slyt292.pdf

(616 KB) Pobierz
Texas Instruments Incorporated
Data Acquisition
Understanding the pen-interrupt (PENIRQ)
operation of touch-screen controllers
By Wendy Fang, Precision Analog Applications, High-Performance Analog,
and Ing-Yih James Wang, Design Engineer, Precision Analog
P NIRQ
—— function
To understand the P —— NIRQ
Introduction
The TSC2003 1 and TSC2007 2 are both four-wire touch-
screen controllers (TSCs) with an I 2 C interface. These two
devices are completely hardware-compatible with respec-
tive TSSOP-16 packages; they are also software-compatible
in many applications. 3
The digital output, or hardware interrupt pin on a
TSC2003 or TSC2007 device is called P —— NIRQ
—— function, we must first start
with the operation of the entire TSC200x touch screen
system.
As Figure 1 shows, there are two interfaces in a TSC
system: one is the analog interface (X+, X–, Y+, and Y–)
between the TSC and the touch panel, and the other is the
digital interface (SCL, SDA, and P —— NIRQ
—— . It provides
rich information on the touch screen system and its vari-
ous connections. For example, this pin indicates whether
the TSC device works as it should, or if the TSC system
analog interface is properly connected. Observing the
P —— NIRQ
—— ) between the
TSC and the host processor. The digital interface is at the
center of the discussion in this article.
When there is no touch or pressure applied to the touch
panel, the touch-screen system is in a wait and sleep state;
the I 2 C bus lines (SCL and SDA) and the pen-detect inter-
rupt (P —— NIRQ
—— pin is very useful for properly configuring the
system in a given application as well as debugging the TSC
device operation.
Many users may presume that the P —— NIRQ
—— ) are all inactive or at logic high.
When pressure or a touch is applied to the system touch
panel, the TSC200x detects the touch. Correspondingly,
P —— NIRQ
—— pin responds
only to touch on the panel and may be surprised by several
exceptional P —— NIRQ
—— goes low or becomes active, and sends an inter-
rupt request to the host. Upon receiving the P —— NIRQ
——
pin does not seem to work the same after the touch panel
or the surrounding environment (such as temperature)
changes. P —— NIRQ
——
behaviors. For instance, the P —— NIRQ
——
signal, the host processor then sends the TSC a command
through the I 2 C bus. In response to the command from the
host, the TSC then powers on the corresponding touch-
panel driver and starts the touch-data sampling/converting
(or filtering). The data are then sent from the TSC to the
host via the I 2 C interface. The system continues this cycle
as long as the touch remains applied to the panel. Refer to
the related sections in the product data sheets 1, 2 for fur-
ther details on the I 2 C digital interface.
When the pressure is released or the touch is removed,
the P —— NIRQ
—— also goes high at times even though the
user maintains pressure on the panel. These behaviors (as
well as others) are often unexpected.
This article discusses these types of behaviors and
describes how the P —— NIRQ
—— pin may be expected to oper-
ate under a variety of conditions. It also explains the prin-
ciples of the P —— NIRQ
—— pin, and provides information about
how and where to investigate P —— NIRQ
—— behaviors.
Throughout this article, the abbreviation TSC200x
refers to both the TSC2003 and the TSC2007, except
where stated otherwise.
—— returns high or becomes inactive. The entire
touch screen system returns to the wait state again.
Figure 1. TSC200x touch-screen system
TSC2003/
TSC2007
Touch Panel
Host Processer
(Noise
Filtering)
IC
Interface
and
Control
Logic
X+
SAR
ADC
2
Y+
SCL
Touch
Panel
Driver
2
IC
Port
SDA
X
Internal
Clock
Y
PENIRQ
Touch
Screen
INT
5
Analog Applications Journal
2Q 2008
High-Performance Analog Products
917598007.185.png 917598007.196.png 917598007.207.png 917598007.218.png 917598007.001.png 917598007.012.png 917598007.023.png 917598007.033.png 917598007.044.png 917598007.054.png 917598007.065.png 917598007.076.png 917598007.086.png 917598007.097.png 917598007.108.png 917598007.119.png 917598007.130.png 917598007.141.png 917598007.150.png 917598007.151.png 917598007.152.png 917598007.153.png 917598007.154.png 917598007.155.png 917598007.156.png 917598007.157.png 917598007.158.png 917598007.159.png 917598007.160.png 917598007.161.png 917598007.162.png 917598007.163.png 917598007.164.png 917598007.165.png
 
