Skip to main content

Interfacing ADC0808 with 8085 using 8255A

Short answer

Key ADC parameters: resolution, conversion time, accuracy (INL/DNL), quantization error, input range, and reference voltage. For interface, 8255 port A reads ADC data, port B outputs channel address; PC4=START, PC5=ALE, PC6=OE, PC0=EOC. Control word 91H; wait for EOC then read data.

What are the parameters to characterize ADCs? Design a circuit to interface ADC0808 with 8085 microprocessor using 8255A PPI.

Parameters that characterise ADCs

  1. Resolution (n bits): LSB = FSR / 2^n.
  2. Conversion time and maximum sampling rate.
  3. Accuracy / total error, including offset, gain error, INL, DNL, missing codes.
  4. Quantisation error (+/-1/2 LSB).
  5. Input voltage range and input impedance; unipolar or bipolar.
  6. Reference voltage and its stability; temperature drift.
  7. Number of input channels, power supply, logic compatibility and output format (tri-state latches).
  8. Aperture time, SNR and ENOB, power consumption.

Design: ADC0808 with 8085 using 8255A

ADC0808: 8-bit successive approximation ADC, 8-channel multiplexer, conversion time about 100 us at 640 kHz clock. Pins: ADD A, B, C (channel), ALE, START, EOC, OE, CLK, Vref+, Vref-, D0-D7.

Assumptions: 8255 I/O mapped at 80H-83H; port A = ADC data (input); port B = channel address (PB0-PB2) and spare outputs; PC4 = START, PC5 = ALE, PC6 = OE (outputs); PC0 = EOC (input).

 8085                    8255A                   ADC0808
 AD0-AD7 -----> D0-D7
 IOR',IOW' -> RD',WR'
 A7..A2 decode -> CS' ;  A0,A1 -> A0,A1
                        PA0-PA7 <---------------- D0-D7
                        PB0-PB2 ----------------> ADD A, B, C
                        PC4 --------------------> START
                        PC5 --------------------> ALE
                        PC6 --------------------> OE
                        PC0 <-------------------- EOC
 CLK OUT -> divider -> 640 kHz -> CLK of ADC
 Vref+ = 5 V, Vref- = 0 ; analog inputs IN0-IN7

Addresses: Port A = 80H, B = 81H, C = 82H, control = 83H. Control word: A input, B output, C upper output, C lower input: 91H.

Operation and program (channel in register C)

  1. Output the channel number to port B.
  2. Pulse ALE (PC5) to latch it; pulse START (PC4) to begin conversion.
  3. Wait for EOC (PC0) to become 1.
  4. Set OE (PC6) and read port A.
        MVI A,91H
        OUT 83H
        MOV A,C         ; channel number 0-7
        OUT 81H
        MVI A,30H       ; ALE = 1, START = 1
        OUT 82H
        MVI A,00H
        OUT 82H         ; falling edge begins conversion
WAIT:   IN 82H
        ANI 01H         ; EOC
        JZ WAIT
        MVI A,40H       ; OE = 1
        OUT 82H
        IN 80H          ; digital data in A
        MOV B,A
        MVI A,00H
        OUT 82H
        HLT

✓ Answer checked by Claude Sonnet 5.5

All Instrumentation II chapter 4 questions →