Analog to Digital Converters &
Digital to Analog Converters
EE3404 MICROPROCESSOR &
MICROCONTROLLER
Interfacing Analog to Digital Data
Converters
• The Analog to Digital Conversion is a
quantizing process. Here the analog signal is
represented by equivalent binary states. The
A/D converters can be classified into two
groups based on their conversion techniques.
In the first technique it compares given analog
signal with the initially generated equivalent
signal.
• In this technique, it includes successive
approximation, counter and flash type
converters. In another technique it determines
the changing of analog signals into time or
frequency. This process includes integrator-
converters and voltage-tofrequency converters.
The first process is faster but less accurate, the
second one is more accurate. As the first process
uses flash type, so it is expensive and difficult to
design for high accuracy.
ADC 0808/0809 Chip
• The ADC 0808/0809 is an 8-bit analog to digital
converter. It has 8 channel multiplexer to
interface with the microprocessor. This chip is
popular and widely used ADC. ADC 0808/0809 is
a monolithic CMOS device. This device uses
successive approximation technique to convert
analog signal to digital form. One of the main
advantage of this chip is that it does not require
any external zero and full scale adjustment, only
+5V DC supply is sufficient.
Features of ADC 0808/0809
• The conversion speed is much higher The
accuracy is also high It has minimal
temperature dependence Excellent long term
accuracy and repeatability Less power
consumption
Architecture of ADC
Interfacing ADC with 8085
Microprocessor
• To interface the ADC with 8085, we need 8255 Programmable
Peripheral Interface chip with it. Let us see the circuit diagram of
connecting 8085, 8255 and the ADC converter.
• The PortA of 8255 chip is used as the input port. The
PC7 pin of Port Cupper is connected to the End of
Conversion (EOC) Pin of the analog to digital converter.
• This port is also used as input port. The Clower port is
used as output port. The PC2-0 lines are connected to
three address pins of this chip to select input channels.
The PC3 pin is connected to the Start of Conversion
(SOC) pin and ALE pin of ADC 0808/0809. Now let us
see a program to generate digital signal from analog
data. We are using IN0 as input pin, so the pin selection
value will be 00H
Digital-to-Analog Converter
• The DAC will accept a digital (binary) input and convert to
analog voltage or current.
• Every DAC will have "n" input lines and an analog output.
The DAC require a reference analog voltage (Vref) or
current (Iref) source. The smallest possible analog value
that can be represented by the n-bit binary code is called
resolution.
• The resolution of DAC with n-bit binary input is 1/2nof
reference analog value. The DAC0800 is an 8-bit, high
speed, current output DAC with a typical settling time
(conversion time) of 100 ns. It produces complementary
current output, which can be converted to voltage by using
simple resistor load. The DAC0800 require a positive and a
negative supply voltage in the range of ± 5V to ±18V
Digital-to-Analog Converter
• It can be directly interfaced with TTL, CMOS, PMOS and other logic
families. For TTL input, the threshold pin should be tied to ground
(VLC = 0V). The reference voltage and the digital input will decide
the analog output current, which can be converted to a voltage by
simply connecting a resistor to output terminal or by using an op-
amp I to V converter. The DAC0800 is available as a 16-pin IC in DIP.
IC 8253/54 - Programmable
Interval Timer
EE3404 MICROPROCESSOR &
MICROCONTROLLER
IC 8253/54 - Programmable Interval
Timer
• The 8254 programmable interval
timer/counter is used to generate accurate
time delays and can be used for applications
such as a real-time clock, an event counter, a
digital one-shot, a square-wave generator, and
a complex waveform generator. The 8254
includes three identical 16-bit counters that
can operate independently in any one of the
six modes (to be described later).
• It is packaged in a 24-pin DIP and requires a
single +5 V power supply. To operate a
counter, a 16-bit count is loaded in its register
and, on command, begins to decrement the
count until it reaches 0. At the end of the
count it generates a pulse that can be used to
interrupt the MPU. The counter can count
either in binary or BCD. In addition, a count
can be read by the MPU while the counter is
decrementing.
BLOCK DIAGRAM
• DATA BUS BUFFER This tri-state, 8-bit,
bidirectional buffer is connected to the data
bus of the MPU.
• CONTROL LOGIC The control section has five
signals: RD (Read), WR (Write), CS (Chip
Select) and address lines A0,A1.
• CONTROL WORD REGISTER This register is
accessed when lines A0 and A1 are at logic 1.
It is used to write a command word which
specifies the counter to be used, its mode,
and either a Read or a Write operation. The
control word format
MODES
• The 8254 can operate in six different modes, and the gate of a counter is used either to disable or enable
counting, as shown in Figure 7.3. However, to maintain clarity, only one mode (Mode 0) is illustrated first, and
details of the remaining modes are discussed in a coming section. In Mode 0, after the count is written and if
the gate is high, the count is decremented every clock cycle. When the count reaches zero; the output goes
high and remains high until a new count or mode word is loaded.
Programming the 8254
• The 8254 can be programmed to provide various types
of output through Write operations, or to check a
count while counting through Read operations.
• WRITE OPERATIONS To initialize a counter, the following steps are necessary. 1.
Write a control word into the control register. 2. Load the low-order byte of a
count in the counter register. 3. Load the high-order byte of a count in the counter
register. With a clock and an appropriate gate signal to one of the counters, the
above steps should start the counter and provide appropriate output according to
the control word. READ OPERATIONS In some applications, especially in event
counters, it is necessary to read the value of the count in progress. This can be
done by either of two methods. One method involves reading a count after
inhibiting (stopping) the counter to be read. The, second method involves reading
a count while the count is in progress (known as reading on the fly). In the first
method, counting is stopped (or inhibited) by controlling the gate input or the
clock input of the selected counter, and two IO read operations are performed by
the MPU. The first IO operation reads the low-order byte, and the second IO
operation reads the high-order byte. In the second method, an appropriate control
word is written into the control register to latch a count in the output latch, and
two IO Read operations are performed by the MPU. These Read/Write operations
are illustrated below
The 8254 as a Counter
• It can be directly interfaced with TTL, CMOS, PMOS and other logic
families. For TTL input, the threshold pin should be tied to ground
(VLC = 0V). The reference voltage and the digital input will decide
the analog output current, which can be converted to a voltage by
simply connecting a resistor to output terminal or by using an op-
amp I to V converter. The DAC0800 is available as a 16-pin IC in DIP.