Data Acquisition
Texas Instruments Incorporated
Figure 2. TSC200x PE —— IR —– P behavior following
touch-on or touch-off activity on panel
Figure 3. TSC200x PE —— IR —– P behavior
with full I 2 C interface
4.06 ms
58.6 ms
PENIRQ (2 V/div)
PENIRQ (2 V/div)
1
1
SCL (2 V/div)
SCL (2 V/div)
SDA (2 V/div)
3
3
4
4
SDA (2 V/div)
Time Base (10 ms/div)
Time Base (500 µs/div)
P NIRQ
—— working principle
The function of the TSC200x P —— NIRQ
—— is usually the trigger that moves
the TSC device to either a wait state (if P —— NIRQ
Clearly, the P —— NIRQ
——
is inac-
—— , once it is enabled,
can be simplified by the block diagram shown in Figure 4
with Q1 and Q4 ON; and Q2 and Q3 OFF.
When the touch panel is not pressed, the touch-panel X
and Y layers are separated and the power from the TSC
touch-panel driver cannot run to ground. Thus, there is no
driving current in the analog interface, and the entire sys-
tem is in a waiting (that is, sleep) mode. The voltage at
point B in Figure 4 is equal to V DD .
tive) or an awake state (if P —— NIRQ
—— is active). However,
there are some cases where P —— NIRQ
—— may not be used to
trigger the touch system in some applications; these
exceptions will not be discussed in this article.
The TSC200x P —— NIRQ
—— reflects the touch-on and touch-
off activity on the touch-screen panel, as shown in Figure 2
and Figure 3. Figure 2 illustrates the digital interface
when the host software has not yet been loaded; Figure 3
is the digital behavior with a complete I 2 C interface.
Figure 4. PE —— IR —– P functional block diagram
TSC Device
PENIRQ
V DD
B
R IRQ
Pen Touch
Control
Logic
Q2
Q1
X+
Y+
GND
A
X–
Y–
High when the
X+ or Y+
driver is on
Q3
Touch
Screen
Off
Q4
On
GND
6
Analog Applications Journal
High-Performance Analog Products
2Q 2008
917598007.166.png 917598007.167.png 917598007.168.png 917598007.169.png 917598007.170.png 917598007.171.png 917598007.172.png 917598007.173.png 917598007.174.png 917598007.175.png 917598007.176.png 917598007.177.png 917598007.178.png 917598007.179.png 917598007.180.png 917598007.181.png 917598007.182.png 917598007.183.png 917598007.184.png 917598007.186.png 917598007.187.png 917598007.188.png 917598007.189.png 917598007.190.png 917598007.191.png 917598007.192.png 917598007.193.png 917598007.194.png 917598007.195.png 917598007.197.png 917598007.198.png 917598007.199.png 917598007.200.png 917598007.201.png 917598007.202.png 917598007.203.png 917598007.204.png 917598007.205.png 917598007.206.png 917598007.208.png 917598007.209.png 917598007.210.png 917598007.211.png 917598007.212.png 917598007.213.png 917598007.214.png 917598007.215.png 917598007.216.png 917598007.217.png 917598007.219.png 917598007.220.png 917598007.221.png 917598007.222.png 917598007.223.png 917598007.224.png 917598007.225.png 917598007.226.png 917598007.227.png 917598007.228.png 917598007.002.png 917598007.003.png 917598007.004.png 917598007.005.png 917598007.006.png 917598007.007.png 917598007.008.png 917598007.009.png 917598007.010.png 917598007.011.png 917598007.013.png 917598007.014.png 917598007.015.png 917598007.016.png 917598007.017.png 917598007.018.png 917598007.019.png 917598007.020.png 917598007.021.png 917598007.022.png 917598007.024.png 917598007.025.png 917598007.026.png 917598007.027.png 917598007.028.png 917598007.029.png
 
