Shop OBEX P1 Docs P2 Docs Learn Events
Best use of Propeller — Parallax Forums

Best use of Propeller

crcordillcrcordill Posts: 29
edited 2007-11-27 00:37 in Propeller 1
Hi, I was wondering what the propeller chip is really good at. I've seen that it does video very well, and many other things, but what is it really good at? Also, I was wondering how well the propeller hooks up to the various sensors offered by parallax. Any word on problems with sensors? Basically, I am wanting a microprocessor for some advanced robotic stuff. (Lots of servos, dc motors with encoders, with alot of sensors). I've had alot of experience with the basic atom, and I am wanting to do more. Is the Propeller what I want? Thanks in advance.

Comments

  • AleAle Posts: 2,363
    edited 2007-11-25 17:41
    Short answer: May be.
    Long answer: It may depend on you,

    Nobody can tell you what you need. We can give you advice based on what we did. A good approach to find if a uC is adequate for what you need it is a comparison table, that has all the features hw-wide you need, and the ones found in the uC you require. From the candidates that meet most of your needs you can find (maybe) examples for similar situations.

    An example: You need to calculate easily with 32 bit of precision in less than 1 uS. Most 8 bit uC will not meet this. Maybe a SX will when clocked at 75 MHz, a propeller will certanly do at the right clock.

    Due to its architecture, the Propeller is quite good at: control. Why ? because it has 8 independent fast processors. But they have little memory, so long programs are at loss, and are not that easy to implement, but short programs, are very easy to implement.

    Have fun
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-25 17:44
    The Propeller is probably what you're looking for. It can be hooked up to all of the sensors offered by Parallax. Some of them require some interface logic to translate the voltage levels (from 3.3V to 5V). Most of them can be hooked up directly or with only a series resistor to protect the Propeller pin from 5V. Servos work fine and there are existing drivers for as many as you have I/O pins available. The Propeller can drive H-bridges for dc motors as well.

    What's the Propeller really good at? Pretty much anything that fits with the amount of memory available (realistically 32K bytes) and the speed (50ns per native instruction or roughly 1-2us per interpreted Spin byte code). It shines at doing multiple tasks (up to 8 ... sometimes you can use one cog to do several things ... like controlling multiple servos or doing both the transmit and receive ends of a full duplex serial connection or handling both a PS/2 keyboard and mouse). It also shines at doing time-dependent tasks where the straightforwardly deterministic instruction set helps.
  • rjo_rjo_ Posts: 1,825
    edited 2007-11-25 17:45
    1) All of the above.

    2) Absolutely.

    What is amazing is that a person can get a certain mental image of the Propeller by doing your homework... but that "mental image" quickly goes out the window when he actually starts using it.

    You will find that the Propeller can do everything you want... and much more.

    Rich
  • DarrenYDarrenY Posts: 61
    edited 2007-11-25 18:11
    The prop is superb for sensor stuff.
    I'm currently using 1 prop to talk to 2 pressure sensors, accelerometer, gyro, gps, rtc, dataflash, digital compass as well as doing a fair bit of math in there as well for a extended kalman filter......

    The 8 cogs make it truly a dream compared with standard uC's!
  • BaggersBaggers Posts: 3,019
    edited 2007-11-25 19:58
    TBH, I'd say there is no "BEST" use for the propeller, as it's brilliant at everything you ask of it [noparse]:)[/noparse] I've done lots of stuff with it, but I'd say I've only skirted over some of it's many many many finest points, as their are far too many to mention.
    maybe the "best" usage of the propeller, programming it, cos you'll never get bored of it, as it's got soooo much to offer, it'll certainly get your brain in a spin ( no pun intended, ok, maybe a little pun lol ) it's a wonderful chip, and has given me great pleasure in coding back to basics again, just you, a processor, and whatever bits n pieces you want to add to it. [noparse]:)[/noparse]

    It truely is a tribute to itself, and to Chip's great work creating it.

    Baggers.
  • deSilvadeSilva Posts: 2,967
    edited 2007-11-25 22:04
    A more realistic view could be:
    For every task you want to accomplish, there is a better (cheaper, faster, smaller, more professional,..) solution with one of the established micro controllers. But none of them has the universal usage of the propeller.

    The propeller is a "generalist": Good for everything until you reach its limits. Those limitations are not always so obvious to the hobbyist.

    But the Propeller (1) will not do what today's DSPs accomplish with ease: Image input, HiRes graphics, MP3 decoding (let alone encoding), LAN, CAN, USB hosting,...

    However it is well suited for "feasibility studies" and prototyping

    It is also extremely well suited for the hobbyist, allowing him to use it with different - especially low! - skill levels! I wish there were more hobbyists in the world....
  • Ken PetersonKen Peterson Posts: 806
    edited 2007-11-26 01:00
    To add to deSilva's comments, the Propeller makes it easier than most microcontrollers to take on several tasks at once - and especially to re-use code that others have written. If you were to try to re-use code on an interrupt-driven system with only one processor, you would run into endless compatibility problems. The architecture of the Propeller lets you get around this for the most part.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    The more I know, the more I know I don't know.· Is this what they call Wisdom?
  • David CuthbertDavid Cuthbert Posts: 12
    edited 2007-11-26 03:25
    I'm finding the Propeller to be an excellent rapid prototyping testbed. Very friendly, very easy to get up and running, and easy to connect to "other things." If you got what you need working on the Propeller and you're building only 1, 10, or even 100 of something, I wouldn't even bother looking to redesign for another uC.

    It's also a lot of fun. I'll admit that I was initially skeptical of some of the claims (I first read about it in Make magazine) -- it is fairly unusual (parallel processing in an embedded processor?!). After playing with it for a couple weeks, though, I'm hooked.

    For higher volumes, the Propeller is probably overkill. At $12/unit, it's also rather pricey. Around 1k is the point where I'd look to port the application to another, cheaper processor.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-26 04:03
    David,
    In higher volumes (1k), it's only $8/unit. Since you can get 16 bit ARM based processors with comparable memory for about 1/3 of that, it's still a bit pricey. For some applications, the multiple cogs may give you higher throughput. On the other hand, the cogs may be tied up providing peripheral I/O that is handled by peripheral devices on the ARM chip. It really depends on your application and how well the Propeller fits in with the task to be done.
  • David CuthbertDavid Cuthbert Posts: 12
    edited 2007-11-26 04:31
    Ah, right. I should have noted that I'm still very much in the playing around stage -- aside from some video output testing, there's nothing I've done on the Propeller that I couldn't do with a general purpose 8-bit uC. Even so, I'm literally doing in minutes to prototype what would take me an hour or more on the 8-bits I've worked on.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-26 05:03
    Also note that you can do IEEE floating point using an available floating point package and all arithmetic is 32 bits. If you need either of those, they're hard to get on an 8-bit uC. You can add an external coprocessor and get the same functionality, but that adds to the cost and board space.
  • AleAle Posts: 2,363
    edited 2007-11-26 20:20
    [noparse][[/noparse]quote]Also note that you can do IEEE floating (...) they're hard to get on an 8-bit uC.

    I tend to disagree: Floating point may be difficult to implement by yourself in 8 bit uC (I did it for several uP, binary and BCD), but they are nowhere near difficult to get. Just name one that does not have one, citing 384-instruction PICs is just no valid, because it is also available for PICs, just not those.

    Some tasks are really easy to work with the propeller, but if your program grows beyond 496 longs, things get really difficult. There is where multiprocessing can give you the hand you need. Solutions can be a bit convoluted at first, till more than one cog fits naturally. Just do not see it as your everyday processor.
  • JoeCreateJoeCreate Posts: 36
    edited 2007-11-27 00:24
    I've tried several uC's and definitely found the Propeller to be the quickest and easiest to use (interfacing sensors as well as programming them). The only thing I don't use it for is Analog to Digital converter stuff since it takes two pins for one input and with 5 Sharp IR sensors with Analog outputs, that would eat up 10 of my inputs real fast. Instead, I use a PIC for Analog inputs and make the data available via i2c.

    I found the Floating Point stuff to be confusing on the Propeller. Most implementations use one or two cogs to do the math where I don't want to spare a cog for it but just want it to work in the current cog (speed is not an issue). I still haven't found an ATAN2 function that just Works like my PC and PIC ATAN2 functions work (I'm sure it's just me and my understanding of it, but so far I haven't found a simple ATAN2 function the produces the same results). Not being real proficient with TANs and ATANs, I blame myself.

    In other words, there will be stumbling blocks because it IS different, but amazingly flexible and so far rather indestructable to the basic robot hobbyist. I really like having so much general-purpose I/O available. No pin is dedicated to any specific function so ANY pin can be used for Serial or i2c or SPI or Digital or whatever. Makes it easier to design PCB's since reassigning pins for different tasks based on ease-of-trace-routing doesn't hurt anything (unless you are hard-core assembly programming for speed and are concerned about how many ns it takes to talk to I/O from cogs on opposite ends of the chip).
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-27 00:37
    There is a Spin-only version of the basic arithmetic functions that doesn't use a separate cog. The main reason for using a separate cog is for speed (and the program has to run somewhere ... not on the cog running the Spin main program).
Sign In or Register to comment.