chapter 19 data conversion. objectives describe and analyze: analog vs. digital signals resolution...

20
CHAPTER 19 Data Conversion

Upload: sybil-owens

Post on 14-Jan-2016

298 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

CHAPTER 19

Data

Conversion

Page 2: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

Objectives

Describe and Analyze:• Analog vs. Digital Signals• Resolution • Digital-to-Analog Conversion• Analog-to Digital Conversion• Troubleshooting

Page 3: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

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.

Page 4: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

A Typical System

<insert figure 19-1 here>

Page 5: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

Resolution

Analog signals can have any value; digital signals cannot.

Page 6: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

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.

Page 7: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

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%

Page 8: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

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)

Page 9: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

Resolution

More bits = finer resolution = less “graininess”.

Page 10: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

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.

Page 11: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

Digital-to-Analog

R-2R resistor network supplies binary-weighted current.

Page 12: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

Digital-to-Analog

A “Multiplying DAC” application.

Page 13: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

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.

Page 14: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

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.

Page 15: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

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.

Page 16: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

Analog-to-Digital

Page 17: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

Analog-to-Digital

The basic process.

Page 18: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

Analog-to-Digital

The hardware.

Page 19: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

S&H: Sample-and-Hold

Holds Vin steady while it is being converted.

Page 20: CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion

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.