Intrigued by the architecture of the Parallax Propeller IC - which I discussed last week, I decided to bag a couple of dev-boards and have a go for myself.
I must say - that the more I read about this device, and explore the wide variety of uses that others have found for it, the more enthusiastic I feel for it.
It's not an ARM, or an AVR or a PIC - it's something fundamentally quite different. It has humble beginnings, but appear to be able to punch above it's weight. It consists of a combination of 8 individual 32 bit processors arranged around a central servicing hub, each with local memory - fast SRAM, and the means to communicate through the central hub RAM.
Mastering the techniques of the Propeller, will give the novice a much greater understanding of how firmware and hardware can interact in a very positive manner - to create a system building component - that appears to exceed than the sum of its parts.
Having spent the best part of 2 years designing ARM processors into products, I am very aware of the ever increasing complexity of modern microcontrollers. Approximately half of my code is devoted to setting up the peripherals, so that they do what the application demands. Just flashing an LED on an ARM Cortex M4, takes about 10K of code, and about a week to reach that magic blink moment - from a standing start.
The tool chains to support these chips are becoming monsters - multi-gigabyte behemoths, that take a long time to master. Nothing is quick nor easy anymore - that's why, when I re-stumbled across Parallax's Propeller (after some years) I was pleasantly surprised.
My Aims:
Gimme Hardware
The longest journey begins with the first step - and in this case that step was to source some suitable hardware, at fairly short notice - and get experimenting. Unfortunately, in the UK there are not many distributors who carry the Propeller device - but I did find Pimoroni in Sheffield, who have a board called a Propeller HAT intended to be mounted on top of a Raspberry Pi - available for a modest £15 each.
As can be seen from the photo, the Propeller Hat is a fairly simple circuit consisting of the Propeller P8X32A, a small EEprom (24LC32) a 6MHz crystal and a 3.3V regulator.
On the top side of the HAT, running parallel to the long sides of the pcb, there are two 20 pin headers that break out the pins from the Propeller IC - all except P30 and P31 that are used for the serial interface.
Along the short sides of the pcb, are 12 pin female header sockets - which connect to various pins on the Pi GPIO connector. In the centre is an area intended to take a self-adhesive mini-breadboard.
Making it Work
Unfortunately, there is a little bit of preparatory work to do before this becomes a general purpose Propeller 1 dev board, rather than a Pi specific one - as the eeprom is actually intended to be the identity eeprom for the HAT, and is not actually connected to the pins of the Propeller IC - doh!
Additionally the 24LC32 is way too small for the Propeller applications - so the first job was to replace it with a 24LC256 - which fortunately I had available - left over from another job.
The following pins need to be linked before the Propeller will work as a stand alone.
EEprom Vcc (Pin 8) to 3V
EEprom WP (Pin 6 ) to 0V
EEprom SCL (Pi Connector pin 28) to Propeller A28
EEprom SDA (Pi Connector pin 27) to Propeller A29
The using an FTDI cable or similar USB to Serial adaptor
Pin 1 0V GND
Pin 2 Not connected
Pin 3 +5V
Pin 4 Tx to Pi Connector pin 8
Pin 5 Rx to Pi Connector pin 10
Pin 6 DTR
It should be noted that DTR is normally low - and this will cause the Propeller to be held in Reset. (This confused me for quite a while!) It is therefore necessary to invert DTR with an NPN transistor before connecting to Propeller Reset.
To make up for the missing Raspberry Pi, I used one of my Piano Forte pcbs to act as a base board for the Propeller Hat. This provides power and a connection point for the FTDI cable, but also has footprints to accept 3 different wireless modules, a micro SD card socket and a Lithium battery boost and charge circuit. Whilst modifying the Propeller HAT was a minor inconvenience, it it more than made up for by the rapid access to a whole bunch of useful peripheral devices. The Piano Forte board also provides an Arduino Shield header format - allowing the Propeller to access all of the Arduino ecosystem too!
Parallax has traditionally had a long history with microcontroller educational projects - beginning many years ago with the BASIC Stamp. This tradition continued when the Propeller took over about 10 years ago with some well thought out kits and starter boards - aimed squarely at educating the newcomer about the unique language and interfacing techniques made possible with the Propeller.
With just a dozen or so resistors, the Propeller can generate VGA video and host a PS/2 Keyboard and Mouse - with this you have the basis of a complete mini-workstation, capable of running interactive BASIC or Forth, or providing the User Interface for other products.
Whilst searching for UK Propeller boards, I also found a rather neat application for the Propeller IC - as a serial controlled VGA generator - illustrated nicely in this video by HobbyTronix.
Propeller has been used for some fairly serious hardware projects. It is not a toy by any means, and it's ability to use software defined peripherals - make it virtually a unique device.
Several Propellers may be interconnected to form a more complex system, with the peripheral functions shared amongst them. There is a product called Tri Blade - that contains 3 Propeller ICs - and 1Mbyte of 55nS SRAM. One propeler handles VGA, keyboards and mouse, another is the main compute engine, and the third is dedicated for interfacing wit external devices - such as ethernet controllers etc.
Some of these boards - often built by interested enthusiasts - feature strongly on the Propeller forum
Here is a mini board P8XBlade 2 - by very creative forum member Cluso (Ray Rodrick).
Why I Like the Propeller
I've only been looking at the Propeller chip for about a week now, but already I am starting to like it - for a whole variety of reasons - some from the heart and some from the head. Here's just a few of those reasons, so far....
The Propeller concept is almost entirely the work of one very talented engineer, Chip Grasey. Whilst most ICs are these days designed and implemented by a team of engineers - with a multi-million dollar budget, Propeller was developed by Chip aided by a group of friends and co-workers.
Propeller has some very flexible hardware, in the form of counters, which can be used to create a variety of peripheral functions, assisted by some fairly tightly coded assembly language program modules.
The 40 pin DIL version is very easy to prototype with on stripboard, breadboard or perfboard. As all pins can be allocated to any function, there are no restrictions on what you can connect to what. Reversing the bus order, or swapping Rx and Tx pins on UARTS becomes simple - just change the code. This is as close as we get to soft-hardware!
Propeller is scalable - more Propeller chips can be added to extend the functionality of a design. PropForth comes with a library that allows high speed communication between Propeller chips. Here's one example of TetraProp - four Propeller ICs on a small board - all talking to a master device with micro SD card.
There is a strong community and forum behind Propeller. Chip Grasey is a regular contributor and treats his customers as friends and co-developers.
The Propeller Tool is by today's tool chain standards a fairly small program. The executable has a disk image size of just 4Mbytes, and the whole package, of tool, examples and documentation is about 35Mbytes.
The IP behind the Propeller IC has been open-sourced. You can study every detail, modify and create your own variations which will run within an FPGA.
The open core and multi-processor design of the Propeller IC lends itself to demonstrating the fundamentals of digital microelectronics and microprocessor architecture, and is a perfect platform for studying electronics and computing science at undergraduate level, with sufficient content to encourage creative development.
An article - originally written for RS Components by William G. Marshall - about 6 years ago - captures succinctly some of the key aspects of propeller.
Incidentally, RS Components stock Propeller devices! - both DIL-40 and 44 pin LQFP - this is good to see that at least one of the big UK/Global Distributors is still supporting these devices.
Next Time
In the next part of this series, I will hopefully have had a chance to play with various aspects of the Propeller, had a look at Tachyon Forth, and will have some peripherals including VGA, keyboard and mouse wired up to the board.
I am not planning to write a book on this processor - that has already been done elsewhere by skilled users. I am just hoping that the information I offer here is sufficient to encourage others to have a fresh look at this fascinating device.
A broad outline of future blog-posts in the pipeline would be (subject to change).
Interfacing VGA, Keyboard and Mouse to Propeller IC using Evita pcb - above
Tachyon Forth
Basic Peripherals - GPIO, SPI, I2C, UARTS, ADC, DAC, Audio
microSD Card
I must say - that the more I read about this device, and explore the wide variety of uses that others have found for it, the more enthusiastic I feel for it.
It's not an ARM, or an AVR or a PIC - it's something fundamentally quite different. It has humble beginnings, but appear to be able to punch above it's weight. It consists of a combination of 8 individual 32 bit processors arranged around a central servicing hub, each with local memory - fast SRAM, and the means to communicate through the central hub RAM.
Mastering the techniques of the Propeller, will give the novice a much greater understanding of how firmware and hardware can interact in a very positive manner - to create a system building component - that appears to exceed than the sum of its parts.
Having spent the best part of 2 years designing ARM processors into products, I am very aware of the ever increasing complexity of modern microcontrollers. Approximately half of my code is devoted to setting up the peripherals, so that they do what the application demands. Just flashing an LED on an ARM Cortex M4, takes about 10K of code, and about a week to reach that magic blink moment - from a standing start.
The tool chains to support these chips are becoming monsters - multi-gigabyte behemoths, that take a long time to master. Nothing is quick nor easy anymore - that's why, when I re-stumbled across Parallax's Propeller (after some years) I was pleasantly surprised.
My Aims:
- Learn more about the Propeller and the means of controlling external hardware using it's "soft peripherals".
- Create a dev-board that can be applied to a number of projects - complete with a supporting infrastructure
- Explore the use of the on-chip VGA video generation, as a means of creating a sef-hosting, more intuitive user interface - to improve my programming productivity.
- Re-visit Forth - either PropForth or Tachyon Forth - as a language for Hardware Exploration
- Apply this new software/hardware mix to solving everyday engineering problems.
Parallax are working on a new Propeller IC - which is currently available only as a verilog design that will run on an FPGA. It appears to increase the performance of the existing design by a factor of about 8. When it makes it's commercial debut, I shall be ready, prepared and waiting for it.
If everything else fails - and 32 bit processor performance plateaus in the next few years, preventing the relentless rise in complexity of the mobile devices we now use, we can re-invent it all - with a big bucket of Propeller chips!
Gimme Hardware
The longest journey begins with the first step - and in this case that step was to source some suitable hardware, at fairly short notice - and get experimenting. Unfortunately, in the UK there are not many distributors who carry the Propeller device - but I did find Pimoroni in Sheffield, who have a board called a Propeller HAT intended to be mounted on top of a Raspberry Pi - available for a modest £15 each.
Propeller HAT (underside) - neat pcb in black solder-resist and gold flash |
On the top side of the HAT, running parallel to the long sides of the pcb, there are two 20 pin headers that break out the pins from the Propeller IC - all except P30 and P31 that are used for the serial interface.
Along the short sides of the pcb, are 12 pin female header sockets - which connect to various pins on the Pi GPIO connector. In the centre is an area intended to take a self-adhesive mini-breadboard.
Making it Work
Unfortunately, there is a little bit of preparatory work to do before this becomes a general purpose Propeller 1 dev board, rather than a Pi specific one - as the eeprom is actually intended to be the identity eeprom for the HAT, and is not actually connected to the pins of the Propeller IC - doh!
Additionally the 24LC32 is way too small for the Propeller applications - so the first job was to replace it with a 24LC256 - which fortunately I had available - left over from another job.
The following pins need to be linked before the Propeller will work as a stand alone.
EEprom Vcc (Pin 8) to 3V
EEprom WP (Pin 6 ) to 0V
EEprom SCL (Pi Connector pin 28) to Propeller A28
EEprom SDA (Pi Connector pin 27) to Propeller A29
The using an FTDI cable or similar USB to Serial adaptor
Pin 1 0V GND
Pin 2 Not connected
Pin 3 +5V
Pin 4 Tx to Pi Connector pin 8
Pin 5 Rx to Pi Connector pin 10
Pin 6 DTR
Pi GPIO Connector - as viewed from above "through the board" |
It should be noted that DTR is normally low - and this will cause the Propeller to be held in Reset. (This confused me for quite a while!) It is therefore necessary to invert DTR with an NPN transistor before connecting to Propeller Reset.
To make up for the missing Raspberry Pi, I used one of my Piano Forte pcbs to act as a base board for the Propeller Hat. This provides power and a connection point for the FTDI cable, but also has footprints to accept 3 different wireless modules, a micro SD card socket and a Lithium battery boost and charge circuit. Whilst modifying the Propeller HAT was a minor inconvenience, it it more than made up for by the rapid access to a whole bunch of useful peripheral devices. The Piano Forte board also provides an Arduino Shield header format - allowing the Propeller to access all of the Arduino ecosystem too!
Four wires are needed to hook up the EEprom - see text |
A spare, bare, Piano Forte pcb provides power, comms and peripherals |
Finally, it's time to play Propeller Pirates! |
Parallax has traditionally had a long history with microcontroller educational projects - beginning many years ago with the BASIC Stamp. This tradition continued when the Propeller took over about 10 years ago with some well thought out kits and starter boards - aimed squarely at educating the newcomer about the unique language and interfacing techniques made possible with the Propeller.
With just a dozen or so resistors, the Propeller can generate VGA video and host a PS/2 Keyboard and Mouse - with this you have the basis of a complete mini-workstation, capable of running interactive BASIC or Forth, or providing the User Interface for other products.
Whilst searching for UK Propeller boards, I also found a rather neat application for the Propeller IC - as a serial controlled VGA generator - illustrated nicely in this video by HobbyTronix.
Propeller has been used for some fairly serious hardware projects. It is not a toy by any means, and it's ability to use software defined peripherals - make it virtually a unique device.
Several Propellers may be interconnected to form a more complex system, with the peripheral functions shared amongst them. There is a product called Tri Blade - that contains 3 Propeller ICs - and 1Mbyte of 55nS SRAM. One propeler handles VGA, keyboards and mouse, another is the main compute engine, and the third is dedicated for interfacing wit external devices - such as ethernet controllers etc.
Some of these boards - often built by interested enthusiasts - feature strongly on the Propeller forum
Here is a mini board P8XBlade 2 - by very creative forum member Cluso (Ray Rodrick).
Why I Like the Propeller
I've only been looking at the Propeller chip for about a week now, but already I am starting to like it - for a whole variety of reasons - some from the heart and some from the head. Here's just a few of those reasons, so far....
The Propeller concept is almost entirely the work of one very talented engineer, Chip Grasey. Whilst most ICs are these days designed and implemented by a team of engineers - with a multi-million dollar budget, Propeller was developed by Chip aided by a group of friends and co-workers.
Propeller has some very flexible hardware, in the form of counters, which can be used to create a variety of peripheral functions, assisted by some fairly tightly coded assembly language program modules.
The 40 pin DIL version is very easy to prototype with on stripboard, breadboard or perfboard. As all pins can be allocated to any function, there are no restrictions on what you can connect to what. Reversing the bus order, or swapping Rx and Tx pins on UARTS becomes simple - just change the code. This is as close as we get to soft-hardware!
Propeller is scalable - more Propeller chips can be added to extend the functionality of a design. PropForth comes with a library that allows high speed communication between Propeller chips. Here's one example of TetraProp - four Propeller ICs on a small board - all talking to a master device with micro SD card.
TetraProp - Four Propeller ICs on top, and another Master IC below |
There is a strong community and forum behind Propeller. Chip Grasey is a regular contributor and treats his customers as friends and co-developers.
The Propeller Tool is by today's tool chain standards a fairly small program. The executable has a disk image size of just 4Mbytes, and the whole package, of tool, examples and documentation is about 35Mbytes.
The IP behind the Propeller IC has been open-sourced. You can study every detail, modify and create your own variations which will run within an FPGA.
The open core and multi-processor design of the Propeller IC lends itself to demonstrating the fundamentals of digital microelectronics and microprocessor architecture, and is a perfect platform for studying electronics and computing science at undergraduate level, with sufficient content to encourage creative development.
An article - originally written for RS Components by William G. Marshall - about 6 years ago - captures succinctly some of the key aspects of propeller.
Incidentally, RS Components stock Propeller devices! - both DIL-40 and 44 pin LQFP - this is good to see that at least one of the big UK/Global Distributors is still supporting these devices.
Next Time
In the next part of this series, I will hopefully have had a chance to play with various aspects of the Propeller, had a look at Tachyon Forth, and will have some peripherals including VGA, keyboard and mouse wired up to the board.
I am not planning to write a book on this processor - that has already been done elsewhere by skilled users. I am just hoping that the information I offer here is sufficient to encourage others to have a fresh look at this fascinating device.
FT812 pcb provides pin connectors for VGA , PS/2 Keyboard and Mouse |
A broad outline of future blog-posts in the pipeline would be (subject to change).
Interfacing VGA, Keyboard and Mouse to Propeller IC using Evita pcb - above
Tachyon Forth
Basic Peripherals - GPIO, SPI, I2C, UARTS, ADC, DAC, Audio
microSD Card