
227
8018P–AVR–08/10
ATmega169P
22.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).
For single ended conversion, the result is
where V
IN is the voltage on the selected input pin and VREF the selected voltage reference (see
0x3FF represents the selected reference voltage minus one LSB.
Figure 22-14. Differential Measurement Range
ADC
VIN 1024
VREF
--------------------------
=
ADC
VPOS VNEG
–
() 512
VREF
-----------------------------------------------------
=
0
Output Code
0x1FF
0x000
V
REF
Differential Input
Voltage (Volts)
0x3FF
0x200
- V
REF