Program BS2 in C
Martin_vL
Posts: 18
Hello,
·
I have a Basic Stamp 2 with the Board of Education. Now is my question if it is possible to program my Basic Stamp·in·C?
·
I think it is possible because there is a PIC uC on the BS2. But how can I program it?
Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
I have a Basic Stamp 2 with the Board of Education. Now is my question if it is possible to program my Basic Stamp·in·C?
·
I think it is possible because there is a PIC uC on the BS2. But how can I program it?
Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Comments
The compiler takes your Parallax Basic program and converts it into a series of byte codes which are downloaded to an EEPROM on the Stamp. There's an interpreter pre-programmed into the PIC that reads this compiled program from the EEPROM and executes the byte codes.
There are no provisions for re-programming the PIC. It can be done at Parallax, but not by the end-user. Part of what you're paying for when you buy the Stamp is the Basic interpreter.
Post Edited (Mike Green) : 10/3/2007 4:19:04 PM GMT
In theory, it would be possible to write a "not-quite-C" compiler (as has been done for the original Mindstorms package) which would output PBasic 'tokens'.
In practice, this would be so tedious that it's simpler to use the Parallax IDE and PBasic directly.
And yes, the BS2 PIC is a 16C57, so you CAN'T re-program the eeprom in it, and the in-PIC eeprom holds the Parallax PBasic run-time engine, so you don't really WANT to re-program that. Note that the BS2 holds its tokens in an on-module, but off-PIC, eeprom on the BS2 module.
Maybe you should look at the Arduino. It works similar to the Stamp but uses a C-LIKE language.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There's nothing like a new idea and a warm soldering iron.