Parallax Propeller ASC+ Review

So, here we are. This is, perhaps, the inaugural “Hobby Electronics” post on Gadgetoid proper. That’s if you ignore some of my older musings about Ruby on the Pi. My previous home for all things electronics, pi.gadgetoid.com, was written during those Ruby days, in Ruby, and with no content management system of any sort. Updating it is, therefore, an absolute chore and that means I tend not to update it as often as I should.

Anyway, in this article I will be talking, once again ( I hear you sigh ) about the Parallax Propeller ASC+. If you’ve been following my blog, or following me on Twitter, you might have noticed me singing the praises of this beefy multi-cored microprocessor. You might also have noticed it singing back at me, running a software emulation of the Commodore 64s legendary SID chip ( SIDcog ) and being fed control data from a Sparkpunk Sequencer.

This is one of the many, but arguably the most fun, things I’ve done with the Propeller ASC+ in the short time that I’ve had my hands on it. It’s only been 7 days, in fact. During that time I’ve dabbled in the comfort of the open-source GCC-powered SimpleIDE which would naturally appeal to Arduino converts. I then found myself drawn by temptation across to Propeller IDE and the curious and exciting world of SPIN, the Parallax Propeller’s native language ( next to Assembly, anyway ).

In the last couple of days I have dived headfirst into SPIN and grasped the basic concepts of the language capably enough to stitch together libraries and create my own wonderful multi-core musical creations. I’ve leaned heavily upon the work of others, but have learned a lot in my journey, both about SPIN and the basic architecture of the Propeller chip itself.

The Propeller ASC+

Now, on to the review. The Propeller ASC+ is Parallax’s answer to Arduino. The ASC+ is aimed squarely at enticing over converts from the in-fashion micro-controller platform, and its compatibility with the Arduino shield format is, in fact its namesake. ASC stands for Arduino Shield Compatible. And that it is.

Parallax have had to protect their little 3.3V microprocessor somewhat to prevent the 5V signals still prevalent in the Arduino ecosystem from doing any damage, but it’s clear from Arduino’s own offerings that the move to 3.3V continues and 5V is on the way out. The Arduino Due demonstrates this, plus the Arduino Yún, as does the upcoming Arduino Zero. It’s clear that Shields will follow this trend, potentially making the protection on the Propeller ASC+ a little overkill. Fortunately, however, the protection comes in the form of inline resistors, and the underside of the ASC+ is brimming with pads which can be bridged with solder to connect the micro-controller pins directly to their counterpart headers.

Analogue

The Propeller chip doesn’t have any built-in analog to digital conversion, but the ASC+ board more than makes up for this with the inclusion of an MCP3208 which offers 12-bit AD conversion resolution. This is slightly better than the 10-bit available on the Arduino Uno, but comparable to the 12-bit on the upcoming Arduino Zero. For the hobbyist the difference is negligible.

Performance

It’s hard to benchmark a multi-core processor like the Propeller against its Arduino counterparts. In fact it’s hard to benchmark micro-controllers against each other in general. There are many factors at play and it’s often the peripherals, or other features that lead to a choice of one versus the other, rather than raw processing power.

When it comes to raw clock speed, the Propeller P8X32A on the Propeller ASC+ board can be driven up to 100Mhz using a replacement 6.25Mhz crystal ( officially available from Parallax ). There have even been efforts to push it as far as 120 and even 140Mhz. However, out of the box it ships with a 5Mhz crystal and runs at 80Mhz.

Most instructions on the P8X32A take 4 clock cycles to complete, versus 1 on devices like the ATMega328 found on the Arduino Uno. Using horrible fuzzy maths, it’s possible to deduce that the Propeller theoretically runs about 10 times as many instructions per second as the 328, so it’s easy to say it’s like having 8 328s in a single package. These raw numbers are practically meaningless in the bigger picture, though, but it’s fair to say that, on the whole, the Propeller is most definitely faster than an Arduino Uno. How much faster varies, but it’s faster.

Throw in the lack of dedicated PWM, or hardware SPI/I2C on the Propeller and you will find that clock cycles get spent on things you almost get for free on the 328, but with so much power to spare this never has a perceptible effect.

