![](http://datasheet.mmic.net.cn/100000/IF180C52TXXX-20R_datasheet_3493957/IF180C52TXXX-20R_600.png)
600
32099I–01/2012
AT32UC3L016/32/64
26.8
Operating Modes
The ADCIFB features two operating modes, each defining a separate conversion sequence:
ADC Mode: At each trigger, all the enabled channels are converted.
Resistive Touch Screen Mode: At each trigger, all enabled channels plus the resistive touch
screen channels are converted as described in
Section 26.8.3. If channels except the
dedicated resistive touch screen channels are enabled, they are converted normally before
and after the resistive touch screen channels are converted.
The operating mode is selected by the TSAMOD field in the Mode Register (MR).
26.8.1
Conversion Triggers
A conversion sequence is started either by a software or by a hardware trigger. When a conver-
sion sequence is started, all enabled channels will be converted and made available in the
shared Last Converted Register (LCDR).
The software trigger is asserted by writing a one to the START field in the Control Register (CR).
The hardware trigger can be selected by the TRGMOD field in the Trigger Register (TRGR). Dif-
ferent hardware triggers exist:
External trigger, either rising or falling or any, detected on the external trigger pin TRIGGER
Pen detect trigger, depending the PENDET bit in the Mode Register (MR)
Continuous trigger, meaning the ADCIFB restarts the next sequence as soon as it finishes
the current one
Periodic trigger, which is defined by the TRGR.TRGPER field
Peripheral event trigger, allowing the Peripheral Event System to synchronize conversion with
some configured peripheral event source.
Enabling a hardware trigger does not disable the software trigger functionality. Thus, if a hard-
ware trigger is selected, the start of a conversion can still be initiated by the software trigger.
26.8.2
ADC Mode
In the ADC Mode, the active channels are defined by the Channel Status Register (CHSR). A
channel is enabled by writing a one to the corresponding bit in the Channel Enable Register
(CHER), and disabled by writing a one to the corresponding bit in the Channel Disable Register
(CHDR). The conversion results are stored in the Last Converted Data Register (LCDR) as they
become available, overwriting old conversions.
At each trigger, the following sequence is performed:
1.
If ACR.SLEEP is one, wake up the ADC and wait for the startup time.
2.
If Channel 0 is enabled, convert Channel 0 and store result in LCDR.
3.
If Channel 1 is enabled, convert Channel 1 and store result in LCDR.
4.
If Channel N is enabled, convert Channel N and store result in LCDR.
5.
If ACR.SLEEP is one, place the ADC cell in a low-power state.
If the Peripheral DMA Controller is enabled, all converted values are transferred continuously
into the memory buffer.
26.8.3
Resistive Touch Screen Mode
Writing a one to the TSAMOD field in the Mode Register (MR) enables Resistive Touch Screen
Mode. In this mode the channels TSPO+0 to TSPO+3, corresponding to the resistive touch