Propeller versus other micros, generally speaking
T Chap
Posts: 4,223
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.
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
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
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
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
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.
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.
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. 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.
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.
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
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
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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
I learn something new every day.
- Rich
You may not have seen this:
http://forums.parallax.com/attachment.php?attachmentid=40588
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
I will certainly point the thread to a few PIC and AVR people.
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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
(I'm thinking of projects in the 100 - 10.000 units range)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...
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.
Great to see planned price decreases though as it just encourages you to find more applications.
Graham
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. 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
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Who says you have to have knowledge to use it?
I've killed a fly with my bare mind.
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]
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 Savage
Parallax Tech Support
csavage@parallax.com
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.···
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
- Rich
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.
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...