|
|
| Author |
Message |
Chris P
Joined: 02 Jan 2006
Posts: 2
|
|
Posted: 02 January 2006, 9:23 AM Post subject: Converting BX-24 code? |
|
|
Excuse the dumb questions, but I am a novice. I built a project about 5 years ago and used a BX-24 along with a 120 x 32 graphic LCDfrom Parallax, and a Vector 2X compass module, plus a temp and light sensor. I sort of finished the project back then and hadn't done much with it since.
I want to start again with the project and was wondering how difficult it will be to rewrite the code so I can unplug the BX-24 and plug in a ZX-24 instead? I don't particularly want to change the hardware at this time.
Here is a pic of the project
Any advice you can give me will be appreciated. |
|
| Back to top |
|
 |
mikep
Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX
|
|
Posted: 02 January 2006, 16:30 PM Post subject: |
|
|
| If you have all of the source code, then the conversion process is very easy as ZBasic is backwards compatible with BasicX. The most significant concern is that the clock speed is 2x that of BasicX so you may need to take this into account for library functions such as InputCapture and OutputCapture. Section 4.1 of the reference guide has more information on this. Start on this manual page: http://www.zbasic.net/doc/ZBasicRef/ZBasicRef74.html |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 02 January 2006, 16:34 PM Post subject: |
|
|
If you have the BasicX source code you should be able to just re-compile it using the ZBasic compiler. You can, but do not need to, use BasicX compatibility mode. It should compile either way.
There are some cases, mostly related to timing, where you may need to make some adjustments. This is because the ZX processors are running twice as fast as the BX processors. |
|
| Back to top |
|
 |
Chris P
Joined: 02 Jan 2006
Posts: 2
|
|
Posted: 02 January 2006, 21:12 PM Post subject: |
|
|
Thanks. I guess I should have read the manual first, it's all there.  |
|
| Back to top |
|
 |
|