Finally, SPIN, the go-to language for the Propeller, is interpreted at runtime, causing a tradeoff between code size and performance. If you’re working in C and everything is compiled to PASM ( Propeller Assembly ) then you’ll never see this as a problem, but SPIN is rewarding to use, and there’s a great deal of SPIN code out there that you can leverage for your projects.

So, the verdict? The Propeller is faster, much faster, but your mileage will vary depending on what you’re doing and what language you’re doing it in.

IO, IO, it’s off to work we go!

What the Propeller lacks in dedicated IO devices, it really makes up in brute power. You can dedicate a COG to tasks like emulating a SID chip, or several to VGA output up to 1600×1600. You can run I2C implementations, Pin-polling, PWM and basically anything you can imagine. There are tons of projects available in Parallax’s own Object Exchange: http://obex.parallax.com/, it’s pretty comprehensive!

Code, Upload, Test, Repeat

What’s always frustrated me about the Arduino is the sheer breadth of different devices, boot-loaders, programmers and more that are available. I often find myself tossing an Arduino aside in frustration and picking up a different one, from Due, to Leonardo, to Uno and back, when I’m developing and testing Arduino libraries. This is because it seems to be the luck of the draw which one will work well on any given day.

During my development cycle I’ll change something, recompile, re-upload, test, tear out a small amount of hair at my silly mistake and repeat. I’ll do this tens of times in a day, and every second of compile and upload time counts. The Due, which I was using today because of a grumpy Leonardo, is particularly frustrating, its erase and reprogram cycle is painfully long and this really slows down development.

The Propeller, on the other hand, is fast. Really, really, really fast. The tools are designed for one micro-controller and only one, they’re simpler, leaner, more lightweight and more efficient. In fact, I found on multiple occasions that the compile and upload speed for the Propeller was so ridiculously short that I became convinced it simply wasn’t working at all. I found myself mashing the RUN button over and over again because I didn’t believe the code had even uploaded. It had, of course.

The other half of the Propellers upload performance is in the architecture of the chip itself. It doesn’t have any flash. That sounds controversial at first since… well… how on earth can you store a program on something with no storage? The answer, of course, is EEPROM, and the Propeller ASC+ comes with a 64K EEPROM onboard which can be flashed with your program, that is then loaded into the Propeller, in its entirety, at boot and stored in memory during runtime.

You can also upload a program directly into the Propeller’s memory from the IDE, bypassing any need to erase or reprogram. This process is lightning fast, but does come with a small gotcha. If you leave some arbitrary program on your EEPROM and your program-in-testing should reset the chip for some reason or another, then that program will be loaded in place of your in-development one causing minor confusion.

Anyway, when it comes to Just Working, I’ve tested the Propeller ASC+ on both Windows and OSX and been suitably impressed with the painless setup. The tools are sleeker, faster and friendlier – PropellerIDE even has code completion! – and the change-upload-test-repeat cycle is much, much faster. If you can forgive the lack of onboard peripherals, the Propeller is an absolute joy to develop for.

Open Sauce

Long gone are the days when Parallax had no open-source community, they’ve come ’round to the growing importance of sharing code for the greater good and have a variety of development tools right in GitHub for your forking pleasure. These include, perplexingly, a development effort to port SimpleIDE ( the C based IDE for the Propeller ) to IOS devices.

Price & Final Comments

At twice the price of an Uno, or around $50, the Propeller ASC+ isn’t cheap. Is it twice as good, though? Easily. The bonus storage space in the EEPROM make it great for logging applications, or storing additional data or settings. The onboard SD card slot, which is extremely easy to get up and running, can also be combined with a launcher-like boot-loader to let you switch between dozens of programs on the go. That’s a pretty incredible feature if you think about it.

It’s not the only Propeller board available by far, either, and with schematics of their boards, and DIP/QFN chips readily available in low quantities Parallax have opened the door for anyone to make a board to their unique specifications.

I highly recommend the ASC+ to any seasoned Arduino user, in fact I challenge you to pick one up, learn SPIN, and get a feel for how nice the tools, resources and community are. Arduino have a lot of mileage on the latter, but Parallax have a dedicated fan following and some great tutorials, both of which will help to get you started.