Shop OBEX P1 Docs P2 Docs Learn Events
Deeper Water — Parallax Forums

Deeper Water

SteveWoodroughSteveWoodrough Posts: 190
edited 2008-06-14 01:51 in Propeller 1
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



·

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-13 02:54
    I can answer a few of these...

    >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
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-06-13 05:52
    Steve,
    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.
  • hippyhippy Posts: 1,981
    edited 2008-06-13 14:18
    Will the Propeller allow me to do more than 1 thing at a time?

    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.
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-06-13 14:33
    I've been using Basic Stamps for a couple of years, and about two months ago bought my first Propeller chip. I had it making LEDs blink, but nothing more than that until about two weeks ago when I decided to put some effort into it. I decided to start by getting it to write to a 4x20 serial LCD, using one of·the LCD object libraries I downloaded. That took me about three days, but only because it was working so quickly that I didn't see it (I'd stupidly put a LCD.cls command at the end). It was working on the first day, but I didn't know it. In the process, though, I learned some worthwhile stuff, including how to use the Propeller Serial Terminal program (I used that to tell me that the LCD INIT command was returning "True").

    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 BakerPaul Baker Posts: 6,351
    edited 2008-06-13 21:10
    I can pretty much assure you that once you've gotten a little bit of proficiency with the Propeller (a couple to few months) you will have your AVR pals drooling over the Propeller chip. The things you will be able to do with the chip will far outstrip the AVR and you will most likely be able to whip it up at a much faster pace than they could on thier AVR. All those "helper chips" you see other setups use (servo controller, pwm controller, sound chip etc) aren't needed with the Propeller because it has enough processing power to handle any robotic application you can throw at it (execpt vision processing).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-06-13 21:35
    I've used both the AVR and the Propeller. Although certain AVR chips (e.g. ATTiny13) have an advantage of small size and cheap price for simple, single-purpose applications, the Propeller blows the doors off of all of them, performancewise. Paul is, perhaps, being a bit modest by excepting vision processing. Machine vision covers a broad continuum of apps, many of which are easily accessible to the Prop. Could it perform facial recognition in milliseconds? That's doubtful. But visually verifying beer bottle fills and cap placement, say, or sizing and sorting kumquats on a packing line would be a piece of cake.

    -Phil
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-06-14 01:10
    To join the everyone else, yes the Propeller is cool and yes it can do a lot of processing simultaneously.

    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
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-14 01:43
    As an example of what the Propeller can do in a simple robotic application, have a look at this thread:
    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
  • SteveWoodroughSteveWoodrough Posts: 190
    edited 2008-06-14 01:51
    Alright, I'm sold. I need to complete the Process Control book but I'll order my Propeller for my birthday present at the end of July. I appreciate everyones feedback and input, particularly Mr. Pilgrims. Aside from a good product, IMO the documentation is the #1 selling point for the Parallax lines. Another strong selling point is this forum. It is always a friendly, reliable, and helpful source and I'm sure I will be tapping it often this Fall.
    Steve
Sign In or Register to comment.