Shop OBEX P1 Docs P2 Docs Learn Events
Propeller versus other micros, generally speaking — Parallax Forums

Propeller versus other micros, generally speaking

T ChapT Chap Posts: 4,198
edited 2006-08-22 22:09 in Propeller 1
I am very new to processors, the Stamp BS2P40 being the first exposure only over the last 3 months or so. I found the Stamp to be pretty simple starting with no experience, and had my application up and running within several days with help from the forum, and minimal manual study. I then converted the Stamp code to Spin with some further help, and after digesting the few differences in language, the Propeller then quickly obsoleted any need for future use of the Stamp.

I know people that are diehard PIC and AVR users, and they know those product lines inside out. In fact, several PIC users I have talked to don't even want to look at the Propeller to see what it has to offer. I can relate in some ways, as there are softwares I use that I like, and I don't care about X software that someone is talking to me about that may be a good choice as well, or even better. That being said, I wish I had a deeper understanding of how other products compare to the Propeller without having to dive into those products. It would be great if there were someone here with PIC 16/18 series experience or AVR experience that could give an idea as to where the Propeller falls in the grand scheme of micros. I am aware there are numerous options on the other products, including built in A/d and other options. Also, I am not aware of the other units having multiprocessing although it could exist. I think it would be great to be able to argue with a PIC user to try out the Propoller based on some valid point that I am not experienced enough yet to see.

Thanks for any enlightenment.

