Docsity

ANALOG-DIGITAL CONVERSION, Cheat Sheet of Electronics

Toggle sidebar
bg1
FUNDAMENTALS OF SAMPLED DATA SYSTEMS
ANALOG-DIGITAL CONVERSION
1. Data Converter History
2. Fundamentals of Sampled Data Systems
2.1 Coding and Quantizing
2.2 Sampling Theory
2.3 Data Converter AC Errors
2.4 General Data Converter Specifications
2.5 Defining the Specifications
3. Data Converter Architectures
4. Data Converter Process Technology
5. Testing Data Converters
6. Interfacing to Data Converters
7. Data Converter Support Circuits
8. Data Converter Applications
9. Hardware Design Techniques
I. Index
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download ANALOG-DIGITAL CONVERSION and more Cheat Sheet Electronics in PDF only on Docsity!

FUNDAMENTALS OF S AMPLED DATA S YSTEMS

ANALOG-DIGITAL CONVERSION

1. Data Converter History

‹ 2. Fundamentals of Sampled Data Systems

2.1 Coding and Quantizing

2.2 Sampling Theory

2.3 Data Converter AC Errors

2.4 General Data Converter Specifications

2.5 Defining the Specifications

3. Data Converter Architectures

4. Data Converter Process Technology

5. Testing Data Converters

6. Interfacing to Data Converters

7. Data Converter Support Circuits

8. Data Converter Applications

9. Hardware Design Techniques

I. Index

ANALOG-DIGITAL CONVERSION

ANALOG-DIGITAL CONVERSION

Examples of the first are outputs of thermocouples, potentiometers on dc references, and analog computing circuitry; of the second, "chopped" optical measurements, ac strain gage or bridge outputs, and digital signals buried in noise; and of the third, synchros and resolvers.

The analog variables to be dealt with in this chapter are those involving voltages or currents representing the actual analog phenomena. They may be either wideband or narrowband. They may be either scaled from the direct measurement, or subjected to some form of analog pre-processing, such as linearization, combination, demodulation, filtering, sample-hold, etc.

As part of the process, the voltages and currents are "normalized" to ranges compatible with assigned ADC input ranges. Analog output voltages or currents from DACs are direct and in normalized form, but they may be subsequently post-processed (e.g., scaled, filtered, amplified, etc.).

Information in digital form is normally represented by arbitrarily fixed voltage levels referred to "ground," either occurring at the outputs of logic gates, or applied to their inputs. The digital numbers used are all basically binary; that is, each "bit," or unit of information has one of two possible states. These states are "off," "false," or "0," and "on," "true," or "1." It is also possible to represent the two logic states by two different levels of current, however this is much less popular than using voltages. There is also no particular reason why the voltages need be referenced to ground—as in the case of emitter-coupled-logic (ECL), positive-emitter-coupled-logic (PECL) or low-voltage- differential-signaling logic (LVDS) for example.

Words are groups of levels representing digital numbers; the levels may appear simultaneously in parallel, on a bus or groups of gate inputs or outputs, serially (or in a time sequence) on a single line, or as a sequence of parallel bytes (i.e., "byte-serial") or nibbles (small bytes). For example, a 16-bit word may occupy the 16 bits of a 16-bit bus, or it may be divided into two sequential bytes for an 8-bit bus, or four 4-bit nibbles for a 4-bit bus.

Although there are several systems of logic, the most widely used choice of levels are those used in TTL (transistor-transistor logic) and, in which positive true, or 1, corresponds to a minimum output level of +2.4 V (inputs respond unequivocally to "1" for levels greater than 2.0 V); and false, or 0, corresponds to a maximum output level of +0.4 V (inputs respond unequivocally to "0" for anything less than +0.8 V). It should be noted that even though CMOS is more popular today than TTL, CMOS logic levels are generally made to be compatible with the older TTL logic standard.

A unique parallel or serial grouping of digital levels, or a number, or code, is assigned to each analog level which is quantized (i.e., represents a unique portion of the analog range). A typical digital code would be this array:

a 7 a 6 a 5 a 4 a 3 a 2 a 1 a 0 = 1 0 1 1 1 0 0 1

