10.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 theoretical
A/D conversion result (stored in the 10-bit A/D conversion result register (ADCR)) is shown by the following
expression.
V
AIN
× 1024 + 0.5)
SAR = INT (
AV
REF
ADCR = SAR × 64
or
ADCR
AV
REF
− 0.5) ×
(
64
1024
where, INT( ):
Function which returns integer part of value in parentheses
V
:
Analog input voltage
AIN
AV
:
AV
pin voltage
REF
REF
ADCR: A/D conversion result register (ADCR) value
SAR:
Successive approximation register
Figure 10-13 shows the relationship between the analog input voltage and the A/D conversion result.
Figure 10-13. Relationship Between Analog Input Voltage and A/D Conversion Result
A/D conversion result
CHAPTER 10 A/D CONVERTER
ADCR
AV
≤ V
+ 0.5) ×
< (
AIN
64
1024
SAR
1023
1022
1021
3
2
1
0
1
1
3
2048
1024
2048
User's Manual U17854EJ9V0UD
REF
2
5
3
2043
1022
1024
2048
1024
2048
1024
Input voltage/AV
REF
ADCR
FFC0H
FF80H
FF40H
00C0H
0080H
0040H
0000H
2045
1023
2047
1
2048
1024
2048
315