Shop OBEX P1 Docs P2 Docs Learn Events
SX/B vs. BS2SX Differences — Parallax Forums

SX/B vs. BS2SX Differences

YendorYendor Posts: 288
edited 2006-08-18 17:29 in General Discussion


I'm a little confused on where the SX28 and SX/B fits in with the BS2SX or if it does at all -·even after reviewiing the Parallax information.·

First of all, can anyone·confirm the following for me?

The BS2SX (.BSX extension) and the SX/B (.SXB extension) are two complely different animals and speak different languages, correct?

The SX/B is not really compatible with any other basic stamp language (BS2, BS2E, BS2SX, BS2P, BS2PE), correct?

And are there any similarities between the two micros (SX28 BS2SX)?

Any links/forums/threads that help with explaining the·coding differences?· I guess the best is to download the BS2SX documentation to intrepret·the commands.

I apologize if this repeats·prior threads.



·

·

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-08-18 16:24
    Hello,

    ·· SX/B is a free compiler for the SX Microcontroller.· The BS2sx is a BASIC Stamp and already has a BASIC Interpreter in its firmware and cannot use SX/B code.· BASIC Stamps are only programmable in PBASIC using the BASIC Stamp Editor.· SX/B is for the SX line of microcontrollers, of which the SX28 just happens to be the core controller used as the interpreter on the BS2sx.· The SX48 is used in the BS2p models of BASIC Stamp.· I hope this helps.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • YendorYendor Posts: 288
    edited 2006-08-18 17:09
    Ah thanks Chris, I see where my confusion is - the micro is the same!

    I meant to compare BS2X vx. the SX28, but I see the relation now.

    So in a since, the SX28 using the SX/B is more efficient & faster than BS2SX using PBASIC, and the same as the SX48 using the SX/B is more efficient and faster than BS2P using PBASIC.

    I'm surprised that the basic code is so different between the SX/B and PBASIC. Can you help me understand why Parallax took a different direction w/ the SX/B if they use the same micro? Power/Efficiency/Speed?

    Thanks!
  • BeanBean Posts: 8,129
    edited 2006-08-18 17:14
    PBASIC is interpreted, SX/B is compiled. Totally different animals.

    Actually SX/B isn't that different from PBASIC. I mean the commands are pretty close. Now the structure of the program is different, but again that is because SX/B is compiled.
    I should add too that SX/B is a one pass compiler. That forces certain things to be declared before there used.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com

    "You're braver than you believe, stronger than you seem, and smarter than you think" Christopher Robin to Pooh
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-08-18 17:29
    And yes...You can expect SX/B code on an SX28 to run faster than similar code on the BS2sx.· Let's not forget that in SX/B (Or even ASM) on the SX chip you also have interrupt capability and other features of the SX Chip itself not available on the BASIC Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.