It is composed of eight bits. The "1" at the extreme left is called the "most significant bit" (MSB, or Bit 1), and the one at the right is called the "least significant bit" (LSB, or

FUNDAMENTALS OF S AMPLED DATA S YSTEMS

2.1 CODING AND Q UANTIZING

bit N: 8 in this case). The meaning of the code, as either a number, a character, or a representation of an analog variable, is unknown until the code and the conversion relationship have been defined. It is important not to confuse the designation of a particular bit (i.e., Bit 1, Bit 2, etc.) with the subscripts associated with the "a" array. The subscripts correspond to the power of 2 associated with the weight of a particular bit in the sequence.

The best-known code (other than base 10) is natural or straight binary (base 2). Binary codes are most familiar in representing integers; i.e., in a natural binary integer code having N bits, the LSB has a weight of 2 0 (i.e., 1), the next bit has a weight of 2^1 (i.e., 2), and so on up to the MSB, which has a weight of 2 N–1^ (i.e., 2N/2). The value of a binary number is obtained by adding up the weights of all non-zero bits. When the weighted bits are added up, they form a unique number having any value from 0 to 2N^ – 1. Each additional trailing zero bit, if present, essentially doubles the size of the number.

In converter technology, full-scale (abbreviated FS ) is independent of the number of bits of resolution, N. A more useful coding is fractional binary which is always normalized to full-scale. Integer binary can be interpreted as fractional binary if all integer values are divided by 2N. For example, the MSB has a weight of ½ (i.e., 2 (N–1)/2N^ = 2–1^ ), the next bit has a weight of ¼ (i.e., 2–2^ ), and so forth down to the LSB, which has a weight of 1/2N (i.e., 2–N). When the weighted bits are added up, they form a number with any of 2 N values, from 0 to (1 – 2–N) of full-scale. Additional bits simply provide more fine structure without affecting full-scale range. The relationship between base-10 numbers and binary numbers (base 2) are shown in Figure 2.2 along with examples of each.

Figure 2.2: Representing a Base-10 Number with a Binary Number (Base 2)

Unipolar Codes

In data conversion systems, the coding method must be related to the analog input range (or span) of an ADC or the analog output range (or span) of a DAC. The simplest case is

Number 10 = a (^) N–1 2 N–1^ + a (^) N –2 2 N–2^ + … +a 12 1 + a 0 20

MSB LSB

Example: 1011 2 = (1×2 3 ) + (0×2^2 )+ (1×2 1 )+ (1×2 0 ) = 8 + 0 + 2 + 1 = (^1110)

FRACTIONAL NUMBERS:

Number 10 = a (^) N–1 2 –1^ + a (^) N–2 2 –2^ + … + a 12 –(N–1)^ + a 02 –N

MSB LSB

Example: 0.1011 2 = (1×0.5) + (0×0.25) + (1×0.125) + (1×0.0625) = 0.5 + 0 + 0.125 + 0.0625 = 0.6875 10

WHOLE NUMBERS:

FUNDAMENTALS OF S AMPLED DATA S YSTEMS

2.1 CODING AND Q UANTIZING

Figure 2.4: Transfer Function for Ideal Unipolar 3-bit DAC

Figure 2.5: Transfer Function for Ideal Unipolar 3-bit ADC

DIGITAL INPUT (STRAIGHT BINARY)

ANALOG OUTPUT

000 001 010 011 100 101 110 111

1/

1/

3/

1/

5/

3/

7/

FS

0

ANALOG INPUT

DIGITAL OUTPUT (STRAIGHT BINARY)

000

001

010

011

100

101

110

111

0 1/8 1/4 3/8 1/2 5/8 3/4 7/8 FS

1 LSB

1/2 LSB

ANALOG-DIGITAL CONVERSION

Gray Code

Another code worth mentioning at this point is the Gray code (or reflective-binary ) which was invented by Elisha Gray in 1878 (Reference 1) and later re-invented by Frank Gray in 1949 (see Reference 2). The Gray code equivalent of the 4-bit straight binary code is also shown in Figure 2.3. Although it is rarely used in computer arithmetic, it has some useful properties which make it attractive to A/D conversion. Notice that in Gray code, as the number value changes, the transitions from one code to the next involve only one bit at a time. Contrast this to the binary code where all the bits change when making the transition between 0111 and 1000. Some ADCs make use of it internally and then convert the Gray code to a binary code for external use.