Texas Instruments Incorporated
Data Acquisition
—–– IR —–
Table 1. PEN
operation (when enables)
System Condition
PENIRQ Circuit Status
Analog Interface Status
PENIRQ Status
No touch applied to the panel
Q1 is on
X+ = V DD
PENIRQ ≡ V DD
(the X and Y layers have no
Q2 is off
X– = V DD
connection)
Voltage at B =V B =V DD
Y+=GND
(no current flows because the
Y– = GND
X and Y layers have no
connection)
Touch applied to the panel
Q1 is on
X+ V B
PENIRQ GND
(the X and Y layers are
Q2 is off
X– V B
If V B <V Threshold
connected at a point A )
V B = Equation 1
Y+ GND
or
(Current loop: V DD R IRQ
Y– GND
PENIRQ V DD
B Q1 X+ A Y–
If V B >V Threshold
Q4 GND)
Where the gate threshold is:
0.4 × V DD <V Threshold < 0.6 × V DD
—— circuitry works as expected, the
proper analog interface connection can be confirmed if
PENIRQ functions as shown in Figure 2 and Figure 3,
without or with full I 2 C activity, respectively.
P NIRQ
When the P —— NIRQ
With pressure applied to the touch panel, the X and Y
layers of the touch panel connect at touch point A, and
current flows from V DD to ground through the touch
panel. The voltage at point B in Figure 4 is then deter-
mined by the resistance divider between R IRQ and R Touch ,
as Equation 1 shows:
—— sensitivity
From the previous discussion, note that the P —— NIRQ
——
responds to pressure on the touch panel (that is, P —— NIRQ
V
RR
——
DD
V
×
R
,
(1)
B
Touch
+
IRQ
Touch
goes low) only if the voltage V B under the touch falls
below the gate threshold V Threshold ; refer to Table 1.
Because V B is determined by the ratio of R IRQ and R Touch ,
the ohms of the touch panel R Touch and the TSC internal
where R IRQ is the TSC internal pullup resistor, R IRQ is
about 10 k
Ω
on the TSC2003, and approximately 51 k
Ω
or
90 k Ω (software-programmable) on the TSC2007.
R Touch is the equivalent resistance between point B and
ground, including:
the Q1 ON resistance;
the touch-panel X-layer resistance between the X+ to
point A;
the touching or pressure resistance (that is, the Z-layer)
between the X and Y layers at point A;
the touch-panel Y-layer resistance between point A to
the Y–; and
the Q4 ON resistance.
The yellow line in Figure 4 indicates the current flow
when the panels are touching. The majority of the R Touch
is the third bullet above (the Z-layer resistance), that is,
the touching resistance between the X and Y layers at
point A. The other items are usually of much smaller
resistance.
Table 1 details the expected (or correct) states and the
status of the TSC200x P —— NIRQ
R IRQ are the keys to understanding P —— NIRQ
——
behavior and
establishing touch-detection sensitivity.
For most resistive TSC devices on the market today,
R Touch , when pressure is put on the panel, ranges from
several hundred ohms to a couple of thousand ohms.
Depending on the mechanical structure of the panel,
R Touch can be up to several hundred-thousand ohms with
very weak pressure. As a result, with a low-to-moderate
panel R Touch value (that is, less than 10 k Ω ), V B can be
much lower than 0.4 × V DD when the panel is touched,
and so there is no problem for the P —— NIRQ
——
to work corre-
sponding to a panel touch on or off.
For example: If the panel resistance changes from
infinite (no-touch or touch-off state) to 1500 Ω (touch-on
state), V B is:
V
RR
V
DD
DD
V
×
R
=
×
1500
B
Touch
+
51000
+
1500
IRQ
Touch
—— signal,
and the TSC system analog interface, under the condition
when the panel is not touched or when the panel is
touched. From Table 1, we can see clearly that the key for
P —— NIRQ
——
circuit, the P —— NIRQ
=
0 029
.
×
V
(for 51-k
Ω
R
on TSC2007).
DD
IRQ
Similarly, V B 0.016 × V DD for 90-k Ω R IRQ on the
TSC2007; or V B
0.13 × V DD on the TSC2003 (where
R IRQ = 10 k Ω ). In both these cases, V B is much lower than
—— to function correctly is the resistance ratio of
R IRQ and R Touch with or without touch and under different
levels of touch pressure. Therefore, the differences
between R IRQ , R Touch , or V Threshold can affect P —— NIRQ
the gate threshold; P —— NIRQ
——
works well and performs as
expected.
For very light or weak touch-on pressure, however, the
panel R Touch value may be high; in fact, R Touch may be as
high as 20 k
——
behavior greatly.
Ω
upon a weak touch. With such touch panels
7
Analog Applications Journal
2Q 2008
High-Performance Analog Products
917598007.030.png 917598007.031.png 917598007.032.png 917598007.034.png 917598007.035.png 917598007.036.png 917598007.037.png 917598007.038.png 917598007.039.png 917598007.040.png 917598007.041.png 917598007.042.png 917598007.043.png 917598007.045.png 917598007.046.png 917598007.047.png 917598007.048.png 917598007.049.png 917598007.050.png 917598007.051.png 917598007.052.png 917598007.053.png
 
