Fundamentals of Linear Electronics Integrated & Discrete

Download Report

Transcript Fundamentals of Linear Electronics Integrated & Discrete

CHAPTER 19
Data
Conversion
Objectives
Describe and Analyze:
• Analog vs. Digital Signals
• Resolution
• Digital-to-Analog Conversion
• Analog-to Digital Conversion
• Troubleshooting
Introduction
• 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.
A Typical System
<insert figure 19-1 here>
Resolution
Analog signals can have any value; digital signals cannot.
Resolution
• 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.
Resolution
• 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 = (1 / 28)  100%
Resolution = (1 / 256)  100%
Resolution = 0.39%
Resolution
• 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)
Resolution
More bits = finer resolution = less “graininess”.
Digital-to-Analog
• 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.
Digital-to-Analog
R-2R resistor network supplies binary-weighted current.
Digital-to-Analog
A “Multiplying DAC” application.
Analog-to-Digital
• 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.
Analog-to-Digital
• 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.
Analog-to-Digital
• 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.
Repeat the process with each bit down to the LSB.
Analog-to-Digital
Analog-to-Digital
The basic process.
Analog-to-Digital
The hardware.
S&H: Sample-and-Hold
Holds Vin steady while it is being converted.
Troubleshooting
• 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.