Deeper Water
SteveWoodrough
Posts: 190
I want to start by saying that one of the things I like best about Parallax is the training manuals and work books for the Basic Stamp product.· Currently I'm plowing my way through the process control book.· All the stuuf I should have learned the first time in school!·
However, the thing that seems to always drive me nuts with the BS2·is that I can only do 1 thing at a time.· I'm a mechanical engineer, and not always the most savvy when it come to programming and logic tricks.· Attached is a short video of a project I did earlier this year.
http://www.youtube.com/watch?v=jI79Xsm_Kyk
A couple folks in the local robot club (Chi Bots) here in Chicago are using the AVR Mega 45's and other AVR chip sets. My questions to you all are:
What are the relative differences between the AVR and the Propeller?
Will the·Propeller allow me to do more than 1 thing at a time?
What is the learing curve like for the Propeller, if it's anything like C, forget it!
Is anything I learned in P Basic applicable to the Propeller code?
What is a good first step to get started?
Is there another more intermediate chip set I should consider first?
THANKS!!! Steve
·
However, the thing that seems to always drive me nuts with the BS2·is that I can only do 1 thing at a time.· I'm a mechanical engineer, and not always the most savvy when it come to programming and logic tricks.· Attached is a short video of a project I did earlier this year.
http://www.youtube.com/watch?v=jI79Xsm_Kyk
A couple folks in the local robot club (Chi Bots) here in Chicago are using the AVR Mega 45's and other AVR chip sets. My questions to you all are:
What are the relative differences between the AVR and the Propeller?
Will the·Propeller allow me to do more than 1 thing at a time?
What is the learing curve like for the Propeller, if it's anything like C, forget it!
Is anything I learned in P Basic applicable to the Propeller code?
What is a good first step to get started?
Is there another more intermediate chip set I should consider first?
THANKS!!! Steve
·
Comments
>Will the Propeller allow me to do more than 1 thing at a time?
Eight cogs allow 8 different processes to function at the same time.
>What is the learing curve like for the Propeller, if it's anything like C, forget it!
I struggled with C too! SPIN has been a pleasure to learn!
>What is a good first step to get started?
The PEkit Labs
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
Need a part? Got spare electronics? - The Electronics Exchange
I watched your video.Be sure to let me know when you put a blade on that thing. I'm tired of cutting my grass and I'd like to be the first to get a grass cutting robot. Very cool!
As for the propeller's languages... Spin is a snap to learn. Unlike a lot of languages, syntax isn't hard to memorize at all. It's really the easier of the two languages to learn. Just remember that indentation is key to your program flow. Spin isn't all that fast, but it sure does get the job done when you want to just throw something together really fast and get it running. The other language to the propeller is the Propeller Assembly. It's assembly code which, like any assembly is very nit picky, but very powerful.
As for multitasking, you'll wonder how in the world you can possibly run anything on single processor chips once you get into it. It's such a breeze and simplifies soooo many things. If you want to have something running all the time, like a sensor aquiring data, just throw the process into a cog and forget about it until your main program needs some info. It's absolutely wonderful.
Yes, up to eight things truly simultaneously and as with any single core processor each of the Propeller's eight cores can be programmed to do multiple things.
What is the learing curve like for the Propeller, if it's anything like C, forget it!
Spin looks daunting at first but I found it was a breeze to work with. There are some very complex statements which can be created but they are not essential to know or understand to start with. I'd say Spin was one of the best and easiest languages I have ever used.
Is anything I learned in P Basic applicable to the Propeller code?
What you've learned along the way will help you greatly even though there's no real one-to-one transition from PBASIC to Spin. There are objects which can provide PBASIC functionality in Spin but I'd personally recommend ignoring those and get an understanding of what native Spin is first.
What is a good first step to get started?
I'd say a couple of ProtoBoards if you are going to be adding your own circuitry, then start experimenting. Turning a LED on and off, detecting a switch push, pretty much everything you did when you first discovered the Basic Stamp.
Is there another more intermediate chip set I should consider first?
Not really. It's well worth diving straight in.
Once I got it to print to the LCD, I attached a mouse, and about a half hour later had it reading mouse position and displaying that on the LCD, again, using objects I'd downloaded from the library.
In short, there was a little bit of a learning curve, but this object-oriented thing really does make it easy to do complex things. I may be through with Stamps now - Propellers are cheaper (once you have a Prop Tool), and much more capable.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
-Phil
I want to point something out though. Steve, you mentioned that with the BasicStamp you can only do one thing at a time. I am making up the statistic, but I am probably not far off when I was 99% of the processors in the word only do one thing at a time! There are programming tricks and interrupts and speed and time slicing and similar tactics used to make processors do many things at "once". I can understand your frustration with the Basic Stamp though, I think it may be common for someone that has spent time playing with it and pushing it to the edges to want to do more. Maybe it is time to graduate and the Propeller would be a great chip for your robots.
With the Propeller, I use both SPIN and ASM. Spin is pretty easy to learn and judging by your experience so far, I think you understand programming concepts so it is just a matter of figuring out the language. The PE Labs are excellent reading and learning material and of course you have the forum to help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
www.brilldea.com·- uOLED-IOC, RGB LEDs, TLC5940 driver PCB
www.tdswieter.com
One little spark of imagination is all it takes for an idea to explode
http://forums.parallax.com/showthread.php?p=635533. This Parallax robot chassis normally comes with a Stamp board. Here a Propeller Protoboard is a "drop-in" replacement that has a simple Basic interpreter including support for an SD card for program and data storage, a wireless "console" link, a compass, and both an ultrasonic and infrared object detection system. The interpreter isn't set up for it, but there is a video interface that, with a short whip antenna, can broadcast text on TV channels 2, 3, or 4 for a short distance (a few feet). The routines to do this are part of the standard library of I/O drivers, but would take some additional memory away from the Basic program space, so were left out.
The Basic interpreter has built-in statements for handling the servos, compass, and ultrasonic and infrared distance to object sensors.
Post Edited (Mike Green) : 6/14/2008 1:49:28 AM GMT
Steve