Shop OBEX P1 Docs P2 Docs Learn Events
Propeller VS PIC — Parallax Forums

Propeller VS PIC

TronPlayerTronPlayer Posts: 5
edited 2009-12-22 08:38 in Propeller 1
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.
«1

Comments

  • Clock LoopClock Loop Posts: 2,069
    edited 2009-12-19 04:55
    The prop can do all that you want faster because the OBEX is chock full of what you want to do.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-19 05:07
    First of all, you're not going to get an unbiased opinion here. People who frequent this forum, whether they've had previous experience with other microcontrollers or not, have already decided that they like the Propeller.

    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.
  • StefanL38StefanL38 Posts: 2,292
    edited 2009-12-19 05:16
    The propeller is really great I never gonna use any other microcontroller.

    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
  • T ChapT Chap Posts: 4,223
    edited 2009-12-19 05:21
    For $20 you can get a VLSI VS1033 chip mp3/wave/etc player that will play back high quality audio from a USBdrive. This will require you add a Vinculum for USB access. There are a few other components but it is not hard to build if you use the Vmusic2 schematic. If you don't want to build a board then you can buy the Vmusic2 which has a built in USB port to host the thumbdrive. This makes calling up high quality audio prompts incredibly easy.
  • TronPlayerTronPlayer Posts: 5
    edited 2009-12-19 06:10
    Thanks for spending the time to help, it is greatly appreciated! I was browsing the store and wanted to ask your opinions on what hardware is the best to start with (developers boards, etc). Also, I couldn't find the Spin compiler, how much is it? Also, is Spin supported by the developers regularly? One of the problems on the PIC side is lack of software updates.
    Thanks again.
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-12-19 06:13
    The spin and pasm compiler/ide (PropTool - windows only) is free for download from the Parallax site, along with manuals and sample code. There are two other privately written free compilers, bst (windows/inux/mac) and homespun (windows only?).

    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
  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-19 06:21
    The "official" Spin compiler (the Propeller Tool) is free. There are two 3rd party Spin compilers that are also free. All of them run under Windows. One of the 3rd party compilers (BST) also runs under Linux and the MacOS. The other 3rd party compiler (HomeSpun) will run under Windows and under Linux and the MacOS if you install Mono.

    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
  • LeonLeon Posts: 7,620
    edited 2009-12-19 10:12
    PICs are a lot cheaper than the Propeller, and the 16-bit PIC24 and dsPIC offer 40 MIPS (60 MIPS will be available) giving higher performance in some applications. I don't find them any harder to use than the Propeller. Designers generally select the device for a particular application which gets the job done as easily and cheaply as possible - it could be a Propeller, PIC, ARM, AVR or whatever.

    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
  • ForrestForrest Posts: 1,341
    edited 2009-12-19 13:19
    Looking over the datasheets, Microchip seems to have a lot more chips that support USB natively.

    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
  • mparkmpark Posts: 1,305
    edited 2009-12-19 15:21
    Mike Green said...
    The "official" Spin compiler (the Propeller Tool) is free. There are two 3rd party Spin compilers that are also free...

    Hey, don't forget the third 3rd party Spin compiler!
  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-19 15:43
    "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.
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-12-19 16:05
    Sorry Michael. I haven't looked at sphinx yet (no time) and I had totally forgotten about it :-(

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-12-19 17:03
    Leon said...
    PICs are a lot cheaper than the Propeller, and the 16-bit PIC24 and dsPIC offer 40 MIPS (60 MIPS will be available) giving higher performance in some applications. I don't find them any harder to use than the Propeller.

    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.
  • photomankcphotomankc Posts: 943
    edited 2009-12-19 21:28
    I'll tell you.· 8 independent processors in one package really does spoil one.· I was just spending some time looking at the cost to create something the other day and the Propeller was a not insignificant portion of that cost.· However the effort of programming in all the things I would need it to do and using interrupts to do them was not appealing and may not have been very practical given the timing requirements involved.· I would have probably ended up splitting the project into more than one PIC and then the cost difference gets eaten up for each extra PIC added.· I still would like to learn the PIC.· Seems a much better fit for things where you want to build a simple digital interface to·a more complex back-end circuit and I have run into places that would be handy and for which the Propeller is total overkill.

    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.·
  • mparkmpark Posts: 1,305
    edited 2009-12-19 22:19
    (re Sphinx: Mike & Cluso99—no apologies needed. I was just poking a little fun.)
  • LeonLeon Posts: 7,620
    edited 2009-12-19 23:07
    photomankc,

    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
  • TronPlayerTronPlayer Posts: 5
    edited 2009-12-20 00:37
    What development board/programmer do you recommend? The Professional development board sure looks nice, but is it really that necessary to explore all the functionality of the Propeller?
  • localrogerlocalroger Posts: 3,452
    edited 2009-12-20 00:47
    TronPlayer, the three main Parallax-based choices are the PPDB, the DemoBoard, and the ProtoBoard. The PPDB is definitely the Cadillac and well worth it if you can afford one (don't forget it doesn't come with an actual propeller chip, you need a DIP40 version for it). Large array of onboard peripherals, no dedicated lines; pick and choose what you want to use and plenty of breadboard to add SD cards, ethernet, 2 or 3 more video outs, whatever. The Demoboard would be the next choice, about half the price if you don't snag a daily deal on the PPDB. It has a basic mix of I/O built on, it's small because it uses a SMD prop, and has only 8 output lines and not much breadboard, but that's enough for one big peripheral like a SD or ethernet card. The protoboard is meant more for one-use things but you can make a more general purpose breadboard rig out of one, and it's half the cost of the demoboard. If you get the protoboard you'll want to get the expansion kit, but that brings it a lot closer to the demoboard in price and unlike the demoboard it doesn't support NTSC video out, only VGA. I find it a lot easier to find small NTSC terminals than VGA (think portable DVD players, especially ones sold on eBay because they don't play DVD's any more).
  • whickerwhicker Posts: 749
    edited 2009-12-20 00:59
    I guess I really haven't touched the PICs since they had that postage-stamp size window of bank-switched registers, and PROM. Granted, I know they moved onto flash, but isn't there still some proprietary programmer with driver involved?

    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.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-20 01:06
    There's already a program for streaming a WAV file from an SD card. I think it's in the Object Exchange. Take a look.

    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.
  • Sal AmmoniacSal Ammoniac Posts: 213
    edited 2009-12-20 01:33
    The PIC has a brain-dead architecture that was designed in the '70s and is really showing its age. If you need an 8-bit microcontroller, do yourself a favour and consider an AVR or something else with a reasonable architecture. For just about any PIC model, you can find an equivalent AVR for just about the same price.
  • LeonLeon Posts: 7,620
    edited 2009-12-20 11:18
    localroger said...
    TronPlayer, the three main Parallax-based choices are the PPDB, the DemoBoard, and the ProtoBoard. The PPDB is definitely the Cadillac and well worth it if you can afford one (don't forget it doesn't come with an actual propeller chip, you need a DIP40 version for it). Large array of onboard peripherals, no dedicated lines; pick and choose what you want to use and plenty of breadboard to add SD cards, ethernet, 2 or 3 more video outs, whatever. The Demoboard would be the next choice, about half the price if you don't snag a daily deal on the PPDB. It has a basic mix of I/O built on, it's small because it uses a SMD prop, and has only 8 output lines and not much breadboard, but that's enough for one big peripheral like a SD or ethernet card. The protoboard is meant more for one-use things but you can make a more general purpose breadboard rig out of one, and it's half the cost of the demoboard. If you get the protoboard you'll want to get the expansion kit, but that brings it a lot closer to the demoboard in price and unlike the demoboard it doesn't support NTSC video out, only VGA. I find it a lot easier to find small NTSC terminals than VGA (think portable DVD players, especially ones sold on eBay because they don't play DVD's any more).

    You just need to add the parts for NTSC/PAL to the Proto Board .

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
  • LeonLeon Posts: 7,620
    edited 2009-12-20 11:27
    Sal Ammoniac said...
    The PIC has a brain-dead architecture that was designed in the '70s and is really showing its age. If you need an 8-bit microcontroller, do yourself a favour and consider an AVR or something else with a reasonable architecture. For just about any PIC model, you can find an equivalent AVR for just about the same price.

    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
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2009-12-20 15:47
    If you are experienced with micro-controllers, electronics and programming and you have the time then you can just choose the micro that matches the application but if you are like me doing lots of different things that do not need to become products then I have found the propeller to be excellent. There is also a massive difference between professional development and experimental/hobby development, I just don't have the time and inclination to investigate lots of solutions, I find the prop very versatile.

    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
  • parts-man73parts-man73 Posts: 830
    edited 2009-12-20 17:39
    TronPlayer said...
    What development board/programmer do you recommend?

    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
  • Sal AmmoniacSal Ammoniac Posts: 213
    edited 2009-12-20 17:39
    Graham Stabler said...
    If you are experienced with micro-controllers, electronics and programming and you have the time then you can just choose the micro that matches the application but if you are like me doing lots of different things that do not need to become products then I have found the propeller to be excellent. There is also a massive difference between professional development and experimental/hobby development, I just don't have the time and inclination to investigate lots of solutions, I find the prop very versatile.

    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.
  • LeonLeon Posts: 7,620
    edited 2009-12-20 18:50
    Have you tried to buy a six-pin ATtiny? They are vapourware!

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM

    Post Edited (Leon) : 12/20/2009 7:11:36 PM GMT
  • mikedivmikediv Posts: 825
    edited 2009-12-20 19:18
    Just my 002 cents but I have to agree with Leon I love the prop and to be honest have spent more time and money on prop stuff and projects than any other chip but I am a huge PIC fan I have all quite a few of them and just bought a more elaborate PIC programmer. There are so many PIC to chose from its almost to much, But for a simple or quick controller they can not be beat, While the prop is very powerful and has tons of support like everyone said it would depend on what you want, an educational platform, Robotics, Production the prop can do it all with a lot less support chips for some things, but just to give a quick example I shoot pellet guns I live in the boonies and we buy these cheap Chinese knock off copies and to tune them you need a good chronograph kind of expensive, but I used a PIC 16F676, 80 cents and a handful of parts another 2 dollars and built a really nice one that uses an LCD meter for read out I am sure it could be done with a prop chip but I did not want to dedicate my prop proto board 30 dollars to a permanent project .. So with a PIC they are so cheap I can leave this project complete,, Just some thoughts.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-20 19:39
    This topic has come up before. The general opinion of most experienced people is that you choose a particular microcontroller based on the needs of a project. The Propeller is really good at lots of things. PICs are really good at other things. Other manufacturers' devices each have their own niche. Sometimes it's price. Sometimes it's a specific feature. The advantage of being comfortable with several different devices is that you can choose the one that fits best.
  • LeonLeon Posts: 7,620
    edited 2009-12-20 20:41
    I've even mixed devices before now to come up with an optimum solution. I designed a system once with a PIC master and four slave AVRs, using the best features of both devices.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM

    Post Edited (Leon) : 12/20/2009 8:49:04 PM GMT
Sign In or Register to comment.