数字电路英文版第十三单元.ppt
CHAPTER 13CHAPTER 13INTERFACINGINTERFACINGKEY TERMSAcceptor A receiving device on a bus.Analog-to-digital converter(ADC)A device used to convert an analog signal to digital form.Bus A set of interconnections that interface one or more devices based on a standardized specification.Bus arbitration The process that prevents two sources from using a bus at the same time.Bus contention An adverse condition that could occur if two or more devices try to communicate at the same time on a bus.Controller An instrument that can specify each of the other instruments on the bus as either a talker or a listener for the purpose of data transfer.DCE Data communications equipment.Digital-to-analog converter(DAC)A device used to convert a digital input to an analog signal.DTE Data terminal equipment.Flash ADC A simultaneous analog-to-digital converter.Handshaking The process of signal interchange by which two digital devices or systems jointly establish communication.High-Z The high-impedance state of a tristate circuit in which the output is effectively disconnected from the rest of the circuit.Interfacing The process of making two or more electronic devices or systems operationally compatible with each other so that they can function properly together.ISA bus Industry standard architecture bus;an internal parallel bus standard.Local bus An internal bus that connects the microprocessor to the cache memory,the main memory,the coprocessor,and the PCI bus controller.Modem A modulator/demodulator for interfacing digital devices to analog transmission systems such as telephone lines.PCI bus Peripheral control interconnect bus;an internal parallel bus standard.Peripheral A device or instrument that provides communication with a computer or provides auxiliary services or functions for a computer.Port The physical interface between a computer and a peripheral.SCSI Small computer system interface;an external parallel bus standard.Source A sending device on a bus.Tristate A type of output in logic circuits that exhibits three states:HIGH,LOW,and High-Z.USB Universal serial bus;an external serial bus standard.13.1 DIGITAL AND ANALOG 13.1 DIGITAL AND ANALOG INTERFACINGINTERFACINGAnalog quantities are sometimes called real-world quantities because most physical quantities that we are interested in measuring are analog in nature.23 Many applications of computers and other digital systems require the input of real-world quantities,such as temperature,speed,position,pressure,and force.Real-world quantities can even include graphic images.Also,digital systems often must produce outputs to control real-world quantities.4012345678910111213148 97651012 341511 12 131416 17 18 19 2015111011100100010101010110101101111001110111011100110010100111100101010010000001000100012345678910111213148 97651012 341511 12 131416 17 18 19 20155Application ExamplesAddress busTo interface between the digital and analog worlds,two basic processes are required:analog-to-digital(A/D)conversion and digital-to-analog(D/A)conversion.67An Electronic Thermostat1AmplifierADCActual temperatureDesired temperatureControl and display logic7894561230.#On/Off Heat/CoolTemperature sensorDigital codeAnalog voltageTo HVAC unit8CD PlayerAmplifierDigital signal processorDigital codePulsesAmplifierAmplifierDACControl On/Off,open/close,play,pause,track,search Laser pick-up headRight channel audio Lift channel audio 9A Digital Audiotape Player/RecorderAmplifierDigital signal processorAudio inAmplifierAmplifierDACControl On/Off,open/close,play,pause,track,search ADCRight channel audio Lift channel audio Tape driver Magnetic read/write heads Digital code10 13.2 DIGITAL-TO-ANALOG(13.2 DIGITAL-TO-ANALOG(D/A)CONVERSIOND/A)CONVERSION D/A conversion is an important part of many systems.In this section,we will examine the theory of operation of two basic types of digital-to-analog converters(DACs)and learn about their performance characteristics.11The Operational Amplifier+-+-+-Inverting inputNoninverting inputOutput VinVin1Vin2VoutRfRiHigh internalinput RVout(a)Op-amp symbol(c)Op-amp as a comparator(b)Op-amp as an inverting amplifier with gain of Rf/RiRfVout=-VinRi12Binary-Weighted-Input Digital-to-Analog Converter+-Rf8R4R2RRI1I0I2I3I0=8RVI3=RVI2=2RVI1=4RV+_20232221VVVVVoutI=0IfVout=IfRfFigure 14-37Thomas L.FloydDigital Fundamentals,8eCopyright 2003 by Pearson Education,Inc.Upper Saddle River,New Jersey 07458All rights reserved.Figure 14-38 Output of the DAC in Figure 14-37.Thomas L.FloydDigital Fundamentals,8eCopyright 2003 by Pearson Education,Inc.Upper Saddle River,New Jersey 07458All rights reserved.13The R/2R Ladder Digital-to-Analog Converter+-Rf=2RR8RD02RVoutD1D2D3RRR6R4R2R1R3R5R72R2R2R2RInputs14+-Rf=2RD3=1REQ=2RR72RI=2R5V+5V0Vout=-IfRf=-()2R2R5V=-5 V(a)Equivalent circuit for D3=1,D2=0,D1=0,D0=0+-Rf=2RD2=1R52RI=2R+5VR7R8REQ=2RR2R+-Rf=2RR72RRRRTHR82.5VVTH2.5VI=00 VVout=-IfRf=-()2R2R2.5V=-2.5 V(b)Equivalent circuit for D3=0,D2=1,D1=0,D0=01516I=2R+-Rf=2RR72RRRRTHR81.25VVTH1.25VI=00 VVout=-IfRf=-()2R2R1.25V=-1.25 V(c)Equivalent circuit for D3=0,D2=0,D1=1,D0=017I=2R+-Rf=2RR72RRRRTHR80.625VVTH0.625VI=00 VVout=-IfRf=-()2R=-0.625V2R0.625V(d)Equivalent circuit for D3=0,D2=0,D1=0,D0=1Resolution.The resolution of a DAC is the reciprocal of the number of discrete steps in the output.The total number of discrete steps equals 2n 1,where n is the number of bits.(4-bit DAC,(1/15)*100=6.67%)Accuracy.Accuracy is a comparison of the actual output of a DAC with the expected output.It is expressed as a percentage of a full-scale,or maximum,output voltage.For example,if a convert has a full-scale output of 10 V and the accuracy is+0.1%,then the maximum error for any output voltage is(10V)(0.001)=10 mV.Ideally,the accuracy should be no worse than+of a least significant bit.For an 8-bit converter,the least significant bit is 0.39%of full scale.The accuracy should be approximately+0.2%.Linearity.A linear error is a deviation from the ideal straight-line output of a DAC.A special case is an offset error,which is the amount of output voltage when the input bits are all zeros.Monotonicity.A DAC is monotonic if it does not take any reverse steps when it is sequenced over its entire range of input bits.Settling time.Settling time is normally defined as the it takes a DAC to settle within+LSB of its final value when a change occurs in the input code.(The settling time of a DAC is the time it takes for the DACs analog output settle to 99.95%of its new value after a digital input has been applied.)18EXAMPLE 13-2 Determine the resolution,expressed as a percentage,of the following:(a)An 8-bit DAC (b)a 12-bit DAC(b)Solution:(a)For the 8-bit converter,(c)x 100=x 100=0.392%1128-1255(b)For the 12-bit converter,11212-14095x 100=x 100=0.0244%If a 4-bit DAC has a 12 V reference applied,calculate each of the following:a.step size b.percent resolution c.the weight of each binary column d.the output voltage when 0010 is applied e.the output voltage when 1011 is applied a.Step size=V0/2n=12/16=0.75 V b.%Res.=s/size/V0=0.75/12=6.25%c.LSB=12V/16=0.75 V 1=12V/8 =1.5 V 1=12V/4 =3.0 V MSB=12V/2 =6.0 V d.0010=1.5 V e.1011=8.25 VIf an 8-bit DAC has a 10 V reference applied,calculate each of the following:a.step size b.percent resolution c.the weight of each binary column d.the output voltage when 0000 0101 is applied e.the output voltage when 1011 0111 is applied a.Step size=V0/2n=10/256=0.039 V b.%Res.=s/size/V0=0.039/10=0.39%c.LSB=10V/256 =0.039 V 1=10V/128 =0.078 V 2=10V/64 =0.156 V 3=10V/32 =0.3125V 4=10V/16 =0.625 V 5=10V/8 =1.25 V 6=10V/4 =2.5 V MSB=10V/2 =5 V d.0000 0101=0.195 V e.1011 0111=7.137 V 13.3 ANALOG TO DIGITAL(A/D)13.3 ANALOG TO DIGITAL(A/D)CONVERSIONCONVERSIONFlash(Simultaneous)Analog-to-Digital Converter:Disadvantages:too many comparatorsAdvantages:fast conversion time1967543210124+_+_+_+_+_+_+_RRRRRRRROp amp comparatorsD0D1D2+VREFSampling pulsesParallel binary outputPriority encoderAnalog input20 7 6 5 4 3 2 1 0 4 2 10 to 0.9 V 0 0 0 0 0 0 0 0 0 0 01 to 1.9 V 0 0 0 0 0 0 1 0 0 0 12 to 2.9 V 0 0 0 0 0 1 1 0 0 1 03 to 3.9 V 0 0 0 0 1 1 1 0 0 1 14 to 4.9 V 0 0 0 1 1 1 1 0 1 0 05 to 5.9 V 0 0 1 1 1 1 1 0 1 0 16 to 6.9 V 0 1 1 1 1 1 1 1 1 1 07 V or Greater 1 1 1 1 1 1 1 1 1 1 1VREF=8 V R=1 k0123456789123456781011 12tV100 110111 110 101 010 000001 011 101110 111EXAMPLE 13-32122 Related Problem:13-3:010,100,101,110,110,111,110,110,101,100,011,010,000,000,001,001,010,011,100,101,110,110,111,111,23CLKStairstep-Ramp Analog-to-Digital ConverterCLEARENQ6Q7Q5Q4Q3Q2Q1Q0D6D7D5D4D3D2D1D0D6D7D5D4D3D2D1D0LatchCTR DIV 256DACControl circuitStairstep reference voltageAnalog inputComparatorC+_24CLKTracking Analog-to-Digital ConverterDOWNENQ6Q7Q5Q4Q3Q2Q1Q0D6D7D5D4D3D2D1D0D6D7D5D4D3D2D1D0LatchCounterDACControl circuitAnalog inputComparatorC+_UP4012345678910111213148 97651012 341511 12 131416 17 18 19 20152526D6D7D5D4D3D2D1D0CounterLatchesCControl logicRamp generatorAnalog inputCLKComparatorResetENtVRamp+_CLEARBinary or BCD outputChapter 13:InterfacingTrue/False1.A light bulb and switch are examples of an analog circuit.2.A D/A converter changes something like temperature variations into a digital quantity.3.An operational amplifier is used as a comparator.4.An eight-bit D/A converter has a resolution of 0.125.5.The primary disadvantage of the flash A/D converter is the large number of comparators required.6.When the analog input to a tracking A/D converter is at a constant level,the digital output will oscillate.7.The RS-232-C is a serial data transfer system.Multiple Choice11.Which of the following characterizes an analog quantity?a.Discrete levels represent changes in a quantity.b.Its values follow a logarithmic response curve.c.Can be described with a finite number of steps.d.Has a continuous set of values over a given range.12.An analog-to-digital converter has a four-bit output.How many analog values can it represent?a.4 b.1/4 c.16 d.0.062513.An analog quantity varies from 0-7V and is input to a 6-bit A/D coverter.What analog value is represented by each step on the digital output?a.0.111V b.1.17V c.0.109V d.0.875V14.What function is performed by the block labeled X in Figure 13-1?a.Analog-to-digital conversion.b.Digital-to-analog conversion.c.Audio ON/OFF control.d.Power supply for the audio amplifier.ControlTape driveDigital signal processing YXAudio inAudio out15.Which of the equations below expresses the voltage gain relationship for an operational amplifier?a.Vout=Vin/Av b.Vout/Vin=Rout/Rin c.Vin/Vout=Rout/Rin d.Vout/Vin=-Rf/Rin16.What is the inverting input on an op-amp referred to as,and why?a.Virtual ground;because it is connected to common.b.The(-)input;to distinguish it from the other input.c.Virtual ground;because it has approximately zero volts on it with respect to the non-inverting terminal.d.Common input;because it is connected to the negative terminal of the power supply,which is in turn connected to circuit common.