SX-B vs PicBasic Pro
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
Russ
Comments
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
·
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.
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.
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
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
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
·
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
·
If you are familiar with programming, in general, I can't imagine you would have trouble with it.
Dan
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
·
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
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.
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· 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
·