hifydudtr

download hifydudtr

of 19

description

xcbcv

Transcript of hifydudtr

Slide 1

EET 252 Unit 7Digital-to-Analog ConversionRead Floyd, Sections 12-3 to 12-5 (through page 707).Study Unit 7 e-Lesson.Do Lab #7.

Homework #7 and Lab #7 due next week.Quiz next week.1-Handout: slide 5, practiceOpAmp-Take Quiz 6.-Fire up Multisim.

An analog-to-digital converter (ADC) takes an analog voltage or current as its input and produces a digital code as its output. This digital code is proportional to the analog input.A digital-to-analog converter (DAC) takes a digital code as its input and produces an analog voltage or current as its output. This analog output is proportional to the digital input. The Big Picture2-Recall that many ADCs contain a DAC as a component.ReviewTransducerPhysicalvariableADCDACActuatorComputerControlphysicalvariable......Analog input(voltage or current)DigitalinputsDigitaloutputsAnalog output(voltage or current)3-Recall that the ADC block typically includes an anti-aliasing filter and a sample-and-hold circuit, in addition to the circuit the performs that actual quantization.

Just as with ADCs, there are several common ways of specifying a DACs resolution:Number of bits, nNumber of output codes, = 2n, or number of steps in the output, = 2n 1Percentage resolution, = 1 / (2n 1), expressed as a percentageStep size, = Vref / 2nReview: Resolution4Resolution: ExamplesFormula4-bit DAC10-bit DACNumber of bitsnNumber of output codes2nNumber of steps in the output2n1Percentage resolution1 / (2n1)Step size (assuming 5 V reference voltage)Vref / 2n

5An 8-Bit DAC in MultisimNote 8 digital inputs, 1 analog output, and input reference voltage.

6-Demo this file (dac_meter.ms10) in Multisim. Have them predict output voltage when digital input = 0000 0001, when digital input = 1111 1111 (full-scale voltage), and when digital input = 0010 1110. -What digital input would be needed to produce an output of roughly 1.2 V?

Calculating the Output VoltageFor an 8-bit multiplying DAC like the one in previous slide, the output voltage is given by the following equation, where Din is the number (between 0 and 255) present on the digital inputs:

This gives the ideal value. In practice, various factors can cause the actual value to deviate from this predicted value.

7-What number would be in the denominator for a 10-bit DAC?-Dont try to memorize this equation! Just think through it.-Using file wordGenDemo.ms10, explain how to use Word Generator, which theyll use in lab.-Then run file dac_scope.ms10.Voltage or Current?Some DACs are designed to produce an output current (rather than an output voltage) that is proportional to the digital input.For such a DAC, wed simply change our equation to

The DAC chip that well use in this weeks lab is a current chip.

8Two standard ways of building a digital-to-analog converter:Binary-weighted inputR/2R LadderBoth methods use operational amplifiers with negative feedback.How to Build a DAC9-Simpler and (generally) quicker than ADCs. In many applications, the op amps output is connected back to its inverting input directly or through a component (resistor or capacitor). This configuration is called negative feedback. For example:Op Amp with Negative Feedback

10Recall that an op amp with no feedback serves as a comparator.In The Art of Electronics, Horowitz and Hill give two golden rules for analyzing circuits that contain op amps with negative feedback:The output attempts to do whatever is necessary to make the voltage difference between the inputs zero. The inputs draw no current.Warning: These two rules apply only if the op amp has negative feedback.Golden Rules of Op Amps with Negative Feedback11Do practiceOpAmp handout.Binary-weighted-input DACIn a binary-weighted-input DAC, 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.The MSB is represented by the largest current, so it has the smallest resistor. To simplify analysis, assume all current goes through Rf and none into the op-amp.MSBLSB

8R4R2RRRfVoutAnalog outputD0D1D2D3 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights ReservedFloyd, Digital Fundamentals, 10th ed 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights ReservedFloyd, Digital Fundamentals, 10th ed12

Binary-weighted-input DACExampleA 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?Solution+3.0 V+3.0 V+3.0 V 0 V120 kW60 kW30 kW15 kW10 kWRf

Vout = Iout Rf = (0.325 mA)(10 kW) =3.25 VVout 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights ReservedFloyd, Digital Fundamentals, 10th ed 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights ReservedFloyd, Digital Fundamentals, 10th ed13-Have them find Vout when binary input is 0001 (step voltage) and 1111 (full-scale voltage).-Note that Vout depends on the precise value of a HIGH at the binary inputs. This is undesirable, and well return to this point later.

R/R2 Ladder DACThe R-2R ladder DAC 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. 2RRRR2R2R2R2RRf = 2RInputsD0D1D2D3Each input that is HIGH contributes to the output:Voutwhere VS = input HIGH level voltage n = number of bits i = bit numberR1R3R5R7R2R4R6R8For accuracy, the resistors must be precise ratios, which is easily done in integrated circuits.

2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights ReservedFloyd, Digital Fundamentals, 10th ed 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights ReservedFloyd, Digital Fundamentals, 10th ed14R/R2 Ladder DACRf = 50 kW0 V+5.0 VVoutR1R3R5R7R2R4R6R8ExampleAn R-2R ladder DAC has a binary input of 1011. If a HIGH = +5.0 V and a LOW = 0 V, what is Vout?50 kW25 kWSolution50 kW50 kW50 kW50 kW25 kW25 kW+5.0 V+5.0 V

D0D1D2D3Applying superposition, Vout = 6.875 VApply to all HIGH inputs, then sum the results.

2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights ReservedFloyd, Digital Fundamentals, 10th ed 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights ReservedFloyd, Digital Fundamentals, 10th ed15-Have them find Vout when binary input is 0001 (step voltage) and 1111 (full-scale voltage).-As in previous design, Vout depends on the precise value of a HIGH at the binary inputs. This is undesirable, and well turn to this point next.

Using a Reference VoltageIn the previous circuits, the output voltage depended on the precise voltage present on the digital inputs. This is undesirable, since a digital HIGH on one of these pins could be anywhere from about 2.4 V to about 5 V.Wed rather have the output voltage depend only on whether the inputs are HIGH or LOW, regardless of the precise voltage.So most DAC chips use additional circuitry and a reference voltage that sets the full-scale output, independent of the precise voltages present on the digital inputs.16

Binary-Weighted DAC, Using a Reference Voltage17-Similar idea applies to R/2R Ladder design.-Shown is a Multisim schematic with voltage-controlled switches.-The LM336 reference diode that theyll use in lab is one way to provide a precision reference voltage.MC1408 8-bit DAC (Datasheet on course website.)Its also known as a DAC0808.This chip requires a ground connection and positive (VCC) & negative (VEE) supply voltages.Its output current is given by Io = Iref x Din / 256where Iref is the current into pin 14 (typically 2 mA).A Popular DAC Chip18Note strange pin naming: A1 is MSB and A8 is LSB.A digital signal processor (DSP) is optimized for speed and working in real time (as events happen). It is basically a specialized microprocessor with a reduced instruction set.Digital Signal Processing

After filtering and converting the analog signal to digital, the DSP takes over. It may enhance the signal in some predetermined way (reducing noise or echoes, improving images, encrypting the signal, etc.). The signal can then be converted back to analog form if desired. 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights ReservedFloyd, Digital Fundamentals, 10th ed 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights ReservedFloyd, Digital Fundamentals, 10th ed19