EE 552 LPT Expander Application Notes

by Shane Pilsworth
     Phillip Jacobson
     Nancy Huntingford     

Providing Digital Inputs With a PC

Sometimes it is necessary to manually provide digital inputs to a digital system. One method is to use switches of some kind to supply the desired logic levels. This is inconvenient as the number of inputs grows large o r if a complex sequence of inputs is desired. This could be accomplished with simulations using CAD tools but sometimes this is not possible. This document describes a simple method for providing digital inputs with commonly available equipment - a PC p arallel port.

Most PC's are equipped with one or more LPT ports. These ports provide a number of inputs and outputs that could be interfaced to a digital system. Although there are a total of 12 digital outputs and 5 digital inputs available on the 25 pin connector, this simple design uses only 8 of the outputs. With the addition of some hardware these 8 outputs can be expanded arbitrarily. Many schemes are possible but this design uses 4 LS74164 serial to parallel shift registers to expand the 8 bits to a total of 32 user programmable bits.

Note: It is important to remember that the outputs of this circuit are parallel shift registers ; their outputs will fluctuate as data is loaded into them and should only be sampled after they have settled.


Circuit

Pinout of the LPT port is here

Data sheet for LS74164 is  here

Maxplus2 circuit schematic is  here


Sample C++ Code

This C++ code demonstrates how to control the outputs of the 4 registers via the parallel port under Win95.

Source code: LPT_Expander.hpp LPT_Expander.cpp        


Additonal Information

For more information on PC parallel ports and applications see this excellent site: http://www.doc.ic.ac.uk/~ih/doc/par/

(This is were I stole the pin out of the LPT port from.)