Tricks increase utility of parallel port
Lorenzo Tazzari, Selex SNC, Alessandria, Italy -- 9/27/2001
In this simple application of the 68HC68 microcontroller's serial-I/O utility, the goal is to configure a simple circuit, driven by any LPT parallel-printer port, which you can use as a remote I/O for a PC. You can independently program each I/O line as either an input or an output. The protocol in this application is an SPI (MISO/MOSI/SCK) type, using synchronous serial communications. Figure 1
shows a circuit that effects the connection with the PC and power supply for all
I/O signals. A bus carries signals of the SPI protocol, and the LPT port can
drive all the
(Chip
Enable) signals. With this type of bus, you drive as many as five
signals,
and each
line can address four 68HC68 chips. Each microcontroller can drive eight I/O lines, with each line independently programmable. Thus, the system can address as many as 160 I/O ports.
Figure 2 shows a simple way to
select the MISO signal. You can choose which pin of the LPT port to use in
receiving the MISO signal. This circuit uses the ULN2003 as an amplifier to
drive the critical
signal.
By joining the SIP and
signals, you can configure a bus system in which all signals go to the bus connector. You need an external power supply, because the LPT port cannot supply sufficient current. You can connect as many as five I/O circuits. The circuit in Figure 3 contains the 68HC68 chip
with its
and address selection. With jumpers E12 and E13, you can select the chip's address. It is
important to emphasize that the system has no check for an address conflict
arising from choosing the same address, with the same
, in more than one chip. If the conflict arises, however, it does not cause hardware damage. Theoretically, using an LPT port at a baud rate of 1 Mbyte/sec, the technique can read or write 160 I/O signals in less than 16 msec.
Is this the best Design Idea in this issue? Vote at www.ednmag.com.
© 2009, Reed Business Information, a division of Reed Elsevier Inc. All Rights Reserved.

