• The fact that real-world signals are analog requires microprocessor-based systems to have an A/D at one end and a D/A at the other end... Analog signals can have any value; digital sig
Trang 1CHAPTER 19
Data Conversion
Trang 2Describe and Analyze:
• Analog vs Digital Signals
• Resolution
• Digital-to-Analog Conversion
• Analog-to Digital Conversion
• Troubleshooting
Trang 3• The low cost of microprocessors and the power of using software to carry out signal processing has revolutionized electronics
• The fact that real-world signals are analog requires microprocessor-based systems to have an A/D at one end and a D/A at the other end
Trang 4A Typical System
<insert figure 19-1 here>
Trang 5Analog signals can have any value; digital signals cannot
Trang 6• Analog signals are continuous, meaning that between
any two values, there is always another value For
example, between 1.0000 Volts and 1.0001 Volts
there is 1.00005 Volts (and an infinite number of
other values)
• Digital signals are discrete, meaning that the
difference between any two digital values cannot be less than 1 For example, the next number after
binary 1010 is 1011 There is no value between 1010 and 1011
Trang 7• Resolution is the smallest difference you can “see” in
a system In a digital system, it is always 1 bit, but you need to know how many bits are in a “word”
• Resolution is a percentage of the maximum binary value For example: suppose you have an 8-bit
converter The resolution would be:
Resolution = 0.39%
Trang 8• Resolution is not the same as accuracy
For example:
6 / 3 = 2.00635
has 6 digits of resolution (that’s 1 ppm!)
but only 3 digits of accuracy (2.00)
Trang 9More bits = finer resolution = less “graininess”
Trang 10• To build an analog-to-digital, you first need a digital-to-analog converter (also called DAC
or D/A)
• The basic ingredients are a precise (or at
least stable) voltage reference, some
precision resistors, some digitally controlled switches, and an op-amp to sum it all up
• See figure on following slide
Trang 11R-2R resistor network supplies binary-weighted current
Trang 12A “Multiplying DAC” application
Trang 13• The basic idea is to use a DAC and a
comparator, and something to generate
binary numbers
• The analog input is applied to one
comparator input The output of the DAC is applied to the other
• Binary values are tried, and the comparator tells the logic about the analog input vs the DAC output
Trang 14• The simplest approach would be to use a binary
counter to drive the DAC As the count increases from zero, the output voltage of the DAC walks up a staircase At some value of DAC output, the
comparator “flips” and the counter stops counting Whatever number is in the counter is the answer
• The problem with that approach is that it takes too long to count up The more bits, the longer it takes
Trang 15• Instead of just counting up from zero, the standard approach is to use a technique called
Successive Approximation
• It requires a digital logic circuit called a “successive approximation register” (SAR)
• Using SAR, the MSB is applied to the DAC first If the comparator flips, take it out; if not, leave it in
Trang 16Analog-to-Digital
Trang 17The basic process
Trang 18The hardware
Trang 19S&H: Sample-and-Hold
Trang 20• Use a scope to examine waveforms Look for “missing codes” which appear as
“landings” on a staircase (sawtooth)
• Look for “stuck bits”
• Check the reference voltage (with a good meter)
• Look for DC offsets