EasyManua.ls Logo

ST ST10F276E - Auto Scan Conversion Modes; Figure 160. Auto Scan Conversion Mode Example

ST ST10F276E
564 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Analog / digital converter UM0404
376/564 DocID13284 Rev 2
In continuous conversion mode the converter will automatically start a new conversion of
the channel specified in ADCH. ADCIR will be set after each completed conversion. When
bit ADST is reset by software, while a conversion is in progress, the converter will complete
the current conversion and then stop and reset bit ADBSY.
19.1.2 Auto scan conversion modes
These modes are selected by programming the mode selection field ADM in register
ADCON to ‘10
B
’ (single conversion) or to ‘11
B
’ (continuous conversion).
Auto Scan modes automatically convert a sequence of analog channels, beginning with the
channel specified in bit-field ADCH and ending with channel 0, without requiring software to
change the channel number. Again, if bit ADCMUX of register XMISC is set, the sequence
starts with the specified channel on Port1 ending with channel 16. Besides, if bit ADCMUX
of register XMISC is set and ADCH value is greater than 7h, the sequence starts converting
non existing channel: this corresponds to an unpredictable result, since the input of A/D
Converter is left floating. After starting the converter through bit ADST, the busy flag ADBSY
will be set and the channel specified in bit-field 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.
Figure 160. Auto scan conversion mode example
Conversion
#2
#1 #0 #3 #2
#x #3
#2
#3#1 #0
#x #3 #2 #1 #3
Write ADDAT
ADDAT Full
Generate Interrupt
Request
Read of ADDAT;
Result of Channel:
ADDAT Full;
Channel 0
Result Lost
Overrun Error Interrupt Request
#3
of Channel:

Table of Contents

Related product manuals