Dac & Adc
Dac & Adc
Dac & Adc
DAC0808 is a D/A converter IC and is used for converting 8-bit digital data input to analog
signal output. It is a monolithic IC featuring a full scale output current settling time of 150 ns
while dissipating only 33 mW with ±5V supplies. The chip accuracy of conversion is good and
power consumption is also low to make it popular. The power supply currents of the DAC0808
are independent of bit codes, and exhibits essentially constant device characteristics over the
entire supply voltage range.
1 NC No connection
2 GND Ground
In circuit
For the working of device DAC0808, we need two voltage sources +5V and -15V as shown in
the diagram. This is a major drawback that is eliminated in modern DAC to make them work
from a single power source.
Eight digital inputs are given to the chip and are supposed to be in order from MSB to LSB.
This is also a major drawback because we need to waste 8 I/O pins. This is also eliminated in
modern DACs.
A +10V power source is connected as a reference voltage for the device and the negative
reference is grounded.
Working
The device takes in parallel 8-bit data from a microcontroller or microprocessor and converts that
data into an analog signal at the output. And the analog output from DAC is a current quantity,
and this needs to be converted into voltage parameters for use in application easily. So to convert
the current parameter into voltage parameter, we will use an op-amp (operational amplifier)
circuit as shown in the circuit diagram. This op-amp circuit (LF351) is called current-to-voltage
converter.
The output analog voltage from op-amp is in linear relation with input digital value and hence
DAC conversion with DAC0808 is achieved. Similarly, you can also use other application
circuits for DAC0808.
Applications:
Here Iout is proportional to digital signal. This has to be converted into voltage by using
external voltage convertor (741).
To generate a triangular wave of +5v we connect to Vref (+) and Vref(-) is grounded with
2.5K resistor.
B1-B8 are 8-bit digital input connected to 8255 port A
CS is connected to 8086 microprocessor. Similarly the D0-D7 are connected to data lines
of 8086 microprocessor.
Here 8086 operates in maximum mode and hence IORD and IOWR of 8086 are
connected to RD and WR pins of 8255.
Solution: Given frequency is 500 Hz of triangular wavelength. By the given frequency we can
calculate the time period of wavelength generated.
1/f = T = 1/500 = 2ms
Let us assume that wave to be generated is symmetric and wave form will rise for 1ms and fall
for 1ms.
We know that output analog voltage from op-amp is in linear relation with input digital value.
Now lets see the expression for Iout
Consider
B7 B6 B5 B4 B3 B2 B1 B0
If 0 0 0 0 0 0 0 0 Iout = 0
If 0 0 0 0 0 0 0 1
The ADC0808 and ADC 0809 are monolithic CMOS devices with an 8-channel multiplexer.
These devices are also designed to operate from common microprocessor control buses, with tri-
state output latches driving the data bus.
ADC 0808/0809 has eight input channels, so to select desired input channel, it is necessary to
send 3-bit address on A, B and C inputs. The address of the desired channel is sent to the
multiplexer address inputs through port pins. After at least 50 ns, this address must be latched:
This can be achieved by sending ALE signal. After another 2.5 μs, the start of conversion (SOC)
signal must be sent high and then low to start the conversion process. To indicate end of
conversion ADC 0808/0809 activates EOC signal. The microprocessor system can read
converted digital word through data bus by enabling the output enable signal after EOC is
activated. This is illustrated in Figure
Interfacing ADC 0808 with 8085:
Figure shows interfacing of ADC 0808 with 8085 using 8255. ADC 0808 has eight input
channels, so to select desired input channel, it is necessary to send 3-bit address on ADC, ADB
and ADA inputs. The address of the desired channel is sent to the multiplexer address inputs
through PB0 to PB2 lines.
After at least 50 ns, this address must be latched. This is achieved by sending ALE signal using
Port line PB3. After another 2.5 μs the start of conversion signal (SOC) must be sent high and
then low. Port line PB4 is used for this purpose. The end of conversion (EOC) is detected by port
line PC0. Schmitt-trigger inverter circuitry generates 300 kHz clock which is required to operate
ADC 0808. The zener diode and LM 308 amplifier circuitry is used to produce a V CC and
+VREF of 5.12 V for the A/D converter. With this reference voltage the A/D converter will have
256 steps of 20 mV each.
Example 2: Interfacing ADC 0808 with 8086 using ports. Use port A of 8255 for transferring
digital data output of ADC to the CPU and port C for control signals. Assume that an analog
input is present at I/P2 of ADC and a clock input of suitable frequency is available for ADC.
Solution: The analog input I/P2 is used and therefore address pins ABC should be 0,1,0
respectively to select I/P2.
The OE and ALE pins are already kept at +5V to select the ADC and enable the outputs.
Port A will read digital data from ADC. Hence it is an input port. Port B will be used to
select one of the available 8 input channels of ADC and hence will act as output port.
Port C upper act as input port to receive the EOC signal while Port C lower act as output
port to send SOC to the ADC.
Port A act as a 8-bit input data port to receive the digital data output from the ADC and Port B
as output port to select the input address. Port C upper acts as input port to receive the EOC
signal while Port C lower acts as output port to send SOC to the ADC. The 8255 control word
is shown in the figure.
OUT CWR, AL
OUT Port C, AL
OUT Port C, AL
WAIT:
JNC WAIT
HLT Stop