Data Acquisition
Texas Instruments Incorporated
and such weak touch, the TSC2003 would surely have
trouble because its internal P —— NIRQ
For some touch panels, the R Touch resistance under a
very weak touch may be very high and very close to the
resistance without any touch. For example, if R Touch is
approximately 100 k Ω , then the TSC2007, with R IRQ =
90 k
——
pull-up resistor
R Touch is relatively low (about 10 k
Ω
), and because the
voltage at point B is:
, may still have difficultly detecting it, since from
Equation 1, V B = 0.526 × V DD .
P NIRQ
Ω
V
RR
V
DD
DD
V
×
R
=
×
20000
B
Touch
+
10000
+
20000
—— transient state
If you monitor the TSC2007 P —— NIRQ
IRQ
Touch
=
067
.
×
V
.
DD
—— signal, you may
notice that when a touch remains on the panel and when
the host is reading touch data (such as X, Y, Z1, or Z2), the
P —— NIRQ
Obviously, the voltage 0.67 × V DD at V B is too high, and
it cannot trigger the P —— NIRQ
—— . You have to apply signifi-
cant pressure on such a panel to allow the TSC2003 to
sense the touch.
Under the same weak touch, however, the TSC2007 has
a clear advantage. The problem described above on the
TSC2003 cannot occur because the TSC2007 has a much
higher internal pull-up resistor in its P —— NIRQ
—— may return high shortly and then go back to low
again before the TSC sends out the touch data over the
I 2 C bus. This situation is illustrated by Figure 5 and Figure 6.
To explain these types of glitches in the P —— NIRQ
—— , we
must first understand the function of the switches Q1 and
Q2 in the P —— NIRQ
—— circuit.
Under the previous same example, V B on the TSC2007 is
either 0.28 × V DD (for 51-k Ω R IRQ ) or 0.18 × V DD (for
90-k Ω R IRQ ); both values are much lower than the gate
—— functional block diagram (see Figure 4).
In some older TSC devices, such as the ADS7843, it is a
concern or problem that a so-called ADC Convert Error
caused by the P —— NIRQ
—— circuit may occur. Refer to the
section, Operation of P —— NIRQ
threshold. The P —— NIRQ
——
works correctly and reliably even
—— , in Reference 4.
with a very weak touch.
Figure 6. PE —— IR —– P details while
reading data
Figure 5. PE —— IR —– P goes high briefly
before touch data are sent via I 2 C
754 µs
PENIRQ (2 V/div)
PENIRQ (2 V/div)
1
1
SCL (2 V/div)
92 ns
SCL (2 V/div)
3
3
SDA (2 V/div)
4
4
SDA (2 V/div)
Time Base (50 ns/div)
Time Base (100 µs/div)
8
Analog Applications Journal
High-Performance Analog Products
2Q 2008
917598007.055.png 917598007.056.png 917598007.057.png 917598007.058.png 917598007.059.png 917598007.060.png 917598007.061.png 917598007.062.png 917598007.063.png 917598007.064.png 917598007.066.png 917598007.067.png 917598007.068.png 917598007.069.png 917598007.070.png 917598007.071.png 917598007.072.png 917598007.073.png 917598007.074.png 917598007.075.png 917598007.077.png 917598007.078.png 917598007.079.png 917598007.080.png 917598007.081.png
Texas Instruments Incorporated
Data Acquisition
Figure 7. Disable PE —— IR —– P when TSC X touch driver on (driver current in orange)
TSC Device
PENIRQ
V DD
V DD
R IRQ
Q5
Off
Q6
On
Pen Touch
B
Control
Logic
Q2
Q1
X+
On
Y+
X–
Off
GND
Q3
Y–
Touch
Screen
High when the
X+ or Y+
driver is on
On
Q4
Off
GND
—— may become wider or narrower
while the touch is moving at different locations. Neverthe-
less, they occur very briefly and quickly (usually in nano-
seconds), and should not affect the P —— NIRQ
Such glitches at P —— NIRQ
When a TSC driver is on (that is, the X driver is on),
V DD is added on the X+ and X– of the touch panel, and
the driving current flows from X+ to X–. Therefore, to
eliminate the ADC error caused by the internal P —— NIRQ
——
——
function.
circuit, the advanced P —— NIRQ
—— detect circuit (see Figure 4)
automatically turns off Q1 and turns on Q2. This means
P —— NIRQ
Power-up default state
To ensure that the TSC2003 P —— NIRQ
—— is enabled after device
power-up, the host may send a dummy read command to
the TSC to enable the P —— NIRQ
—— is disabled whenever the TSC X or Y driver is on,
and the analog-to-digital converter is sampling the X data,
as shown in Figure 7.
When a touch driver is on, the P —— NIRQ
—— ; that is, the command sets
the PD0 bit in the command byte to zero, or PD0 = 0.
The TSC2007 P —— NIRQ
——
is disabled with
—— default state after device power-
up is automatically enabled. Thus, it is not necessary to
implement any specific software command or initialization
process with the TSC2007.
Conclusion
Understanding the function and operating principles of
the pen-interrupt function, or P —— NIRQ
Q1 off and Q2 on; there is no P —— NIRQ
—— current that runs to
the panel, and point B is connected to ground through Q2,
as shown in Figure 7. The P —— NIRQ
—— then remains low.
After finishing the touch-data acquisition process and
turning off the touch driver (that is, Q3 and Q6 change
from on to off), the TSC should again enable the P —— NIRQ
——
by turning Q2 off and turning Q1 on. By the nature of
material differences, there is a certain transient time when
either Q1 or Q2 changes from on to off (or from off to on).
This means there is a deviation or timing difference
between Q1 and Q2 on the respective transient times. If
Q2 has been turned off but Q1 has not yet been turned on
completely, point B may neither be connected to X+
(through Q1) nor to ground (through Q2). Therefore,
point B is pulled high by R IRQ , during which time P —— NIRQ
—— , can help users to
quickly understand the TSC200x states, and therefore
properly use the device and debug the system when need-
ed. This article provides details on P —— NIRQ
—— operation and
behavior for the TSC2003 and TSC2007 devices. With
information about how to make the sensitive P —— NIRQ
——
more reliable, users can select the proper touch panel and
TSC device for their specific applications.
——
jumps high as shown in Figure 5 and Figure 6.
9
Analog Applications Journal
2Q 2008
High-Performance Analog Products
917598007.082.png 917598007.083.png 917598007.084.png 917598007.085.png 917598007.087.png 917598007.088.png 917598007.089.png 917598007.090.png 917598007.091.png 917598007.092.png 917598007.093.png 917598007.094.png 917598007.095.png 917598007.096.png 917598007.098.png 917598007.099.png 917598007.100.png 917598007.101.png 917598007.102.png 917598007.103.png 917598007.104.png 917598007.105.png 917598007.106.png 917598007.107.png 917598007.109.png 917598007.110.png 917598007.111.png 917598007.112.png 917598007.113.png 917598007.114.png 917598007.115.png 917598007.116.png 917598007.117.png 917598007.118.png 917598007.120.png 917598007.121.png 917598007.122.png 917598007.123.png 917598007.124.png 917598007.125.png 917598007.126.png 917598007.127.png 917598007.128.png 917598007.129.png 917598007.131.png 917598007.132.png 917598007.133.png 917598007.134.png 917598007.135.png 917598007.136.png 917598007.137.png 917598007.138.png 917598007.139.png 917598007.140.png 917598007.142.png 917598007.143.png 917598007.144.png 917598007.145.png 917598007.146.png 917598007.147.png 917598007.148.png 917598007.149.png
 
Zgłoś jeśli naruszono regulamin