Interfacing Analog to Digital Data Converters ee3404.pdf

  • 1.
    Analog to DigitalConverters & Digital to Analog Converters EE3404 MICROPROCESSOR & MICROCONTROLLER
  • 2.
    Interfacing Analog toDigital Data Converters • The Analog to Digital Conversion is a quantizing process. Here the analog signal is represented by equivalent binary states. The A/D converters can be classified into two groups based on their conversion techniques. In the first technique it compares given analog signal with the initially generated equivalent signal.
  • 3.
    • In thistechnique, it includes successive approximation, counter and flash type converters. In another technique it determines the changing of analog signals into time or frequency. This process includes integrator- converters and voltage-tofrequency converters. The first process is faster but less accurate, the second one is more accurate. As the first process uses flash type, so it is expensive and difficult to design for high accuracy.
  • 4.
    ADC 0808/0809 Chip •The ADC 0808/0809 is an 8-bit analog to digital converter. It has 8 channel multiplexer to interface with the microprocessor. This chip is popular and widely used ADC. ADC 0808/0809 is a monolithic CMOS device. This device uses successive approximation technique to convert analog signal to digital form. One of the main advantage of this chip is that it does not require any external zero and full scale adjustment, only +5V DC supply is sufficient.
  • 5.
    Features of ADC0808/0809 • The conversion speed is much higher The accuracy is also high It has minimal temperature dependence Excellent long term accuracy and repeatability Less power consumption
  • 6.
  • 7.
    Interfacing ADC with8085 Microprocessor • To interface the ADC with 8085, we need 8255 Programmable Peripheral Interface chip with it. Let us see the circuit diagram of connecting 8085, 8255 and the ADC converter.
  • 8.
    • The PortAof 8255 chip is used as the input port. The PC7 pin of Port Cupper is connected to the End of Conversion (EOC) Pin of the analog to digital converter. • This port is also used as input port. The Clower port is used as output port. The PC2-0 lines are connected to three address pins of this chip to select input channels. The PC3 pin is connected to the Start of Conversion (SOC) pin and ALE pin of ADC 0808/0809. Now let us see a program to generate digital signal from analog data. We are using IN0 as input pin, so the pin selection value will be 00H
  • 9.
    Digital-to-Analog Converter • TheDAC will accept a digital (binary) input and convert to analog voltage or current. • Every DAC will have "n" input lines and an analog output. The DAC require a reference analog voltage (Vref) or current (Iref) source. The smallest possible analog value that can be represented by the n-bit binary code is called resolution. • The resolution of DAC with n-bit binary input is 1/2nof reference analog value. The DAC0800 is an 8-bit, high speed, current output DAC with a typical settling time (conversion time) of 100 ns. It produces complementary current output, which can be converted to voltage by using simple resistor load. The DAC0800 require a positive and a negative supply voltage in the range of ± 5V to ±18V
  • 10.
    Digital-to-Analog Converter • Itcan be directly interfaced with TTL, CMOS, PMOS and other logic families. For TTL input, the threshold pin should be tied to ground (VLC = 0V). The reference voltage and the digital input will decide the analog output current, which can be converted to a voltage by simply connecting a resistor to output terminal or by using an op- amp I to V converter. The DAC0800 is available as a 16-pin IC in DIP.
  • 11.
    IC 8253/54 -Programmable Interval Timer EE3404 MICROPROCESSOR & MICROCONTROLLER
  • 12.
    IC 8253/54 -Programmable Interval Timer • The 8254 programmable interval timer/counter is used to generate accurate time delays and can be used for applications such as a real-time clock, an event counter, a digital one-shot, a square-wave generator, and a complex waveform generator. The 8254 includes three identical 16-bit counters that can operate independently in any one of the six modes (to be described later).
  • 13.
    • It ispackaged in a 24-pin DIP and requires a single +5 V power supply. To operate a counter, a 16-bit count is loaded in its register and, on command, begins to decrement the count until it reaches 0. At the end of the count it generates a pulse that can be used to interrupt the MPU. The counter can count either in binary or BCD. In addition, a count can be read by the MPU while the counter is decrementing.
  • 14.
  • 15.
    • DATA BUSBUFFER This tri-state, 8-bit, bidirectional buffer is connected to the data bus of the MPU. • CONTROL LOGIC The control section has five signals: RD (Read), WR (Write), CS (Chip Select) and address lines A0,A1.
  • 16.
    • CONTROL WORDREGISTER This register is accessed when lines A0 and A1 are at logic 1. It is used to write a command word which specifies the counter to be used, its mode, and either a Read or a Write operation. The control word format
  • 17.
    MODES • The 8254can operate in six different modes, and the gate of a counter is used either to disable or enable counting, as shown in Figure 7.3. However, to maintain clarity, only one mode (Mode 0) is illustrated first, and details of the remaining modes are discussed in a coming section. In Mode 0, after the count is written and if the gate is high, the count is decremented every clock cycle. When the count reaches zero; the output goes high and remains high until a new count or mode word is loaded.
  • 18.
    Programming the 8254 •The 8254 can be programmed to provide various types of output through Write operations, or to check a count while counting through Read operations.
  • 19.
    • WRITE OPERATIONSTo initialize a counter, the following steps are necessary. 1. Write a control word into the control register. 2. Load the low-order byte of a count in the counter register. 3. Load the high-order byte of a count in the counter register. With a clock and an appropriate gate signal to one of the counters, the above steps should start the counter and provide appropriate output according to the control word. READ OPERATIONS In some applications, especially in event counters, it is necessary to read the value of the count in progress. This can be done by either of two methods. One method involves reading a count after inhibiting (stopping) the counter to be read. The, second method involves reading a count while the count is in progress (known as reading on the fly). In the first method, counting is stopped (or inhibited) by controlling the gate input or the clock input of the selected counter, and two IO read operations are performed by the MPU. The first IO operation reads the low-order byte, and the second IO operation reads the high-order byte. In the second method, an appropriate control word is written into the control register to latch a count in the output latch, and two IO Read operations are performed by the MPU. These Read/Write operations are illustrated below
  • 20.
    The 8254 asa Counter • It can be directly interfaced with TTL, CMOS, PMOS and other logic families. For TTL input, the threshold pin should be tied to ground (VLC = 0V). The reference voltage and the digital input will decide the analog output current, which can be converted to a voltage by simply connecting a resistor to output terminal or by using an op- amp I to V converter. The DAC0800 is available as a 16-pin IC in DIP.