15.4.2 Input voltage and conversion results
The relation between the analog input voltage input to the analog input pins (ANI0 to ANI7) and the A/D conversion
result (the value stored in ADCR) is shown by the following expression.
V
IN
ADCR = INT (
AV
REF0
or
AV
REF0
(ADCR – 0.5) x
256
Where,
INT( ) : Function which returns integer parts of value in parentheses.
V
: Analog input voltage
IN
AV
: AV
REF0
REF0
ADCR : A/D conversion result register (ADCR)
Figure 15-6 shows the relation between the analog input voltage and the A/D conversion result.
Figure 15-6. Relationships between Analog Input Voltage and A/D Conversion Result
255
254
A/D Conversion
253
Results
(ADCR)
3
2
1
0
302
CHAPTER 15 A/D CONVERTER
x 256 + 0.5)
AV
V
< (ADCR + 0.5) x
IN
pin voltage
1
1
3
2
5
3
512
256
512
256
512
256
Input Voltage/AV
REF0
256
507
254
509
255
511
512
256
512
256
512
REF0
1