0% found this document useful (0 votes)
19 views

Data Conversion Fundamentals

The document discusses data conversion fundamentals including analog to digital converters (ADCs) and digital to analog converters (DACs). It covers binary coding systems, resolution, gain and offset errors, and applications of DACs. ADCs and DACs are used to translate between analog and digital formats for processing by computers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Data Conversion Fundamentals

The document discusses data conversion fundamentals including analog to digital converters (ADCs) and digital to analog converters (DACs). It covers binary coding systems, resolution, gain and offset errors, and applications of DACs. ADCs and DACs are used to translate between analog and digital formats for processing by computers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

a

Data Conversion
Fundamentals
Technical Tutorial – Data Converters
Basic Level
June 2002

The World Leader in Signal Processing Solutions -1-


A Review of the Binary Code System

Vibration

Weight
Analog World
Digital World
Speed
Voltage
Current
Resistance
? 1001010010
1001101010
Pressure

Temperature

We need a method of communicating between the analog or


real world, and the digital or computer world.

a -2-
How Do We Communicate With The
Microprocessor?

ADC
ADC µP
µP DAC
DAC

„ An analog-digital converter (ADC) and a digital-analog converter (DAC)


are used to “translate” the real world signals into a digital format and
then back again
„ The binary code system is the language of the digital world

a -3-
How Does the Binary System Work?

3 2 1 0
2 2 2 2

8 4 2 1

5=4+1 0 1 0 1

7=4+2+1 0 1 1 1

3=2+1 0 0 1 1

The natural binary system uses a base 2 raised to a power from 0…N.
The chart shows how to convert a number from base 10 to base 2

a -4-
Binary vs Offset Binary
Binary (Unipolar) Offset Binary (Bipolar)

1…111111111 + FS 1…111111111

0…000000000 Zero Scale 1…000000000

- FS 0…000000000

a -5-
Offset Binary vs 2’s
Complement
OBIN 2SC
MSB
1111 0111
1110 0110
1101 0101
The basic difference between offset
1100 0100
binary (OBIN) and 2’s complement 1011 0011
(2SC) is the inversion of the most 1010 0010
significant bit (MSB) 1001 0001
1000 0000
0111 1111
0110 1110
To convert from one code to the other, a 0101 1101
logic inverter is used. 0100 1100
0011 1011
0010 1010
0001 1001
0000 1000
a -6-
Other Codes
(Not An All-Inclusive List)

„ Binary coded decimal (BCD):

‹ Rarely used

„ Gray code :

‹ Shaft encoders (angle-digital converters)

„ Sign + magnitude

„ Twos complement (2SC)

„ Ones complement (1SC)

a -7-
What is an Analog-Digital
Converter?

An analog-digital converter produces a digital output which corresponds


to the value of the analog signal applied to its input relative to a reference
voltage.
The digital output code will represent a finite number of discrete input
values. For an “N” bit converter, there will be 2N discrete values

Analog
Analog –– Digital
Digital
Converter
Converter

Analog Input
DIGITAL OUTPUT CODE = x (2n - 1)
Reference Input

a -8-
What is a Digital-Analog Converter?

A digital-analog converter produces a discrete analog output value


(either AC or DC) corresponding to a digital input word relative to its
reference voltage. An N-bit DAC can only have 2N analog output values.

Digital
Digital -- Analog
Analog
Converter
Converter

Digital Code
ANALOG OUTPUT VOLTAGE = VREF x -----------------
2N

a -9-
Quantization

The A-D converter produces a unique digital


output value for a range of analog input voltage.
Likewise, the D-A converter produces a unique
analog output value for a unique digital input
word
These values are said to be quantized.
The term quantization uncertainty will be
discussed further on in this tutorial.

a -10-
Why Do We Need A-D Converters?

“Real” World Signals – Analog Domain Digital Domain

Micro/DSP Processor
Multiplexer

Analog Analog to
Op Amp Signal Digital
Processing Converter

„ The A-D converter translates its analog input signals into a


digital format for further processing by the computer
„ Typical A-D input ranges include 2.5V, 5V and 10V full scale,
either unipolar or bipolar.

a -11-
Why Do We Need D-A Converters?

Analog Domain Digital Domain

Micro/DSP Processor
Digital to Analog
Op Amp
Converter

„ The D-A converter translates its digital input signals from the
computer into an analog AC or DC signal that is used for
reference or control
„ Typical D-A output ranges include 2.5V, 5V and 10V full scale,
either unipolar or bipolar.
a -12-
Where Are D-A Converters Used?

D-A
D-A Operating
Operating
Converter
Converter System
System

Precision System Reference (Other ADCs, DACs, etc)

