ME Labs, Inc.
719-520-5323
 
Home:
  Developer Resources:

Programming Clues
    Sample Programs
   
    PICBASIC PRO™
Compiler Manual
    PICBASIC™ Compiler
Manual
    Serin2/Serout2 Modes
    ASCII Character Set
    Number Conversion
    Floating Point
Routines
    PBP Debug Monitor
    Articles and Tutorials

Hardware Clues
    Parts / Vendor List
    PICPROTO™ Boards
    LAB-X1 Docs
    LAB-X2 Docs
    LAB-X20 Docs
    LAB-X3 Docs
    LAB-X4 Docs
    LAB-XUSB Docs
    LAB-XT Docs
     
 

Converting programs from PICBASIC™/BS1 to PICBASIC PRO™

Upgrading your PICBASIC™ Compiler to PICBASIC PRO™ Compiler gives you much more capability.  PICBASIC PRO will not, however, compile existing code for the standard compiler as is.  You must make a few changes to compile your existing code with the PICBASIC PRO Compiler.  The following steps will make your existing code compatible with PICBASIC PRO versions 2.40 and later.

1. Add the following line to the top of the program to define the PBC/BS1 variables for PICBASIC PRO:

    include "bs1defs.bas"

2. Comment out any SYMBOL statements that define the internal register names.  These are pre-defined in PICBASIC PRO.  DO NOT remove SYMBOL statements that define constants, bit names, or other aliases.  Only the internal register names will cause errors.

If you're not sure which symbol statements to remove, you can attempt a compile, then trace the line numbers given in each error message.  If the error is caused by a SYMBOL statement, comment it out.

3. If used, change I2CIN to I2CREAD, and I2COUT to I2CWRITE.  The syntax is different for these commands, so check the PICBASIC PRO manual when updating.

4. SERIN commands will need to updated.  Refer to the PICBASIC PRO manual for the new SERIN syntax.

5.  MAX and MIN work in reverse in PBP.  Change all MAX to MIN, MIN to MAX.

6. In each occurrence of the following commands, change parenthesis to square brackets - () to []. 

BRANCH
EEPROM
LOOKDOWN
LOOKUP
SEROUT
SOUND

That should do it.  If you missed anything, you will receive errors when you compile, telling you the line number that needs updating.