596
32099I–01/2012
AT32UC3L016/32/64
26.7.3
Resistive Touch Screen Pin Connections
The resistive touch screen film signals connects to the ADCIFB using the AD and ADP pins. The
X
P (top) and XM (bottom) film signals are connected to ADtspo+0 and ADtspo+1 pins, and the YP
(right) and Y
M (left) signals are connected to ADtspo+2 and ADtspo+3 pins. The tspo index is
configurable through the Touch Screen Pin Offset (TSPO) field in the Mode Register (MR) and
allows the user to configure which AD pins to use for resistive touch screen applications. Writing
a zero to the TSPO field instructs the ADCIFB to use AD0 through AD3, where AD0 is con-
nected to X
P, AD1 is connected to XM and so on. Writing a one to the TSPO field instructs the
ADCIFB to use AD1 through AD4 for resistive touch screen sequencing, where AD1 is con-
nected to X
P and AD0 is free to be used as an ordinary ADC channel.
When the Analog Pin Output Enable (APOE) bit in the Mode Register (MR) is zero, the AD pins
are used to measure input voltage and drive the GND sequences, while the ADP pins are used
to drive the VDD sequences. This arrangement allows the user to reduce the voltage seen at the
AD input pins by inserting external resistors between ADP0 and X
P and ADP1 and YP signals
which are again directly connected to the AD pins. It is important that the voltages observed at
the AD pins are not higher than the maximum allowed ADC input voltage. See
Figure 26-3 onpage 597 for details regarding how to connect the resistive touch screen films to the AD and
ADP pins.
By adding a resistor between ADP0 and X
P, and ADP1 and YP, the maximum voltage observed
at the AD pins can be controlled by the following voltage divider expressions:
The Rfilmx parameter is the film resistance observed when measuring between X
P and XM. The
Rresistorx parameter is the resistor size inserted between ADP0 and X
P. The definition of Rfilmy
and Rresistory is the same but for ADP1, Y
P, and YM instead.
Table 26-2.
Resistive Touch Screen Pin Connections
ADCIFB Pin
TS Signal, APOE == 0
TS Signal, APOE == 1
ADP0
Xp through a resistor
No Connect
ADP1
Yp through a resistor
No Connect
ADtspo+0
Xp
ADtspo+1
Xm
ADtspo+2
Yp
ADtspo+3
Ym
VADtspo 0
+
()
Rfilmx
Rfilmx Rresistorx
+
---------------------------------------------
VDP
0
()
=