Atmel Evaluation Kit AT91SAM9X35-EK AT91SAM9X35-EK Data Sheet

Product codes
AT91SAM9X35-EK
Page of 1301
938
SAM9X35 [DATASHEET]
11055E–ATARM–10-Mar-2014
Figure 42-10. Insertion of Touchscreen sequences (TSFREQ = 2; TSAV = 1)
42.7.8  Measured Values, Registers and Flags
As soon as the controller finishes the Touchscreen sequence, XRDY, YRDY and PRDY are set and can generate an
interrupt. These flags can be read in the “ADC Interrupt Status Register”. They are reset independently by reading in
ADC_XPOSR, ADC_YPOSR and ADC_PRESSR. for classic ADC conversions.
X
 - V
Xmin
) on its LSB and XSCALE (V
XMAX
 - V
Xmin
) aligned
on the 16th bit.
Y
 - V
Ymin
) on its LSB and YSCALE (V
YMAX
 - V
Ymin
) aligned
on the 16th bit.
To improve the quality of the measure, the user must calculate: XPOS/XSCALE and YPOS/YSCALE.
V
XMAX, 
V
Xmin, 
V
YMAX, 
and
 
V
Ymin
 are measured at the first start up of the controller. These values can change during use, so
it can be necessary to refresh them. Refresh can be done by writing ‘1’ in the CALIB field of the control register
(ADC_CR).
The “ADC Touchscreen Pressure Register” presents Z1 on its LSB and Z2 aligned on the 16th bit. See 
 to
know how use them.
42.7.9 Pen Detect Method
When there is no contact, it is not necessary to perform a conversion. However, it is important to detect a contact by
keeping the power consumption as low as possible.
The implementation polarizes one panel by closing the switch on (X
P
/U
L
) and ties the horizontal panel by an embedded
resistor connected to Y
M
 / Sense. This resistor is enabled by a fifth switch. Since there is no contact, no current is flowing
and there is no related power consumption. As soon as a contact occurs, a current is flowing in the Touchscreen and a
Schmitt trigger detects the voltage in the resistor.
The Touchscreen Interrupt configuration is entered by programming the PENDET bit in the “ADC Touchscreen Mode
Register”
If this bit is written at 1, the controller samples the pen contact state when it is not converting and waiting for a
trigger.
To complete the circuit, a programmable debouncer is placed at the output of the Schmitt trigger. This debouncer is
programmable up to 2
15
 ADC clock periods. The debouncer length can be selected by programming the field PENDBC in
.
Due to the analog switch’s structure, the debouncer circuitry is only active when no conversion (Touchscreen or classic
ADC channels) is in progress. Thus, if the time between the end of a conversion sequence and the arrival of the next
trigger event is lower than the debouncing time configured on PENDBC, the debouncer will not detect any contact.
Trigger event
ADC_SEL
XRDY
Read the
ADC_XPOSR
Read the
ADC_XPOSR
C
T
C
T
C
C
T
C
T
C
C
C: Classic ADC Conversion Sequence     -     T: Touch Screen Sequence 
YRDY
Read the
ADC_YPOSR
Read the
ADC_YPOSR