Comments

  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-08-20 01:22
    I teach the AVR's, 8051's and have used PICs. After the propeller, they will drive you nuts.

    There is specific hardware in each device, such as PWM timers, that require numerous (NUMEROUS!) registers to be set for the specific function you need, then you are tied to using specific I/O pins for that hardware. You HAVE to connect to only the specified pins for that particular peripheral hardware.

    Need 2 of those, such as PWM outs? You may be out of luck. Then come the interrupts. To get the response you may need, you'll need to configure interrupts so that X code runs when Y condition happens. Of course, interrupting your current code can cause all kinds of possible problems and debugging issues.

    Selecting a version of the controller? Do you need 1 or 2 serial I/O? How many timers? A/D or no? Which chip do you get with the right mix of the interanal hardware that's locked in? I've spent literally hours trying to pick out the best chip for an application and making trade offs.

    How about compilers? I've know I've spend hundreds (and should spend thousands for the better versions) of software to program these devices.

    The free use of I/O and silicon in the Propeller is liberating.

    The only down side I can see with the propeller is the size and cost.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    Southern Illinois University Carbondale - Electronic Systems Technologies

    Personal Links with plenty of BASIC Stamp info
    StampPlot - Graphical Data Acquisition and Control
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-08-20 01:32
    Oh, thought I'd eive you an example that I'm teaching: To get an 8051 (a classic many are based on) to sound a tone at 10KHz in the background while other code is busy doing other stuff (not 100% up to snuff, but close):

    ORG 0000
    SJMP main

    ORG 0003 ; interrupt vector
    CPL P2.1 ; toggle output pin for tone
    RETI ; return from interrupt


    ORG 0030
    Main:
    MOV TMOD, #02H ; configure timer 0 for mode 2
    MOV TH0, #56 ; preload high timer byte value of r200 counts (.0002mS)
    MOV TL0, #56 ; load low timer byte
    SETB ET0 ; enable timer interrupt
    SETB EA ; enable global interrupt
    SETB TR0 ; enable timer

    Loop:
    ; whatever code
    .
    .
    .
    SJMP Loop

    While this is in MCS51 assembler, even using C the registers and the the interrupts need to be configured. Compare that to setting up a Cog to simply toggle a pin at the right frequency.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    Southern Illinois University Carbondale - Electronic Systems Technologies

    Personal Links with plenty of BASIC Stamp info
    StampPlot - Graphical Data Acquisition and Control
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2006-08-20 01:41
    I'm trying to build a machine tool that requires fairly high speed control, I was using a PIC and it could do that OK, it could also talk to a multi-media card fine but when I came to think about how to interface myself with the machine I got depressed. You can get serial LCD screens and you could interface all manner of keyboards if you had the time but I felt I was more likely to end up with two lines of green text and a few push buttons I would have to mount in a makeshift way.

    In comes the propeller, I now have a real monitor with colour and a full keyboard. Interfacing is as easy as falling off a log and I am starting to have a soft-machine-controller so I might be able to use it for other processes with just a few changes of code and perhaps the odd hardware module.

    That's one place where I find the propeller really scores, if you want to interact with the device. The 8 processors, objects and easy programming are also pretty cool [noparse]:)[/noparse]

    I'm not ruling out any other processor for further projects as like you say they often have some good built in functionality and I would definately consider using a propeller with other processors as a front end. When people have die-hard views about what they like I wonder if it has more to do with what they know (are used to) and perhaps the odd bad experience.

    As for your argument to give them, show them the graphics demo ask them how long it would take them to code and get the video hardware working, ask them about the keyboard, the mouse, the accelerometers, I2C devices. And if they say their chip has I2C ask them how they feel about doing SPI on that same chip (it might only have one built in). Ask them about frequency sythesis. Ask them about objects. Ask them about sharing code and how long it takes to intergrate shared code into their programs.

    Ask them if they can handle enough interupts etc to do video, keyboard, mouse and other processes at the same time.

    If they still think the propeller isn't worth EVEN looking at ask them how many shares they have in Microchip/AVR/Cygnal/TI ?

    Graham
  • Rich MRich M Posts: 33
    edited 2006-08-20 01:55
    Martin is right on the money with everything he says.

    Just as a couple of additional thoughts.

    My other microcontroller experience is primarily with PICs. The PIC line has been around for decades, in a steady evolutionary march. One of the primary reasons that PIC's ( and AVR, TI, etc. ) are so popular is that there is a very broad range of capabilities across the product lines, with a corresponding broad range of prices.

    When you're a hobbyist, it isn't unreasonable to spend $25 on a Propeller, Basic Stamp, etc. If you're a factory engineer, and you're building one to a dozen devices, that's not a big issue, either. On the other hand, when you're building a hundred, thousand, or tens of thousands of some product, there's no way you're going to pay $25 for the controller. In those domains, you will choose parts based on a difference of 5 or 10 cents per controller, and will choose the cheapest controller that meets your needs. You can buy other microcontrollers for just a $2 or $3, in many cases. The price difference adds up fast. wink.gif

    PIC's, in particular, have a *huge* support network behind them. There are thousands of engineers who are familiar with them, and Microchip, the manufacturer, is heads-and-shoulders above just about anyone else when it comes to supporting the customer. Many manufacturers won't give you the time of day, unless you're going to buy a minimum of tens of thousands of pieces.

    Other microcontrollers have architectures that can be difficult to understand if you're a novice user - page mode access to memory, for example, in which you essentially see only a small "window" of the memory space at any given time, etc. That can cause all sorts of interesting development problems. wink.gif

    Pseudo-multitasking can be accomplished on most other architectures through the use of interrupts. But they're generally a pain to get the timing right. On the other hand, the dedicated pins that Martin talks about can often be used in that fashion - set up the i2c, CAN bus, PWM, etc. pins, and then let them go do their thing while you do something else for a few microseconds. wink.gif On the Propeller, you have to bit-bang everything.

    The one thing that is really noticable about the Propeller is the lack of interrupts. And that's one of the biggest strengths when it comes to pseudo-multitasking. But it also is very limiting in other respects. For example, other processors allow you to do things like set up the system so that it goes to sleep, consuming an almost unmeasurable amount of power, until a pin changes state. Then, when the state change happens, it wakes up, an interrupt occurs, and you can go to full power and do something useful, before going back to sleep. Thus, you can be *extremely* power efficient - always a good thing when running on batteries. wink.gif

    Other architectures are more "open" in respect to languages. You can program in assembly, of course. Most of them also have C and BASIC compilers, often from third parties. There are multitudes of development tools for other platforms - Linux, Macs, and so on. That isn't the case for Parallax products.

    But, when it comes down to it, when I'm doing a hobbyist project, the Propeller is almost ideal. It's just almost too easy to use. wink.gif
  • R PankauR Pankau Posts: 127
    edited 2006-08-20 01:58
    I'm considering the propeller as well. When I first jumped into icrocontrollers 2 years ago I was in heaven just to make something work with a PIC processor. Now it's like pulling teeth to make myself get into a new project because I know the hours spent will be long to get the results I want, and that is frustrating. Looks like lots of people are speaking highly about the pchip because of the immediate results, speed etc... I'm ready to graduate from PIC. I just want my ideas to work.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-08-20 02:51
    Rich M said...

    The one thing that is really noticable about the Propeller is the lack of interrupts. And that's one of the biggest strengths when it comes to pseudo-multitasking. But it also is very limiting in other respects. For example, other processors allow you to do things like set up the system so that it goes to sleep, consuming an almost unmeasurable amount of power, until a pin changes state. Then, when the state change happens, it wakes up, an interrupt occurs, and you can go to full power and do something useful, before going back to sleep. Thus, you can be *extremely* power efficient - always a good thing when running on batteries. wink.gif

    The WAITPEQ instruction (is that right? been a long summer, a little rusty) will provide the same feature - The cog will sleep until a pin condition is met. If that is the only cog performing any operations, current draw will be in the microamps, and if not, reduced by that cog's current draw at least. Each cog essentially can be an entire ISR unto themselves and sleep while waiting. But without the pain of interrupt issues and error trapping. Or WAITCNT until a specific time elapses while sleeping.

    -Martin
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-08-20 02:55
    Power Plant Dork said...
    I'm considering the propeller as well. When I first jumped into icrocontrollers 2 years ago I was in heaven just to make something work with a PIC processor. Now it's like pulling teeth to make myself get into a new project because I know the hours spent will be long to get the results I want, and that is frustrating. Looks like lots of people are speaking highly about the pchip because of the immediate results, speed etc... I'm ready to graduate from PIC. I just want my ideas to work.

    I can sympathize. Until this year I was excited to teach students about controllers, peripheral hardware and ALL those wonderful registers. So cool to be able to read 20 pages of data sheets (on that ONE topic) to configure something to work in the background. Now teaching it all makes my stomach churn because it just doesn't need to be that complex. [noparse]:)[/noparse]

    -Martin
  • cgraceycgracey Posts: 14,133
    edited 2006-08-20 02:57
    Rich,
    The Propeller CAN do this. You can switch to the internal 20KHz oscillator and wait for a pin combination (in either Spin or assembly). Then, when the external condition is met, you can enable the crystal oscillator and PLL, and switch over to them. This takes about 5uA during the 20KHz mode (brownout enabled, one cog hanging in a WAITPEQ instruction. For each COG running continuously, it's an additional 3uA.
    Rich M said...


    ...For example, other processors allow you to do things like set up the system so that it goes to sleep, consuming an almost unmeasurable amount of power, until a pin changes state. Then, when the state change happens, it wakes up, an interrupt occurs, and you can go to full power and do something useful, before going back to sleep. Thus, you can be *extremely* power efficient - always a good thing when running on batteries. wink.gif
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • Rich MRich M Posts: 33
    edited 2006-08-20 03:02
    Boy, I don't know how I missed that.

    I learn something new every day. smile.gif

    - Rich
  • cgraceycgracey Posts: 14,133
    edited 2006-08-20 03:08
    Rich,

    You may not have seen this:

    http://forums.parallax.com/attachment.php?attachmentid=40588
    Rich M said...
    Boy, I don't know how I missed that.

    I learn something new every day. smile.gif

    - Rich
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • T ChapT Chap Posts: 4,198
    edited 2006-08-20 03:21
    Thanks for info guys. I think the biggest downside that keeps cropping up is pricing for production purposes. Being that there are more processors on board, I suppose there may be a higher cost associated with the extra silicon. The other thoughtmay be that Parallax is intentionally targetting hobbyists and robot market, and not trying to going head to head with the production market. Maybe a limited single cog processor at $3 would open up more production possibilities based on cost?

    I will certainly point the thread to a few PIC and AVR people.
  • cgraceycgracey Posts: 14,133
    edited 2006-08-20 03:36
    We will be dropping the price of the Propeller chips dramatically in the near future. I can't say too much yet, because we must communicate with our distributors first, but we realize that it needs to be cheaper.

    This chip is expensive to make, as microcontrollers go,·because the die is 53 square mm. Also, being a small foundry customer, we do not get very low (let alone 'Asian') wafer prices. We know we must drop the price, though, to invite volume business. We could keep selling one piece for $25 and slowly grow a new type of BASIC Stamp customer base, but to get more sales, we need higher volume design-in. We are going to set the 1K-piece price to·$8.03 and the one-piece price to $12.95. Now even $8 isn't 'cheap', but it buys you a lot of (unique) functionality.
    originator99 said...
    Thanks for info guys. I think the biggest downside that keeps cropping up is pricing for production purposes. Being that there are more processors on board, I suppose there may be a higher cost associated with the extra silicon. The other thoughtmay be that Parallax is intentionally targetting hobbyists and robot market, and not trying to going head to head with the production market. Maybe a limited single cog processor at $3 would open up more production possibilities based on cost?

    I will certainly point the thread to a few PIC and AVR people.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • T ChapT Chap Posts: 4,198
    edited 2006-08-20 03:52
    Well that is great news then on my end. To get the same functionality, many boards would require several $3 PIC's anyway, so $8 is workable.
  • R PankauR Pankau Posts: 127
    edited 2006-08-21 01:15
    I think Using a Pchip for a hobbiest at $25 is not bad because to get the other micros going you need a programmer, $50, and maybe a compiler $100 if you don't like the free ASM that is offered. In this pchip world, the high level language compiler is free, connect serially with spare parts and you're running. It's just a little different to pay for the hardware. In reality how many big projects can you do in a year? If you're like me I can squeeze in 2 or 3 projects per year after my kids are in bed, and I'll most likely cannibalize old projects for new ones. I'm also finding that ther is not much glory in doing things the hard way if there is an easier method that gets the same or better results. I have an old advanced calculus book that has hardly been touched if anyone is interested in doing something hard, I'd rather be doing something fun.
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-08-21 08:50
    I wonder how many of those 'engineered' systems using 'cheap' PIC and AVRs would have been cheaper if they instead went for the Propeller and shredded the development time?
    (I'm thinking of projects in the 100 - 10.000 units range)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • BiblioTechBiblioTech Posts: 10
    edited 2006-08-21 09:23
    I think the multiple cogs are the "force muliplier" of the Propeller over other controlers. That said, a single cog version would be less effective in the current environment. But a 4 cog version could be effective if it is able to be produced for 60% or less of current (or proposed) cost. That would allow for a significant power to price("bang per buck") ratio.

    If the project I'm working on can fit into a 4 cog Prop at $5-6 cost it would make its comercialisation much more likely. But even $13 per chip for short(200-400 units) production runs, including the full 8 cog chip does make its production more likely. I've just got to get the prototype together as proof of concept.

    Frans...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Read a book, under a lamp and think what it took to get here.
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2006-08-21 09:58
    The cost is a funny issue; because the propeller is nice and compact and can do simple things very well its ideal for products which suit a low price but at the same time it can do some amazing things which would cost much more otherwise. For my machine controller I feel that $25 is very cheap and if I produced it commercially I still would. If I was making a toy or something more simple I'd definately feel the pinch.

    Great to see planned price decreases though as it just encourages you to find more applications.

    Graham
  • Rich MRich M Posts: 33
    edited 2006-08-21 12:55
    Gadgetman:

    At a substantially cheaper price, the Prop could indeed find a niche as a PIC/AVR replacement. There's just be a couple of caveats that I could think of, off the top of my head.

    1) PICS and AVR's are known quantities - there are thousands of professional engineers familiar with their architecture, quirks, design parameters, advantages, and disadvantages. PICs, in particular, are known for being well-nigh indestructable under extreme conditions. And since engineers are often relatively conservative, many will hold off on moving to an entirely new architecture, for production work, until there's more of a track record.

    2) Microchip is a very good supplier. Lead times are typically quite minimal, even for very large orders. AVR's can be somewhat more problematic, in some cases, but still nowhere as bad as, say, Maxim/Dallas. wink.gif I don't think Parallax has a comparable track record - that's not a slam on them, it's just a recognition that getting into the PIC/AVR design space, with the corresponding quantities and production targets, is not something they have traditionally been involved in. This will make many engineers nervous, as well.

    3) A lot of times, a PIC/AVR is simply "good enough", and at the right price point. Even if Parallax gets the qty price down to $8, there's still a huge number of applications in which a $2 PIC is preferred, even if development time is much longer. And remember - most PIC engineers already have libraries of time-tested, optimized code available, making their development times very fast compared to the hobbyists/low volume engineers that Parallax products have been popular with up to this point.

    - Rich
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-08-21 16:54
    Bibliotech,

    When I was first introduced to the Propeller, I thought as you do, that a four-cog pChip could find a less-expensive niche. But now that I've worked with the Propeller, I don't think that anymore. It's amazing how fast the required number of cogs for an app can pile up. And without interrupts, it's well-nigh impossible to combine the functions of two or more independent cogs into one. Eight is a good number. It hasn't yet been too few. But, even for simple apps, four would be an onerous limitation.

    -Phil
  • CJCJ Posts: 470
    edited 2006-08-21 17:18
    not to mention the radical die layout change required to reduce size from 8 to 4 cogs (judging from the die pic in the circuit cellar article)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • LawsonLawson Posts: 870
    edited 2006-08-21 23:23
    Phil Pilgrim (PhiPi) said...
    Bibliotech,

    When I was first introduced to the Propeller, I thought as you do, that a four-cog pChip could find a less-expensive niche. But now that I've worked with the Propeller, I don't think that anymore. It's amazing how fast the required number of cogs for an app can pile up. And without interrupts, it's well-nigh impossible to combine the functions of two or more independent cogs into one. Eight is a good number. It hasn't yet been too few. But, even for simple apps, four would be an onerous limitation.

    -Phil
    Well i guess it depends on how much each Cog is running code versus sitting arround and waiting, but any cooperative multi-tasking system should allow a single Cog to do multiple things without needing interrupts.· A particularly simple system i've seen for cooperative multi-tasking·is using state-machines.· A very nice description of why state-machines are nice this way can be found here => http://www.newmicros.com/store/product_manual/Isomax0.pdf·(skip to the "fundamentals" section on page three to get to the meat quickly)· State-machines do have limitations, but should allow a single Cog to handle TONS of "slow" I/O management tasks.·

    My two bits,
    Marty!

    P.S. on this same note i was VERY happy to find that Spin has a select-case conditional structure [noparse]:D[/noparse]
  • Ken GraceyKen Gracey Posts: 7,386
    edited 2006-08-22 00:15
    Regarding Rich's second point about Parallax's track record in high-volume products, I'd like to point out that we've had exclusive control of the SX for over a year. We will have packaged, qualified, tested and sold over a million chips this year. At the moment, our inventory levels are 300K units and we can fill nearly any order our customers provide without a lead time. These volumes are peanuts compared to the other companies you mentioned, but it's impressive for a small company.

    Commercial users and their applications rarely appear on our discussion forums, but we've certainly got them in our customer list.

    All customers get the same treatment at Parallax whether they're buying an IR LED or a thousand chips. It'll always be this way, too, because our customer base is diverse and most of our staff doesn't know the distinction between hobby and work (right, guys, right, right [noparse]:)[/noparse] ?).

    Ken Gracey
    Parallax, Inc.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-08-22 02:51
    Right Ken!· I was a hobbyist and a customer of Parallax in both the hobbyist and business sense prior to coming to Parallax.· It's a perfect fit!· =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • The CaptainThe Captain Posts: 60
    edited 2006-08-22 14:59
    What if they made a 16 cog propeller chip and a servo board with like 84720395873094857309485734 servo connectors on it. I WOULD BUY IT IN A HEART BEAT!!!!
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2006-08-22 17:14
    The Captain,
    If we sold you that many servo connectors, my children could retire!· ...Do you need servo's to go with that or are you good?
    If not we could probably work out some sort of discounted price break.·smilewinkgrin.gif·
    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Rich MRich M Posts: 33
    edited 2006-08-22 17:20
    Heck, if Parallax came out with an 8 cog propeller that included sufficient on-chip memory and resources that I could drive a 1024x768 VGA display at a high color depth, I'd buy so many, my wife would start raising her eyebrow at me. wink.gif

    - Rich
  • The CaptainThe Captain Posts: 60
    edited 2006-08-22 17:26
    Beau Schwabe,

    Ahahahahah. I was just stating that if you made a Pchip with 16 cogs, I could make my planned robot run off of one chip. Also, you could run an OS on it. freaked.gifroll.gif
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-08-22 22:09
    The Captain said...
    Beau Schwabe,

    Ahahahahah. I was just stating that if you made a Pchip with 16 cogs, I could make my planned robot run off of one chip. Also, you could run an OS on it. freaked.gifroll.gif

    Too late...

    Someone already made an OS for it...
    http://forums.parallax.com/forums/default.aspx?f=25&m=137483

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
Sign In or Register to comment.