English
Language : 

XC161 Datasheet, PDF (90/419 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller with C166SV2 Core Volume 2 (of 2): Peripheral Units
16.2
ADC Operation
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
The Analog/Digital Converter
Channel Selection, ADCH
Bitfield ADCH controls the input channel multiplexer logic. In the Single Channel Modes,
it specifies the analog input channel which is to be converted. In the Auto Scan Modes,
it specifies the highest channel number to be converted in the auto scan round.
ADCH may be changed while a conversion is in progress. The new value will go into
effect after the current conversion is finished in the fixed channel modes, or after the
current conversion round is finished in the auto scan modes.
ADC Flags, ADBSY, SAMPLE
The ADC Busy Status Flag is set when the ADC is started (by setting ADST) and remains
set as long as the ADC performs conversions or calibration cycles.
ADBSY is cleared when the ADC is idle, meaning there are no conversion or calibration
operations in progress.
Bit SAMPLE is set during the sample phase.
ADC Start/Stop Control, ADST
Bit ADST is used to start or to stop the ADC. A single conversion or a conversion
sequence is started by setting bit ADST.
The busy flag ADBSY will be set and the converter then selects and samples the input
channel, which is specified by the channel selection field ADCH. The sampled level will
then be held internally during the conversion. When the conversion of this channel is
complete, the result together with the number of the converted channel is transferred into
the result register and the interrupt request is generated. The conversion result is placed
into bitfield ADRES.
ADST remains set until cleared either by hardware or by software. Hardware clears the
bit dependent on the conversion mode:
• In Fixed Channel Single Conversion mode, ADST is cleared after the conversion of
the specified channel is finished.
• In Auto Scan Single Conversion mode, ADST is cleared after the conversion of
channel 0 is finished.
Note: In the continuous conversion modes, ADST is never cleared by hardware.
Stopping the ADC via software is performed by clearing bit ADST. The reaction of the
ADC depends on the conversion mode:
• In Fixed Channel Single Conversion mode, the ADC finishes the conversion and then
stops. There is no difference to the operation if ADST was not cleared by software.
• In Fixed Channel Continuous Conversion mode, the ADC finishes the current
conversion and then stops. This is the usual way to terminate this conversion mode.
User’s Manual
ADC_X1, V2.1
16-8
V2.2, 2004-01