Datasheet

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 V
REF
the selected voltage reference (see
Table 22-3 on page 229 and Table 22-4 on page 230). 0x000 represents analog ground, and
0x3FF represents the selected reference voltage minus one LSB.
Figure 22-14. Differential Measurement Range
ADC
V
IN
1024
V
REF
--------------------------=
ADC
V
POS
V
NEG
()512
V
REF
---------------------------------------------------- -=
0
Output Code
0x1FF
0x000
V
REF
Differential Input
Voltage (Volts)
0x3FF
0x200
- V
REF