
CHAPTER 9 A/D CONVERTER
203
9.7 Operation in External Trigger Mode
In the external trigger mode, the analog inputs (ANI0 to ANI3) are A/D converted by the ADTRG pin input timing.
The ADTRG pin is also used as the P07 and INTP113 pins. To set the external trigger mode, set PMC07 bit of
the PMC0 register to 1 and the TRG2 to TRG0 bits of the ADM1 register to 110.
For the valid edge of the external input signal during the external trigger mode, the rising edge, falling edge, both
rising and falling edges can be specified using the ES031 and ES030 bits of the INTM1 register. For details, refer
to
5.3.6 External interrupt mode registers 1 to 4 (INTM1 to INTM4)
.
9.7.1 Select mode operations (External trigger select)
A/D converts one analog input (ANI0 to ANI3) specified by the ADM0 register. The conversion results are stored
in the ADCRn register corresponding to the analog input. There are two select modes, 1-buffer mode and 4-buffer
mode, storing the conversion results (n = 0 to 7).
(1) 1-buffer mode (External trigger select: 1-buffer)
A/D converts one analog input using the ADTRG signal as a trigger. The conversion results are stored in one
ADCRn register. The analog input and the A/D conversion results register correspond one to one. INTAD
interrupts are generated in each A/D conversion, and A/D conversion ends.
While the CE bit of the ADM0 register is 1, the A/D conversion is repeated every time a trigger is input from
the ADTRG pin.
This mode is suitable for applications which read out the result in each A/D conversion.
Figure 9-14. 1-Buffer Mode (External Trigger Select 1-Buffer) Operation
Caution Analog inputs enclosed by dotted line are not available.
(2) 4-buffer mode (External trigger select: 4-buffer)
A/D converts one analog input four times using the ADTRG signal as a trigger and stores the results in four
ADCRn registers. The INTAD interrupt is generated and conversion ends when the four A/D conversions end.
While the CE bit of the ADM0 register is 1, the A/D conversion is repeated every time a trigger is input from
the ADTRG pin.
This mode is suitable for applications which calculate the average of the A/D conversion result.
ANI0
ANI1
ANI2
ANI3
ANI4
ANI5
ANI6
ANI7
ADCR0
ADCR1
ADCR2
ADCR3
ADCR4
ADCR5
ADCR6
ADCR7
A/D Converter
ADTRG