Sistemas de Aquisição de Dados Mestrado Integrado em Eng. Física Tecnológica 216/17 Aula 4, 1th October
ADC Amplitude Quantization: ADC Digital Output Formats V REF +FS RANGE (SPAN) OR FS ANALOG INPUT N-BIT ADC MSB LSB DIGITAL OUTPUT N-BITS WHOLE NUMBERS: Number 1 = a N 1 2 N 1 + a N 2 2 N 2 + +a 1 2 1 + a 2 MSB LSB Example: 111 2 = (1 2 3 ) + ( 2 2 )+ (1 2 1 )+ (1 2 ) = 8 + + 2 + 1 = 11 1 FRACTIONAL NUMBERS: Number 1 = a N 1 2 1 + a N 2 2 2 + + a 1 2 (N 1) + a 2 N MSB LSB Example:.111 2 = (1.5) + (.25) + (1.125) + (1.625) =.5 + +.125 +.625 =.6875 1
Binary Coding of Quantised Numbers Unipolar Codes (4 bit example) BASE 1 NUMBER SCALE +1V FS BINARY GRAY +15 +14 +13 +12 +11 +1 +9 +8 +7 +6 +5 +4 +3 +2 +1 +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 9.375 8.75 8.125 7.5 6.875 6.25 5.625 5. 4.375 3.75 3.125 2.5 1.875 1.25.625. 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Binary Coding of Quantised Numbers II Bipolar Codes (4 bit example) 2.1 C Q BASE 1 NUMBER +7 +6 +5 +4 +3 +2 +1 1 2 3 4 5 6 7 8 SCALE +FS 1LSB = +7/8 FS +3/4 FS +5/8 FS +1/2 FS +3/8 FS +1/4 FS +1/8 FS 1/8 FS 1/4 FS 3/8 FS 1/2 FS 5/8 FS 3/4 FS FS + 1LSB = 7/8 FS FS ±5V FS +4.375 +3.75 +3.125 +2.5 +1.875 +1.25 +.625..625 1.25 1.875 2.5 3.125 3.75 4.375 5. NOT NORMALLY USED IN COMPUTATIONS (SEE TEXT) OFFSET BINARY 1 1 1 1 1 1 1 1 1 TWOS COMP. 1 1 1 1 1 1 1 1 1 * ONES COMP. * 1 1 1 1 1 ONES COMP. + 1 1 1 1 SIGN MAG. * 1 1 1 1 1 1 1 1 1 SIGN MAG.
How to connect ADC to the CPU (Two-Complement Binary Format) 12 bit 1 1 1 1 16 bit 1 1 1 1 x x x x Left align 16 bit 1 1 1 1 1 1 1 1 Sign extend Verilog HDL Example: extended[15:] <= { {4{value[11]}}, value[11:] }; 5
Binary Coding of Quantized Numbers III BCD Codes (4 digit example) BASE 1 NUMBER +15 +14 +13 +12 +11 +1 +9 +8 +7 +6 +5 +4 +3 +2 +1 SCALE +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 +1V FS 9.375 8.75 8.125 7.5 6.875 6.25 5.625 5. 4.375 3.75 3.125 2.5 1.875 1.25.625. DECADE 1 DECADE 2 DECADE 3 DECADE 4
Analog-to-Digital Conversion a a1 a2... Mapping: R (finite set) 111 11 11 T 1 11 1 LSB Resolution 1 1/2 LSB 1 LSB = 1/8 1/4 3/8 1/2 5/8 3/4 7/8 FS ANALOG INPUT full scale 2 N, A LSB = V ref 2 N 7
Best resolution of a n-bit ADC (Value of a LSB) db F S = 2 log 1 ( 1 2 N ) 8
Anti-Aliasing Filters For a correct sampling we need to be sure that the image spectrum overlaps only at amplitudes lower than the ADC resolution log( F(f) ) Filter Cutoff Nth-Order LPF Slope = 6 N db/oct = 2 N db/dec The Bandwidth of the LPF + ADC system will always be inferior to the Nyquist Limit Fsamp /2 Dynamic range of ADC (db) -fs fs/2 fs log(f) Bandwidth 9
A-A Filter Examples ADC with fsamp= 1 MHz @1 bit Resolution: 6dB (see table in slide 8) 3rd Order Low Pass Filter: 6 db/dec fsamp/2=5 khz System s Analog Bandwidth BW= 5 khz
Bibliography Data Conversion Handbook, Chapter 2 Analog Devices Inc., 24 http://www.analog.com/library/analogdialogue/archives/39-6/ data_conversion_handbook.html Analog-to-Digital Conversion, Second Edition, Marcel J.M. Pelgrom, Springer 213