PBasic on BS2px vs. SX/B on SX48/52
Kevin Wood
Posts: 1,266
I was wondering how PBasic for the BS2px compares feature-wise to SX/B on the SX48/52 chips, say for the protoboard? Without reverting to assembly on the SX, how much of the capacity of the SX chip can be readily accessed with each version of basic in the respective IDEs?
Another question, has there been any brainstorming on a hybrid stamp that would allow you to bypass the PBasic interpreter and program directly in assembly, perhaps with conditional compilation?
Thanks.
Another question, has there been any brainstorming on a hybrid stamp that would allow you to bypass the PBasic interpreter and program directly in assembly, perhaps with conditional compilation?
Thanks.
Comments
·· The commands for the BS2px allow the most control of the SX specific features, however you must bear in mind that the BASIC Stamp's PBASIC is still an interpreted language and cannot include assembly.· The SX/B is not being interpreted...It's straight assembly in the end.· You also get access to the interrupts, even in SX/B, and you can include in-line assembly in the SX/B as well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Chris,
I started wondering after looking at the BS2px datasheet; it seemed that the BS2px gives alot of the features of the SX48, without the need to revert to assembly.
Paul,
Initially I was thinking that the PBasic interpreter was on the external eeprom, and could be bypassed. But given that the interpreter is internal to the SX chip on the stamp, would it be possible to store assembly object code in the eeprom, and have the stamp recognize it as assembly, and run it directly, bypassing the interpreter?
I'm not trying to reinvent the wheel here, it just seemed like a neat idea. As I stated, originally I thought the interpreter was seperate, so I figured why not have two eeproms on the stamp, one for PBasic, the other for assembly, and using the appropriate one based on the code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
·· You are correct to an extent...The px gives you access to many SX features, but some things like the timers and the ISR are unavailable and/or used by the interpreter.· And then there's the sheer speed of running 75 million instructions per second.· On the other hand the BS2px is our fastest BASIC Stamp and I have found it useful in a few places where a BASIC Stamp was preferred but may have been passed over due to being slightly slower.· The BS2px can often take up the slack and increase development time, although I'm sure a colleague of mine (Jon Williams) will say the SX/B is quickly taking up slack in that department too!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax