Adc 0808
Adc 0808
Adc 0808
||
In most of the cases, the PIO 8255 is used for interfacing the analog
to digital converters with a microprocessor.
This chips do not contain any internal sample & hold circuit.
|O O
O
Interface ADC 0808 with 8086 using 8255 ports. Use Port A of 8255 for
transferring digital data output of ADC to the CPU & Port C for
control signals. Assume that an analog input is present at I/P2 of the
ADC and a clock input of suitable frequency is available for ADC.
Draw the schematic & timing diagram of different signals of
ADC0808.
The analog input I/P2 is used & therefore address pins A,B,C should
be 0,1,0 respectively to select I/P2.
The OE (Out put latch Enable) & ALE pins are already kept at +5v to
select the ADC and enable the outputs.
Port C
acts as the
port to receive the EOC signal while
Port C acts as the
port to send SOC to ADC.
acts as a 8-bit
data port to receive the digital data
output from the ADC.
D7 D6 D5 D4 D3 D2 D1 D0
1 0 0 1 1 0 0 0 = 98H
MOV AL,98H ; Initialize 8255, send AL to control word (CWR)
OUT CWR, AL
MOV AL, 02H ;Select I/P2 as analog I/P
OUT Port B, AL ;Port B as output
MOV AL, 00H ; Give start of conversion pulse to the ADC
OUT Port C, AL
MOV AL, 01H
OUT Port C, AL
MOV AL, 00H
OUT Port C, AL
|: IN AL, Port C ; check for EOC by reading Port C upper & rotating
RCL ; through carry.
JNC |
IN AL, Port A if EOC, read digital equivalent in AC
HLT ; stop.