microEngineering Labs, Inc.
      719-520-5323

              

  Home
  Products
  Distributors
  Purchasing Info
  Developer Resources
  Support
  Upgrades
  Contact Us
  Pb-Free Info (RoHS)
 

 

keyword search:
 

 

PICBASIC™ Compiler Instruction Set

  • ASM..ENDASM - Insert assembly language code section.*
  • BRANCH - Computed GOTO (equivalent to ON..GOTO).
  • BUTTON - Debounce and auto-repeat input on specified pin.
  • CALL - Call assembly language subroutine.*
  • EEPROM - Define initial contents of on-chip EEPROM.
  • END - Stop execution and enter low power mode.
  • FOR..NEXT - Repeatedly execute statement(s).
  • GOSUB - Call BASIC subroutine at specified label.
  • GOTO - Continue execution at specified label.
  • HIGH - Make pin output high.
  • I2CIN - Read bytes from I2C device.*
  • I2COUT - Send bytes to I2C device.*
  • IF..THEN - GOTO if specified condition is true.
  • INPUT - Make pin an input.
  • [LET] - Assign result of an expression to a variable.
  • LOOKDOWN - Search table for value.
  • LOOKUP - Fetch value from table.
  • LOW - Make pin output low.
  • NAP - Power down processor for short period of time.
  • OUTPUT - Make pin an output.
  • PAUSE - Delay (1mSec resolution).
  • PEEK - Read byte from register.*
  • POKE - Write byte to register.*
  • POT - Read potentiometer on specified pin.
  • PULSIN - Measure pulse width (10us resolution).
  • PULSOUT - Generate pulse (10us resolution).
  • PWM - Output pulse width modulated pulse train to pin.
  • RANDOM - Generate pseudo-random number.
  • READ - Read byte from on-chip EEPROM.
  • RETURN - Continue execution at statement following last executed GOSUB.
  • REVERSE - Make output pin an input or an input pin an output.
  • SERIN - Asynchronous serial input (8N1).
  • SEROUT - Asynchronous serial output (8N1).
  • SLEEP - Power down processor for a periond of time (1 Sec resolution).
  • SOUND - Generate tone or white-noise on specified pin.
  • TOGGLE - Make pin output and toggle state.
  • WRITE - Write byte to on-chip EEPROM.

*PICBASIC language extension not found on BS1.

Operators:

All math operations are unsigned and performed with 16-bit precision. The operators supported are:

+

Addition

-

Subtraction

*

Multiplication

**

MSB of Multiplication

/

Division

//

Remainder

MIN

Minimum

MAX

Maximum

&

Bitwise AND

|

Bitwise OR

^

Bitwise XOR

&/

Bitwise AND NOT

|/

Bitwise OR NOT

^/

Bitwise XOR NOT

 

Copyright 2010
microEngineering Labs, Inc.
2845 Ore Mill Road, STE 4
Colorado Springs CO 80904
(719) 520-5323
(719) 520-1867 fax
email: support@melabs.com

Last Updated: 01/22/2010

Home | Products | Support | Resources | Purchase | Contact

PIC, PICmicro, dsPIC, and MPLAB are registered trademarks of Microchip Technology Inc. in the USA and other countries.  PICBASIC, PICBASIC PRO, PICPROTO, and EPIC are trademarks of Microchip Technology Inc. in the USA and other countries.   BASIC Stamp is a trademark of Parallax, Inc.