Example: dental hygienist

PICBASIC PRO™ Compiler - melabs.com Home Page

PICBASIC PRO CompilerCOPYRIGHT NOTICEC opyright 2008 microEngineering Labs, rights manual describes the use and operation of the PICBASIC PRO Compiler from microEngineering Labs, Inc. Use of the PICBASIC PROC ompiler without first obtaining a license is a violation of law. To obtain alicense, along with the latest version of the product and documentation,contact microEngineering Labs, and redistribution of this manual over the Internet or in anyother medium without prior written consent is expressly forbidden. In allcases this copyright notice must remain intact and Labs, 60039 Colorado Springs CO 80960-0039(719) 520-5323(719) 520-1867 faxemail: Stamp is a trademark of Parallax, , PICBASIC PRO, PICPROTO and EPIC are trademarks ofMicrochip Technology Inc.

PICBASIC PRO Compiler 1 1. Introduction The PICBASIC PRO™ Compiler (or PBP) makes it even quicker and easier for you to program Microchip Technology’s powerful PIC®

Tags:

  Compiler, Picbasic

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of PICBASIC PRO™ Compiler - melabs.com Home Page

1 PICBASIC PRO CompilerCOPYRIGHT NOTICEC opyright 2008 microEngineering Labs, rights manual describes the use and operation of the PICBASIC PRO Compiler from microEngineering Labs, Inc. Use of the PICBASIC PROC ompiler without first obtaining a license is a violation of law. To obtain alicense, along with the latest version of the product and documentation,contact microEngineering Labs, and redistribution of this manual over the Internet or in anyother medium without prior written consent is expressly forbidden. In allcases this copyright notice must remain intact and Labs, 60039 Colorado Springs CO 80960-0039(719) 520-5323(719) 520-1867 faxemail: Stamp is a trademark of Parallax, , PICBASIC PRO, PICPROTO and EPIC are trademarks ofMicrochip Technology Inc.

2 In the and other is a registered trademarks of Microchip Technology Inc. in the other PRO CompilermicroEngineering Labs, PRO CompileriTABLE OF CONTENTS1. Introduction .. The PIC MCUs .. About This Manual .. Sample Programs .. 32. Getting Started .. Software Installation .. Your First Program .. Program That MCU .. It s Alive .. I ve Got Troubles .. PIC MCU Specific Issues .. PICBASIC and BASIC Stamp Compatiblity .. Code Crosses Page Boundary Messages .. Out of Memory Errors .. Coding Style .. Comments .. Pin and Variable Names.

3 Labels .. GOTO .. 153. Command Line Options .. Usage .. Options .. Option -A .. Option -C .. Option -E .. Option -H or -? .. Option -L .. Option -O .. Option -P .. Option -S .. Option -V .. Option -Z .. 204. PICBASIC PRO Basics .. Identifiers .. Line Labels .. Variables .. Aliases .. Arrays .. 25 PICBASIC PRO Symbols .. Constants .. Numeric Constants .. String Constants .. Ports and Other Registers .. Pins .. Comments .. Multi-statement Lines .. Line-extension Character .. INCLUDE.

4 DEFINE .. Math Operators .. Multiplication .. Division .. Shift .. ABS .. COS .. DCD .. DIG .. DIV32 .. MAX and MIN .. NCD .. REV .. SIN .. SQR .. Bitwise Operators .. Comparison Operators .. Logical Operators .. 405. PICBASIC PRO Statement Reference .. ADCIN .. BRANCH .. BRANCHL .. BUTTON .. CALL .. CLEAR .. CLEARWDT .. COUNT .. DATA .. DEBUG .. DEBUGIN .. 58 PICBASIC PRO DISABLE .. DISABLE DEBUG .. DISABLE INTERRUPT .. DTMFOUT .. EEPROM .. ENABLE .. ENABLE DEBUG.

