Você está na página 1de 22

These slides incorporate figures from Digital Design Principles and Practices, third edition, by John F.

Wakerly, Copyright 2000, and are used by permission. NO permission is given to re-use or publish these figures, in either original or modified form, in printed, electronic or any other format.

Slide Set 12 Analog-digital Conversion

Digital-to-analog conversion

Vout

x0 2  x1 2  x2 2  K  xn 1 2 ! k 2n
0 1 2

n 1

reference voltage in multiplying DAC i.e., 00...0 => 0 volts; 11....1 => k volts (slightly less) k / 2n = step size

Weighted resistor network


CMOS transmission gates

How does voltage across load resistor relate to switch settings?

Thevenin equivalent

Veq ! V VCC ! V ' V ! ( I 3  I 2  I1  I 0 )(16 R )


What are the four source currents?

x3 (V  V ) (1  x3 )V x3V  V  ! 2 2 2 x (V ' V ) (1  x2 )V x2V ' V  ! I2 ! 2 4R 4R 4R x1 (V ' V ) (1  x1 )V x1V ' V  ! I1 ! 8R 8R 8R x0 (V ' V ) (1  x0 )V x0V '  V  ! I0 ! 16 R 16 R 16 R I3 !

Short circuit current?

V ' V ! (8 x3  4 x2  2 x1  x0 ) 16

x3V ' x2V ' x1V ' x0V ' I SC !    2R 4R 8 R 16 R V' (8 x3  4 x2  2 x1  x0 ) I SC ! 16 R Req ! R

V' V ! (8 x3  4 x2  2 x1  x0 ) 16 Req ! R

Vout

n 1 i xi 2 V RL i !0 RL ! R  R Veq ! R  R 2n L L

Norton equivalent circuit


Rnorton ! Rthevenin ! R I norton ! Vthevenin / R

For current-based analysis Thevenin is for voltage-based analysis Replaces linear circuit with current generator and parallel resistance linear circuit is one with only resistances and voltage sources Current source is short-circuit current Equivalent resistance is open-circuit voltage divided by short-circuit current Equivalent resistance can be found by shorting all voltage sources

Norton analysis of weighted resistor network

Equivalent resistance set voltage sources to zero:

1 Req ! !R 1 1 1 1 1     16 R 16 R 8R 4 R 2 R
Have short-circuit current from Thevenin analysis

Norton equivalent circuit:

I SC

V' ! (8 x3  4 x2  2 x1  x0 ) 16 R

Current divides proportionally output voltage is then constant times digital input

(1  p ) R ! pRLoad R p! R  RLoad Vout Vout Vref p ! 4 R2 xi 2 RLoad


i

Vref RLoad ! RLoad  R

xi 2i n 2

1-p p

Some problems with this weighted resistor solution Resistor values span a wide range
n-bit DAC ==> resistors from 2R to 2nR 8-bit DAC ==> 2R to 512R, e.g., 2K to 512K Difficult to fabricate wide ranges of resistance in semiconductor processes.

Different resistors in the network have different accuracy requirements.


5% resistance change at MSB has 2.5% effect 5% resistance change at LSB (8-bit) has .02% effect MSB of 16-bit DAC (as in CD player) would require accuracy of one part in 215 (.003%) to have less than one step-size error.

Solution: Ladder Network

Claim: same Norton and Thevenin equivalents Uses only two resistor values, R and 2R

Why same Thevenin and Norton equivalents?

y y

Thevenin?

2 R x0Vre Veq ! x0Vre ! 2 2R  2R x0Vre I ! 2R Req ! R

y y

open-circuit voltage?

x0Vref 2

equivalent resistance? set voltage sources to zero

x0Vre Veq ! 2

xV x1Vre  0 re 2  (2 R ) 4R

xV xV Veq ! 1 re  0 re 2 4

Req !

1 1 1  2R 2R

!R

and so on...

After reducing through most significant bit (bit 3 in this case):

RLoad

x3Vref x2Vref x1Vref x0Vref    2 4 8 16

V out

R L o a d V re f ! (8 x 3  4 x 2  2 x 1  x 0 ) R Load  R 1 6 R L o a dV re f ! R Load  R

V out

xi 2 i
2n
same equation as weighted resistor network but uses only two resistor sizes: R and 2R

Analog-to-digital conversion
Analog comparator = 1-bit A-to-D

Combinational A-to-D

Fastest conversion time


used in digital scopes, video sampling, etc.

Good for only a few bits of resolution


too much hardware

Alternative: sequential A-to-D


Idea: Use one comparator, repetitively, and a DAC to try different digital values until correct result is found.

COMP (logic signal)

initialize to zero increment until comp becomes zero

RESULT

Counter-ramp A-to-D
Initialize result register to 0 Keep incrementing result register until the DAC produces a voltage greater than Vin. Maximum of 2n steps for n-bit conversion. ABEL code:
state IDLE: if START then LOOK with result := 0; else IDLE with result := result; state LOOK: if (COMP == 1) then DONE with result := result; else if (result == MAX) then DONE with result := result; else LOOK with result := result + 1; state DONE: if START then DONE with result := result; else IDLE with result := result;

Successive-approximation A-to-D
Like a binary search in software -- n steps to search 2n possible results (n-bit result). First step -- determine MSB of result:
Set result to 10000. Is COMP 1 or 0? COMP=1 ==> MSB = 1; else MSB = 0.

Second step -- determine next lower bit:


Set result to x1000. Is COMP 1 or 0? (x = bit found at previous step). COMP=1 ==> next lower bit =1; else 0.

And so on, for n steps through the LSB

Other clever ideas, e.g., Apple II A-to-D for joystick


Converts analog position into numeric value. Idea: Use a potentiometer whose resistance is a function of position (joystick). Combine the resistance with a capacitance and measure the RC time constant Use a program loop.

time proportional to joystick position

Você também pode gostar