ME Labs, Inc. 719-520-5323 |
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.
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 [].
That should do it. If you missed anything, you will receive errors when you compile, telling you the line number that needs updating. |
Copyright 2022 ME Labs, Inc. PO Box 8250 Asheville NC 28814 (719) 520-5323 (719) 520-1867 fax email: support@melabs.com |
|