One of the earliest practical ADCs to use the Gray code was a 7-bit, 100 kSPS electron beam encoder developed by Bell Labs and described in a 1948 reference (Reference 3). The basic electron beam coder concepts are shown in Figure 2.6 for a 4-bit device. The early tubes operated in the serial mode (A). The analog signal is first passed through a sample-and-hold, and during the "hold" interval, the beam is swept horizontally across the tube. The Y-deflection for a single sweep therefore corresponds to the value of the analog signal from the sample-and-hold. The shadow mask is coded to produce the proper binary code, depending on the vertical deflection. The code is registered by the collector, and the bits are generated in serial format. Later tubes used a fan-shaped beam (shown in Figure 2.6B), creating a "flash" converter delivering a parallel output word.

Figure 2.6: The Electron Beam Coder: (A) Serial Mode and (B) Parallel or "Flash" Mode

Electron gun

Electron gun

Y Deflectors

X Deflectors

Shadow Mask Collector

Y Deflectors Shadow Mask Collector

(A) SERIAL MODE

(B) PARALLEL MODE

ANALOG-DIGITAL CONVERSION

Other examples where Gray code is often used in the conversion process to minimize errors are shaft encoders (angle-to-digital) and optical encoders.

ADCs which use the Gray code internally almost always convert the Gray code output to binary for external use. The conversion from Gray-to-binary and binary-to-Gray is easily accomplished with the exclusive-or logic function as shown in Figure 2.8.

Figure 2.8: Binary-to-Gray and Gray-to-Binary Conversion Using the Exclusive-Or Logic Function

Bipolar Codes

In many systems, it is desirable to represent both positive and negative analog quantities with binary codes. Either offset binary , twos complement , ones complement , or sign magnitude codes will accomplish this, but offset binary and twos complement are by far the most popular. The relationships between these codes for a 4-bit systems is shown in Figure 2.9. Note that the values are scaled for a ±5-V full-scale input/output voltage range.

For offset binary , the zero signal value is assigned the code 1000. The sequence of codes is identical to that of straight binary. The only difference between a straight and offset binary system is the half-scale offset associated with analog signal. The most negative value (–FS + 1 LSB) is assigned the code 0001, and the most positive value (+FS – 1 LSB) is assigned the code 1111. Note that in order to maintain perfect symmetry about mid-scale, the all-zeros code (0000) representing negative full-scale (–FS) is not normally used in computation. It can be used to represent a negative off- range condition or simply assigned the value of the 0001 (–FS + 1 LSB).

BINARY GRAY GRAY BINARY MSB MSB 1

0

1

1

1

1

1

0

1

1

1

0

1

0

1

1

FUNDAMENTALS OF S AMPLED DATA S YSTEMS

2.1 CODING AND Q UANTIZING

Figure 2.9: Bipolar Codes, 4-bit Converter

The relationship between the offset binary code and the analog output range of a bipolar 3-bit DAC is shown in Figure 2.10. The analog output of the DAC is zero for the zero- value input code 100. The most negative output voltage is generally defined by the 001 code (–FS + 1 LSB), and the most positive by 111 (+FS – 1 LSB). The output voltage for the 000 input code is available for use if desired, but makes the output non-symmetrical about zero and complicates the mathematics.

The offset binary output code for a bipolar 3-bit ADC as a function of its analog input is shown in Figure 2.11. Note that zero analog input defines the center of the mid-scale code 100. As in the case of bipolar DACs, the most negative input voltage is generally defined by the 001 code (–FS + 1 LSB), and the most positive by 111 (+FS – 1 LSB). As discussed above, the 000 output code is available for use if desired, but makes the output non-symmetrical about zero and complicates the mathematics.

Twos complement is identical to offset binary with the most-significant-bit (MSB) complemented (inverted). This is obviously very easy to accomplish in a data converter, using a simple inverter or taking the complementary output of a "D" flip-flop. The popularity of twos complement coding lies in the ease with which mathematical operations can be performed in computers and DSPs. Twos complement, for conversion purposes, consists of a binary code for positive magnitudes (0 sign bit), and the twos complement of each positive number to represent its negative. The twos complement is formed arithmetically by complementing the number and adding 1 LSB. For example, –3/8 FS is obtained by taking the twos complement of +3/8 FS. This is done by first complementing +3/8 FS, 0011 obtaining 1100. Adding 1 LSB, we obtain 1101.

+4. +3. +3. +2. +1. +1. +0.

–0. –1. –1. –2. –3. –3. –4. –5.

1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0 1 0 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0

