Chapter 14
A/D Converter
XIV - 30
Operation
■ Setting Sampling/Hold Time
Sampling/hold time can be selected from 1, 2 , 4 and 6 cycles of the conversion clock. Select the proper value
with the A/D input impedance. If the A/D input impedance is high, select 6 cycles.
■ Selecting Operation Mode
Operation mode is set by the AN0MD1-0 flags of the AN0CTR0 register and the AN1MD1-0 flags of the
AN1CTR0 register and the AN2MD1-0 flags of the AN2CTR0 register. Table: 14.3.2 shows the operation mode
to be set. One-time conversion means that one-time input to the ADINn pin is converted by the any single channel
or multiple channels. Continuous conversion means that the conversion is continued until it is stopped by the any
single channel or multiple channels.
Table:14.3.2 Operation Mode of A/D Conversion
■ A/D Converter Start
A/D conversion is started when the set-up start trigger is generated.
Table:14.3.3 Converter Start Trigger (AD0, 1, 2)
■ A/D Converter Stop
A/D converter stop differs depending on the conversion mode to be selected.
Table:14.3.4 A/D Converter Stop
ANnMD1
ANnMD0
Operation mode
0
Any single channel/one-time conversion
0
1
Multiple channels/one-time conversion for each
1
0
Any single channel/continuous conversion
1
Multiple channels/continuous conversion
Start trigger
AN0TRG
(AN0CTR)
ADnAST2-0
(ADSTn)
ANnTRG
(ANnCTR0
Description
Register set by instruction
0
-
Conversion is started by setting the ANnEN flag of the conver-
sion control register (ANnCTR0) to “1”.
PWM0 overflow
1
000
1
Conversion is started by PWN0 overflow signal.
PWM0 underflow
1
001
1
Conversion is started by PWN0 underflow signal.
Timer 12 compare A
1
010
1
Conversion is started by the timer 12 compare A interrupt.
Timer 12 compare B
1
011
1
Conversion is started by the timer 12 compare B interrupt.
PWM1 overflow
1
100
1
Conversion is started by PWN1 overflow signal.
PWM1 underflow
1
101
1
Conversion is started by PWN1 underflow signal.
Timer 13 compare A
1
110
1
Conversion is started by the timer 13 compare A interrupt.
Timer 13 compare B
1
111
1
Conversion is started by the timer 13 compare B interrupt.
Operation mode
Stop operation
Any single channel/one time con-
version
When one-time conversion ends, all the conversion operation is completed and the con-
version operation is stopped.
Multiple channels/one time con-
version for each
Any single channel/continuous
conversion
The conversion operation is not stopped even if one-time conversion ends. To stop the
conversion, the ANnEN flag needs to be cleared to “0”.
Multiple channels/continuous
conversion