Shop OBEX P1 Docs P2 Docs Learn Events
BS2 vs SX? — Parallax Forums

BS2 vs SX?

willy1067willy1067 Posts: 107
edited 2008-11-08 02:28 in General Discussion
I am very new at parallax, so please forgive my ignorance.· I purchase the BS2 Homework board few months ago, and learning to program it and use it.

I needed more I/0 for my current project and was adviced to use the SX chip added to my BS2.

Now as far as I can see, the SX is faster and even do it has less I/O; still·cheaper.

Why should I use the BS2 instead of few SX chips?

What are the major difference between the two microcontroller beside the ones I already mentioned?

again, please forgive my ignorance, just looking to learn. and in the process contribute to this great forum.

Complete project:
Stepper motor driver
http://forums.parallax.com/showthread.php?p=641371

Current projects:
I/O board
http://forums.parallax.com/showthread.php?p=641605
Robotic hand
http://forums.parallax.com/showthread.php?p=637017
·

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Fernando Gomez

revinc.us
gomez-rivera.com

Never compare yourself with anyone else, there will always be someone bigger·or·smaller·than you.

Post Edited (willy1067) : 4/25/2007 4:01:48 AM GMT

Comments

  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-04-19 10:48
    The Basic Stamp II (BS2) PBASIC is a bit easier to set up and learn than using SX/B (SX Basic).·Some times·I will develop something on a BS2 and then·port It over to the SX28 or SX48 or SX52. You may want to consider getting a Professional Development Board which supports both BS2 and SX28 micro-controllers. It has been great for me!

    The Basic Stamp II cost most per chip being $50 to $80 depending on model and it is great for simply projects that you want to get developed faster. However, the SX chips need either an SX-Blitz or SX-KEY (~$30-$50) ONE TIME PURCHASE to program the SX chips BUT the chips are less than $3 each. The SX chips also allows for programming in either SX/B or Assembly language but the BS2 programs only in PBASIC. It is made for easier development. Each has pros and cons. Once you get better at SX/B then the choice is obvious but for the absolute begineer I would recommend·starting with the·BS2 or better yet BS2px (3 times faster I beleive than a BS2 - and more EEPROM space). The BS2 also has less variable space to work with. The SX48 and SX52 is·best supported by their SX48 and SX52·$10 protoboards - but·you will still need to by either a 1 time purchase SX-Blitz (no debuging but cheaper) or SX-KEY (adds nice debuging features) to program them. The SX48 and SX52 has much more·variable space, RAM and most importantly I/O lines than the SX28 and BS2. The SX28 like the BS2·are DIP based so they can be used on solderless breadboards as well.

    Bottom line is that the BS2 is most expensive overall but somewhat easier to pick up and learn. SX/B is not hard to learn either.

    I hope this answers·your concerns and paints a better picture of the differences. I·use all of them.

    ·
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-04-19 12:28
    The BS2 is like coffee, the SX is like Espresso - it takes a bit more effort to acquire a taste for it... but it really gets you going.

    Oddly enough, the SXes are a better value for you $$$$.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • ProfessorwizProfessorwiz Posts: 153
    edited 2007-04-19 13:43
    I just purchased the SX kit, after taking a class in the Basic Stamp. I was somewhat suprised that Parallax didn't have the SX-B closer to the Pbasic. I am going to port over a couple of my assignments but it looks like it'll be harder than I thought. Any suggestions on what to watch for?

    Russ
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-04-19 14:06
    Willy1067,

    You may want to download the SX-Key software 3.2.3 and go to the HELP file which will list all of the SX/B commands and examples of how they are used.

    http://www.parallax.com/sx/downloads.asp

    You can do the same for the BS2:

    http://www.parallax.com/html_pages/downloads/software/software_basic_stamp.asp



    You will see that many of the commands are closely identical in name and functionality. I started on the BS2 but found many limitations which caused me to move upwards to the SX28 and a professional development board (PDB). I do not regret this move at all. SX/B is wonderfull and BEAN has been doing some serious updating and improvements every day on making it better. SX/B and an SX chip far superceeds the capability of a BS2.

    It's your own personal choice. Read through both sets of HELP files on the commands and examples and make the decision for yourself.
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-04-19 19:17
    SX/B was specifically designed as a bridge between BASIC and Assembly, it was never intended to be a PBASIC clone. There are PBASIC clone compilers out there (for PICs in particular) -- but you'll pay for them. SX/B doesn't cost you a dime, and it gives you a way to learn assembly by looking at the output created by the compiler (your BASIC source is included). Sure, you can look at the output of those other compilers, but their architecture will make the list files -- NOT designed for teaching -- will be darned difficult to make heads or tails of, especially if you don't have a serious background in Assembly.

    I've been adding a lot more Assembly to my SX/B projects and I'm more confident doing it having seen how the compiler handles certain operations.

    Professorwiz said...
    I just purchased the SX kit, after taking a class in the Basic Stamp. I was somewhat surprised that Parallax didn't have the SX-B closer to the Pbasic. I am going to port over a couple of my assignments but it looks like it'll be harder than I thought. Any suggestions on what to watch for?

    Russ
  • HenrymouHenrymou Posts: 128
    edited 2007-04-20 05:55
    Yeah, I like the SX, I am just starting, like tonight and I already see it's potential after reading the Applications section The IDE language looks hard though, so many symbols and parenthesis, I wish it could be simpler like PBasic. yeah.gif
  • ProfessorwizProfessorwiz Posts: 153
    edited 2007-04-20 10:47
    JohnnyMac,
    I gave up learning assembler after the C64. I think with the need for fast prototyping that the Basic is the way to go. Will I eventually learn it, yeah. Did you check out the article in the lastest issue of Nuts & Volts? The author who compared speeds of different compilers seems to be in the same boat I'm in. Assembly is neat, but for most everything Basic will do it quicker (as in development time).
  • Shawn LoweShawn Lowe Posts: 635
    edited 2007-04-20 12:29
    I got the SX kit just to expand my horizons. As I am working towards a degree in EET, I realized that I needed to get my feet wet, and with SX/B, the learning curve is a lot less steep! [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Shawn Lowe


    My last words shall be - "NOT YET!!!"
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-04-20 14:44
    There's no denying that Basic will be the quicker development path but experienced programmers will tell you that hand-crafted Assembly will always provide the best execution speed. I have applications now where I need the extra speed that hand-written Assembly provides and am including Assembly sections in my SX/B programs. For me the beauty of SX/B is three-fold: 1) I can write programs quickly in Basic, 2) I can use the compiler output to learn Assembly techniques, and 3) I can integrate Assembly, when needed (like in a DMX lamp dimmer project I'm working on right now), very easily.
  • HenrymouHenrymou Posts: 128
    edited 2007-05-01 00:22
    HAhahah yeah, the funny thing is the SX is about 3x as challedgeing as a BS@, while a BS@ is 25x more expensive than an SX
    rip off if u ask me, I like da SX chips, and I can program them in SX/B, way more easier than assembly smilewinkgrin.gif
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-05-01 00:56
    Your evaluation is apples and oranges, Henry. The BS2 module is a single-board-computer, complete with power supply, power management (brown-out protection), program memory (EEPROM) and an application (PBASIC runtime engine) -- the SX chip is just that, a raw piece of silicon, you get to add in all the rest. Of course, experienced technicians and engineers will have no trouble with a raw chip like the SX, but that's not the case all around. Parallax started an entire marketplace with the BASIC Stamp module that still thrives today, and the proof is in the number of wannabe competitors.

    The SX and SX/B shows Parallax's commitment to the advanced hobbyist and professional. That said, they've always made their OEM components available at reasonable cost fro production; I know because I used them into a product I designed about eight years ago.
  • beatsbeats Posts: 17
    edited 2008-11-02 02:49
    I didn't want to open up a new thread for such a dumb questionrolleyes.gif so I am going to post it in here instead:

    I am trying to understand some SX code but I am stuck with some commands that I do not understand and I tried searching for their definitions without downloading the compiler, but had no luck.

    the commands are:

    -WATCH

    -SUB
    and the intergers that might follow it, e.g. SUB 2,3

    -FUNC
    and the intergers that might follow it, e.g. FUNC 2,0


    If it is possibe for someone to translate their meanings into their equivalent PBasic (BS2) counterparts then I might have a better chance of understanding their usage.
    Thanks!

    Post Edited (logical) : 11/2/2008 3:01:40 AM GMT
  • BeanBean Posts: 8,129
    edited 2008-11-02 14:16
    The BS2 does not have any such commands.

    WATCH is kinda like DEBUG in that it allows you to see the value in variables.

    The parameters after SUB are the min and max bytes passed to the subroutine.

    The parameters after FUNC is return bytes, min and max bytes passed to the function.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    "The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
    www.iElectronicDesigns.com

    ·
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2008-11-02 14:43
    Take a look at the online SX/B guide: http://forums.parallax.com/attachment.php?attachmentid=47155

    WATCH is on page 21
    SUB is on page 14
    FUNC is on page 16

    Look at this post too for SUB and FUNC: http://forums.parallax.com/showthread.php?p=657104







    ·
  • beatsbeats Posts: 17
    edited 2008-11-03 01:39
    thanks guys!
  • beatsbeats Posts: 17
    edited 2008-11-07 19:21
    so, would these be equivalent commands from SX/B to PBasic?


    SoundAddr      VAR      Word 
     
     
    WATCH   SoundAddr 
    

    ·····
    SoundAddr      VAR      Word 
     
      
    DEBUG SoundAddr 
     
    
  • JonnyMacJonnyMac Posts: 9,214
    edited 2008-11-07 19:28
    Yes, though you DEBUG command is not fully formatted -- if you don't specify a numeric output type the DEBUG terminal will attempt to display the value as a character. You WATCH command has options as well (bits and output format). Be careful trying to go back and forth between SX/B and PBASIC too much; learn to use each language as it's intended so you get the best out of it.
  • beatsbeats Posts: 17
    edited 2008-11-07 19:57
    ok thanks

    ...although·without specifying their numeric output types, would their defualts both be to display these variables as characters (ASCII)?
  • BeanBean Posts: 8,129
    edited 2008-11-07 21:11
    Only arrays will default to ASCII. BYTE and WORD varaiables will debug as decimal as you would expect.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    "The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
    www.iElectronicDesigns.com

    ·
  • JonnyMacJonnyMac Posts: 9,214
    edited 2008-11-08 02:28
    I should have been more clear: in the BASIC Stamp editor DEBUG values default to characters; in the SX WATCH values (when used without modifiers) default to decimal.
Sign In or Register to comment.