Shop OBEX P1 Docs P2 Docs Learn Events
difference between basic satmp and sx\b — Parallax Forums

difference between basic satmp and sx\b

ErikErik Posts: 31
edited 2008-07-29 04:47 in General Discussion
Hello,

I read a lot the last days about the sx processor and programming it in basic.
so everything till now is clear but I like to know how I must see the speed diference when the program is runnening between a bs2sx and a sx in basic.
I 'm search to find it but I can't find anything.

so can someone tell me where i can find it or what the diference is.

I'm ussing now the bs2sx but like to have more I/O's and speed.

best regards Erik

·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-28 20:16
    The BS2sx is an SX processor with a proprietary Basic interpreter pre-programmed into the SX's flash memory. The SX module also includes a voltage regulator, EEPROM for holding the interpretive program, and some interface logic for programming the EEPROM. The interpreter executes about 4000 interpretive instructions a second.

    Using SX/B with an SX processor is much faster and makes available more than the normal 16 I/O pins of a BS2sx. The SX can execute as much as 50 million instructions a second although the instructions don't usually do as much as the BS2sx interpretive instructions. SX/B is a compiler for a version of Basic that's deliberately very similar to the Basic used by the Stamps. It's not identical and there's a lot you would have to learn about using SX/B that's different from the BS2sx Basic, but there are some excellent texts and magazine columns available for downloading from Parallax to help you with that.
  • ErikErik Posts: 31
    edited 2008-07-28 20:42
    Hello Mike,

    Thanks for your answer.but·I was looking for me info about the sx using it with sx/b.I read the sevarel colums for jon and his manual·but there isn't much about what will be the major reason to go using the sx with basic.

    so do you know where I canfind more info or must we us the sx manuals and work with that or is it different when you ussing the basic languea
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-28 21:05
    The last few Nuts and Volts Columns have been about using the SX with SX/B (www.parallax.com/Resources/NutsVoltsColumns/tabid/272/Default.aspx). There are also some book downloads (www.parallax.com/Default.aspx?tabid=403) on the subject.
  • ErikErik Posts: 31
    edited 2008-07-28 21:50
    Hello Mike,
    Thanks for your time.
    I·will look to the·coloms again, I·saw that hittconsulting make the compiler they talk about the speed of thesxwith basic

    thanks best regards Erik
    ·
  • JonnyMacJonnyMac Posts: 9,216
    edited 2008-07-28 22:08
    My columns for the last year and-a-half have been devoted to the SX and SX/B -- it needed the attention that the BASIC Stamp has been getting for 14+ years. SX/B is easy to learn, but really does require one to understand the SX a little bit to get the most out of it. Many of my programs today are a mix of SX/B (BASIC) and Assembly as there have been lots of good assembly modules available for the SX since it was introduced. This is one of the beauties of SX/B: you can mix high- and low-level code in the same program, and do advanced things like creating "virtual peripherals" to handle background operations while the foreground is doing something. I spend a lot of time using VP UARTS and servo drivers as animatronics is a big part of what I'm involved with at EFX-TEK.

    BTW, I'm not the only one writing about SX/B. Robert Doerr, a forum regular, has written some really great articles for Servo having to do with a robotics project in which he uses SX chips. I've found bits of his code very useful in my own projects.

    In the end, and while not perfect, the SX/B help file is your best source of information for SX/B. It goes into good detail on all the instructions and has several example programs that will get you up to speed. To be candid, you'll probably never be spoon-fed SX/B like Parallax did with PBASIC, but you can learn it with a little bit of effort -- and you'll have a really good time, I promise. If it wasn't for SX/B I probably wouldn't be using the SX as much as I do.
  • ErikErik Posts: 31
    edited 2008-07-28 22:38
    Hello John,

    thanks for your answer so we go further with the sx.I was trying to get an better idea if the sx is a good processor·to invest more time. I like the stamp and·other idea's from parallax , so we go test some programs that we use on the stamp and make them ready for the sx.

    best regards Erik·
  • JonnyMacJonnyMac Posts: 9,216
    edited 2008-07-28 22:58
    If you're looking for more horsepower than the Stamp can offer the SX is the next logical step (my opinion). That are many of us that will happily answer your questions and guide you through the transition. The SX is really fun, and seriously worth a bit of effort to learn it.
  • ErikErik Posts: 31
    edited 2008-07-29 00:36
    Hello Jon,

    That there are people to help me with my problems and that the products are trustfull is for me a reason to try to stay at the products off parallax.we going for the next step the sx and thanks for the last push in the right direction.



    best regards Erik
  • Clock LoopClock Loop Posts: 2,069
    edited 2008-07-29 01:35
    One good thing I found when migrating to the sx from the basic stamp, was the discovery of interrupts.

    And as all programmers know, interrupt management is a concept that MUST be grasped to proceed farther down the pipe.

    Interrupts allow the programmer to interact with the real world VERY FAST, AT RANDOM.

    They let the programmer create code that will run a "shell" (user interface, display, etc) and still respond to stimuli that comes at RANDOM.

    The BS2 is mainly a single process device.

    When I had a bs2 I was doing some pretty deep things with it, and kept finding myself running into blocks that required interrupts, more ram, faster speeds, etc...

    The SXB language allowed me to keep my basic programming structure and keep on going with new features and possibilites.

    It really is like a SUPER BS2+++ or something.

    If you have built a BOE-BOT or similar Parallax project, and even modified it a bit..

    You are ready for the SX.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Meh. Nothing here, move along.
  • ErikErik Posts: 31
    edited 2008-07-29 04:47
    hello,

    It's good to hear to invest time in·the sx isa right choose??



    Erik
Sign In or Register to comment.