Digital To Analog Converters Notes
Digital To Analog Converters Notes
(14)
Digital to Analog converters
OBJECT:-
To Interface Digital -to-Analog converter to 8085 using 8255 and write
Assembly Language Program to generate Ramp Wave form.
THEORY:-
Digital-to-Analog Conversion or simply DAC, is a device that is used to convert a
digital (usually binary) code into an analog signal (current, voltage, or electric
charge). Digital-to-analog conversion is the primary means by which digital
equipment such as computer-based systems are able to translate digital data into
real-world signals that are more understandable to or useable by humans, such as
music, speech, pictures, video. It also allows digital control of machines,
equipment, household appliances. When data is in binary form, the 0's and 1's may
be of several forms such as the TTL form where the logic zero may be a value up
to 0.8 volts and the 1 may be a voltage from 2 to 5 volts. The data can be converted
to clean digital form using gates which are designed to be on or off depending on
the value of the incoming signal. Data in clean binary digital form can be
converted to an analog form by using a summing amplifier. Here is a simplified
functional diagram of an 8-bit DAC.
1
There are mainly two techniques used for digital to analog conversion
This approach is not satisfactory for a large number of bits because it requires too
much precision in the summing resistors.
2
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 to any number with just the
resistance values R and 2R.
3
The interfacing of DAC 0808 with microprocessor 8085 is shown below. Here,
programmable peripheral interface, 8255 is used as parallel port to send the digital data
to DAC.
4
Interfacing Digital-To-Analog converter to 8085 using 8255
Port/Register Address
Port A 00
Port B O1
Port C 02
Control Register 03
Program:
MVI A, 80H ; Initialization -control word for 8255 to Configure all ports as output
ports
OUT 03
MVI A, DATA ; Load 8-bit data to be sent at the input of 0808 DAC
OUT 00 ; Send data on port A.
5
Figure shows analog output voltage v0 is plotted against all 16 possible digital
input words.
1. Resolution
Resolution is defined in two ways.
……… (1)
Resolution = 2n
6
Resolution is also defined as the ratio of a change in output voltage
resulting from a change of 1 LSB at the digital inputs. For an n-bit
DAC it can be given as:
Therefore, we can say that an input change of 1 LSB causes the output to
change by 40 mv
2. Accuracy
lt is a comparison of actual output voltage with expected output. It is
expressed in percentage. Ideally, the accuracy of DAC should be, at worst,
±1/2, of its LSB. If the full scale output voltage is 10.2 V then for an 8-bit
DAC accuracy can be given as
Accuracy = VoFs/(2n -1 )2
= 10.2/255x2 = 20 mV
7
PROCEDURE:-
1. Connect power supply 8V & GND to both microprocessor trainer kit &
DAC interfacing kit.
2. Connect data bus between microprocessor trainer kit & DAC interfacing kit.
3. Enter the program to generate Ramp Wave.
4. Execute your program from respective locations and observe the waveform
on oscilloscope.
HOME WORK
Time
8
Programmable Peripheral Interface-8255:-
9
PIN Diagram:
10
11
For I/O Mode
The mode definition format for I/O mode is shown in Figure below The
control words for both, mode definition and Bit Set-Reset are loaded into
the same control register, with bit D7 used for specifying whether the
word loaded into the control register is a mode definition word or Bit
Set-Reset word. If D7 is high, the word is taken as a mode .definition
word, and if it is low, it is taken as a Bit Set-Reset word. The appropriate
bits are set or reset depending on the type of operation desired, and
loaded. In to the control register.
12