D-A
D-A High
High Voltage
Voltage
Converter
Converter Power
Power Supply
Supply

Precision Control Source

a -13-
Where Are D-A Converters Used?
Reference
Input

Digital
Input D-A
D-A
Converter
Converter

Voltage Attenuator

Digital
ROM
ROM Input D-A
D-A
Look-Up
Look-Up Converter
Converter
Table
Table

Waveform Reconstruction
a -14-
DC Specifications

An A-D converter and a D-A converter share the following


common DC specifications:

¾ Resolution

¾ Gain error

¾ Offset error

¾ Integral non-linearity

¾ Differential non-linearity

a -15-
What is Resolution?
1/4 1/2 3/4 1/8 1/2 3/4

1 1

Resolution = 1/4 Resolution = 1/8

„ The resolution of an analog-digital or a digital-analog converter is


analogous to a ruler. The resolution determines the size of the
incremental change that either the ADC can measure or that the DAC
can generate. The smaller the increment, the higher the resolution
required.
„ The smallest increment the ADC or DAC can measure/generate is
referred to as its least significant bit.

a -16-
ADC and DAC Resolution

Resolution, 2n LSB ppm FS % FS dB FS


N Bits (10V FS)

2 4 2.5 V 250,000 25.0 -12.0

4 16 625 mV 62,500 6.25 -24.0

8 256 39.1 mV 3,906 0.39 -48.0

10 1,024 9.77 mV 977 0.098 -60.0

12 4,096 2.44 mV 244 0.024 -72.0

14 16,384 610 uV 61 0.0061 -84.0

16 65,536 153 uV 15 0.0015 -96.0

18 262,144 38 uV 4 0.0004 -108.0

24 16,777,216 596 nV* 0.06 0.000006 -144.0

* 600 nV is the Johnson Noise in a 2.2 kilohm Resistor in a 10 kHz BW


@ 25 deg C

a -17-
How is the LSB Value Determined?
A data converter can neither measure nor generate a signal on its own.
A voltage reference is required.

Voltage
Voltage
Reference
Reference

A-D
A-D D-A
D-A
Converter
Converter Converter
Converter

Voltage Reference
The LSB value is equal to ; N = number of bits
2N

a -18-
Ideal Transfer Functions – 3 Bit ADC

111

110

101 In an ideal ADC, the


code changes at
100 exactly the midpoint
011 between the major
increments
010

001

000

1/4 1/2 3/4 FS


a -19-
Ideal Transfer Functions – 3 Bit DAC


3/4 •


In an ideal DAC, the
1/2 •
the output voltage is
• the exact incremental
value at each code
1/4 •

000 001 010 011 100 101 110 111

a -20-
Gain and Offset Error
ADC and DAC gain and offset errors are analogous to the gain and offset
errors of operational amplifiers. The offset error produces a lateral shift in
the transfer function while the gain error produces a rotational shift in the
transfer function. Both the offset error and gain error can be trimmed out.

Actual Actual
Ideal Ideal

Error Error

Offset Error Gain Error

a -21-
Integral Non-Linearity
Also referred to as relative accuracy, it also is analogous to the non-
linearity of an op amp. The use of the “best straight line method” shows
less of an error, but it is not practical in real life.

Linearity Error, X/2

Linearity Error, X

End Point Method “Best Straight Line” Method

a -22-
Differential Non-Linearity

An ideal converter will give us code transitions 1 LSB wide. In reality,


DNL errors due to trim errors and noise may give us code transitions less
than or greater than 1 LSB. An A-D converter with < 0.1 LSB is said to
have a missing code.

1 LSB n+2 n+2

n+1 n+1 > 1 LSB

n n

a -23-
Missing Codes

111

110

101

100
Missing
011
Code
010

001

000

1/4 1/2 3/4 FS

a -24-
Monotonicity

A DAC is said to be monotonic if its output increases or remains the same


for an increment in the digital code. Conversely, a DAC is non-monotonic
if the output decreases for an increment in the digital code.

n n+1 n+2 n+3 n n+1 n+2 n+3

a -25-
Key AC Specifications for
A-D and D-A Converters

SPECIFICATION ABBREV A—D D-A

Signal-Noise Ratio SNR √

Effective Number of Bits ENOB √

Full Power Bandwidth FPBW √

Sampling Clock Jitter √

Settling Time √

Glitch Impulse √

Harmonic Distortion THD √ √

Intermodulation Distortion IMD √ √

Spurious Free Dynamic Range SFDR √ √

a -26-
A Review of Quantization Noise
The input to an A-D converter is an analog voltage, and so has infinite resolution.
The output of the A-D converter, however is a digital representation of the input
that has been quantized or divided into 2N discrete steps. Any analog input above
or below the “nominal” input range as shown will yield the same digital code. This
is called the quantization uncertainty.
ADC Output
Code

