Datasheet
941
SAM9G45 [DATASHEET]
Atmel-6438O-ATARM-SAM9G45-Datasheet_08-Dec-15
If the bit PRES in “TSADCC Mode Register” is enabled, the following sequence is performed to measure both
position and pressure.
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 Y
p
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 Y
P
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 X
M
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 X
M
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 X
M
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 Y
M
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 Y
M
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 Y
M
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
- X
M
4. Y
P
- X
M
5. Xpos
6. Y
P
- Y
M
7. X
P
- Y
M
8. AD4 to AD7 if enabled.
The vertical position can be easily calculated by dividing the data at offset 2 (X
P
- X
M
) by the data at offset 3(Y
P
-
X
M
).
The horizontal position can be easily calculated by dividing the data at offset 5 (Y
P
- Y
M
) by the data at offset 7 (X
P
- Y
M
).
The Pressure measure can be calculated using the following formula
Rp = Rxp*(Xpos/1024)*[(Z2/Z1)-1]