
32. 12-Bit A/D Converter (S12AD)
Under development Preliminary document
Specifications in this document are tentative and subject to change.
32.3.3.4
Channel Selection and Self-Diagnosis (Channel-Dedicated Sample-and-Hold
Circuits Used)
When the channel-dedicated sample-and-hold circuit is used and channels and self-diagnosis are selected, sample-and-
hold operation is first performed, and then A/D conversion is performed for the reference voltage VREFH0 (×0, ×1/2, or
×1) supplied to the 12-bit A/D converter, and A/D conversion is performed on the analog input of the selected channels,
which sequence is repeated as below.
In continuous scan mode, temperature sensor output A/D conversion select bit (TSS) and internal reference voltage A/D
conversion select bit (OCS) in ADEXICR should both be set to 0 (non-selection).
(1) Analog input sampling of all the channels whose channel-dedicated sample-and-hold circuit is to be used is started
when the ADST bit in ADCSR is set to 1 (A/D conversion start) by software, synchronous trigger (MTU or ELC),
or asynchronous trigger input.
(2) After sample-and-hold operation, A/D conversion for self-diagnosis is started.
(3) When A/D conversion for self-diagnosis is completed, the A/D conversion result is stored into the A/D self-
diagnosis data register (ADRD). A/D conversion is then performed for ANn channels selected by the ADANSA
register, starting from the channel with the smallest number n.
(4) Each time A/D conversion of a single channel is completed, the A/D conversion result is stored into the
corresponding A/D data register (ADDRy).
(5) When A/D conversion of all the selected channels is completed, an S12ADI0 interrupt request is generated if the
ADIE bit in ADCSR is 1 (S12ADI0 interrupt upon scanning completion enabled). At the same time, analog input
sampling is started for all the channels whose channel-dedicated sample-and-hold circuit is to be used.
(6) The ADST bit is not automatically cleared to 0 and steps 2 to 5 are repeated as long as the bit remains 1. When the
ADST bit is set to 0 (A/D conversion stop), A/D conversion stops and the 12-bit A/D converter enters a wait state.
(7) When the ADST bit is later set to 1 (A/D conversion start), analog input sampling is started again for all the
channels whose channel-dedicated sample-and-hold circuit is to be used.
Figure 32.13
Example of Operation in Continuous Scan Mode (Channel-Dedicated Sample-and-Hold Circuits
Used + Self-Diagnosis)
ADST
A/D conversion
started
Channel 0 (AN000) Waitingfor conversion
Channel 1 (AN001) Waitingfor conversion
ADDR0
ADDR1
S12ADI0
Sampling
Set
(1)
(4)
Stored
A/D conversion 1
Holding
Cleared
(6)
A/D conversion result 1
A/D conversion result 2
A/D conversion
time
Sampling-and-holding, self-diagnosis, and scanning performed repeatedly
(4)
(5)
Set
(7)
Interrupt generated
Stored
Sampling
Holding
A/D conversion 2
Sample-and-hold time
Waiting for
conversion
(2)
Waiting for conversion
VREFH0
(×0,×,×1)
Waiting for conversion
Self-diagnosis 1
ADRD
(3)
Stored
Result of A/D conversion for self-diagnosis 1
Result of A/Dconversionfor self-diagnosis 2
Sampling
Waiting for conversion
Holding
Self-diagnosis 2
Sampling
Holding
Waiting for
conversion
Sampling
(2)
(3)
Stored