English
Language : 

ATA6616C_14 Datasheet, PDF (201/274 Pages) ATMEL Corporation – 8K/16K Flash Microcontroller with LIN Transceiver, 5V Regulator and Watchdog
4.18.8 ADC Conversion Result
After the conversion is complete (ADIF is high), the conversion result can be found in the ADC result registers (ADCL,
ADCH). The form of the conversion result depends on the type of the conversion as there are three types of conversions:
single ended conversion, unipolar differential conversion and bipolar differential conversion.
4.18.8.1 Single Ended Conversion
For single ended conversion, the result is:
ADC = -V----I--N-V---×-R---E-1--F-0---2---4--
where VIN is the voltage on the selected input pin and VREF the selected voltage reference (see Table 4-58 on page 203 and
Table 4-59 on page 204). 0x000 represents analog ground, and 0x3FF represents the selected voltage reference minus one
LSB. The result is presented in one-sided form, from 0x3FF to 0x000.
4.18.8.2 Unipolar Differential Conversion
If differential channels and an unipolar input mode are used, the result is:
ADC = (---V----P---O---S-----–----VV-----NR---EE---FG----)---×-----1---0---2---4- × GAIN
where VPOS is the voltage on the positive input pin, VNEG the voltage on the negative input pin, and VREF the selected voltage
reference (see Table 4-58 on page 203 and Table 4-59 on page 204). The voltage on the positive pin must always be larger
than the voltage on the negative pin or otherwise the voltage difference is saturated to zero. The result is presented in one-
sided form, from 0x000 (0d) to 0x3FF (+1023d). The GAIN is either 8x or 20x.
4.18.8.3 Bipolar Differential Conversion
As default the ADC converter operates in the unipolar input mode, but the bipolar input mode can be selected by writing the
BIN bit in the ADCSRB register to one. In the bipolar input mode two-sided voltage differences are allowed and thus the
voltage on the negative input pin can also be larger than the voltage on the positive input pin. If differential channels and a
bipolar input mode are used, the result is:
ADC = (---V----P---O---S-----–---V-V---R--N-E--E-F--G----)---×-----5---1---2- × GAIN
where VPOS is the voltage on the positive input pin, VNEG the voltage on the negative input pin, and VREF the selected voltage
reference. The result is presented in two’s complement form, from 0x200 (–512d) through 0x000 (+0d) to 0x1FF (+511d). The
GAIN is either 8x or 20x.
However, if the signal is not bipolar by nature (9 bits + sign as the 10th bit), this scheme loses one bit of the converter
dynamic range. Then, if the user wants to perform the conversion with the maximum dynamic range, the user can perform a
quick polarity check of the result and use the unipolar differential conversion with selectable differential input pair. When the
polarity check is performed, it is sufficient to read the MSB of the result (ADC9 in ADCH register). If the bit is one, the result
is negative, and if this bit is zero, the result is positive.
ATA6616C/ATA6617C [DATASHEET] 201
9132I–AUTO–06/14