| AND
Technology Research Ltd. 4 Forest Drive, Theydon Bois Essex. CM16 7EY. UK +44 (0) 1992 814655 | Tel |
![]() |
MCU Architecture
Complementing
this
month's Micro of the Month feature David takes a closer look at Parallax's
Propeller architecture & how its novel approach, could see it become a serious
contender.
In a single processor solution, multiple threads of control introduce latency, code growth, and complexity -- interrupt entry, context save, flag decoding, running code, context restore & return. The Propeller has none of this, preferring instead a philosophy of splitting tasks amongst the cogs. Thus, each cog can become its own highly programmable minimal latency interrupt handler, because other cogs run other code uninterrupted. With the addition of some highly programmable timer/counter modes, you can effectively implement your own event system that performs many times better & more predictable than a traditional interrupt. This places the Propeller very well in the league of real-time data stream processing, for example audio.
The absence of common peripherals again is intentionally handled via a mindset shift - each cog is a very capable processor, & with 8 of them all with access to all 32 GPIO's, it's easy to write your own peripheral handler in code & dedicate any cog to it. This means that the silicon space is not dedicated to a wide range of peripherals you may not use, but can be programmed to suit your specific applications needs.
The Propeller can be programmed in 3 separate languages. It comes with its own onboard highly compact SPIN language, which is a low-level interpreted language running about 1/10th the speed of assembler, & normally used for main application code. For very high speed time critical real-time operations, assembler is used. The instruction set of the cog's is a highly orthogonal RISC register based load/store architecture with features to help predictable code execution, such as conditional execution of any instruction, & conditional write back of any result - thus you can more finely tune the execution time of code without inserting NOPS or counting cycles and balancing code paths. Finally, there is a credible commercial ANSI C (C89) compiler (which also has a non-commercial "lite" mode).
Propeller power consumption is not as competitive as some of the ultra low power devices now coming onto the market, but ranges from micro amps to milliamps depending how many cogs are running. A cog can be configured to automatically power down when it finishes its task, & standby currents while waiting for a pin change or hub synchronisation are an order of magnitude lower than when running code at full steam.
The absence of any form of A/D or D/A somewhat places the Propeller more in the digital domain, but often in practice the onboard A/D on many MCU's has limited range & performance for many applications, meaning that external devices are often required. It's also clear that you're likely to run out of pins before you run out of performance, but the architecture has space reserved for up to 64 GPIO's, & there is talk of a 64 IO version being released.
Parallax do an affordable demo board that includes PSU, VGA, composite video,
PS/2 keyboard & mouse, an on-board stereo headphone amp & microphone,
& a small breadboard. It comes pre-loaded with an impressive VGA demonstration
application, & the free tools come bundled with many other sample applications
& reusable code objects. Code objects are written to be pretty much plug
& play, with the editor grouping together SPIN code, constant data, assembler
& documentation with schematic diagrams into a single .spin file. A look
at the MIT licensed object exchange on the parallax website pulls up hundreds
of pre-written cog objects for a disparate range of peripherals, video, audio
processing, RFID & other predictable real-time applications. Whether the
Propeller stays in the traditional hobby/education & small-scale embedded
market carved by the BASIC Stamp, or whether it successfully migrates into mainstream
embedded is only limited by the imagination of the engineers that engage with
its novel architecture. If the Parallax object exchange is anything to go by,
there is already a thriving community of engineers doing just that.
Useful links
Parallax
Inc [www.parallax.com]