Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Interfacing A/D Converters

Topics to be covered Definitions

• Timer IC 8253/54 • Commonly available ADC chip family


is ADC080X. ADC 0800, ADC 0804,
• Serial I/O 8251
ADC 0808/0809 and ADC 0816 are
• Parallel I/O 8255 common chips in this family
• A/D Converters • ADCs are available with 8-, 10-, 12-,
• D/A Converter and 16-bit digital outputs
• Arithmetic Coprocessors • The number of bits and the input
voltage range decides the
• System level interfacing
resolution. An ADC with input
design voltage range of 0 to +5V with 8 bits
at the output will have a resolution
of 5/256 = 19.5 mV
• The conversion time of ADCs is
decided by the type of ADC and T 1
Interfacing 8-bit ADC
• An ADC has two control lines, START (or CONVERT) and
DATA READY (or BUSY).
• A pulse to the START pin begins the conversion.
• At the end of the conversion period, DATA READY
becomes active and the digital output is made available
at the output buffer.
To interface an ADC with the microprocessor, the
microprocessor should
1. Send a pulse to start conversion (may be derived from
WR
2. Wait until end of conversion (EoC). This can be verified
by Status check (polling) or by interrupt
3. Read the digital signal at an input port
2
Interfacing an ADC using Status Check

3
Interfacing an 8-Bit ADC using Status Check

4

5
Subroutine:
OUT 82H ; start conversion
TEST: IN 80H ; Read data ready status
RAR ; get D0 into carry
JC TEST ; if D0=1, conversion is
not complete and go back
IN 81H ; Read output and save in
accumulator
RET

6
Interfacing an 8-bit ADC using Interrupt

7
8

9
• The main program should initialize the stack,
enable the interrupts (EI), unmask RST 6.5 and
initiate conversion by writing to port 8000H
• In addition the main program should also
include initialization of memory pointer for
storing data and the counter to count reading
• At the end of conversion the microprocessor is
interrupted by using RST 6.5 which transfer
the program control to 0034H.

10

11

You might also like