910
SAM9G45 [DATASHEET]
6438K–ATARM–12-Feb-13
1.
If SLEEP is set, wake up the ADC cell and wait for the Startup Time.
2.
Close the switches on the inputs X
M and Yp during the Sample and Hold Time.
3.
Convert Channel X
p and store the result in both TSADCC_Z1DR and TSADCC_LCDR.
4.
Close the switches on the inputs X
M and YP during the Sample and Hold Time.
5.
Convert Channel Y
M and store the result in both TSADCC_Z2DR and TSADCC_LCDR.
6.
Close the switches on the inputs X
P and XM during the Sample and Hold Time.
7.
Convert Channel X
M and store the result in TSADCC_CDR1.
8.
Close the switches on the inputs X
P and XM during the Sample and Hold Time.
9.
Convert Channel X
p, subtract TSADCC_CDR1 from the result and store the subtraction result in both
TSADCC_CDR0 and TSADCC_LCDR.
10. Close the switches on the inputs X
P and XM during the Sample and Hold Time.
11. Convert Channel Y
P and store the result in TSADCC_XPDR, subtract TSADCC_CDR1 from the result
and store the subtraction result in both TSADCC_CDR1 and TSADCC_LCDR.
12. Close the switches on the inputs Y
P and YM during the Sample and Hold Time.
13. Convert Channel Y
M and store the result in TSADCC_CDR3 while storing content of TSADCC_XPDR in
TSADCC_LCDR.
14. Close the switches on the inputs Y
P and YM during the Sample and Hold Time.
15. Convert Channel Y
p subtract TSADCC_CDR3 from the result and store the subtraction result in both
TSADCC_CDR2 and TSADCC_LCDR.
16. Close the switches on the inputs Y
P and YM during the Sample and Hold Time.
17. Convert Channel X
p subtract TSADCC_CDR3 from the result and store the subtraction result in both
TSADCC_CDR3 and TSADCC_LCDR.
18. if Channel 4 to channel 7are enabled, convert the channels and store result in the corresponding
TSADCC_CDRx and TSADCC_LCDR
19. If SLEEP is set, sleep down the ADC cell.
The resulting buffer is 16 bits wide and its structure stored in memory is:
1.
Z1
2.
Z2
3.
X
P - XM
4.
Y
P - XM
5.
Xpos
6.
Y
P - YM
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(YP -
X
M).
The horizontal position can be easily calculated by dividing the data at offset 5 (Y
P - YM) by the data at offset 7 (XP
- Y
M).
The Pressure measure can be calculated using the following formula
Rp = Rxp*(Xpos/1024)*[(Z2/Z1)-1]
40.10.3
Interleaved Mode
In the Interleaved Mode, the conversion of the touch screen channels are made in parallel to each channel. In addi-
tion to interleaving, the analog channels 4 and 5 can be converted more often than the touch screen channels