179
CHAPTER 11 8-BIT A/D CONVERTER (
µ
PD780024AS SUBSERIES)
Preliminary User’s Manual U16035EJ1V0UM
11.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 A/D
conversion result (stored in the A/D conversion result register 0 (ADCR0)) is shown by the following expression.
ADCR0 = INT (
V
IN
×
256 + 0.5)
AV
REF
or
(ADCR0 – 0.5)
×
AV
REF
≤
V
IN
< (ADCR0 + 0.5)
×
AV
REF
256 256
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 11-6 shows the relationship between the analog input voltage and the A/D conversion result.
Figure 11-6. Relationship Between Analog Input Voltage and A/D Conversion Result
255
254
253
3
2
1
0
A/D conversion result
(ADCR0)
1
512
1
256
3
512
2
256
5
512
3
256
507
512
254
256
509
512
255
256
511
512
1
Input voltage/AV
REF