logo image - link to home page

Products | Support | Resources | PurchaseContact  | Basket  | Checkout

  Home
  What's New
  Products
  Distributors
  Purchasing Info
  Developer Resources
  Support
  Upgrades
  Site Index
  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 2008
microEngineering Labs, Inc.
Box 60039
Colorado Springs CO 80960
(719) 520-5323
(719) 520-1867 fax
email: support@melabs.com

Last Updated: 08/07/2008

Home | What's New | Products | Support
Resources
| Purchase | Index 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.

Microchip third-party partner  Microchip Consultant Program Member