NOMINAL

ADC Voltage Input

a -27-
A Review of Quantization Noise
(con’t)
As a result of this quantization uncertainty, a linear ramp voltage applied to an
ADC will produce a quantization noise which may be represented by a sawtooth
waveform coincident with the code transitions.

101
ADC Output Code

100

010

a -28-
A Review of Quantization Noise
(con’t)

The RMS value of the quantization noise sawtooth is its peak value q÷2
divided by √ 3, or q ÷ √12, where q = 1 LSB

+q/2

0 volts

-q/2

a -29-
A Review of Quantization Noise
(con’t)
HARMONICS OF FSIGNAL
(EXAGGERATED FOR CLARITY)

OUTPUT
RMS
QUANTIZATION NOISE

FSIGNAL FS/2 FS

If the quantization noise is uncorrelated with the frequency of the AC input signal,
The noise will be spread uniformly over the Nyquist bandwidth of fs/2.

If, however the input signal is locked to a sub-multiple of the sampling frequency,
The quantization noise will no longer appear uniform, but as harmonics of the
fundamental frequency
a -30-
Signal-to-Noise Ratio

„ The Signal-to-Noise ratio for an ideal N-bit A/D converter in the


Nyquist Bandwidth is, -

SNRideal = (6.02N + 1.76)dB

„ Since no A/D converter is perfect, its effective resolution at a


given frequency due to distortion and noise will be less than its
theoretical value, N.

„ An A/D converter’s Effective Number of Bits (ENOB) equals, -

SNRactual - 1.76dB
ENOB =
6.02dB
a -31-
Effective Number of Bits (ENOB)
The ENOB gives us a truer indication of the dynamic performance of the
ADC, because it takes into account the distortion and noise in the DC to
FS/2 ( Nyquist) bandwidth.
Since noise and distortion tend to increase with frequency, the effective
resolution of a 12-bit A-D converter may in fact be reduced to 11 or even
10 bits!
Effective Number of Bits

12 bit
(ENOB)

ADC Brand “Y”


11 bit
ADC Brand “X”

10 bit

Frequency

a -32-
Full Power Bandwidth

The full power bandwidth of an A-D converter may be defined as the


frequency (under full scale input conditions), at which the analog value of
the digital output is - 3 dB with respect to its input.

A-D
A-D D-A
D-A
Converter
Converter Converter
Converter

Full Scale Full Scale – 3dB

0 dB

-3 dB

FPBW

a -33-
Sampling Clock Jitter

Aperture (Phase) Jitter in the ADC sampling clock or sample-and-hold


(SHA) can produce voltage errors in the ADC measurements.

∆vRMS = Aperture Jitter Error

ADC
Analog Input
Slope = dv/dt Nominal “Held” Output

∆tRMS = Aperture Jitter ∆v = dv/dt • ∆t

“Hold”

“Track”

a -34-
Effect on SNR and ENOB due to
Sampling Clock Jitter, tj
1
SNR = 20log10
100 2πftj 16
tj = 1 ps

Effective Number of Bits (ENOB)


Signal-Noise Ratio (SNR) - dB

14
80
tj = 10 ps 12

10
60
tj = 100 ps
8
40
tj = 1 ns 6

4
20

0
1 3 10 30 100

Full Scale Sinewave Input Frequency, MHz


a -35-
DAC Settling Time

Settling time is defined as the time it takes the DAC’s output to respond to a step
change in the digital input, and come within and remain within a defined error
band.

ERROR
BAND

TIME

DEAD SLEW
RECOVERY TIME FINAL SETTLING
TIME TIME

SETTLING TIME

a -36-
Glitch Impulse

A glitch is the uncontrolled (and undesirable) movement of the DAC


output during a code transition. A glitch can be due to either capacitive
coupling of digital transitions to the analog output, or by the effects of
some switches in the DAC operating more quickly than others.

voltage
time

Glitch impulse is specified on the data sheet in either nV-sec or pV-sec


(area under the curve). Glitch is a major concern in video raster scan
displays, because it can create distortion in the image.

a -37-
DAC Transitions Showing Glitch
The figure on the left shows the ideal DAC code transition. The center figure
shows a doublet glitch caused by capacitive coupling. This type of glitch cancels
out in the long term and can be present with or without a reference. The unipolar
glitch on the right is caused by switch timing differences…its amplitude is
proportional to the reference voltage

v v v

t t t
Transition with Transition with
Ideal Transition
Doublet Glitch Unipolar (Skew) Glitch

a -38-
AD768 - Glitch Impulse

