Propeller VS PIC
TronPlayer
Posts: 5
Hi,
I had some quick questions about the Propeller chip and Spin. I have been excited to get into embedded programming and recently purchased an EasyPic development board before I heard about Propeller. My question is how does Propeller compare to PIC in ease and capabilities? Is SPIN easy to use? More like basic or C? It is possible to play high quality music/audio prompts with Propeller from an SD card? Also, can Propeller be used as a USB host? Any general comparisons/experiences you have between the two would be greatly appreciated!
Thanks.
I had some quick questions about the Propeller chip and Spin. I have been excited to get into embedded programming and recently purchased an EasyPic development board before I heard about Propeller. My question is how does Propeller compare to PIC in ease and capabilities? Is SPIN easy to use? More like basic or C? It is possible to play high quality music/audio prompts with Propeller from an SD card? Also, can Propeller be used as a USB host? Any general comparisons/experiences you have between the two would be greatly appreciated!
Thanks.
Comments
For myself, I've written programs for PICs, mostly the smaller ones, and feel that the Propeller is easier to use and Spin is easy to use. The complex bits are those that have to do with either the application itself or the use of multiple processors, although using multiple processors is more straightforward than using interrupts to perform the same functions.
Spin is very similar to C in ease of use. It borrows some things from C, some from Pascal, some from Python, some from other languages.
There is a WAV player that runs on the Propeller, either playing from memory or from an SD card. It's not CD quality sound, but pretty good
There is some code (in the Object Exchange I think) that lets the Propeller be used as a low-speed USB host for HID (keyboard, mice, etc.) There is no code available for general USB host use and the general opinion is that it can't be done without some external hardware. Given how inexpensive other USB host devices are (like Vinculum's), it's a better use of resources to use something else for that purpose. Note that many USB "stacks" for the smaller microcontrollers only implement HID and even "cheat" at that. They don't implement the full USB protocol and only provide a similar USB support as the Propeller code.
There's an interesting package in the Object Exchange that provides a full multi-channel stereo vocal synthesis program that runs on the Propeller and the associated demo program is known as the "singing monks" and does 4 part harmony. Very impressive.
There are two C compilers for the Propeller as well, one free and the other commercial, but very reasonably priced.
BUT:
high quality audio - meaning 160 kbit MP3 stereo decoding is hard to do.
An USB-host needs high-speed and has hard to reach timing-requirements
So I would say you can use it for ANYthing but high-quality MP3-decoding and USB-hosting
I highly doubt than any general-purpose microcontroller with NO special decoding hardware can do MP3-decoding.
Same for USB-hosting it needs special hardware. You can add a MP3-decoder and USB-hosting as external hardware to the propeller.
So start with the PIC and if - you want to add VGA-Signal-Output to have a comfortable display for your project
and add a PC-keyboard for comfortable input, just grab a propeller and download the PC-keyboard-objects and the VGA-object from the obex
communicate with your PIC over a serial RS232 or SPI or I2C-interface develop your customized code in 2 days and you are done.
(2 days if you know how to program in SPIN)
If you are not fixed on a project with MP3-decoding and USB-hosting then I recommend the propeller.
The software for developing and downloading programs in SPIN is MUCH easier than ANY toolchain for programming in C for other microcontrollers
(editor, compiler, linker, etc. etc)
And you have 8 cores that can execute code completely independent from each other. Dedicating a co-processor to do anything is MUCH easier
than fiddling around with special purpose-hardwareregisters for I2C, SPI, UART or interrupts.
best regards
Stefan
Thanks again.
And, let me say, this forum is the best for getting help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
The Propeller Tool and BST are actively updated when necessary. Both are pretty stable. Library "objects" are available for downloading from the Propeller Object Exchange and are contributed by users and Parallax staff. Some of the commonly used "objects" are distributed with the Propeller Tool, but the most recent versions are always available from the Object Exchange.
See the Propeller Object Exchange index and the Propeller Downloads page off the Parallax main webpage.
As Cluso99 mentioned, all 3 compilers also include assemblers since programs include both Spin interpreted code and native assembly code. Typically, high-speed or time-sensitive code is written in assembly and everything else is written in Spin. For most users, the only assembly code is in the library "objects" that they include in their programs.
Post Edited (Mike Green) : 12/19/2009 6:28:26 AM GMT
For many applications with the Propeller assembler has to be used to get the required speed as Spin and C are too slow. This isn't the case with PICs, as efficient C compilers are available. The newer 8-bit PIC18 and 16-bit PICs have extensive peripheral libraries for the C compilers which make development very quick and easy.
Some PICs have USB OTG, which gives USB host capabilities.
I don't see where you got the idea that Microchip doesn't provide updates, their software is frequently updated for new devices and to fix bugs.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Post Edited (Leon) : 12/19/2009 1:45:02 PM GMT
Propeller has the advantage of being able to generate many video signals - composite video, television and VGA with just a handful of resistors.
Each chip has it's strengths. If you want to use both chips, you may want to check out the Chameleon, which combines a PIC24 and a Propeller on one board www.xgamestation.com/view_product.php?id=52
Hey, don't forget the third 3rd party Spin compiler!
Sorry, I was thinking more about the usual desktop compiler for Windows, Linux, and the MacOS.
mpark has managed to put a whole development environment together (editor, compiler/assembler, I/O drivers) that runs natively on the Propeller which he's called Sphinx. It requires a PS/2 keyboard, TV display, and SD card, and will compile itself. Pretty much any Propeller board will run it although you need to add an SD card socket and wire it to a couple of I/O pins. Parallax and others sell a mini-SD card adapter that'll work.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
True, although getting the config bits set properly the first time you use a new chip can be a bit of a challenge. That is one place where the propeller is easy to use, especially for beginners.
Having said that, there are applications that there is no real push in my mind, to take the propeller. If you have an app that needs 200K prog space, or native USB, use a pic. For large apps, spin isn't really a replacement for C because of cog ram limitations.
I think overall the learning curve getting into the propeller is much less than other micros, and what you learn is not wasted if you want to move on to the pic/c world.
This was a journey for me out my comfort area.· I usually programmed more along the lines of DB access and GUIs so getting into the hardware level was a big step for me to take.· I found it easy to take that step with the Propeller and I was out all of about $30.00 to get started programming it on a breadboard.·
You were probably looking at the wrong PIC. The simpler ones only have one interrupt which makes things awkward, as the source of the interrupt has to ascertained before it is processed. There are devices that can more easily handle multiple interrupts.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Since my career doesn't depend on fattening somebody else's wallet with volume sales on the order of millions, I think I can splurge and pay the whole $8 it takes to use something that doesn't make my life miserable.
I guess, why couldn't you stream a wav file (or raw file) at 32 Khz from an SD card?
I'm seeing a buffered read speed around here of 800 kilo-BYTES per second, that divided by two for 16-bit audio is 400,000 samples per second. by two again for stereo is 200,000 samples per second. 32 kHz acceptable quality is only 32,000 samples per second.
The DemoBoard is indeed nice. I have one with a mini-SD card socket glued onto the top of the VGA connector and the 4 I/O pins plugged into the I/O connector along with Vdd and Vss. That still leaves 4 I/O pins for experimentation and the breadboard area is available.
You just need to add the parts for NTSC/PAL to the Proto Board .
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
I'd say it was the other way round. Microchip makes such a vast range of devices that it is generally quite easy to find one that is a close fit to an application, that will be cheaper than an AVR. Also, the Microchip tools (software and hardware) are much better. That is why Microchip is number one in 8-bit MCUs and Atmel is number five. I like and use AVRs, but I use the best device for a particular application.
The 16-bit PIC24s and dsPICs offer 40 MIPS, have a much nicer architecture than the AVR, and cost about the same.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Post Edited (Leon) : 12/20/2009 3:53:56 PM GMT
I could program in C already but had never really got in to micros when I occasionally tried, the propeller was an instant hit with me, I love the multi cog method of programming and I really don't see how I could have created what I have created on the propeller with relative ease on a different platform, at least not in the time I created it in. I have had the same experience with others I have helped, who after a few weeks from no knowledge at all have created some relatively complex real time applications.
It is not the be all and end all but it is pretty great for many things and a great deal of fun.
Graham
If you don't mind soldering. The SpinStudio modules could be a good choice for a beginner. You can start off with a MainBoard and a couple modules. Then add peripherals as your needs change.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian
uController.com - home of SpinStudio - the modular Development system for the Propeller
PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!
SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board
Graham,
I agree completely with your assessment of the difference between professional and hobby development. As a hobby developer I have standardized on the propeller because of its versatility and ease of use. I recently reimplemented a project on the propeller that I'd originally done with an ARM processor. The propeller implementation took about 1/10 the time as the ARM project. In fact, as I mentioned in another post, it took me considerably less time to implement a driver for a sensor with an SPI interface on the propeller than it did to read and understand the SPI peripheral section of the ARM datasheet.
From this point on, I'll only use another processor if I need something truly small and compact (like a 6 pin ATtiny) or something with more horsepower (like the XMOS). The $8 cost of a propeller is completely insignificant in one-off hobby projects.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Post Edited (Leon) : 12/20/2009 7:11:36 PM GMT
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Post Edited (Leon) : 12/20/2009 8:49:04 PM GMT