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:
 


 

Home:
  Support home:
General Topics:
    FAQ
    MCU selector guide
    Developer's resources
    Downloads and patches
    Sample programs
Support by Product:
    melabs USB/U2 
Programmer
    melabs Serial 
Programmer
    EPIC™ Plus PICmicro®  
Programmer
    Programming Adapters
    PICBASIC PRO™ 
Compiler
    PICBASIC™ Compiler
    PICPROTO™ Boards
    LAB-X1 Experimenter Board
    LAB-X2 Experimenter Board
    LAB-X3 Experimenter Board
    LAB-X4 Experimenter Board
    LAB-X18 Experimenter Board
    LAB-X20 Experimenter Board
    LAB-XT Experimenter Board
    LAB-XUSB Experimenter 
Board
    melabs Loader
 

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.

 

Copyright 2008
microEngineering Labs, Inc.
Box 60039
Colorado Springs CO 80960
(719) 520-5323
(719) 520-1867 fax
email: support@melabs.com

Last Updated: 01/04/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