CHAPTER 12 A/D CONVERTER
427
User’s Manual U14359EJ4V0UM
12.6.2 Scan mode operation
In this mode, the analog inputs specified by the ADM0 register are selected sequentially from the ANI0 pin and are
A/D converted the specified number of times using the match interrupt signal as a trigger.
In the conversion operation, first the analog input lower channels (ANI0 to ANI3) are A/D converted the specified
number of times. If the lower channels (ANI0 to ANI3) of the analog input are set by the ADM0 register so that they
are scanned, and when the set number of A/D conversions ends, the A/D conversion end interrupt (INTAD) is
generated and A/D conversion is stopped.
When the higher channels (ANI4 to ANI7) of the analog input are set by the ADM0 register so that they are
scanned, after the conversion of the lower channel is ended, the mode is shifted to the A/D trigger mode, and the
remaining A/D conversions are executed.
The conversion results are stored in the ADCRn register corresponding to the analog input. When conversion of all
the specified analog inputs has ended, the A/D conversion end interrupt (INTAD) is generated and A/D conversion is
stopped (n = 0 to 7).
There are two scan modes: 1-trigger mode and 4-trigger mode, according to the number of triggers.
This mode is most appropriate for applications in which multiple analog inputs are constantly monitored.
(1) 1-trigger mode (timer trigger scan: 1 trigger)
In this mode, analog inputs are A/D converted the specified number of times using the match interrupt signal
(INTM000) as a trigger. The analog input and ADCRn register correspond one to one.
When all the specified A/D conversions have ended, the A/D conversion end interrupt (INTAD) is generated
and A/D conversion is stopped.
Trigger
Analog Input
A/D Conversion Result Register
INTM000 interrupt
ANI0
ADCR0
INTM000 interrupt
ANI1
ADCR1
INTM000 interrupt
ANI2
ADCR2
INTM000 interrupt
ANI3
ADCR3
ANI4
ADCR4
ANI5
ADCR5
ANI6
ADCR6
(A/D trigger mode)
ANI7
ADCR7
When the match interrupt is generated after all the specified A/D conversions have ended, A/D conversion is
restarted.
In 1-shot mode, and when less than a specified number of match interrupts are generated, if the ADCEn bit is
set to 1, the INTAD interrupt is not generated and the standby state is set.