PICBasic Pro

 

The PicBasic Pro Compiler is the easiest way for you to program the fast and powerful Microchip Technology PICmicro microcontrollers. PicBasic Pro converts your BASIC programs into files that can be programmed directly into a PICmicro MCU.

The PicBasic Pro Compiler features: BASIC Stamp II commands, direct and library routine access to pins on PORTA, C, D, E, as well as PORTB, arrays, real IF..THEN..ELSE and interrupt processing in BASIC.The PicBasic Pro Compiler gives you direct access to all of the PICmicro MCU registers - I/O ports, A/D converters, hardware serial ports, etc. - easily and in BASIC. It automatically takes care of the page boundaries and RAM banks. It even includes built-in commands to control intelligent LCD modules.

The PicBasic Pro Compiler instruction set is upward compatible with the BASIC Stamp II and Pro uses BS2 syntax. Programs can be compiled and programmed directly into a PICmicro MCU, eliminating the need for a BASIC Stamp module. These programs execute much faster and may be longer than their Stamp equivalents. They may also be protected so no one can copy your code.

The PicBasic Pro Compiler is a DOS command line application (it also works in Windows) and runs on PC compatibles. It can create programs for any of Microchip's PICmicro microcontrollers and works with most PICmicro MCU programmers. A printed manual and sample programs are included to get you started. Spanish manual available!

The PicBasic Pro Compiler can also be used inside Microchip's MPLAB IDE. This allows programs to be edited and simulated within Windows.

Version 2.40 of the PicBasic Pro Compiler adds limited support for the 12-bit core  microcontrollers, new commands and BASIC source-level debugging.

  • True compiler provides faster program execution and longer programs than BASIC interpreters
  • Direct and library routine access to any pin or register
  • Automatic page boundary handling past 2K
  • Bit, byte and word arrays
  • Real If..Then..Else..Endif
  • Hierarchal expression handling
  • Interrupts in BASIC and assembler
  • BASIC Stamp I and II library
  • Built-in LCD support
  • Oscillator support from 3.58MHz to 40MHz
  • I2C instructions to access more external devices including serial EEPROMs
  • In-line assembler and Call support
  • MPLAB / MPASM / ICE compatibility
  • Use in DOS or Windows
  • Supports all Microchip PICmicro microcontrollers
  • Compatible with most PICmicro MCU programmers (see EPIC Programmer)

If you want maximum compatibility with the BASIC Stamp I, or you would like to save a little money, or you just don't need all the extra features in PicBasic Pro, please take a look at the standard PicBasic Compiler.

