ADC-to-PC interface transfers data in nibbles

-December 09, 1999

The circuit in Figure 1 uses a Centronics printer port to interface an eight-channel, 8-bit ADC to a PC. The circuit cuts the cost of addressing and decoder circuitry and saves one expansion slot for interfacing. The design uses three of the subport's various signals as control signals for channel selection, handshaking, and data transfer to the MAX158 ADC. These signals are programmable by means of a bit position in the control word of the respective port.

Two signals, P_Slct1 and P_Slct2, when high and low, respectively, select the MAX158 ADC. This arrangement overcomes any accidental-selection problem, which can happen when you use a single select bit. A falling edge at the  and  pins of the MAX158 initiates a conversion, and the read operation latches the multiplexer address inputs, A0 through A2, for the channel selection. The level at the  pin of IC2 indicates the status of the conversion process. A low level at  indicates that conversion process is over and that the converted digital data is available. The  pin interfaces to the port through the D_Rdy signal. The corresponding software repeatedly samples this line to check its status. When D_Rdy is low, the PC reads the converted digital data through IC1.

Only five input lines to the printer port are available, so the 8-bit data transfer occurs in two nibbles from IC1. The higher or lower nibble is available when IC1's Pin 1 or Pin 19 is low, respectively. Under the control of the N_Slct signal, only one of these pins is low at once. The software then combines two nibbles to complete 1 byte of data. The circuit uses the fifth input bit, which is the D_Rdy signal, to check the conversion status of IC2.

VREF+ and bypass capacitors C1 and C2 connect to a 5V input supply, which results in a full 0-to-5V conversion. A 7805 regulator (not shown) generates VCC.

The accompanying C program works satisfactorily and can scan all the channels one after the other and print the converted data on the screen. (DI #2448)

Loading comments...

Write a Comment

To comment please Log In