You are on page 1of 16

ADC DAC

Timing Diagram for ADC



MVI A,98H
OUT CWR
MVI A,02H
OUT PortB
MVI A,00H
OUT PortC
MVI A,01H
OUT PortC
MVI A,00H
OUT PortC
WAIT: IN Port C ;Check for EOC by
RCR ; reading port C upper and
JNC WAIT ;rotating through carry.
IN Port A ;If EOC, read digital equivalent in A
HLT ;Stop.


Take Analog input and convert in digital, send
digital input to microprocessor, provide some
delay and then send to DAC .

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 digital
voltmeters, peak detectors , panel meters, programmable gain and
attenuation, and stepping motor drive.

Figure shows a block
diagram of a 3 bit D/A
converter; it has three
digital 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
The 3 bit D/A converter has eight input
possible combinations. If a converter has n
input lines, it can have 2n input combinations.
If the full scale analog voltage is 1V, the
smallest unit or the LSB is equivalent to 1/2n
of 1V. This is defined as resolution.
The MSB represents half of the full scale
value.

Calculate the values of the LSB and MSB and
full scale output for an 8-bit DAC for the 0 to
10V range.
LSB 10/256=39mV
MSB 10/2 =5
Full scale Output 10-0.0039V= 9.9
D/A Converter Circuits
Input signals representing appropriate binary
values can be simulated by an operational
amplifier with a summing network.


Interfacing an 8-bit D/A converter
with 8085
Design an output port with the address FFH to
interface the 1408 D/A converter that is
calibrated for a 0 to 10V range.
Write a program to generate a continuous
ramp waveform.
Explain the operation of the 1408, which is
calibrated for a bipolar range 5V. Calculate
the output Vo if the input is 10000000.
MVI A,00H
DTOA: OUT FFH
MVI B, COUNT
DELAY: DCR B
JNZ DELAY
INR A
JMP DTOA
This program outputs 00 to FF continuously to the D/A converter. The analog output of
the DAC starts at 0 and increase up to 10V as a ramp. When the accumulator
contents go to 0, the next cycle begins: thus the ramp signal is generated
continuously. The ramp output of the DAC can be observed on as oscilloscope with
an external sync.
The delay in the program is necessary for two reasons:
1. The time needed for a microprocessor to execute an output loop is likely to be less
than the settling time of the DAC.
2. The slope of the ramp can be varied by changing the delay.
Analog-to-digital (A/D) converters
The A/D conversion is a quantizing process whereby an analog signal is
represented by equivalent binary states; this is opposite to the D/A conversion
process.
Analog-to-digital converters can be classified into two general groups based on
the conversion technique.
One technique involves comparing a given analog signal with the internally
generated equivalent signal. This group includes successive approximation,
counter and flash-type converters.
The second technique involves changing an analog signal into time or frequency
and comparing these new parameters to known values. This group includes
integrator converters and voltage to frequency converters.
The trade-off between the two techniques is based on accuracy vs. speed.
The successive-approximation and the flash type are faster but generally less
accurate than the integrator and the voltage-to-frequency type converters.
Furthermore, the flash type is expensive and difficult to design for high accuracy.

Interfacing 8-Bit A/D Converters
To interface an A/D converter with the
microprocessor, the microprocessor should
1. Send a pulse to the START pin. This can be
derived from a control signal such as Write
(WR).
2. Wait until the end of the conversion. The end
of the conversion period can be verified
either by status checking (polling) or by using
the interrupt.
3. Read the digital signal at an input port.
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?

You might also like