Conversation between
Analogue and Digital
System
Analogue to Digital Converter
Digital to Analogue Converter
1
Introduction
• Analog to digital converter (ADC) and digital to analog converter
(DAC) are used to interface a computer to the analog world so
that the computer can monitor and control a physical variable.
2
Analog – to – Digital Conversion
• Takes an analog input voltage and after a certain
amount of time produces a digital output code that
represents the analog input.
• ADC process is generally more complex than
DAC.
3
Sampling
• Most input signals to an electronic system start out as analog signals.
For processing, the signal is normally converted to a digital signal by
sampling the input.
• Before sampling, the analog input must be filtered with a low-pass anti-
aliasing filter. The filter eliminates frequencies that exceed a certain
limit that is determined by the sampling rate.
Analog
input Sampling
signal circuit
Sampling
pulses
Sampled
4
version of
input signal
• To understand the need for an anti-aliasing filter, you need to
understand the sampling theorem which essentially states:
• In order to recover a signal, the sampling rate must be greater
than twice the highest frequency in the signal.
• Stated as an equation, fsample > 2fa(max)
where fsample = sampling frequency
fa(max) = highest harmonic in the analog signal
If the signal is sampled less than this, the recovery process
will produce frequencies that are entirely different than in the
original signal. These “masquerading” signals are called 5
aliases.
• Quantization – is a process of converting an analog value to a
code. During the quantization, the ADC converts each sampled
value of analog signal to a binary code. The more bits that are
used to represent a sampled value, the more accurate is the
representation.
Fig 2
Sample Quantization Code
interval level
1 0 00
2 1 01
3 2 10
4 1 01
5 1 01
6 1 01
7 1 01
8 2 10
9 3 11
10 3 11
11 3 11
12 3 11
7
13 3 11
The reconstructed waveform in Figure 2 using four quantization levels (2 8
bits). The original analog waveform is shown in light gray for reference.
9
• Operational amplified – op-amp is a linear amplifier which has
two inputs (inverting and noninverting) and one output.
ﻋﺎﻛس وﻏﯾر ﻋﺎﻛس
10
Flash Analog to Digital Converter
• The flash method utilizes special high speed comparators that
compare reference voltages with the analog input voltage.
• When the input voltage exceeds the reference voltage for a given
comparator, a HIGH is generated.
• 2n-1 comparators are required to convert n – bit binary code.
• Advantage:
• it provides a fast conversion time
• Disadvantage:
• A large number of comparator is needed
11
Flash Analog to Digital Converter
12
Fig 3
Determine the binary code output of the 3-bit flash ADC in Fig 3 for the input signal
in Fig 4 and the encoder enable pulses shown. For this example, the Vref = +8V.
13
14
Digital – to – Analog Converter (DAC)
• Process of taking a value represented in digital
code (such as straight binary or BCD) and
converting it to a voltage or current that is
proportional to the digital value.
10 V
A positive half-wave from 0-10 V
is shown in blue. The sample-and-
hold circuit produces the staircase
representation shown in red.
0V
15
Digital-to-Analog Conversion Methods
Binary-weighted-input DAC:
The binary-weighted-input DAC is a basic DAC in which
the input current in each resistor is proportional to the
column weight in the binary numbering system. It requires
very accurate resistors and identical HIGH level voltages
for accuracy. LSB 8R
D0 Rf
The MSB is represented by the + –
I0
4R If
largest current, so it has the D1
smallest resistor. To simplify I1 – Vout
2R
analysis, assume all current D2 I=0
I2 + Analog
goes through Rf and none into R output
the op-amp. D3 16
MSB I3
Example 1
Digital-to-Analog Conversion Methods
A certain binary-weighted-input DAC has a binary input of
1101. If a HIGH = +3.0 V and a LOW = 0 V, what is Vout?
120 kW
1 +3.0 V Rf
60 kW 10 kW
0 0V
–
30 kW
1 +3.0 V Vout
+
15 kW
1 +3.0 V
I out ( I 0 I1 I 2 I 3 )
3.0 V 3.0 V 3.0 V
0 V 0.325 mA
120 kW 30 kW 15 kW
Vout = Iout Rf = (−0.325 mA)(10 kW) =−3.25 V 17
18
19
20
Digital-to-Analog Conversion Methods
R-2R ladder:
The R-2R ladder requires only two values of resistors. By calculating
a Thevenin equivalent circuit for each input, you can show that the
output is proportional to the binary weight of inputs that are HIGH.
VS
Each input that is HIGH contributes to the output: Vout n i
2
where VS = input HIGH level voltage
n = number of bits Inputs
i = bit number D0 D1 D2 D3
For accuracy, the resistors R1 R3 R5 R7 Rf = 2 R
must be precise ratios, 2R 2R 2R 2R
R2 R4 R6 R8
which is easily done in –
integrated circuits. 2R R R R Vout
+ 21
Example 2
Digital-to-Analog Conversion Methods
An R-2R ladder has a binary input of 1011. If a
HIGH = +5.0 V and a LOW = 0 V, what is Vout?
D0 D1 D2 D3
+5.0 V +5.0 V 0V +5.0 V
R1 R3 R5 R7 Rf = 50 kW
50 kW 50 kW 50 kW 50 kW
R2 R4 R6 R8
–
50 kW 25 kW 25 kW 25 kW Vout
+
VS
Apply Vout to all inputs that are HIGH, then sum the results.
2 n i
5V 5V
Vout ( D0 ) 40 0.3125 V Vout ( D1 ) 41 0.625 V
2 2
5V 22
Vout ( D3 ) 43 2.5 V Applying superposition, Vout = −3.44 V
2
Summary
Resolution and Accuracy of DACs
The R-2R ladder is relatively easy to manufacturer and is
available in IC packages. DACs based on the R-2R
network are available in 8, 10, and 12-bit versions. The
resolution is an important specification, defined as the
reciprocal of the number of steps in the output.
What is the resolution of the BCN31 R-
2R ladder network, which has 8-bits?
Number of % Resolution:
steps: 28 – 1
1/255 = 0.39%
= 255
23
Performance characteristics of a
DAC
• Resolution – the resolution of DAC is the reciprocal of the
number of discrete steps in the output.
• For example: a 4-bit DAC has a resolution of one part in 24-1.
Expressed as a percentage, (1/15)*100 = 6.67%.
• Offset Error – ideally, the output of a DAC will be zero volts
when the binary input is all 0s. In practice however, there will be
a small output voltage for this kind od situation.
• Accuracy – accuracy is derived from a comparison if the actual
output if a DAC with the expected output. It is expressed as a
percentage of a full scale or maximum, output voltage.
• For example: if a converter has a full scale output of 10V and the
accuracy ±0.1%, then the maximum error for any output voltage is
(10V) (0.001) = 10 mV. 24