948
11028E–ATARM–22-Apr-13
SAM9G46
For Trigger Counter at 5:
1.
Close the switches on the inputs Y
P and YM during the Sample and Hold Time.
2.
Convert Channel Y
M and store the result in TSADCC_CDR3 (and store content of
TSADCC_XPDR in TSADCC_LCDR if PDCEN is enabled).
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 6.
For Trigger Counter at 6:
1.
Close the switches on the inputs Y
P and YM during the Sample and Hold Time.
2.
Convert Channel Y
P, subtract TSADCC_CDR3 from the result and store the subtraction
result in TSADCC_CDR2 (and also in TSADCC_LCDR if PDCEN is enabled).
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 7.
For Trigger Counter at 7:
1.
Close the switches on the inputs Y
P and YM during the Sample and Hold Time
2.
Convert Channel X
P, subtract TSADCC_CDR3 from the result and store the subtraction
result in TSADCC_CDR3 (and also in TSADCC_LCDR if PDCEN is enabled).
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 8.
For Trigger Counter between 8 and (2TSFREQ+1):
1.
Increment Trigger Counter.
2.
If Trigger Counter equals (2TSFREQ+1), then set Trigger Counter to 0.
3.
If Channel 4 to Channel 7 are enabled, convert Channels and store result in the corre-
sponding TSADCC_CDRx and TSADCC_LCDR.
The Trigger Counter is cleared when TSAMOD is written to define the Interleaved Mode, then it
simply rolls over.
41.10.4
Manual Mode
The TSADCC features a manual mode allowing to control the state (open/close) of the four
switches.
Writing TSAMOD to “Manual Mode” automatically enables the ADC pins as analog inputs.The
this mode, the “Sample and Hold Time” used is the one defined for the Touchscreen mode
(TSSHTIM).
To perform a measurement, the following sequence must be followed
1.
Select the switch (switches) to close.
2.
If SLEEP is set, wake up the ADC cell and wait for the Startup Time.