View Full Version : Pbasic

Brian B
11-04-2010, 05:34 AM
i am working on a project and naad more i/o pins. do both the bs2 and propeller chip use PBASIC?

11-04-2010, 08:08 AM
No they do not. If you use basic stamps, there is a Basic Stamp 2px or 2p series that is in a 40 pin package - that uses PBasic.

The propeller uses SPIN, a custom language for the propeller - it also uses objects included in the IDE for lots of functions such as tv display, serial communications, or whatever. The propeller object exchange includes a PBASIC library that makes the PBasic to SPIN transition easier. If you do want to try the propeller, get the propeller demo board.

Another Basic Stamp solution for more output is to use serial shift registers or other IC chips. I recommend the 'Microcontroller applications cookbook' by Matt Gilliland for more information on this.

11-04-2010, 09:45 AM
The BS2-P 40 pin module will give you 16 extra I/O lines, although the upper 16 lines are not as easily accessed as the first standard 16 lines. A little extra code will get you around this.
I don't know if you are bread boarding or what but obviously the 40 pin version is not pin compatible as with the rest of the BS2 family. The only real advantage of the 40 pin chip is that it does use PBASIC which you may know enough now. The propeller is in so many ways more powerful (somewhat like eight stamps that operate separately but in conjunction with each other. The downside is that you would have to learn the SPIN programing language. It may be worth the time though as the propeller is an amazingly powerful processor.

11-04-2010, 11:01 PM
i am working on a project and naad more i/o pins. do both the bs2 and propeller chip use PBASIC?
You can add shift registers to your project to increase the number of I/Os needed.
Take a look at the 74xx595 and the 74xx165. (Example 74HC595N)
You can find code for these shift reg's for both BS2xx's and the Propeller.
Hope this helps.

Mike Green
11-04-2010, 11:21 PM
There's an object in the Propeller Object Exchange called "BS2_Functions" that implements many of the more complex operations of PBasic as Spin subroutines. It's intended to help make conversion from the Basic Stamps to the Propeller as easy as possible.

John R.
11-04-2010, 11:23 PM
Even better than the Prop Demo Board, the Prop Education kit (40 Pin DIP) is the "deal of the day" (http://www.parallax.com/Store/Microcontrollers/PropellerProgrammingKits/tabid/144/ProductID/415/List/0/Default.aspx?SortField=ProductName,ProductName) for only 79.99 today. It's a great way to learn the Prop!

There is also PropBasic available at this thread: Prop Basic by Bean (http://forums.parallax.com/showthread.php?t=118611)

Don't be intimidated! The Prop is THE way to go, and MUCH less expensive, and MUCH more powerful, than any STAMP. Think 8 Stamps in one chip, and if get the above Prop Education kit, you'll learn how to set up a prop circuit for additional projects for $24.99 - or less - see the Propeller DIP Plus Kit (http://www.parallax.com/Store/Microcontrollers/PropellerProgrammingKits/tabid/144/CategoryID/20/List/0/SortField/0/Level/a/ProductID/416/Default.aspx)