0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 *0 0 0 0 1 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0 1 0 0 1 1 0 0 0

+FS – 1LSB = +7/8 FS +3/4 FS +5/8 FS +1/2 FS +3/8 FS +1/4 FS +1/8 FS 0

  • 1/8 FS
  • 1/4 FS
  • 3/8 FS –1/2 FS –5/8 FS –3/4 FS
  • FS + 1LSB = –7/8 FS
  • FS

SCALE ±5V FS 0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0 1 0 0 1 1 0 0 0

0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 *1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1

OFFSET BINARY

TWOS COMP.

ONES COMP.

SIGN MAG.

0+ 0 0 0 0 0– 1 1 1 1

0 0 0 0 1 0 0 0

ONES COMP.

SIGN MAG. NOT NORMALLY USED IN COMPUTATIONS (SEE TEXT)

0

BASE 10 NUMBER

FUNDAMENTALS OF S AMPLED DATA S YSTEMS

2.1 CODING AND Q UANTIZING

Twos complement makes subtraction easy. For example, to subtract 3/8 FS from 4/8 FS, add 4/8 to –3/8, or 0100 to 1101. The result is 0001, or 1/8, disregarding the extra carry.

Ones complement can also be used to represent negative numbers, although it is much less popular than twos complement and rarely used today. The ones complement is obtained by simply complementing all of a positive number's digits. For instance, the ones complement of 3/8 FS (0011) is 1100. A ones complemented code can be formed by complementing each positive value to obtain its corresponding negative value. This includes zero, which is then represented by either of two codes, 0000 (referred to as 0+) or 1111 (referred to as 0–). This ambiguity must be dealt with mathematically, and presents obvious problems relating to ADCs and DACs for which there is a single code which represents zero.

Sign-magnitude would appear to be the most straightforward way of expressing signed analog quantities digitally. Simply determine the code appropriate for the magnitude and add a polarity bit. Sign-magnitude BCD is popular in bipolar digital voltmeters, but has the problem of two allowable codes for zero. It is therefore unpopular for most applications involving ADCs or DACs.

Figure 2.12 summarizes the relationships between the various bipolar codes: offset binary, twos complement, ones complement, and sign-magnitude and shows how to convert between them.

Figure 2.12: Relationships Among Bipolar Codes

The last code to be considered in this section is binary-coded-decimal (BCD) , where each base-10 digit (0 to 9) in a decimal number is represented as the corresponding 4-bit straight binary word as shown in Figure 2.13. The minimum digit 0 is represented as

Sign Magnitude

2's Complement

Offset binary

1's Complement

No Change

If MSB = 1, complement other bits, add 00… Complement MSB If new MSB = 0 complement other bits, add 00…

If MSB = 1, complement other bits

If MSB = 1, complement other bits, add 00…

No Change

Complement MSB

If MSB = 1, add 11…

Complement MSB If new MSB = 1, complement other bits, add 00…

Complement MSB

No Change

Complement MSB If new MSB = 1, add 11…

If MSB = 1, complement other bits

If MSB = 1, add 00…

Complement MSB If new MSB = 0, add 00…

No Change

To Convert From To Sign Magnitude 2's Complement Offset Binary 1's Complement

ANALOG-DIGITAL CONVERSION

0000, and the digit 9 by 1001. This code is relatively inefficient, since only 10 of the 16 code states for each decade are used. It is, however, a very useful code for interfacing to decimal displays such as in digital voltmeters.

Figure 2.13: Binary Coded Decimal (BCD) Code

Complementary Codes

Some forms of data converters (for example, early DACs using monolithic NPN quad current switches), require standard codes such as natural binary or BCD, but with all bits represented by their complements. Such codes are called complementary codes. All the codes discussed thus far have complementary codes which can be obtained by this method. A complementary code should not be confused with a ones complement or a twos complement code.

In a 4-bit complementary-binary converter, 0 is represented by 1111, half-scale by 0111, and FS – 1 LSB by 0000. In practice, the complementary code can usually be obtained by using the complementary output of a register rather than the true output, since both are available.

Sometimes the complementary code is useful in inverting the analog output of a DAC. Today many DACs provide differential outputs which allow the polarity inversion to be accomplished without modifying the input code. Similarly, many ADCs provide differential logic inputs which can be used to accomplish the polarity inversion.

DAC and ADC Static Transfer Functions and DC Errors

