English
Language : 

XC161 Datasheet, PDF (94/419 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller with C166SV2 Core Volume 2 (of 2): Peripheral Units
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
The Analog/Digital Converter
16.2.2 Auto Scan Conversion Modes
These modes are selected by programming the mode selection field ADM to 10B (single
conversion) or to 11B (continuous conversion). Auto Scan modes automatically convert
a sequence of analog channels, beginning with the channel specified in bitfield ADCH
and ending with channel 0, without requiring software to change the channel number.
After starting the converter through bit ADST, the busy flag ADBSY will be set and the
channel specified in bitfield ADCH will be converted. After the conversion is complete,
the interrupt request flag ADCIR will be set and the converter will automatically start a
new conversion of the next lower channel. ADCIR will be set after each completed
conversion. After conversion of channel 0 the current sequence is complete.
In Single Conversion Mode the converter will automatically stop and reset bits ADBSY
and ADST.
In Continuous Conversion Mode the converter will automatically start a new sequence
beginning with the conversion of the channel specified in ADCH.
When bit ADST is reset by software, while a conversion is in progress, the converter will
complete the current sequence (including conversion of channel 0) and then stop and
reset bit ADBSY.
Conversion
of Channel..
#3
#2
#1
#0
#3
#2
Write ADC_DAT
#x
#3
#2
#1
ADC_DAT Full
Generate Interrupt
Request
#0
#3
Read of ADC_DAT;
Result of Channel:
#x
#3
ADC_DAT Full;
Channnel 0
#2
# 1 Result Lost
#3
Overrun Error
Interrupt Request
MC_ADC0001_AUTOSCAN
Figure 16-3 Auto Scan Conversion Mode Example
Note: Auto Scan sequences that begin with channel numbers above 7 will generate (up
to) 4 invalid results from channels 11 … 8 which are not connected to input pins.
Starting an Auto Scan sequence with ADCH = EH will generate the following
15 results: 14, 13, 12, x, x, x, x, 7, 6, 5, 4, 3, 2, 1, 0.
Starting a sequence with ADCH = BH … 8H generates 4 … 1 invalid results at the
beginning of the sequence and therefore makes no sense in an application.
User’s Manual
ADC_X1, V2.1
16-12
V2.2, 2004-01