Atmel Evaluation Kit AT91SAM9X35-EK AT91SAM9X35-EK Data Sheet

Product codes
AT91SAM9X35-EK
Page of 1301
932
SAM9X35 [DATASHEET]
11055E–ATARM–10-Mar-2014
If all ADC channels (i.e. 12) are used on an application board, there is no restriction of usage of the user sequence. But
as soon as some ADC channels are not enabled for conversion but rather used as pure digital inputs, the respective
indexes of these channels cannot be used in the user sequence fields (ADC_SEQR1, ADC_SEQR2 bitfields). For
example, if channel 4 is disabled (ADC_CSR[4] = 0), ADC_SEQR1, ADC_SEQR2 register bitfields USCH1 up to
USCH12 must not contain the value 4. Thus the length of the user sequence may be limited by this behavior.
As an example, if only 4 channels over 12 (CH0 up to CH3) are selected for ADC conversions, the user sequence length
cannot exceed 4 channels. Each trigger event may launch up to 4 successive conversions of any combination of
channels 0 up to 3 but no more (i.e. in this case the sequence CH0, CH0, CH1, CH1, CH1 is impossible).
A sequence that repeats several times the same channel requires more enabled channels than channels actually used
for conversion. For example, a sequence like CH0, CH0, CH1, CH1 requires 4 enabled channels (4 free channels on
application boards) whereas only CH0, CH1 are really converted.
Note:
The reference voltage pins always remain connected in normal mode as in Sleep Mode.
42.6.7 Comparison Window
The ADC Controller features automatic comparison functions. It compares converted values to a low threshold or a high
threshold or both, according to the CMPMODE function chosen in the Extended Mode Register (ADC_EMR). The
comparison can be done on all channels or only on the channel specified in CMPSEL field of ADC_EMR. To compare all
channels the CMP_ALL parameter of ADC_EMR should be set. 
Moreover a filtering option can be set by writing the number of consecutive comparison errors needed to raise the flag.
This number can be written and read in the CMPFILTER field of ADC_EMR.
The flag can be read on the COMPE bit of the Interrupt Status Register (ADC_ISR) and can trigger an interrupt.
The High Threshold and the Low Threshold can be read/write in the Comparison Window Register (ADC_CWR). 
If the comparison window is to be used with LOWRES bit in ADC_MR set to 1, the thresholds do not need to be adjusted
as adjustment will be done internally. Whether or not the LOWRES bit is set, thresholds must always be configured in
consideration of the maximum ADC resolution.
42.6.8 ADC Timings
Each ADC has its own minimal Startup Time that is programmed through the field STARTUP in the Mode Register,
ADC_MR.
A minimal Tracking Time is necessary for the ADC to guarantee the best converted final value between two channel
selections. This time has to be programmed through the TRACKTIM bit field in the Mode Register, ADC_MR.
Warning: No input buffer amplifier to isolate the source is included in the ADC. This must be taken into consideration to
program a precise value in the TRACKTIM field. See the product ADC Characteristics section.
42.7 Touchscreen 
42.7.1 Touchscreen Mode
The TSMODE parameter of “ADC Touchscreen Mode Register” is used to enable/disable the Touchscreen functionality,
to select the type of screen (4-wire or 5-wire) and, in the case of a 4-wire screen, to activate (or not) the pressure
measurement.
In 4-wire mode, channel 0, 1, 2 and 3 must not be used for classic ADC conversions. Likewise, in 5-wire mode, channel
0, 1, 2, 3, and 4 must not be used for classic ADC conversions.
42.7.2  4-wire Resistive Touchscreen Principles
A resistive touchscreen is based on two resistive films, each one being fitted with a pair of electrodes, placed at the top
and bottom on one film, and on the right and left on the other. In between, there is a layer acting as an insulator, but also
enables contact when you press the screen. This is illustrated in 
.