-0.470
RL = 50Ω
-0.472 VOUT = 0 TO -1V

-0.474

-0.476

-0.478

-0.480

-0.482

TIME - 2 ns/div

a Glitch Impulse at Major Carry -39-


Eliminating Glitch Impulses

WRONG WAY RIGHT WAY

SWITCH

Low Pass • +
BUFFER •
Filter -

“1”
HOLD CAPACITOR

“0”

„ Low Pass Filter Integrates Glitch Over Longer Period of Time


„ Sample-Hold As “Deglitcher” Holds DAC Output During
Code Change
a -40-
Dynamic Testing of
Data Converters

LOW PHASE A/D CONVERTER


BANDPASS FFT
JITTER ON
FILTER ANALYZER
SINEWAVE SOURCE EVALUATION BOARD

LOW PHASE
JITTER
STABLE
CLOCK SOURCE

D/A
D/A CONVERTER
CONVERTER
DIRECT
DIRECT DIGITAL
DIGITAL FFT
FFT
LATCH
LATCH ON
ON
SYNTHESIZER
SYNTHESIZER ANALYZER
ANALYZER
EVALUATION
EVALUATION BOARD
BOARD

a -41-
Fast Fourier Transform (FFT)
Analyzer

A Fast Fourier Transform (FFT) Analyzer simplifies the measurement of, -


¾ Harmonic and intermodulation distortion (THD, IMD)
¾ Signal-noise ratio (SNR)
¾ Spurious-free dynamic range (SFDR)
By converting signals in the time domain to signals in the frequency domain

f1 f1

amplitude
2f1
3f1
amplitude

2f1

3f1

time frequency

a -42-
A “Typical” FFT Output

0dB

-10dB

-20dB

-30dB

-40dB
2
-50dB
4
3 5 6
-60dB 7 8

-70dB

-80dB
Start 0 Hz FSAMPLE = 20 MHz, FIN = 1.1MHz Stop 10 MHz

a -43-
Harmonic Distortion (THD)
Harmonic distortion in both DACs and ADCs can come from a number of sources:
(1) non-linearities in the ADC or DAC architecture; (2) spurious signals due to the
quantization process, and (3) code-dependent glitches in the DAC output.
0dB

-10dB

-20dB
Harmonics
-30dB

-40dB
2
-50dB
4
-60dB 3 5 6
7 8
-70dB

-80dB

a -44-
Intermodulation Distortion (IMD)

Intermodulation distortion (IMD) in an A-D converter is of a major concern in the


design of radio receivers, where channel-channel spacing is extremely tight. The
3rd order products are very close to the fundamental signals and are extremely
difficult to filter out, even with digital filtering. Their effect would be to mask out a
weak fundamental signal.

F1 F2

SECOND
ORDER
THIRD
PRODUCTS
ORDER
PRODUCTS
F2 - F1 F1 + F2
2F1 - F2 2F2 - F1

FREQUENCY F

a -45-
FFT Output
2-Tone Intermodulation Test
A 1 dB change in the fundamental output level equals a 3dB change in
the 3rd order intermodulation component

0dB

-10dB

-20dB

-30dB

-40dB

-50dB

-60dB

-70dB

-80dB

Start 0 Hz FSAMPLE = 20 MHz, FIN = 4.5MHz and 5.5 MHz Stop 10 MHz

a -46-
Spurious-Free Dynamic Range
(SFDR)
Spurious-free dynamic range (SFDR) is the distance, in dB, from the fundamental
level to the first “spur”. In the FFT image below, the SFDR is approximately -51 dB
due to the 2nd harmonic

0dB

-10dB

-20dB
SFDR
-30dB

-40dB
2
-50dB
4
-60dB 3 5 6
7 8
-70dB

-80dB

a -47-
Summary
„ Analog-digital and digital-analog converters communicate with
the host processor using a binary code system.
„ Key DC specifications for the A/D and D/A converter include, -
‹ Resolution

‹ Gain and offset error


‹ Integral and differential nonlinearity
„ Key AC specifications for the A/D and D/A converter include, -
‹ Signal-noise ratio (SNR)
‹ Spurious-free dynamic range (SFDR)

‹ Total harmonic distortion (THD)


„ The ENOB (effective number of bits) of an A/D converter gives us
a truer indication of the A/D’s dynamic performance by taking
into account the distortion and noise in the Nyquist (DC to FS/2)
bandwidth.

a -48-
Want To Learn More?

„ “Linear Design Seminar”, Section 5, Data Converters, Analog


Devices, 1995
„ “High Speed Design Techniques”, Sections 4 & 6, Analog
Devices 1996
http://www.analog.com/technology/amplifiersLinear/training/highspeed.html

a -49-

You might also like