Propeller Manual

Table Of Contents
Introducing the Propeller Chip
I/O Pins
The Propeller has 32 I/O pins, 28 of which are entirely general purpose. Four I/O pins (28 -
31) have a special purpose at Boot Up and are available for general purpose use afterwards;
see the Boot Up Procedure section on page 18. After boot up, any I/O pins can be used by
any cogs at any time since I/O pins are one of the common resources. It is up to the
application developer to ensure that no two cogs try to use the same I/O pin for conflicting
purposes during run-time.
For details of the I/O hardware, refer to the internals of the cogs in Figure 1-2 on page 20
while reading the following explanation.
Each cog has its own 32-bit I/O Direction Register and 32-bit I/O Output Register to
influence the directions and output states of the Propeller chip’s corresponding 32 I/O pins.
A cog's desired I/O directions and output states is communicated through the entire cog
collective to ultimately become what is called "Pin Directions" and "Pin Outputs" in the
upper right corner of Figure 1-2 on page 20.
The cog collective determines Pin Directions and Pin Outputs as follows:
1. Pin Directions are the result of OR'ing the Direction Registers of the cogs together.
2. Pin Outputs are the result of OR'ing the output states of the cogs together. A cog's
output state consists of the bits of its I/O modules (the Counters, the Video
Generator, and the I/O Output Register) OR'd together then AND'd with the bits of its
Direction Register.
In essence, each I/O pin’s direction and output state is the “wired-OR” of the entire cog
collective. This allows the cogs to access and influence the I/O pins simultaneously without
the need for any resource arbiter and without any possibility of electrical contention between
the cogs.
The result of this I/O pin wiring configuration can easily be described in the following simple
rules:
A. A pin is an input only
if no active cog sets it to an output.
B. A pin outputs low only
if all active cogs that set it to output also set it to low.
C. A pin outputs high if any
active cog sets it to an output and also sets it high.
Table 1-4 demonstrates a few possible combinations of the collective cogs’ influence on a
particular I/O pin, P12 in this example. For simplification, these examples assume that bit 12
of each cog’s I/O hardware, other than its I/O Output Register, is cleared to zero (0).
Page 26 · Propeller Manual v1.1