15936_8 a-d converter
TRANSCRIPT
-
8/22/2019 15936_8 a-D Converter
1/37
Digital-to-Analog
Analog-to-DigitalInterface Part IVMicroprocessor
-
8/22/2019 15936_8 a-D Converter
2/37
Data Collection and Control
-
8/22/2019 15936_8 a-D Converter
3/37
Digital-to-Analog Conversion
[DAC]
-
8/22/2019 15936_8 a-D Converter
4/37
Digital to Analog(D/A) Converters Digital to analog converters can be broadly classified in three categories:
current output, voltage output, and multiplying type.
The current output DAC provides current as the output signal.
The voltage output DAC internally converts signal into the voltage signal.
The voltage output DAC is slower than the current output DAC because of
the delay in converting the current signal into the voltage signal.
The multiplying DAC is similar to the other two types except its output
represents the product of the input signal and the reference source, and
product is linear over a broad range.
D/A converters are available as integrated circuits. Some are designed to
be compatible with the microprocessor. Typical applications include digitalvoltmeters, peak detectors , panel meters, programmable gain and
attenuation, and stepping motor drive.
-
8/22/2019 15936_8 a-D Converter
5/37
Figure shows a block
diagram of a 3 bit D/A
converter; it has threedigital input lines (D2, D1,
D0) and one output line for
the analog signal.
The three input lines can
assume eight input
combinations from 000 to
111.
If the input ranges from 0 to
1 V, it can be divided into
eight equal parts; each
successive input is 1/8V
higher than the previous
combination
D/A
Conveter
Digital
Input
LSB
MSB
D0
D1
D2
Analog Output
3 Bit D/A converter
-
8/22/2019 15936_8 a-D Converter
6/37
Digital-to-Analog Conversion 2 Basic Approaches
Weighted Summing Amplifier R-2R Network Approach
-
8/22/2019 15936_8 a-D Converter
7/37
Weighted Sum DAC One way to achieve D/A conversion is to use a
summing amplifier.
This approach is not satisfactory for a large
number of bits because it requires too much
precision in the summing resistors.
This problem is overcome in the R-2R network
DAC.
-
8/22/2019 15936_8 a-D Converter
8/37
Weighted Sum DAC
-
8/22/2019 15936_8 a-D Converter
9/37
R-2R Ladder DAC
-
8/22/2019 15936_8 a-D Converter
10/37
R-2R Ladder DAC
-
8/22/2019 15936_8 a-D Converter
11/37
R-2R Ladder DAC The summing amplifier with the R-2R ladder of
resistances shown produces the output where the
D's take the value 0 or 1.
The digital inputs could be TTL voltages which close
the switches on a logical 1 and leave it grounded
for a logical 0.
This is illustrated for 4 bits, but can be extended toany number with just the resistance values R and2R.
-
8/22/2019 15936_8 a-D Converter
12/37
Q1. Write a program to generate a triangular
wave?
Q2. Write a program to generate a square wave
of particular frequency?
Q3. Write a program to generate a saw tooth
wave?
Q4. Write a program to generate a ramp wave?
-
8/22/2019 15936_8 a-D Converter
13/37
Analog to Digital Conversion[ADC]
-
8/22/2019 15936_8 a-D Converter
14/37
-
8/22/2019 15936_8 a-D Converter
15/37
ADC Basic Principle The basic principle of operation is to use the
comparator principle to determine whether or
not to turn on a particular bit of the binary
number output.
It is typical for an ADC to use a digital-to-
analog converter (DAC) to determine one of
the inputs to the comparator.
-
8/22/2019 15936_8 a-D Converter
16/37
ADC Various Approaches 3 Basic Types
Digital-Ramp ADC
Successive Approximation ADC
Flash ADC
-
8/22/2019 15936_8 a-D Converter
17/37
Digital-Ramp ADC Conversion from analog to digital form
inherently involves comparator action where
the value of the analog voltage at some pointin time is compared with some standard.
A common way to do that is to apply the
analog voltage to one terminal of acomparator and trigger a binary counterwhich drives a DAC.
-
8/22/2019 15936_8 a-D Converter
18/37
Digital-Ramp ADC
-
8/22/2019 15936_8 a-D Converter
19/37
Digital-Ramp ADC The output of the DAC is applied to the other
terminal of the comparator.
Since the output of the DAC is increasingwith the counter, it will trigger thecomparator at some point when its voltageexceeds the analog input.
The transition of the comparator stops thebinary counter, which at that point holds thedigital value corresponding to the analog
voltage.
-
8/22/2019 15936_8 a-D Converter
20/37
Successive approximation ADC
Illustration of 4-bit SAC with 1 volt step size
-
8/22/2019 15936_8 a-D Converter
21/37
Successive approximation ADC Much faster than the
digital ramp ADCbecause it uses digital
logic to converge onthe value closest to theinput voltage.
A comparator and a
DAC are used in theprocess.
-
8/22/2019 15936_8 a-D Converter
22/37
Flash ADC It is the fastest type of ADC available,
but requires a comparator for each
value of output.
(63 for 6-bit, 255 for 8-bit, etc.) Such ADCs are available in IC form up to
8-bit and 10-bit flash ADCs (1023
comparators) are planned.
The encoder logic executes a truthtable to convert the ladder of inputs tothe binary number output.
Illustrated is a 3-bit flash ADC with resolution 1 volt
-
8/22/2019 15936_8 a-D Converter
23/37
ADC080x Features Compatible with 8080 P
derivativesno interfacinglogic needed
-
access time-
135 ns.
Easy interface to allmicroprocessors, oroperates stand alone
Differential analog voltageinputs Logic inputs andoutputs meet both MOS andTTL voltage levelspecifications
Works with 2.5V (LM336)voltage reference On-chipclock generator 0V to 5Vanalog input voltage rangewith single 5V supply
No zero adjust required
-
8/22/2019 15936_8 a-D Converter
24/37
ADC080x, interfacing
-
8/22/2019 15936_8 a-D Converter
25/37
-
8/22/2019 15936_8 a-D Converter
26/37
-
8/22/2019 15936_8 a-D Converter
27/37
Interfacing Application
To control the temperature of heater
-
8/22/2019 15936_8 a-D Converter
28/37
Temperature control using 8085
-
8/22/2019 15936_8 a-D Converter
29/37
PROJECT DISCRIPTION
It sense the temperature and on/off theheater accordingly.
The sensing circuitry may consist of resistance
thermometer, thermocouples, thermisters,pyrometers place in the arm of wheatstonebridge.
A change in temperature causes a change inresistance giving a voltage that is proportionalto the change in temperature
-
8/22/2019 15936_8 a-D Converter
30/37
Thermocouples are widely used transducers to
measure the temperature.
The o/p of thermocouple is proportional to
the temperature of heater in microvolts.
This voltage is amplified by multistage
amplifier and then A/D converter.
8085 sends a SOC signal to A/D converter via
8255.
-
8/22/2019 15936_8 a-D Converter
31/37
After the conversion an EOC signal is given to
the microprocessor. Then the microprocessor
reads the o/p as digital quantity proportional
to the temperature to be measured.
-
8/22/2019 15936_8 a-D Converter
32/37
HARDWARE
tthermocouple
3stage
amplifier ADC8255
EOC
SOC
PORTA
PC7
PC3
DB0-DB7
MPU
-
8/22/2019 15936_8 a-D Converter
33/37
FLOWCHART
-
8/22/2019 15936_8 a-D Converter
34/37
PROGRAM
MVI A, 91H
OUT CWR ;INITIALIZE 8255
L2:CALL CONVERSION
CPI 80H ; COMPARE WITH SET POINT
JC L1
MVI A,0EH ; RESET PC7,HEATER OFF WITH BSR MODE
OUT CWR
JMP L2 L1: MVI A,0FH ; SET PC7, HEATER ON WITH BSR MODE
OUT CWR
JMP L2
CONVERSION MVI A 00H
-
8/22/2019 15936_8 a-D Converter
35/37
CONVERSION: MVI A,00H
OUT PB ; SEND ADDRESS TO SELECT I/P 0
MVI A,08H ;LATCH ADDRESS BY ALE=1
OUT PB
MVI C,0AH
L3: DCR C
JNZ L3;DELAY
MVI A,18H
OUT PB ; MAKE SOC HIGH
MVI A,08H ; MAKE SOC LOW
OUT PB
-
8/22/2019 15936_8 a-D Converter
36/37
MVI A,00H
OUT PB ; MAKE ALE LOW
L4: IN PC
ANI 01H
JZ L4 ; WAIT FOR EOC
IN PA
RET
-
8/22/2019 15936_8 a-D Converter
37/37