421
16.4 8/10-Bit A/D Converter Registers
Note:
Be sure to stop the A/D conversion before rewriting the A/D conversion resolution setting bit
(S10). If the bit is rewritten after the A/D conversion started, the A/D data register (ADCR0/
ADCR1) contents are undefined.
To read the A/D data register (ADCR0/ADCR1), be sure to use the word transfer instructions
(such as MOVW A and 002EH) when 10-bit resolution mode is specified.
Table 16.4-3 Function Description of Each Bit of A/D Control Status Register (ADCR0/ADCR1)
Bit name
Function
bit15
S10:
A/D conversion
resolution setting bit
This bit is used to set the resolution for A/D conversion.
When this bit is "0", the 10-bit resolution is set.
When this bit is "1", the 8-bit resolution is set.
Note:
A/D data bits to be used depend on the resolution. In 10-bit
resolution mode, the D9 to D0 bits are used. In 8-bit resolution
mode, the D7 to D0 bits are used.
bit14
bit13
ST1, ST0: Sampling
time setting bit
This bit is used to set the sampling time for A/D conversion.
When A/D conversion is activated, the analog input is captured
for the time interval specified by the sampling time setting bits
(ST1, ST0).
Note:
When "00B" is set, the machine clock frequency should be
equal to or less than 8 MHz.
If "00B" is set when the machine clock frequency is 16 MHz,
normal analog conversion values may not be obtained.
bit12
bit11
CT1, CT0:
Comparison time
setting bit
This bit is used to set the compare time for A/D conversion.
The A/D conversion result is determined after the analog input
is captured (sampling time passed) and the compare time
interval specified by the compare time setting bits (CT1, CT0).
In 10-bit resolution mode, the result is stored in the A/D data
bits (D9 to D0). In 8-bit resolution mode, the result is stored in
the A/D data bits (D7 to D0).
Note:
When "00B" is set, the machine clock frequency should be
equal to or less than 8 MHz.
If "00B" is set when the machine clock frequency is 16 MHz,
normal analog conversion values may not be obtained.
vit10
-:
Undefined bit
The value read from this bit is undefined.
The value set to this bit does not affect operation.
bit9 - bit0
D9 - D0:
A/D data bit
These bits are used to store A/D conversion results. They are
rewritten after each A/D conversion is completed.
Normally, the final conversion value is stored.
The initial value is undefined.
Note:
The A/D conversion data protection function is available (For
details, see Section 16.6, "Operation of the 8/10-Bit A/D
Converter").
Do not write data to the A/D data bits during A/D conversion.