repetitive actions required while the microcontroller
communicates with them to obtain data or effect actions
using a serial protocol like I2C, SPI, 1-Wire, Asynchronous,
and so forth. In addition, these modules encapsulate
circuitry that you would otherwise have to create.
If your project requires several helper modules,
however, they can add a significant expense to the overall
cost of the project. Additionally, wiring and board real
estate can become quite cramped. Also, serial
communications can be a performance bottleneck, limiting
the overall speed of the system. Another disadvantage is
that the programmer has to learn many different
specifications.
Traditional Solutions
Many microcontrollers (e.g., SX28AC/DP, 68HC12) can
implement pseudo-parallel processing using interrupts. This
— besides being very complex to program — is not real
parallel processing. Using interrupts, you can only carry out
a small number of tasks before you run out of timing
bandwidth. For example, using a buffered software UART
while also performing PWM in the interrupt loop can rapidly
task most microcontrollers, leaving very little time to do
other actions in the main loop of the program.
Another method of designing a parallel concurrent
system is to use multiple processors. However, you do need
to decide on how these processors will intercommunicate.
Usually, this is achieved by designating a central master
controller that communicates with the others using serial
communication (as in our space station project). However,
serial communication can limit the overall system’s response
time. A much faster and very viable method for
intercommunicating multiple processors is achieved by
utilizing a shared RAM. However, programming such a
system can be overly complex. Imagine what would happen
if two processors try to write to the same memory location
at the same time, or consider what would become of the
validity of the data read by one processor while
another is writing to it.
FIGURE 2. RobotBASIC control program.
within the chip’s hardware. It is so simple to implement
concurrent processing with the Propeller that even the
novice programmer can achieve astounding results.
FIGURE 3. The space station model control systems.
The Propeller Chip
Advantage
The Propeller chip has eight processors
(cogs) that can run independently and in parallel.
With the Propeller chip, you can implement the
actions of many helper modules within the one
chip. This greatly reduces cost, wiring, and
project board real estate. Additionally, with the
ability of the cogs to share the 32 KB of onboard
RAM memory (called hub RAM),
intercommunicating the eight sub-microcontrollers is effortless. The Propeller chip
solves all the memory access contentions
associated with the shared RAM solution entirely
FIGURE 4. BS2-based setup.
SERVO 12.2010 71