PicBasic Pro 2.40 Instruction Set:

  • @ Insert one line of assembly language code.
  • ADCIN Read on-chip analog to digital converter.
  • ASM..ENDASM Insert assembly language code section.
  • BRANCH Computed GOTO (equiv. to ON..GOTO).
  • BRANCHL BRANCH out of page (long BRANCH).
  • BUTTON Debounce and auto-repeat input on specified pin.
  • CALL Call assembly language subroutine.
  • CLEAR Zero all variables.
  • CLEARWDT Clear (tickle) Watchdog Timer.
  • COUNT Count number of pulses on a pin.
  • DATA Define initial contents of on-chip EEPROM.
  • DEBUG Asynchronous serial output to fixed pin and baud.
  • DEBUGIN Asynchronous serial input from fixed pin and baud.
  • DISABLE Disable ON DEBUG and ON INTERRUPT processing.
  • DISABLE DEBUG Disable ON DEBUG processing.
  • DISABLE INTERRUPT Disable ON INTERRUPT processing.
  • DTMFOUT Produce touch-tones on a pin.
  • EEPROM Define initial contents of on-chip EEPROM.
  • ENABLE Enable ON DEBUG and ON INTERRUPT processing.
  • ENABLE DEBUG Enable ON DEBUG processing.
  • ENABLE INTERRUPT Enable ON INTERRUPT processing.
  • END Stop execution and enter low power mode.
  • FOR..NEXT Repeatedly execute statements.
  • FREQOUT Produce up to 2 frequencies on a pin.
  • GOSUB Call BASIC subroutine at specified label.
  • GOTO Continue execution at specified label.
  • HIGH Make pin output high.
  • HPWM Output hardware pulse width modulated pulse train.
  • HSERIN Hardware asynchronous serial input.
  • HSEROUT Hardware asynchronous serial output.
  • I2CREAD Read from I2C device.
  • I2CWRITE Write to I2C device.
  • IF..THEN..ELSE..ENDIF Conditionally execute statements.
  • INPUT Make pin an input.
  • LCDIN Read from LCD RAM.
  • LCDOUT Display characters on LCD.
  • {LET} Assign result of an expression to a variable.
  • LOOKDOWN Search constant table for value.
  • LOOKDOWN2 Search constant / variable table for value.
  • LOOKUP Fetch constant value from table.
  • LOOKUP2 Fetch constant / variable value from table.
  • LOW Make pin output low.
  • NAP Power down processor for short period of time.
  • ON DEBUG Execute BASIC debug monitor.
  • ON INTERRUPT Execute BASIC subroutine on an interrupt.
  • OWIN One-wire input.
  • OWOUT One-wire output.
  • OUTPUT Make pin an output.
  • PAUSE Delay (1mSec resolution).
  • PAUSEUS Delay (1uSec resolution).
  • PEEK Read byte from register.
  • POKE Write byte to register.
  • POT Read potentiometer on specified pin.
  • PULSIN Measure pulse width on a pin.
  • PULSOUT Generate pulse to a pin.
  • PWM Output pulse width modulated pulse train to pin.
  • RANDOM Generate pseudo-random number.
  • RCTIME Measure pulse width on a pin.
  • READ Read byte from on-chip EEPROM.
  • READCODE Read word from code memory.
  • RESUME Continue execution after interrupt handling.
  • RETURN Continue at statement following last GOSUB.
  • REVERSE Make output pin an input or an input pin an output.
  • SELECT CASE Compare a variable with different values.
  • SERIN Asynchronous serial input (BS1 style).
  • SERIN2 Asynchronous serial input (BS2 style).
  • SEROUT Asynchronous serial output (BS1 style).
  • SEROUT2 Asynchronous serial output (BS2 style).
  • SHIFTIN Synchronous serial input.
  • SHIFTOUT Synchronous serial output.
  • SLEEP Power down processor for a period of time.
  • SOUND Generate tone or white-noise on specified pin.
  • STOP Stop program execution.
  • SWAP Exchange the values of two variables.
  • TOGGLE Make pin output and toggle state.
  • USBIN USB input.
  • USBINIT Initialize USB.
  • USBOUT USB output.
  • WHILE..WEND Execute statements while condition is true.
  • WRITE Write byte to on-chip EEPROM.
  • WRITECODE Write word to code memory.
  • XIN X-10 input.
  • XOUT X-10 output.

Functions / Operators:

All math operations are unsigned and performed with 16-bit precision.

The operators supported are:

Math Operators

Description

+

Addition

-

Subtraction

*

Multiplication

**

Top 16 Bits of Multiplication

*/

Middle 16 Bits of Multiplication

/

Division

//

Remainder (Modulus)

<<

Shift Left

>>

Shift Right

ABS

Absolute Value*

COS

Cosine

DCD

2n Decode

DIG

Digit

DIV32

31-bit x 15-bit Divide

MAX

Maximum*

MIN

Minimum*

NCD

Encode

REV

Reverse Bits

SIN

Sine

SQR

Square Root

&

Bitwise AND

|

Bitwise OR

^

Bitwise Exclusive OR

~

Bitwise NOT

&/

Bitwise NOT AND

|/

Bitwise NOT OR

^/

Bitwise NOT Exclusive OR

*Implementation differs from BASIC Stamp.

Code: PicBasicPro   price: $250

Microcontrollers Menu

SCM International, Inc.

  English assistance by e-mail
  Asistencia en espaņol por e-mail

Mailing Address:
SCM International, Inc.
2648 E. Workman Ave. suite 527
West Covina, CA 91791 
USA

Fax: +1 (530)3256895

Corporate Headquarters POBOX:
SCM International, Inc.
POBOX 9793

Reno, NV . 89507
USA

SCMStore.com, license and Conditions of use

SCM International, Inc. license the user to use this application by the term of a session, only under the following terms and conditions:

(c) 2008, SCM International, Inc. All right reserved.