Page 240 - Embedded Microprocessor Systems Real World Design
P. 240
Open-Collector Serial Interface
Figure 8.10 shows a simple means to provide interprocessor communication using
an asynchronous serial port such as the one available on most microcontrollers. All
the processors drive a common serial line with opencollector drivers. The common
serial line is pulled up to +12V. Each processor has a comparator, referenced at
+6V, to receive data.
With a 6V reference, the noise immunity of this approach is similar to that of
RS-232, but the opencollector drive allows multiple devices to communicate over
a single wire. Since the system uses standard asynchronous signaling, any type of
processor can communicate on the bus.
To implement this system, one of the processors would be designated as the
master, and the other processors would transmit only when requested to do so by
the master. This avoids bus contention.
Figure 8.11 shows a variation on the open-collector serial communication
method that allows a slave to request attention from the master. To implement this,
the common serial line is pulled to +24V instead of +12V. The master has two coni-
parators, one referenced at 6V for the data and another referenced at +18V and
driving an interrupt on the processor. The slaves can request attention by pulling
the common serial line down with a 12V zener diode. When no slave is requesting
attention, the common line swings between 0 and 24V. When a slave is requesting
attention, the serial line swings between 0 and 12V. Thus, the master can monitor
the request input when the serial line is idle to determine whether any slaves are
requesting attention. The slave devices must be polled by the master to determine
which ones need service.
The maximum baud rate for this method usually will be lower than for the
+12V-only system. At +12V, a 600-ohm resistor dissipates about 0.25W. But at 24V,
a 2300ohm resistor dissipates the same power. Thus, the 24V system typically will
use a larger pullup, resulting in a lower maximum data rate. However, this com-
munication method allows multiple processors to communicate, with an attention
request capability, over a single wire (plus ground).
Parallel Port Interface
Many single-board computers, such as PC/104 systems (see Chapter 10) include a
parallel printer port, compatible with that found in the IBM PC clone world. In
many embedded systems, this port is not needed to communicate with a printer.
The standard printer port provides eight data lines, a strobe signal, four output
lines, and six input lines. If your hardware already includes a printer port, this can
be a simple way to implement communication with other processors.
Two computer boards can be interconnected using their printer ports. There is
a standard interface for this, called Interlink, used to interconnect PCs. Off-the-
shelf software and cables are available to implement this interface. Interlink
Multiprocessor Systems 221