ADC/DAC interfacing with 8085
• Interfacing ADC In most of the cases, 8255 or buffer is used
for interfacing the analog to digital converters with
microprocessor.
• The analog to digital converters is treaded as an input device
by the microprocessor the MPU sends an initializing
signal to the ADC to start the analog to digital data conversation
process.
• The start of conversation signal is a pulse of a specific duration.
• Interfacing ADC The process of analog to digital conversion is a
slow process, and the microprocessor has to wait for the digital
data till the conversion is over.
• After the conversion is over, the ADC sends end of conversion
EOC signal to inform the microprocessor that the conversion is
over and the result is ready at the output buffer of the ADC.
• These tasks of issuing an SOC pulse to ADC, reading EOC signal
from the ADC .
Interfacing ADC 0808
Block diagram of ADC 0808
Interfacing 8 bit DAC with 8085
• Design an O/P port with the address FFH to
interface the 1408 D/A converter that is calibrated
for 0 to 10V range.
• Write a program to generate a ramp.
Interfacing 8 bit 1408 DAC with 8085
Here R14 and R15 value is
same and Vref is 5v such that
output current shouldnot
exceed 2 mA .
Figure: Interfacing 1408 DAC in unipolar range
• 1408 is TTL and CMOS compatible logic ckt convert digital pulse to
analog signal. (binary weighted or R/2R)
• 8 inputs DAC provide 256 discrete voltage.
• Labeling of LSB, MSB of data bus and the 1408 is opposite. (A 1 is
MSB fo 1408)
• 2mA reference current for full scale input. and two power supplies
+5 and -15.
• Reference current is determined by R14. Output Io =
•For full scale input (D7 to D0 all =1):
Io = Iref *(1- 1/28)
I0
• The output is 1 LSB less than full scale reference source. The full-scale o/p
voltage=Vo = Io * Rf = 2mA(255/256)x5k =9.961V.
• Circuit is designed for 0 to +10V range.
[for bipolar resistor let Rb is connected between pin no. 4 and Vref and voltage range
for same is -5v to +5v. Output current let I= Io –(Vref /Rb) and Vo = I * Rf. If all inputs
are zeros output is - 5v, if only MSB is high at i/p output is 0v, if all i/ps are high
o/p is +5v.]
Io’ = Io – Vref/ Rb
=
- Vref / Rb, when input is all ‘0’,
Vo= Rf *Io’ = (Io – Vref/ Rb) *Rf = -5v
When A1 = 1 and all other 0’s 10000000 = Vo = 0v.
Program to generate continuous ramp waveform.
MVI A, 00H; :load AC with first i/p
DTOA OUT FFH; :output to DAC(FF is port add)
: MVI B, COUNT; : Set register B for delay
DELAY DCR B;
: JNZ DELAY;
INR A; :next input
JMP :go back to o/p
DTOA;
• Delay is necessary
time needed for µP to execute an o/p loop is likely to
be less than the settling time of DAC.
slope of the ramp can be varied by changing the delay.
Interfacing 10 bit DAC with 8085
In many DAC applications, 10 or 12-bit resolution is required. But
microprocessor has only 8-bit data lines. One method is to use two
output ports on time shared basis; one for first eight bits and second
for the remaining bits. A disadvantage of this method is that the DAC
input assumes on intermediate value between two input operations.
The solution to this difficulty can be using a double buffer DAC.
• AD7522 is a CMOS 10-bit DAC consists of an input buffer and a holding
register hence 10 bits are loaded into the input register in two steps
using two output ports.
• The low-order 8-bits are loaded with the control line LBS and
remaining 2-bits are loaded with the control line HBS.
• Then all 10-bits are switched into a holding register for conversion by
enabling LDAC line.
• When a data byte is sent to the port address 8000H in a memory map I/
O, the WR and IO/ M signals go low along with A0 and the line LBS is
enabled. Similarly, the address 8001H enables lines HBS and LDAC.
Figure: Timing diagram
The following instructions illustrate how to load the maximum
input of 10-bits all 1’s into the DAC.
LXI B, 03FFH; Load 10-bit at logic 1 in BC register
LXI H, Load HL with port address for lower 8-bits
8000H; MOV Load 8-bits D7-D0 in the DAC
M,
INXC;H; Point to port address 8001H
MOV M, B; Load two bits D9 and D8 and switch all ten
bits for conversion
HL
T