12.4.2 Input voltage and conversion results
The relationship between the analog input voltage input to the analog input pins (ANI0 to ANI7) and the A/
D conversion result (the value stored in the A/D conversion result register (ADCR)) is shown by the following
expression.
V
IN
ADCR = INT(
AV
REF
or
AV
(ADCR – 0.5) ×
256
Remark INT ( ): Function which returns the integer part of the value in parentheses
V
:
Analog input voltage
IN
AV
:
AV
REF
ADCR:
A/D conversion result register (ADCR) value
Figure 12-5 shows the relationship between the analog input voltage and the A/D conversion result.
Figure 12-5. Relationship Between Analog Input Voltage and A/D Conversion Result
255
254
253
A/D
conversion
results
3
(ADCR)
2
1
0
CHAPTER 12 A/D CONVERTER
× 256 + 0.5)
REF
≤ V
< (ADCR + 0.5) ×
IN
pin voltage
REF
1
1
3
2
512
256
512
256
512
User's Manual U11302EJ4V0UM
AV
REF
256
5
3
507
254
509
256
512
256
512
Input voltage/AV
REF
255
511
1
256
512
199