From BS2 to PIC
Can anyone direct me to / recomend·an article covering moving the assembly code form BS2 to standalone PIC processor?
I am going to Google for such thing· but would like to get some opinions also.
Thanks
·
I am going to Google for such thing· but would like to get some opinions also.
Thanks
·

Comments
nice but somewhat backwards.
I already have a debuged code written in Parallax BASIC and " burned into" BS2 PIC in an assembly. All of these tools ( I checked others ) require to rewrite the code either in their BASIC version or an assembly.
I just want to "burn" my code into another PIC.
It should not be that complicated. I'll do some more research
Just to expand on what Mike said, there is NO assembly or machine language for PBASIC, the language used for the Parallax Stamp. The only thing which is executable is a set of tokens, and those tolens (representitive of your program) are INTERPRETED and run by the PBASIC run time engine.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
I guess my PBASIC needs to be rewritten in PIC BASIC using other development tools.
I'll keep googling and searching!
Maybe the OEM is the way to go - or buy another BS2 on e-bay!
Note that SX/B Basic is NOT the same as PBasic, although there are similarities. It is compiled vs. interpreted, and like the other Parallax developed tools, it is freely downloadable.
So if it is compiled do they refer to 4000 lines of assembly code or PBASIC in their documentation?
I am not trying to split hair but in my case I really need full 2K of PBASIC tokens to make one of my applications (DDS ocillator with LCD display) work.
Thanks for your help
If that's your only problem, switch to the BS-2SX or any of the larger Stamps which have 8 x 2K of programming space. You then just need to know how to structure your program to use this banked memory, as it's not contiguous.
Regards,
Bruce Bates
Post Edited (Bruce Bates) : 9/10/2006 11:42:25 AM GMT
If you look at the comparison sheet that Parallax has on their site for the Stamp modules, you'll notice that they are built using 4 different microcontrollers:
1. Microchip PIC16C56a - used on the Rev. Dx / BS1-IC
2. Microchip PIC16C57c - used on the BS2-IC
3. Ubicom SX28AC - used on the BS2e-IC and BS2sx-IC
4. Ubicom SX48AC - used on the BS2p24-IC, BS2p40-IC, BS2pe-IC, BS2px-IC, and Javelin Stamp
On all of these stamp modules, the microcontroller itself is pre-loaded with a language interpreter. The Basic Stamps have the PBasic interpreter, the Javelin Stamp has a Java virtual machine. These pre-loaded chips are configured in such a way that you can't reprogram them, so although identical to their unprogrammed counterparts, they are specialized units.
If you wanted to use a PBasic interpreter chip in your own hardware design, you can purchase them pre-programmed from Parallax. As mentioned, that's all it will/can ever be. If however, you wanted to use a raw, unprogrammed, reprogrammable PIC16C56a, PIC16C57c, SX28AC, or SX48AC in your design, you would purchase them from a supplier of your choice.
Since your original question pertained to porting from PBasic to a PIC chip, such as perhaps a PIC16C57c, I suggested the Parallax SX microcontroller, which you may have confused with the BS2sx Stamp Module.
The BS2sx Stamp Module can only be programmed in PBasic. In the comparison document, the 8x2k ~4000 inst. means that the module has 8 memory banks of 2k that can hold a total of ~4000 PBasic instructions. The original BS2 has 1 bank of 2k for ~500 instructions. So if you are using the original BS2, want to continue using PBasic, and need more program space, you can use any of the following: BS2e, BS2sx, BS2p24, BS2p40, BS2pe, BS2px.
If you want or need more performance than PBasic can provide, and are considering moving to a Microchip PIC, then you should also take a look at the Parallax SX microcontrollers, which are very similar to some Microchip PICs. It's this line of products that can be programmed in assembly, as well as compiled Basic. These are the same as the Ubicom chips mentioned above; Parallax took over the product line.
Here is the link to the SX line of products: www.parallax.com/sx/index.asp
Here is the link to the SX/B compiler: www.parallax.com/sx/sxb.asp