Panasonic MN103001G/F01K Personal Computer User Manual


 
A/D Converter
14-10
(4) Multiple channels/continuous conversion
If "multiple channels/continuous conversion" is selected as the operating mode (ADMD1 to 0), a number of
AN inputs, starting from AN0, are converted continuously. Set channel 0 in the conversion channel selection bits
used for converting any one channel (ADSC1 to 0), and set the number of channels to be converted in the conversion
channel selection bits (ADMC1 to 0). (Conversion starts with channel 0.) An A/D interrupt request is generated
each time one round of conversion of all channels is completed.
When starting up conversion through software, set the conversion start trigger selection bits (ADST1 to 0) to
"00", and set the conversion start/execution flag (ADEN) to "1".
If the conversion start trigger selection bits (ADST1 to 0) are set to "external trigger," then the conversion
start/execution flag (ADEN) is set to "1" when a falling edge is input to the ADTRG pin, A/D conversion then
starts.
And if the conversion start trigger selection bits (ADST1 to 0) are set to "timer trigger," then the conversion
start/execution flag (ADEN) is set to "1" when a timer 2 underflow occurs, A/D conversion then starts.
The conversion start/execution flag (ADEN) is "1" while conversion is in progress, and is not cleared by
hardware. Therefore, set the conversion start/execution flag (ADEN) to "0" when stopping the conversion operation.
The conversion channel selection bits that are used for selecting any one channel for conversion (ADSC1 to 0)
indicate the current channel number being converted, and are then set to "00" when conversion of all channels is
completed.
Note: If multiple channels are to be converted, be certain to include a capacitor of at least 0.1 µF between each AN
pin and AVSS. Each capacitor should be placed as closely as possible to each AN pin.
Fig. 14-5-4 External Trigger Input Conversion Example (for Channels 0 to 2, Continuous Conversion)
Clear by software when stopping
the conversion operation.
Set
External trigger input
(ADTRG pin)
ADEN flag
Interrupt request
Status
Channel 0
conversion
Channel 1
conversion
Channel 2
conversion
Channel 0
conversion
Channel 1
conversion
Channel 2
conversion
Channel 0
conversion