Shop OBEX P1 Docs P2 Docs Learn Events
SX-B vs PicBasic Pro — Parallax Forums

SX-B vs PicBasic Pro

ProfessorwizProfessorwiz Posts: 153
edited 2007-06-01 11:26 in General Discussion
While I understand one costs a bit, and SX-B is free, I enjoy writting little projects in Basic and don't wish to spend the time learning Assembler.· I'd be interested in knowing why I'd want to go with the SX-B?· I've been trying to go though what documentation I can find on the Parallax site much instruction.· I keep reading that the SX-B compiler is written so people would want to learn assembler and pick it up that way.· It seems that the PicBasic Pro compiler is more complete, and I didn't see anything in the comparison in the latest Nuts & Volts that had much to say abou the SX-B.· I'm sorry if I'm sounding negative but I'm just trying to get it straight.· If all I plan on programming in is Basic, should I still continue on with the Parallax SX or should I rethink and go Pic?

Russ

Comments

  • BeanBean Posts: 8,129
    edited 2007-05-23 21:24
    If you don't have any SX hardware then I'd suggest you get the SX-Blitz for $30 http://www.parallax.com/detail.asp?product_id=45170
    and a protoboard for $10 http://www.parallax.com/detail.asp?product_id=45300

    For $40 you can try out SX/B before spending $250 for PicBasic Pro.

    Yes it's funny how SX/B was not in the comparison in Nuts and Volts. Hmmm maybe because it's free ???

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    “The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-23 21:25
    I'm not the best person to answer since I have only a reading knowledge of the SX and SX/B not having actually done anything myself with it, but I have used PicBasic and PIC assembly.

    The SX is much faster than the PIC and has an interrupt structure that is suitable for accurate timing and reproducible interrupt timing. As a result, many of the functions that are implemented in hardware in the PIC can be implemented in interrupt service routines on the SX. It also seems to be much easier to mix Basic and assembly in SX/B than to try to do it in PicBasic.
  • ProfessorwizProfessorwiz Posts: 153
    edited 2007-05-23 22:21
    Yes I agree you can get a cheaper solution to try, in fact·I bought the $99 kit.· The issue is there just doesn't seem to be much written about the SX-B compiler with the gearing towards use the compiler till you use it in assembler.· I started with a class on the Basic stamp and had a blast, and was probably spoiled by all great books that were avail to program in PBasic.· I can't justify spending $40 on a stamp for the projects I'm working on so it seemed that the SX with the compiler was the ticket.· I'm trying to go though the Exploring SX book, but it just seems abit lacking unless you want to learn assembler.·

    In the Nuts and Volts write up they did have the Stamp at least.· I really followed the guys thinking that I don't wish to program in assembler and don't wish too, but do wish he would have looked over the SX.
  • John CoutureJohn Couture Posts: 370
    edited 2007-05-24 18:17
    As you have taken a class in PicBasic and undoubtly have some books on the topic, why not compare the commands and structure yourself with SX/B?

    The SX/B reference book is free at
    http://forums.parallax.com/forums/attach.aspx?a=14085

    Pay particular attention to how interrupts are handled (a weakness in most MCU versions of Basic) and the use of Virtual Peripherals (Nuts & Volts May 2007 Article: http://www.parallax.com/dl/docs/cols/nv/vol8/col/nv143.pdf).

    Although both of those topics are not for the faint of heart they are available in SX/B and probably not in most flavors of MCU basics.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John J. Couture

    San Diego Miramar College
  • ProfessorwizProfessorwiz Posts: 153
    edited 2007-05-24 18:35
    No, I had a class with the Basic Stamp - BS2 with the Board of Education.· I didn't have a PicBasic class or anything.· I am unfamiliar with the command structure of the PicBasic chips.· After having the exciting class with the Basic Stamp I was very much wanting to go further and move up to the SX chip, using the·SX/B.· I was kind of shocked to see how little instructional material there is out there right now.··I tried finding the SX/B reference book at the attached link but it didn't load.··I do have the reference manuals that were included with the kit, and the exploring the SX book which I've been trying to follow, but it seems like they just added the SX/B stuff in as an afterthought and really are pushing the Assembler aspect.· I'd really like to see another book written on the SX/B more in the flavor of what was written in for the BS2, or perhaps an addem that would flow along the lines of the books with here's the difference is Pbasic vs SX/B and why you would do it this way type of thing.·
    The reason the whole PicBasic Pro came up, was that it seems like it's a more refined language than the SX/B and the concept behind it was not to use it till you got proficient enough in assembler, but more of a means to the end.

    Russ
  • BeanBean Posts: 8,129
    edited 2007-05-24 18:46
    Russ,
    There are several books "in the works" probably the first one out will be by Jon Williams and it is exactly what you are looking for. Maybe Jon will chime in with an ETA.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    “The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • ProfessorwizProfessorwiz Posts: 153
    edited 2007-05-24 19:59
    I guess I've been spoiled by the quality books they put out for the BS2. PLEASE Jon GIVE USE AN ETA?!?!
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2007-05-24 21:16
    Professorwiz said...
    ...·I tried finding the SX/B reference book at the attached link but it didn't load.
    Russ
    Hi Russ,

    If you send me an email, I'd be glad to send you the SX/B pdf as an attachment, it would be about 1MB.· It is a pdf of the Help file, so it has complete documentation of the language, sample code for most commands, and several projects with schematics included.

    -Stephanie Lindsay
    Editor, Parallax Inc.
    editor@parallax.com

    ·
  • DosManDanDosManDan Posts: 179
    edited 2007-05-24 22:00
    Just my opinion, but there might not be alot written on SX/B because it's so easy to use. Bean wrote a great help file and I've been able to find out answers to anything I need just by reading it. Most of the commands are real similar to the BS2 basic.

    If you are familiar with programming, in general, I can't imagine you would have trouble with it.

    Dan
  • BeanBean Posts: 8,129
    edited 2007-05-24 22:41
    The SX/B pdf is also available in this thread http://forums.parallax.com/showthread.php?p=597707
    And I didn't write the help file, I only assisted in updating it to the current version.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    “The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • Oliver H. BaileyOliver H. Bailey Posts: 107
    edited 2007-05-25 00:18
    Hi Russ,
    I've worked extensively in SX Basic and PIC Basic Pro. I didn't see you mention if you use the Microcode IDe or use PIC Basic Pro from within ME LAB so I will assume MicroCode because it would be very close to the SX/B IDE. In the MicroCode IDE, SX Basic would be almost idential to the BS2 extensions in PIC Basic Pro. Interrupt handlers are similar but not identical. There are basically two reasons assembly seems to have a higher emphasis than SX basic. First, SX BASIC is a recent development (within the past 2 or so years) and because the SX is so established, new book versions have not been released in print that cover SX BASIC. Note that I said in print. There is a book on the Parallax web site that has been updated in PDF format only to cover both assembly and SX BASIC. I've read it and it is well written and through.

    PIC BASIC Pro is also a "wrapper" around PIC assembler. In fact PIC BASIC Pro actually creates tigher and faster assembly code thn PIC C. SX/B while not as mature is very code efficient as well. The difference is that SX/B generates assembler which cannot be single stepped debugged in BASIC.

    If your comfortable with PIC BASIC Pro and/or PBASIC for the BASIC Stamp, you should not have a difficult time learning or becoming comfortable with SX Basic as the differences are easy to remember and minimal.

    Regards,
    Oliver Bailey
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-05-26 18:57
    There are two of us, both named Jo[noparse][[/noparse]h]n, working on SX/B books. I've also written a bunch of material for Nuts & Volts that most find very useful as they are generally project oriented and show how to achieve a task. I find it somewhat amusing that there is so much excitement about the recent PDF -- that's the same help file that I created (with Bean's input and technical checking) at the start of SX/B, have been updating ever since (I did not participate in the latest update), and have been pointing when someone is looking for information on SX/B.

    Those that want to learn SX/B are doing so with the information available now. Waiting for conditions to be "perfect" (i.e., a printed book for what is a FREE product) is going to do nothing but delay one's mastery of SX/B.
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-05-27 05:16
    My point is that information has long been available.
  • John BondJohn Bond Posts: 369
    edited 2007-06-01 09:34
    Jon - as you know, you're one of my heroes so I say this with a little caution.

    The information for the SX has been around and the support has been terrific. When I first made the transition, the emphasis was still on Assembler even though there was a good help file for SX/B. Everything was there but somehow it was all a bit fragmented. The tons of good Stamp2 stuff, particularly your Stampworks book made the transition easier and has also made a huge difference for me.

    Now the new revised SX/B help file, particularly with the PDF has reach some sort of Knowledge Critical Mass where it’s as useful to me as my much thumbed Stampworks. Yes, 90% is just reworked and I can’t put my finger on what makes the big difference but the help file has just gone from good to GREAT.

    You are so right though, one learns about microcontrollers by doing. This is one subject where academic knowledge means little without experience.

    So anyone wanting to get into programming the SX should use the advice in the old NIKE advert - JUST DO IT! –

    John Bond

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • BeanBean Posts: 8,129
    edited 2007-06-01 11:26
    You are so right though, one learns about microcontrollers by doing. This is one subject where academic knowledge means little without experience.

    So anyone wanting to get into programming the SX should use the advice in the old NIKE advert - JUST DO IT! –

    John Bond
    John,
    · I couldn't agree more. Someone could go to art school for many years, but they won't become a good artist until they actually "create" some art. Programming is the same way. You could memorize the SX/B help file inside and out, but until you start creating real-world programs you won't be a very good programmer.

    · I know we all laugh about the "blink an LED" programs that most books start with. But when I started assembly programming with the SX it took me several hours to get that darn LED to flash.

    · Another problem user seem to have is the old "I want to write a program, but I don't know what I want it to do". It's really hard to just think of something practical and useful out-of-the-blue. I aways ask people what they are interested in. And try to come up with something that fits in with their interests. Let's face it, if it's not interesting, it's boring.

    · I've said this before, but when Jon Williams SX/B book is released I think it will be a god-sent to the SX/B community. If you love his revised stampworks book, you will love this one too. I've seen parts of it, it's good. I wouldn't be surprised if Parallax bundled it with the SX starter kit. It will be a must-have for anyone starting out with SX/B.

    Bean.
    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    “The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
Sign In or Register to comment.