200
CHAPTER 12 10-BIT A/D CONVERTER (
µ
PD780034AS SUBSERIES)
Preliminary User’s Manual U16035EJ1V0UM
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 (stored in the A/D conversion result register 0 (ADCR0)) is shown by the following expression.
ADCR0 = INT (
V
IN
×
1024 + 0.5)
AV
REF
or
(ADCR0 – 0.5)
×
AV
REF
≤
V
IN
< (ADCR0 + 0.5)
×
AV
REF
1024 1024
where,
INT( ):
Function which returns integer part of value in parentheses
V
IN
:
Analog input voltage
AV
REF
:
AV
REF
pin voltage
ADCR0: A/D conversion result register 0 (ADCR0) value
Figure 12-6 shows the relationship between the analog input voltage and the A/D conversion result.
Figure 12-6. Relationship Between Analog Input Voltage and A/D Conversion Result
1023
1022
1021
3
2
1
0
A/D conversion result
(ADCR0)
1
2048
1
1024
3
2048
2
1024
5
2048
3
1024
2043
2048
1022
1024
2045
2048
1023
1024
2047
2048
1
Input voltage/AV
REF