Design Ideas: June 9, 1994
Using the circuit in Figure 1, a PC's printer port can accept 8-bit parallel data. The 74HC241 in the circuit is a data buffer as well as a high/low nibble selector. The Borland C program in Listing 1 reads the high and low nibbles, reforming the 8-bit data and converting them to a vertical bar on the PC's screen. Moreover, the program can compare the input data with preset high and low limits, sending the results of this comparison back out through the printer port. You can download a copy of this listing from EDN's FTP server. Because the printer port powers the IC, the circuit requires no external power. (DI #1432)