Documente Academic
Documente Profesional
Documente Cultură
6, 2002
Analog/Digital Converters
1
EE 308 Mar. 6, 2002
Comparator
V
CC
V
REF
V
V OUT
IN
2
EE 308 Mar. 6, 2002
5V Vin
4.375 V −
Dout
+
3.750 V −
+
3.125 V −
+
2.500 V −
+
1.875 V −
+
1.250 V −
+
0.625 V −
+
0.000 V
3
EE 308 Mar. 6, 2002
A
-bit Flash A/D converter requires 2 -1 comparators
An 8-bit Flash A/D requires 255 comparators
A 12-bit Flash A/D converter would require 4,095 comparators
– Cannot integrate 4,095 comparators onto an IC
The largest flash A/D converter is 8 bits
Flash A/D converters can sample at several billion samples/sec
4
EE 308 Mar. 6, 2002
HC12 A/D is
= 5 V and
The HC12 has a 10-bit A/D converter. The typical voltage range used for the
= 0 V, so the HC12 has a quantization value
of
!#"$"&%
The dynamic range of an A/D converter is given in decibels (dB):
5
EE 308 Mar. 6, 2002
0.5
−0.5
−1
0 2 4 6 8 10 12 14 16 18 20
0.5
−0.5
−1
0 2 4 6 8 10 12 14 16 18 20
0.5
−0.5
−1
0 2 4 6 8 10 12 14 16 18 20
t (ms)
6
EE 308 Mar. 6, 2002
RF
R
0
V −R
R0 F
Vout = V
R R0
0
7
Digital-to-Analog (D/A) Converters
EE 308
E
An inverting op amp can produce an output voltage which is a linear combination of several input voltages
RF
R
0
V −R R R R
R0 F F F F
Vout = V − V − V − V
R R0 R R1 R R2 R R3
0 1 2 3
R
1
V
R1
8
R
2
V
R2
R
3
V
R3
Mar. 6, 2002
Digital-to-Analog (D/A) Converters
EE 308
E
By using input resistors which scale by factors of 2, a summing op amp can produce an output which follows
a binary pattern
RF
R
0
V −R 2 R 4 R 8 R
Ref F F F F
Vout = V − V − V − V
R Ref R Ref R Ref R Ref
0 0 0 0
R 2
0 −R
9
F
V = V +2V +4 V +8V
Ref R Ref Ref Ref Ref
0
R 4
0 −R
F
V = V 1+2+4+8
Ref R Ref
0
R 8
0
V
Ref
Mar. 6, 2002
Digital-to-Analog (D/A) Converters
EE 308
E
By using switches on the input resistors, a summing op amp can produce an output which is a binary number
(representing which switches are closed) times a reference voltage
RF
B
0 R
0
V −R
Ref F
10
Vout = V B +2B +4 B +8B
Ref 0 1 2 3
R
0
B R 2
1 0
−R
F V
= B
Ref
R
0
B R
2 0 4
B = B B B B
3 2 1 0
B R
3 0 8
Mar. 6, 2002
EE 308 Mar. 6, 2002
A simple A/D converter can be constructed with a counter and a D/A con-
verter
The counter counts from 0 to 2 -1
The counter drives the input of the D/A converter
The output of the D/A converter is compared to the input voltage
When the output of the comparator switches logic level, the generated voltage
passed the input voltage
By latching the output of the counter at this time, the input voltage can be
determined (with the accuracy of the quantization value of the converter)
Problem with Slope A/D converter: Takes 2 clock cycles to test all possible
values of reference voltages
11
EE 308 Mar. 6, 2002
C
L
O
A
U
T
N
C
T
E H
R
CLK
D/A
V
in
Latch Here
V
D/A
Time
12
EE 308 Mar. 6, 2002
13
EE 308 Mar. 6, 2002
Conversion Complete
V
in Successive
High/Low
Approximation
Start Register
L
A
Clk T
C
H
A/D Value
D/A
V 110000
V
D/A
V 101000 100111
in
100110 100110
100100
100000
Time
14
EE 308 Mar. 6, 2002
An SA A/D converter can give the wrong output if the voltage changes during
a conversion
An SA A/D converter needs an input buffer which holds the input voltage
constant during the conversion
This input buffer is called a Track/Hold or Sample/Hold circuit
It usually works by charging a capacitor to the input voltage, then disconnect-
ing the capacitor from the input voltage during conversion
The voltage on the capacitor remains constant during conversion
The HC12 has a Track/Hold amplifier built in
SA A/D converters have resolutions of up to 16 bits
SA A/D converters have speeds up to several million samples per second
15
EE 308 Mar. 6, 2002
A/D Value
D/A
V 110000
V
D/A
V 101000 100111
in
100110 100110
100100
100000
Time
16