231
Chapter 8 A/D Converter
8
A/D conversion continues until the CS bit is reset by software.
If data is written to the ADM register during conversion, conversion is initialized. If the CS bit is 1,
conversion is started from the beginning.
When the RESET signal is input, the ADCR register contents become undefined.
(2) Input voltage and conversion result
The analog voltages input to the analog input pins (AN0 through AN7) are related to the A/D conversion result
(value held in the ADCR), as follows:
ADCR = INT( × 256 + 0.5)
or,
(ADCR - 0.5) × VIN < (ADCR + 0.5) ×
Remark INT( ) : Function returning the integer part of a value specified in ( )
VIN : Analog input voltage
AVREF:AV
REF pin voltage
ADCR: Value in the ADCR register
Fig. 8-5 shows the relations between the analog voltages and the A/D conversion results.
Fig. 8-5 Relations between Analog Input Voltages and A/D Conversion Results
VIN
AVREF
AVREF
256
0
1
2
3
253
254
255
A/D conversion
result (ADCR)
1
512
Input voltage/AVREF
1
256
3
512
2
256
5
512
3
256
507
512
254
256
509
512
255
256
511
512 1
AVREF
256