
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 ——— Introduction PENIRQ function 1 2 ———— The TSC2003 and TSC2007 are both four-wire touch- To understand the PENIRQ function, we must first start screen controllers (TSCs) with an I2C interface. These two with the operation of the entire TSC200x touch screen devices are completely hardware-compatible with respec- system. tive TSSOP-16 packages; they are also software-compatible As Figure 1 shows, there are two interfaces in a TSC in many applications.3 system: one is the analog interface (X+, X–, Y+, and Y–) The digital output, or hardware interrupt pin on a between the TSC and the touch panel, and the other is the ———— ———— TSC2003 or TSC2007 device is called PENIRQ. It provides digital interface (SCL, SDA, and PENIRQ) between the rich information on the touch screen system and its vari- TSC and the host processor. The digital interface is at the ous connections. For example, this pin indicates whether center of the discussion in this article. the TSC device works as it should, or if the TSC system When there is no touch or pressure applied to the touch analog interface is properly connected. Observing the ———— panel, the touch-screen system is in a wait and sleep state; PENIRQ pin is very useful for properly configuring the the I2C bus lines (SCL and SDA) and the pen-detect inter- ———— system in a given application as well as debugging the TSC rupt (PENIRQ) are all inactive or at logic high. device operation. ———— When pressure or a touch is applied to the system touch Many users may presume that the PENIRQ pin responds panel, the TSC200x detects the touch. Correspondingly, ———— only to touch on the panel and may be surprised by several PENIRQ goes low or becomes active, and sends an inter- ———— ———— ———— exceptional PENIRQ behaviors. For instance, the PENIRQ rupt request to the host. Upon receiving the PENIRQ pin does not seem to work the same after the touch panel signal, the host processor then sends the TSC a command or the surrounding environment (such as temperature) ———— through the I2C bus. In response to the command from the changes. PENIRQ also goes high at times even though the host, the TSC then powers on the corresponding touch- user maintains pressure on the panel. These behaviors (as panel driver and starts the touch-data sampling/converting well as others) are often unexpected. (or filtering). The data are then sent from the TSC to the This article discusses these types of behaviors and ———— host via the I2C interface. The system continues this cycle describes how the PENIRQ pin may be expected to oper- as long as the touch remains applied to the panel. Refer to ate under a variety of conditions. It also explains the prin- ———— the related sections in the product data sheets1, 2 for fur- ciples of the PENIRQ pin, and provides information about ———— ther details on the I2C digital interface. how and where to investigate PENIRQ behaviors. When the pressure is released or the touch is removed, ———— Throughout this article, the abbreviation TSC200x the PENIRQ returns high or becomes inactive. The entire refers to both the TSC2003 and the TSC2007, except touch screen system returns to the wait state again. where stated otherwise. Figure 1. TSC200x touch-screen system Touch Panel TSC2003/ Host Processer TSC2007 X+ SAR (Noise ADC Filtering) 2 Y+ IC SCL Touch 2 Panel Interface SDA IC X Internal Driver and Port Clock Y Control PENIRQ Touch Logic INT Screen 5 Analog Applications Journal 2Q 2008 www.ti.com/aaj High-Performance Analog Products Data Acquisition Texas Instruments Incorporated ———– ———– Figure 2. TSC200x PENIRQPEbehavior following Figure 3. TSC200x PENIRQPEbehavior touch-on or touch-off activity on panel with full I2C 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) 3 SDA (2 V/div) 3 4 4 SDA (2 V/div) Time Base (500 µs/div) Time Base (10 ms/div) ———— Clearly, the PENIRQ is usually the trigger that moves ——— ———— PENIRQ working principle the TSC device to either a wait state (if PENIRQ is inac- ———— ———— The function of the TSC200x PENIRQ, once it is enabled, tive) or an awake state (if PENIRQ is active). However, ———— can be simplified by the block diagram shown in Figure 4 there are some cases where PENIRQ may not be used to with Q1 and Q4 ON; and Q2 and Q3 OFF. trigger the touch system in some applications; these When the touch panel is not pressed, the touch-panel X exceptions will not be discussed in this article. ———— and Y layers are separated and the power from the TSC The TSC200x PENIRQ reflects the touch-on and touch- touch-panel driver cannot run to ground. Thus, there is no off activity on the touch-screen panel, as shown in Figure 2 driving current in the analog interface, and the entire sys- and Figure 3. Figure 2 illustrates the digital interface tem is in a waiting (that is, sleep) mode. The voltage at when the host software has not yet been loaded; Figure 3 point B in Figure 4 is equal to V . is the digital behavior with a complete I2C interface. DD ———– Figure 4. PENIRQPEfunctional block diagram TSC Device PENIRQ VDD B RIRQ Pen Touch Control Logic Q2 Q1 X+ Y+ GND A X– High when the Y– Q3 Touch X+ or Y+ Off Screen Q4 driver is on On GND 6 High-Performance Analog Products www.ti.com/aaj 2Q 2008 Analog Applications Journal Texas Instruments Incorporated Data Acquisition —–– —– Table 1. PENIRQ operation (when enables) System Condition PENIRQ Circuit Status Analog Interface Status PENIRQ Status No touch applied to the panel Q1 is on X+ = VDD PENIRQ ≡ VDD (the X and Y layers have no Q2 is off X– = VDD connection) Voltage at B =VB =VDD 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+ ≈ VB PENIRQ ≈ GND (the X and Y layers are Q2 is off X– ≈ VB If VB <VThreshold connected at a point A)VB = Equation 1 Y+ ≈ GND or (Current loop: VDD → RIRQ → Y– ≈ GND PENIRQ ≈ VDD B → Q1 → X+ → A → Y– → If VB >VThreshold Q4 → GND) Where the gate threshold is: 0.4 × VDD <VThreshold < 0.6 × VDD ———— With pressure applied to the touch panel, the X and Y When the PENIRQ circuitry works as expected, the layers of the touch panel connect at touch point A, and proper analog interface connection can be confirmed if current flows from VDD to ground through the touch PENIRQ functions as shown in Figure 2 and Figure 3, panel. The voltage at point B in Figure 4 is then deter- without or with full I2C activity, respectively. mined by the resistance divider between R and R , ——— IRQ Touch PENIRQ sensitivity as Equation 1 shows: ———— From the previous discussion, note that the PENIRQ V ———— V ≈ DD × R , responds to pressure on the touch panel (that is, PENIRQ B + Touch (1) RRIRQ Touch goes low) only if the voltage VB under the touch falls where RIRQ is the TSC internal pullup resistor, RIRQ is below the gate threshold VThreshold; refer to Table 1. about 10 kΩ on the TSC2003, and approximately 51 kΩ or Because VB is determined by the ratio of RIRQ and RTouch, 90 kΩ (software-programmable) on the TSC2007. the ohms of the touch panel R and the TSC internal Touch ———— RTouch is the equivalent resistance between point B and RIRQ are the keys to understanding PENIRQ behavior and ground, including: establishing touch-detection sensitivity. • the Q1 ON resistance; For most resistive TSC devices on the market today, R , when pressure is put on the panel, ranges from • the touch-panel X-layer resistance between the X+ to Touch several hundred ohms to a couple of thousand ohms. point A; Depending on the mechanical structure of the panel, • the touching or pressure resistance (that is, the Z-layer) RTouch can be up to several hundred-thousand ohms with between the X and Y layers at point A; very weak pressure. As a result, with a low-to-moderate • the touch-panel Y-layer resistance between point A to Ω panel RTouch value (that is, less than 10 k ), VB can be the Y–; and much lower than 0.4 × V when the panel is touched, DD ———— • the Q4 ON resistance. and so there is no problem for the PENIRQ to work corre- The yellow line in Figure 4 indicates the current flow sponding to a panel touch on or off. For example: If the panel resistance changes from when the panels are touching. The majority of the RTouch is the third bullet above (the Z-layer resistance), that is, infinite (no-touch or touch-off state) to 1500 Ω (touch-on the touching resistance between the X and Y layers at state), VB is: point A. The other items are usually of much smaller VDD VDD resistance. V ≈ ××R = 1500 B RR+ Touch 51000+ 1500 Table 1 details the expected (or correct) states and the IRQ Touch ———— ———— =× Ω status of the TSC200x PENIRQ circuit, the PENIRQ signal, 0.(for 029 VDD 551-k RIRQ on TSC2007). and the TSC system analog interface, under the condition ≈ Ω Similarly, VB 0.016 × VDD for 90-k RIRQ on the when the panel is not touched or when the panel is ≈ TSC2007; or VB 0.13 × VDD on the TSC2003 (where touched.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages7 Page
-
File Size-