5 ENABLE INTERRUPT .. END .. ERASECODE .. FREQOUT .. GOSUB .. GOTO .. HIGH .. HPWM .. HSERIN .. HSERIN2 .. HSEROUT .. HSEROUT2 .. I2 CREAD .. I2 CWRITE .. INPUT .. LCDIN .. LCDOUT .. {LET} .. LOOKDOWN .. LOOKDOWN2 .. LOOKUP .. LOOKUP2 .. LOW .. NAP .. ON DEBUG .. ON INTERRUPT .. OUTPUT .. OWIN .. OWOUT .. PAUSE .. PAUSEUS .. PEEK .. PEEKCODE .. POKE .. 116 PICBASIC PRO POKECODE .. POT .. PULSIN .. PULSOUT .. PWM .. RANDOM .. RCTIME .. READ.

6 READCODE .. RESUME .. RETURN .. REVERSE .. SELECT CASE .. SERIN .. SERIN2 .. SEROUT .. SEROUT2 .. SHIFTIN .. SHIFTOUT .. SLEEP .. SOUND .. STOP .. SWAP .. TOGGLE .. USBIN .. USBINIT .. USBOUT .. USBSERVICE .. WRITE .. WRITECODE .. XIN .. XOUT .. 1666. Structure of a Compiled Program .. Target Specific Headers .. The Library Files .. PICBASIC PRO Generated Code ..ASM File Structure .. 170 PICBASIC PRO Compilerv7. Other PICBASIC PRO Considerations .. How Fast is Fast Enough? .. Configuration Settings.

7 RAM Usage .. Reserved Words .. Life After 2K .. 12-Bit Core Considerations .. 1768. Assembly Language Programming .. Two Assemblers - No Waiting .. Programming in Assembly Language .. Placement of In-line Assembly .. Another Assembly Issue .. 1829. Interrupts .. Interrupts in General .. Interrupts in BASIC .. Interrupts in Assembler .. 18610. PICBASIC PRO / PICBASIC / Stamp Differences .. Execution Speed .. Digital I/O .. Low Power Instructions .. Missing PC Interface .. No Automatic Variables .. No Nibble Variable Types.

8 No DIRS .. No Automatic Zeroing of Variables .. Math Operators .. [ ] Versus ( ) .. ABS .. DATA, EEPROM, READ and WRITE .. DEBUG .. GOSUB and RETURN .. I2 CREAD and I2 CWRITE .. LOOKDOWN and LOOKUP .. MAX and MIN .. SERIN and SEROUT .. SLEEP .. 198 PICBASIC PRO CompilerviAppendix A .. 199 Serin2/Serout2 Mode Examples .. 199 Appendix B .. 201 Defines .. 201 Appendix C .. 203 Reserved Words .. 203 Appendix D .. 205 ASCII Table .. 205 Appendix E .. 209 Contact Information .. 209 PICBASIC PRO Compiler11. IntroductionThe PICBASIC PRO Compiler (or PBP) makes it even quicker andeasier for you to program Microchip Technology s powerful PIC microcontrollers (MCUs).

9 The English-like BASIC language is mucheasier to read and write than assembly PICBASIC PRO Compiler is BASIC Stamp II like and has most ofthe libraries and functions of both the BASIC Stamp I and II. Being a truecompiler, programs execute much faster and may be longer than theirStamp is not quite as compatible with the BASIC Stamps as our originalPICBASIC Compiler is with the BS1. Decisions were made that wehope improve the language overall. One of these was to add a instead of the (GOTO) of theStamps. These differences are spelled out later in this defaults to create files that run on a PIC16F84 clocked at a minimum of other parts are necessary: 2 22pf capacitors for the4 MHz crystal, a pull-up resistor tied to the /MCLR pin and a suitable5- volt power supply.

10 PIC MCUs other than the 16F84, as well asoscillators of frequencies other than 4 MHz, may be used with thePICBASIC PRO The PIC MCUsThe PICBASIC PRO Compiler produces code that may be programmedinto a wide variety of PIC microcontrollers having from 8 to 100 pins andvarious on-chip features including A/D converters, hardware timers andserial current version of the PICBASIC PRO Compiler supports most of theMicrochip Technology PIC MCUs, including the 12-bit core, 14-bit coreand both 16-bit core series, the PIC17 Cxxx and PIC18 Xxxxx devices, aswell as the Micromint PicStics.


Related search queries