1007
6437E–ATARM–23-Apr-13
SAM9M11
7.
X
P -YM
8.
AD4 to AD7 if enabled.
The vertical position can be easily calculated by dividing the data at offset 2 (X
P -XM) by the data
at offset 3(Y
P -XM).
The horizontal position can be easily calculated by dividing the data at offset 5 (Y
P -YM) by the
data at offset 7 (X
P -YM).
The Pressure measure can be calculated using the following formula
Rp = Rxp*(Xpos/1024)*[(Z2/Z1)-1]
42.10.3
Interleaved Mode
In the Interleaved Mode, the conversion of the touch screen channels are made in parallel to
each channel. In addition to interleaving, the analog channels 4 and 5 can be converted more
often than the touch screen channels depending on the TSFREQ field in the register
TSADCC_MR. In the interleaved mode at least one ADC channel must be enabled.
In the Interleaved Mode, the channels 0 to 3 corresponding to the Touch Screen inputs are auto-
matically activated and the bits CH0 to CH3 are automatically set in the
“TSADCC ChannelThis mode allows periodic conversion of the remaining channels at high sampling rate and con-
verted data transferred in memory with the PDC while the touch screen conversions are
performed at low rate. The PDC transfers only analog channel data and touch screen data must
The resolution can be configured for the channel 4 to 7 only, through the LOWRES bit. The res-
olution for the conversion made on channels 0 to 3 is forced to 10 bits.
At each trigger, the sequence performed depends on a Trigger Counter, which is compared at
the end to the Touch Screen Frequency, as defined by the field TSFREQ in the register
TSADCC_MR:
Touch Screen Frequency = Trigger Frequency / (2TSFREQ+1)
unless TSFREQ is programmed at 0 or 1. In such cases, the Touch Screen Frequency is one-
sixth of the Trigger Frequency.
As TSFREQ varies between 0 and 15, this results in the ADC channels being converted
between 6 to 65536 less often than the Touch Screen channels.
are as follow:
For Trigger Counter at 0:
1.
Close the switches on the inputs X
P and XM during the Sample and Hold Time.
2.
Convert Channel X
M and store the result in TSADCC_CDR1.
3.
If Channel 4 to Channel 7 are enabled, convert Channels and store result in the corre-
sponding TSADCC_CDRx and TSADCC_LCDR.
4.
Set Trigger Counter to 1.