CHAPTER 9 A/D CONVERTER
User’s Manual U18172EJ2V0UD
159
9.4.2
Input voltage and conversion results
The relationship between the analog input voltage input to the analog input pins (ANI0 to ANI3) and the theoretical
A/D conversion result (stored in the 10-bit A/D conversion result register (ADCR)) is shown by the following
expression.
ADCR = INT (
×
1024 + 0.5)
or
(ADCR
−
0.5)
×
≤
V
AIN
< (ADCR + 0.5)
×
where, INT( ): Function which returns integer part of value in parentheses
V
AIN
:
Analog input voltage
V
DD
: V
DD
pin voltage
ADCR: 10-bit A/D conversion result register (ADCR) value
Figure 9-11 shows the relationship between the analog input voltage and the A/D conversion result.
Figure 9-11. Relationship Between Analog Input Voltage and A/D Conversion Result
1023
1022
1021
3
2
1
0
03FFH
03FEH
03FDH
0003H
0002H
0001H
0000H
A/D conversion result
SAR
ADCR
1
2048
1
1024
3
2048
2
1024
5
2048
Input voltage/V
DD
3
1024
2043
2048
1022
1024
2045
2048
1023
1024
2047
2048
1
V
AIN
V
DD
V
DD
1024
V
DD
1024