Atmel Evaluation Kit AT91SAM9M10-G45-EK AT91SAM9M10-G45-EK Hoja De Datos

Los códigos de productos
AT91SAM9M10-G45-EK
Descargar
Página de 1361
 905
SAM9M10 [DATASHEET]
6355F–ATARM–12-Mar-13
 
40.10.2
Touch  Screen  Mode
Writing TSAMOD to “Touch Screen Only Mode” automatically enables the touch screen pins as analog inputs, and
thus disables the digital function of the corresponding pins. 
In Touch Screen Mode, the channels 0 to 3 corresponding to the Touch Screen inputs are automatically activated
and the bits CH0 to CH3 are automatically set in the 
The remaining channels can be either enabled or disabled by the user and their conversions are performed at the
end of each touch screen sequence.
The resolution is forced to 10 bits, regardless of the LOWRES bit setting.
At each trigger, if the bit PRES in 
 is disabled, the following sequence is performed to
measure only position.
1.
If SLEEP is set, wake up the ADC cell and wait for the Startup Time.
2.
Close the switches on the inputs X
P
 and X
M
 during the Sample and Hold Time.
3.
Convert Channel X
M
 and store the result in TSADCC_CDR1.
4.
Close the switches on the inputs X
P
 and X
M
 during the Sample and Hold Time.
5.
Convert Channel X
P
, subtract TSADCC_CDR1 from the result and store the subtraction result in both 
TSADCC_CDR0 and TSADCC_LCDR.
6.
Close the switches on the inputs X
P
 and X
M
 during the Sample and Hold Time.
7.
Convert Channel Y
P
, subtract TSADCC_CDR1 from the result and store the subtraction result in both 
TSADCC_CDR1 and TSADCC_LCDR.
8.
Close the switches on the inputs Y
P
 and Y
M
 during the Sample and Hold Time.
9.
Convert Channel Y
M
 and store the result in TSADCC_CDR3.
10. Close the switches on the inputs Y
P
 and Y
M
 during the Sample and Hold Time.
11. Convert Channel Y
P
, subtract TSADCC_CDR3 from the result and store the subtraction result in both 
TSADCC_CDR2 and TSADCC_LCDR.
12. Close the switches on the inputs Y
P
 and Y
M
 during the Sample and Hold Time.
13. Convert Channel X
P
, subtract TSADCC_CDR3 from the result and store the subtraction result in both 
TSADCC_CDR3 and TSADCC_LCDR.
14. If Channel 4 to Channel 7 are enabled, convert the Channels and store result in the corresponding 
TSADCC_CDRx and TSADCC_LCDR.
15. If SLEEP is set, sleep down the ADC cell.
The resulting buffer is 16 bits wide and its structure stored in memory is:
1.
X
P
 - X
M
2.
Y
P
 - X
M
3.
Y
P
 - Y
M
4.
X
P
 - Y
M
5.
AD4 to AD7 if enabled.
The vertical position can be easily calculated by dividing the data at offset 0 (X
P
 - X
M
) by the data at offset 1 (Y
P
 -
X
M
).
The horizontal position can be easily calculated by dividing the data at offset 2 (Y
P
 - Y
M
) by the data at offset 3 (X
P
- Y
M
).
tion 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.