The most important thing to remember about both DACs and ADCs is that either the input or output is digital, and therefore the signal is quantized. That is, an N-bit word represents one of 2N^ possible states, and therefore an N-bit DAC (with a fixed reference)

1 0 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1 1 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0

0 0 1 1 0 1 1 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0

+FS – 1LSB = +15/16 FS +7/8 FS +13/16 FS +3/4 FS +11/16 FS +5/8 FS +9/16 FS +1/2 FS +7/16 FS +3/8 FS +5/16 FS +1/4 FS +3/16 FS +1/8 FS 1LSB = +1/16 FS 0

SCALE +10V FS

0

BASE 10 NUMBER 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 0

0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0

DECADE 1 DECADE 2 DECADE 3 DECADE 4

ANALOG-DIGITAL CONVERSION

is very important to remember that the actual transfer characteristic is not a line, but a number of discrete points.

Figure 2.15: Transfer Functions for Ideal 3-Bit DAC and ADC

The input to an ADC is analog and is not quantized, but its output is quantized. The transfer characteristic therefore consists of eight horizontal steps. When considering the offset, gain and linearity of an ADC we consider the line joining the midpoints of these steps—often referred to as the code centers.

For both DACs and ADCs, digital full-scale (all "1"s) corresponds to 1 LSB below the analog full-scale (FS). The (ideal) ADC transitions take place at ½ LSB above zero, and thereafter every LSB, until 1½ LSB below analog full-scale. Since the analog input to an ADC can take any value, but the digital output is quantized, there may be a difference of up to ½ LSB between the actual analog input and the exact value of the digital output. This is known as the quantization error or quantization uncertainty as shown in Figure 2.15. In ac (sampling) applications this quantization error gives rise to quantization noise which will be discussed in Section 2.3 of this chapter.

As previously discussed, there are many possible digital coding schemes for data converters: straight binary , offset binary , 1's complement , 2's complement , sign magnitude , gray code , BCD and others. This section, being devoted mainly to the analog issues surrounding data converters, will use simple binary and offset binary in its examples and will not consider the merits and disadvantages of these, or any other forms of digital code.

The examples in Figure 2.15 use unipolar converters, whose analog port has only a single polarity. These are the simplest type, but bipolar converters are generally more useful in real-world applications. There are two types of bipolar converters: the simpler is merely a unipolar converter with an accurate 1 MSB of negative offset (and many converters are arranged so that this offset may be switched in and out so that they can be used as either unipolar or bipolar converters at will), but the other, known as a sign-magnitude converter is more complex, and has N bits of magnitude information and an additional bit which corresponds to the sign of the analog signal. Sign-magnitude DACs are quite rare,

DIGITAL INPUT

ANALOG OUTPUT

FS

(^000 001 010 011 100 101 110 111) ANALOG INPUT

DIGITAL OUTPUT

FS

000

001

010

011

100

101

110

111

QUANTIZATIONUNCERTAINTY

QUANTIZATION UNCERTAINTY

DAC ADC

FUNDAMENTALS OF S AMPLED DATA S YSTEMS

2.1 CODING AND Q UANTIZING

and sign-magnitude ADCs are found mostly in digital voltmeters (DVMs). The unipolar, offset binary, and sign-magnitude representations are shown in Figure 2.16.

Figure 2.16: Unipolar and Bipolar Converters

The four dc errors in a data converter are offset error , gain error , and two types of linearity error (differential and integral). Offset and gain errors are analogous to offset and gain errors in amplifiers as shown in Figure 2.17 for a bipolar input range. (Though offset error and zero error, which are identical in amplifiers and unipolar data converters, are not identical in bipolar converters and should be carefully distinguished.)

The transfer characteristics of both DACs and ADCs may be expressed as a straight line given by D = K + GA, where D is the digital code, A is the analog signal, and K and G are constants. In a unipolar converter, the ideal value of K is zero; in an offset bipolar converter it is –1 MSB. The offset error is the amount by which the actual value of K differs from its ideal value.

The gain error is the amount by which G differs from its ideal value, and is generally expressed as the percentage difference between the two, although it may be defined as the gain error contribution (in mV or LSB) to the total error at full-scale. These errors can usually be trimmed by the data converter user. Note, however, that amplifier offset is trimmed at zero input, and then the gain is trimmed near to full-scale. The trim algorithm for a bipolar data converter is not so straightforward.

