Shop OBEX P1 Docs P2 Docs Learn Events
Comparision between SX and BS — Parallax Forums

Comparision between SX and BS

Jim McCorisonJim McCorison Posts: 359
edited 2005-01-03 23:57 in General Discussion
I've started learning about microcontrollers and hom to interface them to the world using a BS2 with the WAM and BAAD Stamps in Class programs. I'm moving along pretty good. But the more I learn, and the more I read about the SX chips, I wonder if my project should be done using the instead. And now with the release of SX/B (my assembler is 25 years old, very very rusty, and for a IBM 370) I'm wondering even more.

Before I do up a comparision sheet between the various BS and SX chips, I thought I'd post and see it somebody has already done that.

Thanks,
Jim

Comments

  • BeanBean Posts: 8,129
    edited 2004-12-31 03:37
    The main advantages of the stamps are: EEPROM for data storage, more advanced commands, easy to get data back into a PC

    Main advantages of the SX are: Execution speed, price, true interrupts.

    Be aware that there are different versions of both the Stamp and the SX.

    Bean.
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-12-31 13:14
    SX/B still only has 'BYTE' quantities. It's a HUGE improvement over 'pure' assembly, but the BS2 still has greater/easier programming capabilities.

    I'd only go to the SX/B if you really need the speed and interrupts.

    I don't think anyone has done the comparison sheet between the SX and BS2 yet. Since the SX runs at 50 MIPS, and the BS2 runs at 4 KIPS, it might be a difficult comparison to make.
  • KenMKenM Posts: 657
    edited 2004-12-31 15:39
    And don't forget Beans post mentioning cost.

    A BS2 costs $50

    A SX is less than $5
    allanlane5 said...
    SX/B still only has 'BYTE' quantities. It's a HUGE improvement over 'pure' assembly, but the BS2 still has greater/easier programming capabilities.

    I'd only go to the SX/B if you really need the speed and interrupts.

    I don't think anyone has done the comparison sheet between the SX and BS2 yet. Since the SX runs at 50 MIPS, and the BS2 runs at 4 KIPS, it might be a difficult comparison to make.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-12-31 15:42
    allanlane5 said...
    I don't think anyone has done the comparison sheet between the SX and BS2 yet. Since the SX runs at 50 MIPS, and the BS2 runs at 4 KIPS, it might be a difficult comparison to make.
    Allan,

    ·· In all fairness, 50MIPS VS. 4KIPS isn't really a valid (Apples to Apples) comparison in my eyes.· For each instruction the BS2 executes (At 4 KIPS) the SX would need several instructions to do the same work, since we're comparing high-level instructions against individual machine-code instructions.· Somewhat trivial, I know, but the bottom line is that to do something useful, the SX will require several instructions.· Peace!· cool.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
  • KenMKenM Posts: 657
    edited 2004-12-31 16:05
    Chris,
    Yes the sx requires more instructions to do the same work as a BS2. However, running an SX with a 50 MHz clock, the BS2 cannot come close to achieving the same speed as an SX.
    Example, measuring pulse width with 1 uS resolution can easily be done with the SX, and that cannot be done on a BS2.
    I completely understand your point though. I think part of the comparison comes down to....what is your time worth? Writing a simple program for the SX can easily take 10 times as long as the same on a BS2 (I have not tried using the SXB compiler yet)
    ken
    Chris Savage said...
    allanlane5 said...
    I don't think anyone has done the comparison sheet between the SX and BS2 yet. Since the SX runs at 50 MIPS, and the BS2 runs at 4 KIPS, it might be a difficult comparison to make.
    Allan,

    ·· In all fairness, 50MIPS VS. 4KIPS isn't really a valid (Apples to Apples) comparison in my eyes.· For each instruction the BS2 executes (At 4 KIPS) the SX would need several instructions to do the same work, since we're comparing high-level instructions against individual machine-code instructions.· Somewhat trivial, I know, but the bottom line is that to do something useful, the SX will require several instructions.· Peace!· cool.gif
  • Jim McCorisonJim McCorison Posts: 359
    edited 2004-12-31 17:03
    For my needs, speed isn't an issue. True Interupts make things a little easier, but isn't a requirement. Cost? That is a factor, although I could go with the chip only solution for production. I'm trying to develop an energy monitoring device for cruising boats. An inital run of 10 units would cost $21.25 just for the BS2 stamp chip.

    Although if I knew for sure that I'd get to the point of production I'd go ahead and take advantage of the current web specials on OEM modules at $30/each and buy a bunch. But that's down the road. I've still got some learning to do, make prototype, see what the intended users think of it, yadda, yadda, yadda.

    Jim
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-01 17:32
    If you are planning to do production of your idea,·a happy median for you may be to buy a single basic stamp, do your prototyping on the basic stamp (since the learning curve is more gradual) while trying to only use commands and features which are also available in SX/B. Then when you have your prototype working satisfactorily, port your program to SX/B and the bare SX chip. This enables you to take advantage of each method's strengths.·When you're prototyping you only worry about how to program in BASIC. When your porting only·then do you worry about assembly. And your cost of production would be much less.

    Paul
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-01-01 18:44
    Paul,

    Thanks for the feedback. I'd kind of been thinking about that possibility which is why I was wondering about a comparison.

    There are lots of educational pieces available for the BS, like WAM, BAAD, and others from Parallax, as well as Matt Gilliland's Cookbooks. Not to mention the invaluable forums here. The BS seems like an excellent learning platform. And you're right, once you have a functional prototype, translating it to a similar platform wouldn't be too hard, as long as you didn't build the prototype around a specific feature of the proto platform. I guess I'll keep on the original plan with the BS, but keep an eye on the SX with the thought that is is the final target.

    Cheers, and a Happy New Year to all,
    Jim
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-02 04:48
    You may have already seen this page, but http://www.parallax.com/sx/sxb_commands.asp·shows the commands which SX/B supports. So if you can keep your program constrained to these commands, your porting should be smooth sailing (pun intended). If you find a command you really need that SX/B does not support, remember you can always create it on your own, after all the PBASIC on the stamp is running on the SX (if your using a BS2) so the SX is capable of doing the missing command, its just not implemented in SX/B.

    Paul
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-01-03 00:55
    Paul,

    By "create your own", you mean drop down to assembler. I may end up doing that if necessary.

    At this point I'm still a ways away from even considering moving over to the SX. I still have little pesky things to do, like learn enough to figure out how to a masure a voltage difference of only a few millivolts between two 12vdc lines. That side is the challenging part for me. The software part is the fun side, not that the hardware isn't fun, just a bit of a learning curve.

    Thanks,
    Jim
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-03 23:57
    yes i mean replicating PBASIC functions unavailable in SX/B in assembler, an op amp can magnify the voltage difference of two voltages.·http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/opampvar6.html#c2·can get you started. You'll need a separate supply (ideally -15V and 15V, but you could get away with 0V and·15V if one voltage is always greater than the other (u can create an absolute function to force this situation if you can't gaurentee this condition by placing a diode in the feedback path and you don't care about the sign of the difference).

    Post Edited (Paul Baker) : 1/4/2005 3:48:33 PM GMT
Sign In or Register to comment.