The integral linearity error of a converter is also analogous to the linearity error of an amplifier, and is defined as the maximum deviation of the actual transfer characteristic of the converter from a straight line, and is generally expressed as a percentage of full-scale (but may be given in LSBs). For an ADC, the most popular convention is to draw the straight line through the mid-points of the codes, or the code centers. There are two

ALL "1"s

ALL "1"s

0

FS – 1 LSB FS – 1 LSB^ FS – 1 LSB

–(FS – 1 LSB)

0 0

–FS

1 AND ALL "0"s

UNIPOLAR OFFSET BIPOLAR (^) SIGN MAGNITUDE BIPOLAR

CODE CODE CODE

FUNDAMENTALS OF S AMPLED DATA S YSTEMS

2.1 CODING AND Q UANTIZING

curve fitting techniques, and the maximum deviation is measured from this line. In general, the integral linearity error measured in this way is only 50% of the value measured by end point methods. This makes the method good for producing impressive data sheets, but it is less useful for error budget analysis. For ac applications it is better to specify distortion than dc linearity, so it is rarely necessary to use the best straight line method to define converter linearity.

The other type of converter nonlinearity is differential nonlinearity (DNL). This relates to the linearity of the code transitions of the converter. In the ideal case, a change of 1 LSB in digital code corresponds to a change of exactly 1 LSB of analog signal. In a DAC, a change of 1 LSB in digital code produces exactly 1 LSB change of analog output, while in an ADC there should be exactly 1 LSB change of analog input to move from one digital transition to the next. Differential linearity error is defined as the maximum amount of deviation of any quantum (or LSB change) in the entire transfer function from its ideal size of 1 LSB.

Where the change in analog signal corresponding to 1 LSB digital change is more or less than 1 LSB, there is said to be a DNL error. The DNL error of a converter is normally defined as the maximum value of DNL to be found at any transition across the range of the converter. Figure 2.19 shows the non-ideal transfer functions for a DAC and an ADC and shows the effects of the DNL error.

Figure 2.19: Transfer Functions for Non-Ideal 3-Bit DAC and ADC

The DNL of a DAC is examined more closely in Figure 2.20. If the DNL of a DAC is less than –1 LSB at any transition, the DAC is non-monotonic i.e., its transfer characteristic contains one or more localized maxima or minima. A DNL greater than + LSB does not cause non-monotonicity, but is still undesirable. In many DAC applications (especially closed-loop systems where non-monotonicity can change negative feedback to positive feedback), it is critically important that DACs are monotonic. DAC monotonicity is often explicitly specified on data sheets, although if the DNL is guaranteed to be less than 1 LSB (i.e., |DNL| ≤ 1 LSB) then the device must be monotonic, even without an explicit guarantee.

DIGITAL INPUT

ANALOG OUTPUT

FS

000 001 010 011 100 101 110 111

NON-MONOTONIC

ANALOG INPUT

DIGITAL OUTPUT

FS

000

001

010

011

100

101

110

111

MISSING CODE

DAC ADC

ANALOG-DIGITAL CONVERSION

Figure 2.20: Details of DAC Differential Nonlinearity

In Figure 2.21, the DNL of an ADC is examined more closely on an expanded scale. ADCs can be non-monotonic, but a more common result of excess DNL in ADCs is missing codes. Missing codes in an ADC are as objectionable as non-monotonicity in a DAC. Again, they result from DNL < –1 LSB.

Figure 2.21: Details of ADC Differential Nonlinearity

1 LSB,

0.5 LSB,

1.5 LSB,

0.25 LSB,

DNL = 0

1 LSB,

DNL = –0.5 LSB

DNL = +0.5 LSB

DNL = –0.75 LSB

MISSING CODE (DNL < –1 LSB) DNL = 0

ANALOG INPUT

DIGITAL OUTPUT CODE

d

d

1 LSB, DNL = 0

2 LSB, DNL = +1 LSB

1 LSB, DNL = 0

–1 LSB, DNL = –2 LSB

1 LSB, DNL = 0

1 LSB, DNL = 0

2 LSB, DNL = +1 LSB

DIGITAL CODE INPUT

ANALOG OUTPUT

NON-MONOTONIC IF DNL < –1 LSB

BIT 2 IS 1 LSB HIGH BIT 1 IS 1 LSB LOW

000 001 010 011 100 101 110 111

FS