Low Voltage Controller for Touch Screens AD7879/AD7889 FEATURES Personal digital assistants Smart handheld devices Touch screen monitors Point-of-sale terminals Medical devices Cell phones VCC/REF X- Y- X+ Y+ X+ X- REF- REF- REF+ TEMPERATURE SENSOR 12-BIT SAR ADC AD7879/ AD7879-1/ AD7889/ AD7889-1 SERIAL PORT RESULT REGISTERS CONTROL REGISTERS PENIRQ/INT/DAV GND FILTERING Y- 6-TO-1 MUX Y+ SEQUENCER AND TIMER TO RESULT REGISTERS CS/ DIN/ DOUT/ SCL ADD0 ADD1 SDA 07667-001 APPLICATIONS FUNCTIONAL BLOCK DIAGRAM AUX/VBAT/GPIO 4-wire touch screen interface 1.6 V to 3.6 V operation Median and averaging filter to reduce noise Automatic conversion sequencer and timer User-programmable conversion parameters Auxiliary analog input/battery monitor (0.5 V to 5 V) 1 optional GPIO Interrupt outputs (INT, PENIRQ) Touch-pressure measurement Wake-up on touch function Shutdown mode: 6 A maximum 12-ball, 1.6 mm x 2 mm WLCSP 16-lead, 4 mm x 4 mm LFCSP Figure 1. GENERAL DESCRIPTION The AD7879/AD7889 are 12-bit successive approximation analog-to-digital converters (SAR ADCs) with a synchronous serial interface and low on-resistance switches for driving 4-wire resistive touch screens. The AD7879/AD7889 work with a very low power supply--a single 1.6 V to 3.6 V supply--and feature throughput rates of 105 kSPS. The devices include a shutdown mode that reduces current consumption to less than 6 A. To reduce the effects of noise from LCDs and other sources, the AD7879/AD7889 contain a preprocessing block. The preprocessing function consists of a median filter and an averaging filter. The combination of these two filters provides a more robust solution, discarding the spurious noise in the signal and keeping only the data of interest. The size of both filters is programmable. Other user-programmable conversion controls include variable acquisition time and first conversion delay; up to 16 averages can be taken per conversion. The AD7879/AD7889 can run in slave mode or standalone (master) mode, using an automatic conversion sequencer and timer. The AD7879/AD7889 have a programmable pin that can operate as an auxiliary input to the ADC, as a battery monitor, or as a GPIO. In addition, a programmable interrupt output can operate in three modes: as a general-purpose interrupt to signal when new data is available (DAV), as an interrupt to indicate when limits are exceeded (INT), or as a pen-down interrupt when the screen is touched (PENIRQ). The AD7879/AD7889 offer temperature measurement and touch-pressure measurement. The AD7879 is available in a 12-ball, 1.6 mm x 2 mm WLCSP and in a 16-lead, 4 mm x 4 mm LFCSP. The AD7889 is available in a backside-coated version of the WLCSP. Both parts support an SPI interface (AD7879/AD7889) or an I2C interface (AD7879-1/AD7889-1). Rev. C Information furnished by Analog Devices is believed to be accurate and reliable. However, no responsibility is assumed by Analog Devices for its use, nor for any infringements of patents or other rights of third parties that may result from its use. Specifications subject to change without notice. No license is granted by implication or otherwise under any patent or patent rights of Analog Devices. Trademarks and registered trademarks are the property of their respective owners. One Technology Way, P.O. Box 9106, Norwood, MA 02062-9106, U.S.A. Tel: 781.329.4700 www.analog.com Fax: 781.461.3113 (c)2008-2010 Analog Devices, Inc. All rights reserved. AD7879/AD7889 TABLE OF CONTENTS Features .............................................................................................. 1 Auxiliary Input ........................................................................... 18 Applications ....................................................................................... 1 Battery Input ............................................................................... 18 Functional Block Diagram .............................................................. 1 Limit Comparison ...................................................................... 18 General Description ......................................................................... 1 GPIO ............................................................................................ 18 Revision History ............................................................................... 2 Conversion Timing ........................................................................ 20 Specifications..................................................................................... 3 Register Map ................................................................................... 21 SPI Timing Specifications (AD7879/AD7889)......................... 4 Detailed Register Descriptions ..................................................... 22 I C Timing Specifications (AD7879-1/AD7889-1).................. 5 Control Registers ............................................................................ 26 Absolute Maximum Ratings............................................................ 6 Control Register 1 ...................................................................... 26 Thermal Resistance ...................................................................... 6 Control Register 2 ...................................................................... 28 ESD Caution .................................................................................. 6 Control Register 3 ...................................................................... 29 Pin Configurations and Function Descriptions ........................... 7 Interrupts ..................................................................................... 30 Typical Performance Characteristics ............................................. 9 Synchronizing the AD7879/AD7889 to the Host CPU ........ 31 Terminology .................................................................................... 12 Serial Interface ................................................................................ 32 Theory of Operation ...................................................................... 13 SPI Interface ................................................................................ 32 Touch Screen Principles ............................................................ 13 I2C-Compatible Interface .......................................................... 34 Measuring Touch Screen Inputs ............................................... 14 Grounding and Layout .................................................................. 37 Touch-Pressure Measurement .................................................. 15 Lead Frame Chip Scale Packages ............................................. 37 Temperature Measurement ....................................................... 15 WLCSP Assembly Considerations ........................................... 37 Median and Averaging Filters ....................................................... 17 Outline Dimensions ....................................................................... 38 AUX/VBAT/GPIO Pin ................................................................... 18 Ordering Guide .......................................................................... 39 2 REVISION HISTORY 11/10--Rev. B to Rev. C Changes to Table 2 ............................................................................ 3 Added Conversion Timing Section .............................................. 20 Added Figure 34.............................................................................. 29 1/10--Rev. A to Rev. B Updated Outline Dimensions ....................................................... 37 Changes to Ordering Guide .......................................................... 38 3/09--Rev. 0 to Rev. A Added AD7889 and Backside-Coated WLCSP ......... Throughout Change to Battery Monitor, Input Voltage Range Parameter ..... 3 Changes to Table 4 ............................................................................ 6 Added Thermal Resistance Section and Table 5; Renumbered Sequentially ................................................................ 6 Changes to Pin Configurations and Function Descriptions Section ................................................................................................ 7 Added Table 7.................................................................................... 8 Changes to First Method Section ................................................. 15 Changes to Median and Averaging Filters Section .................... 17 Changes to GPIO Interrupt Enable (Bit 12, Control Register 3, Address 0x03) Section ................................................................... 19 Changes to Table 13 ....................................................................... 22 Changes to ADC Channel (Control Register 1, Bits[14:12]) Section.............................................................................................. 26 Changes to Power Management (Control Register 2, Bits[15:14]) Section ........................................................................ 27 Changes to DAV--Data Available Interrupt Section................. 29 Changes to INT--Out-of-Limit Interrupt Section .................... 29 Changes to Writing Data Section ................................................. 31 Changes to Reading Data Section and Figure 40 ....................... 32 Changes to Figure 41...................................................................... 33 Changes to Writing Data over the I2C Bus Section.................... 34 Changes to Figure 44...................................................................... 35 Updated Outline Dimensions ....................................................... 37 Changes to Ordering Guide. ......................................................... 38 10/08--Revision 0: Initial Version Rev. C | Page 2 of 40 AD7879/AD7889 SPECIFICATIONS VCC = 1.6 V to 3.6 V, TA = -40C to +85C, unless otherwise noted. Table 1. Parameter DC ACCURACY Resolution No Missing Codes Integral Nonlinearity (INL)1 Differential Nonlinearity (DNL)1 Negative DNL Positive DNL Offset Error1, 2 Gain Error1, 2 Noise3 Power Supply Rejection3 Internal Clock Frequency Internal Clock Accuracy SWITCH DRIVERS On Resistance1 Y+, X+ Y-, X- ANALOG INPUTS Input Voltage Range DC Leakage Current Input Capacitance Accuracy TEMPERATURE MEASUREMENT Temperature Range Resolution Accuracy2 BATTERY MONITOR Input Voltage Range Input Impedance3 Accuracy LOGIC INPUTS (DIN, SCL, CS, SDA, GPIO) Input High Voltage, VINH Input Low Voltage, VINL Input Current, IIN Input Capacitance, CIN3 LOGIC OUTPUTS (DOUT, GPIO, SCL, SDA, INT) Output High Voltage, VOH Output Low Voltage, VOL Floating-State Leakage Current Floating-State Output Capacitance2 CONVERSION RATE3 Conversion Time Throughput Rate Min Typ 12 11 12 2 Max Unit 3 Bits Bits LSB -0.99 2 6 4 70 60 2 1.8 2.2 6 5 Test Conditions/Comments LSB size = 390 V. LSB size = 390 V. LSB LSB LSB LSB V rms dB MHz MHz 0 VCC V A pF % +85 C C C Calibrated at 25C. V k % Uncalibrated accuracy. 0.1 30 0.3 -40 0.3 2 0.5 5 16 2 5 0.7 x VCC 0.3 x VCC 0.01 10 VCC - 0.2 V V A pF 0.1 5 V V A pF 9.5 s 105 kSPS 0.4 Rev. C | Page 3 of 40 VIN = 0 V or VCC. Including 2 s of acquisition time, MAV filter off. 2 s of additional time is required if MAV filter is on. AD7879/AD7889 Parameter POWER REQUIREMENTS VCC ICC Converting Mode Static Min Typ Max Unit Test Conditions/Comments 1.6 2.6 3.6 V 480 406 650 A A 0.5 6 A Specified performance. Digital inputs = 0 V or VCC. ADC on, PM = 10. ADC and temperature sensor are off; the reference and oscillator are on; PM = 01 or 11. PM = 00. Shutdown Mode 1 2 3 See the Terminology section. Guaranteed by characterization; not production tested. Sample tested at 25C to ensure compliance. SPI TIMING SPECIFICATIONS (AD7879/AD7889) VCC = 1.6 V to 3.6 V, TA = -40C to +85C, unless otherwise noted. Sample tested at 25C to ensure compliance. All input signals are specified with tR = tF = 5 ns (10% to 90% of VCC) and timed from a voltage level of 1.4 V. Table 2. Parameter 1 fSCL t1 t2 t3 t4 t5 t6 t7 t8 Unit MHz max ns min ns min ns min ns min ns min ns max ns max ns min Description CS falling edge to first SCL falling edge SCL high pulse width SCL low pulse width DIN setup time DIN hold time DOUT access time after SCL falling edge CS rising edge to DOUT high impedance SCL rising edge to CS high Guaranteed by design; not production tested. CS t1 t2 1 SCL t8 t3 2 3 15 16 1 2 15 16 t4 t5 DIN LSB MSB t6 DOUT MSB Figure 2. Detailed SPI Timing Diagram Rev. C | Page 4 of 40 t7 LSB 07667-002 1 Limit 5 5 20 20 15 15 20 16 15 AD7879/AD7889 I2C TIMING SPECIFICATIONS (AD7879-1/AD7889-1) VCC = 1.6 V to 3.6 V, TA = -40C to +85C, unless otherwise noted. Sample tested at 25C to ensure compliance. All input signals are timed from a voltage level of 1.4 V. Table 3. Parameter1 fSCL t1 t2 t3 t4 t5 t6 t7 t8 tR tF Unit kHz max s min s min s min ns min ns min s min s min s min ns max ns max Description Start condition hold time, tHD; STA Clock low period, tLOW Clock high period, tHIGH Data setup time, tSU; DAT Data hold time, tHD; DAT Stop condition setup time, tSU; STO Start condition setup time, tSU; STA Bus-free time between stop and start conditions, tBUF Clock/data rise time Clock/data fall time Guaranteed by design; not production tested. tR t2 tF t1 SCL t3 t1 t5 t7 t6 t4 SDA t8 STOP START START Figure 3. Detailed I2C Timing Diagram Rev. C | Page 5 of 40 STOP 07667-003 1 Limit 400 0.6 1.3 0.6 100 300 0.6 0.6 1.3 300 300 AD7879/AD7889 ABSOLUTE MAXIMUM RATINGS TA = 25C, unless otherwise noted. THERMAL RESISTANCE Table 4. JA is specified for the worst-case conditions, that is, a device soldered in a circuit board for surface-mount packages. 1 Rating -0.3 V to +3.6 V -0.3 V to VCC + 0.3 V -0.3 V to +5 V -0.3 V to VCC + 0.3 V -0.3 V to VCC + 0.3 V 10 mA Table 5. Thermal Resistance Package Type1 12-Ball WLCSP 16-Lead LFCSP 1 JA 75 30.4 Unit C/W C/W 4-layer board. 15 kV 10 kV 200A TO OUTPUT PIN 4 kV 1 kV 0.2 kV -40C to +85C -65C to +150C 150C IOL 1.4V CL 50pF 200A IOH Figure 4. Circuit Used for Digital Timing ESD CAUTION 866 mW 2.138 W 260C (0.5C) 300C Transient currents of up to 100 mA do not cause SCR latch-up. Stresses above those listed under Absolute Maximum Ratings may cause permanent damage to the device. This is a stress rating only; functional operation of the device at these or any other conditions above those indicated in the operational section of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. Rev. C | Page 6 of 40 07667-004 Parameter VCC to GND Analog Input Voltage to GND AUX/VBAT to GND Digital Input Voltage to GND Digital Output Voltage to GND Input Current to Any Pin Except Supplies1 ESD Rating (X+, Y+, X-, Y-) Air Discharge Human Body Model Contact Human Body Model ESD Rating (All Other Pins) Human Body Discharge Field-Induced Charged Device Model Machine Model Operating Temperature Range Storage Temperature Range Junction Temperature Power Dissipation WLCSP (4-Layer Board) LFCSP (4-Layer Board) IR Reflow Peak Temperature Lead Temperature (Soldering 10 sec) AD7879/AD7889 PIN CONFIGURATIONS AND FUNCTION DESCRIPTIONS BALL A1 INDICATOR 1 2 AUX/ VBAT/ GPIO VCC/REF BALL A1 INDICATOR 1 2 3 AUX/ VBAT/ GPIO VCC/REF X+ A 3 X+ A PENIRQ/ INT/DAV CS PENIRQ/ INT/DAV ADD0 Y+ B Y+ B DOUT DIN X- C SDA ADD1 X- SCL GND Y- C SCL GND Y- D TOP VIEW (BALL SIDE DOWN) Not to Scale Figure 5. AD7879/AD7889 WLCSP Pin Configuration 07667-006 TOP VIEW (BALL SIDE DOWN) Not to Scale 07667-005 D Figure 6. AD7879-1/AD7889-1 WLCSP Pin Configuration Table 6. Pin Function Descriptions, WLCSP Ball No. AD7879/ AD7879-1/ AD7889 AD7889-1 1A 1A Mnemonic AUX/VBAT/GPIO 1B 1B PENIRQ/INT/DAV 1C N/A 1D 2A 2B N/A N/A 1C 1D 2A N/A 2B DOUT SDA SCL VCC/REF CS ADD0 2C N/A N/A 2C DIN ADD1 2D 2D GND 3A 3B 3C 3D 3A 3B 3C 3D X+ Y+ X- Y- Description This pin can be programmed as an auxiliary input to the ADC (AUX), as a battery measurement input to the ADC (VBAT), or as a general-purpose digital input/output (GPIO). Interrupt Output. This pin is asserted when the screen is touched (PENIRQ), when a measurement exceeds the preprogrammed limits (INT), or when new data is available in the registers (DAV). Active low, internal 50 k pull-up resistor. SPI Serial Data Output for the AD7879/AD7889. I2C Serial Data Input and Output for the AD7879-1/AD7889-1. Serial Interface Clock Input. Power Supply Input and ADC Reference. Chip Select for the SPI Serial Interface on the AD7879/AD7889. Active low. I2C Address Bit 0 for the AD7879-1/AD7889-1. This pin can be tied high or low to determine an address for the AD7879-1/AD7889-1 (see Table 25). SPI Serial Data Input to the AD7879/AD7889. I2C Address Bit 1 for the AD7879-1/AD7889-1. This pin can be tied high or low to determine an address for the AD7879-1/AD7889-1 (see Table 25). Ground. Ground reference point for all circuitry on the AD7879/AD7889. All analog input signals and any external reference signal should be referred to this voltage. Touch Screen Input Channel. Touch Screen Input Channel. Touch Screen Input Channel. Touch Screen Input Channel. Rev. C | Page 7 of 40 14 ADD0 13 AUX/VBAT/GPIO 12 PENIRQ/INT/DAV Y+ 1 PIN 1 INDICATOR 12 PENIRQ/INT/DAV AD7879-1 11 NC NC 3 TOP VIEW (Not to Scale) 10 NC NC 3 10 NC 9 X- 4 TOP VIEW (Not to Scale) Y- 5 SDA NOTES 1. NC = NO CONNECT 2. THE EXPOSED PAD IS NOT CONNECTED INTERNALLY. FOR INCREASED RELIABILITY OF THE SOLDER JOINTS AND MAXIMUM THERMAL CAPABILITY, IT IS RECOMMENDED THAT THE PAD BE SOLDERED TO THE GROUND PLANE. 07667-007 NOTES 1. NC = NO CONNECT 2. THE EXPOSED PAD IS NOT CONNECTED INTERNALLY. FOR INCREASED RELIABILITY OF THE SOLDER JOINTS AND MAXIMUM THERMAL CAPABILITY, IT IS RECOMMENDED THAT THE PAD BE SOLDERED TO THE GROUND PLANE. 9 SCL 8 DOUT SCL 8 Y- 5 X- 4 GND 7 NC 2 ADD1 6 11 NC GND 7 AD7879 DIN 6 NC 2 Figure 7. AD7879 LFCSP Pin Configuration 07667-008 PIN 1 INDICATOR Y+ 1 16 X+ 15 VCC/REF 14 CS 13 AUX/VBAT/GPIO 16 X+ 15 VCC/REF AD7879/AD7889 Figure 8. AD7879-1 LFCSP Pin Configuration Table 7. Pin Function Descriptions, LFCSP Pin No. AD7879 AD7879-1 1 1 2, 3, 10, 11 2, 3, 10, 11 4 4 5 5 6 N/A N/A 6 Mnemonic Y+ NC X- Y- DIN ADD1 7 7 GND 8 9 N/A 12 8 N/A 9 12 SCL DOUT SDA PENIRQ/INT/DAV 13 13 AUX/VBAT/GPIO 14 N/A N/A 14 CS ADD0 15 16 15 16 VCC/REF X+ EP Description Touch Screen Input Channel. No Connect. Touch Screen Input Channel. Touch Screen Input Channel. SPI Serial Data Input to the AD7879. I2C Address Bit 1 for the AD7879-1. This pin can be tied high or low to determine an address for the AD7879-1 (see Table 25). Ground. Ground reference point for all circuitry on the AD7879. All analog input signals and any external reference signal should be referred to this voltage. Serial Interface Clock Input. SPI Serial Data Output for the AD7879. I2C Serial Data Input and Output for the AD7879-1. Interrupt Output. This pin is asserted when the screen is touched (PENIRQ), when a measurement exceeds the preprogrammed limits (INT), or when new data is available in the registers (DAV). Active low, internal 50 k pull-up resistor. This pin can be programmed as an auxiliary input to the ADC (AUX), as a battery measurement input to the ADC (VBAT), or as a general-purpose digital input/output (GPIO). Chip Select for the SPI Serial Interface on the AD7879. Active low. I2C Address Bit 0 for the AD7879-1. This pin can be tied high or low to determine an address for the AD7879-1 (see Table 25). Power Supply Input and ADC Reference. Touch Screen Input Channel. Exposed Pad. The exposed pad is not connected internally. For increased reliability of the solder joints and maximum thermal capability, it is recommended that the pad be soldered to the ground plane. Rev. C | Page 8 of 40 AD7879/AD7889 TYPICAL PERFORMANCE CHARACTERISTICS TA = 25C, VCC = 2.6 V, fSCL = 2 MHz, unless otherwise noted. 1.0 470 0.8 465 0.6 GAIN ERROR VARIATION (LSB) 475 455 450 445 440 435 430 0.4 0.2 2.6V 0 3.6V -0.2 -0.4 1.6V -0.6 -0.8 -40 -25 -10 10 25 40 TEMPERATURE (C) 55 70 85 -1.0 07667-009 425 Figure 9. Supply Current vs. Temperature -40 -25 -10 10 25 40 TEMPERATURE (C) 55 70 85 07667-011 CURRENT (A) 460 Figure 12. Change in ADC Gain vs. Temperature 1.0 700 0.8 600 OFFSET VARIATION (LSB) 0.6 CURRENT (A) 500 400 300 200 0.4 1.6V 0.2 2.6V 0 -0.2 3.6V -0.4 -0.6 100 1.8 2.0 2.2 2.4 2.6 2.8 VCC (V) 3.0 3.2 3.4 3.6 -1.0 3.5 1.5 3.0 1.0 2.5 0.5 INL (LSB) 2.0 2.0 -0.5 1.0 -1.0 0.5 -1.5 0 -10 10 25 50 TEMPERATURE (C) -10 10 25 40 TEMPERATURE (C) 55 70 85 0 1.5 75 100 -2.0 07667-012 CURRENT (A) 4.0 -25 -25 Figure 13. Change in ADC Offset vs. Temperature Figure 10. Supply Current vs. VCC -40 -40 0 Figure 11. Full Power-Down IDD vs. Temperature 512 1024 1536 2048 CODE 2560 Figure 14. ADC INL Rev. C | Page 9 of 40 3072 3584 4096 07667-014 1.6 07667-010 0 07667-013 -0.8 AD7879/AD7889 1.0 6.0 0.8 5.5 0.6 5.0 0.2 RON () 0 4.5 -0.2 4.0 -0.4 -0.6 X+ TO VCC Y+ TO VCC X- TO GND Y- TO GND 3.5 -0.8 1 501 1001 1501 2001 2501 CODE 3001 3501 4001 3.0 07667-015 -1.0 -40 Figure 15. ADC DNL -25 -10 10 25 40 TEMPERATURE (C) 55 70 85 07667-017 DNL (LSB) 0.4 Figure 17. Switch On Resistance vs. Temperature (X+, Y+: Pin to VCC; X-, Y-: Pin to GND) 7 2370 2369 6 2368 ADC CODE (Decimal) 4 3 X+ TO VCC Y+ TO VCC X- TO GND Y- TO GND 2 2367 2366 2365 2364 2363 2362 1 0 1.6 1.8 2.0 2.2 2.4 2.6 2.8 VCC (V) 3.0 3.2 3.4 3.6 2360 -40 -25 -15 -5 Figure 16. Switch On Resistance vs. VCC (X+, Y+: Pin to VCC; X-, Y-: Pin to GND) 5 15 25 35 45 TEMPERATURE (C) 55 65 75 85 Figure 18. ADC Code vs. Temperature (Fixed Analog Input) Rev. C | Page 10 of 40 07667-018 2361 07667-016 RON () 5 AD7879/AD7889 1400 MEAN: -1.98893 SD: 0.475534 250 1000 NUMBER OF UNITS TEMPERATURE (Code) 1200 800 600 200 150 100 400 50 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 VCC (V) 0 07667-019 0 INPUT TONE AMPLITUDE (dB) SNR = 61.58dB THD = 72.34dB -40 -60 -80 -100 -120 07667-020 0 1603 3206 4809 6412 8015 9618 11221 12824 14427 16030 17633 19236 20839 22442 24045 25648 27251 28854 30457 32060 33663 35266 36869 -140 FREQUENCY (Hz) -2 -1 0 Figure 21. Typical Uncalibrated Accuracy for the Battery Channel (25C) 0 -160 -3 ERROR (%) Figure 19. Temperature Code vs. VCC for 25C -20 -4 07667-021 200 Figure 20. Typical FFT Plot for the Auxiliary Channels at 25 kHz Sampling Rate and 1 kHz Input Frequency Rev. C | Page 11 of 40 AD7879/AD7889 TERMINOLOGY Differential Nonlinearity (DNL) DNL is the difference between the measured and the ideal 1 LSB change between any two adjacent codes in the ADC. Integral Nonlinearity (INL) INL is the maximum deviation from a straight line passing through the endpoints of the ADC transfer function. The endpoints of the transfer function are zero scale at 1 LSB below the first code transition and full scale at 1 LSB above the last code transition. Gain Error Gain error is the deviation of the last code transition (111 ... 110 to 111 ... 111) from the ideal (VREF - 1 LSB) after the offset error has been calibrated out. Offset Error Offset error is the deviation of the first code transition (00 ... 000 to 00 ... 001) from the ideal (AGND + 1 LSB). On Resistance On resistance is a measure of the ohmic resistance between the drain and the source of the switch drivers. Rev. C | Page 12 of 40 AD7879/AD7889 THEORY OF OPERATION CONDUCTIVE ELECTRODE ON BOTTOM SIDE Y+ The core of the AD7879/AD7889 is a high speed, low power, 12-bit analog-to-digital converter (ADC) with an input multiplexer, on-chip track-and-hold, and on-chip clock. Conversion results are stored in on-chip result registers. The results from the auxiliary input or the battery input can be compared with high and low limits stored in limit registers to generate an outof-limit interrupt (INT). The AD7879/AD7889 also contain low resistance analog switches to switch the X and Y excitation voltages to the touch screen and to the on-chip temperature sensor. The high speed SPI serial bus provides control of the devices, as well as communication with the devices. The AD7879-1/AD7889-1 are available with an I2C interface. Operating from a single supply from 1.6 V to 3.6 V, the AD7879/ AD7889 offer a throughput rate of 105 kHz. The device is available in a 1.6 mm x 2 mm, 12-ball wafer level chip scale package (WLCSP) and in a 4 mm x 4 mm, 16-lead lead frame chip scale package (LFCSP). The AD7879/AD7889 have an on-chip sequencer that schedules a sequence of preprogrammed conversions. The conversion sequence starts automatically when the screen is touched or at preset intervals, using the on-board timer. To ensure that the AD7879/AD7889 work well with different touch screens, the user can select the acquisition time. A programmable delay ensures that the voltage on the touch screen settles before a measurement is taken. To help reduce noise in the system, the ADC takes up to 16 conversion results from each channel and writes the average of the results to the register. To further improve the performance of the AD7879/AD7889, the median filter can also be used if there is noise present in the system. PLASTIC FILM WITH TRANSPARENT, RESISTIVE COATING ON BOTTOM SIDE X- Y- X+ CONDUCTIVE ELECTRODE ON TOP SIDE PLASTIC FILM WITH TRANSPARENT, RESISTIVE COATING ON TOP SIDE LCD SCREEN 07667-022 The AD7879/AD7889 are a complete 12-bit data acquisition system for digitizing positional inputs from a 4-wire resistive touch screen. To support this function, data acquisition on the AD7879/AD7889 is highly programmable to ensure accurate and noise-free results from the touch screen. Figure 22. Basic Construction of a Touch Screen The Y layer has conductive electrodes running along the top and bottom edges, allowing the application of an excitation voltage down the Y layer from top to bottom. Provided that the layers are of uniform resistivity, the voltage at any point between the two electrodes is proportional to the horizontal position for the X layer and the vertical position for the Y layer. When the screen is touched, the two layers make contact. If only the X layer is excited, the voltage at the point of contact and, therefore, the horizontal position, can be sensed at one of the Y layer electrodes. Similarly, if only the Y layer is excited, the voltage and, therefore, the vertical position, can be sensed at one of the X layer electrodes. By switching alternately between X and Y excitation and measuring the voltages, the X and Y coordinates of the contact point can be determined. In addition to measuring the X and Y coordinates, it is also possible to estimate the touch pressure by measuring the contact resistance between the X and Y layers. The AD7879/ AD7889 are designed to facilitate this measurement. TOUCH SCREEN PRINCIPLES A 4-wire touch screen consists of two flexible, transparent, resistive-coated layers that are normally separated by a small air gap (see Figure 22). The X layer has conductive electrodes running down the left and right edges, allowing the application of an excitation voltage across the X layer from left to right. Rev. C | Page 13 of 40 AD7879/AD7889 Figure 23 shows an equivalent circuit of the analog input structure of the AD7879/AD7889, showing the touch screen switches, the main analog multiplexer, the ADC, and the dual 3-to-1 multiplexer that selects the reference source for the ADC. VCC X+ X- Y+ Y- X- Y- GND X+ Y+ VCC DUAL 3-TO-1 MUX AUX/VBAT/GPIO REF- TEMPERATURE SENSOR REF+ 12-BIT SUCCESSIVE APPROXIMATION ADC WITH TRACK-AND-HOLD 07667-023 IN+ Figure 23. Analog Input Structure The AD7879/AD7889 can be set up to automatically convert either specific input channels or a sequence of channels. The results of the ADC conversions are stored in the result registers. When measuring the ancillary analog inputs (AUX, TEMP, or VBAT), the ADC uses a VCC reference and the measurement is referred to GND. VIN = VCC x RY - The advantage of the single-ended method is that the touch screen excitation voltage is switched off when the signal is acquired. Because a screen can draw over 1 mA, this is a significant consideration for a battery-powered system. The disadvantage of the single-ended method is that voltage drops across the switches can introduce errors. Touch screens can have a total end-to-end resistance ranging from 200 to 900 . By taking the lowest screen resistance of 200 and a typical switch resistance of 14 , the user can reduce the apparent excitation voltage to 200/228 x 100 = 87% of its actual value. In addition, the voltage drop across the low-side switch adds to the ADC input voltage. This introduces an offset into the input voltage; thus, it can never reach 0. Ratiometric Method The ratiometric method illustrated in Figure 25 shows the negative input of the ADC reference connected to Y- and the positive input connected to Y+. Thus, the screen excitation voltage provides the reference for the ADC. The input of the ADC is connected to X+ to determine the Y position. VCC Y+ MEASURING TOUCH SCREEN INPUTS When measuring the touch screen inputs, it is possible to use VCC as a reference or instead to use the touch screen excitation voltage as the reference and to perform a ratiometric, differential measurement. The differential method is the default method and is selected by clearing the SER/DFR bit (Bit 9 in Control Register 2) to 0. The single-ended method is selected by setting this bit to 1. Single-Ended Method Figure 24 illustrates the single-ended method for the Y position. For the X position, the excitation voltage is applied to X+ and X- and the voltage is measured at Y+. VCC Y+ X+ VREF INPUT (VIA MUX) X+ REF+ ADC TOUCH SCREEN REF- Y- GND Figure 25. Ratiometric Conversion of Touch Screen Inputs For greater accuracy, the ratiometric method has two significant advantages. One is that the reference to the ADC is provided from the actual voltage across the screen; therefore, any voltage dropped across the switches has no effect. The other advantage is that because the measurement is ratiometric, it does not matter if the voltage across the screen varies in the long term. However, it must not change after the signal has been acquired. REF- 07667-024 Y- GND INPUT (VIA MUX) The disadvantage of the ratiometric method is that the screen must be powered up at all times because it provides the reference voltage for the ADC. REF+ ADC TOUCH SCREEN (1) RYTOTAL 07667-025 INPUT MUX The voltage seen at the input to the ADC in Figure 24 is Figure 24. Single-Ended Conversion of Touch Screen Inputs Rev. C | Page 14 of 40 AD7879/AD7889 TOUCH-PRESSURE MEASUREMENT Second Method The pressure applied to the touch screen by a pen or finger can also be measured with the AD7879/AD7889 using some simple calculations. The contact resistance between the X and Y plates is measured, providing a good indication of the size of the depressed area and, therefore, the applied pressure. The area of the spot that is touched is proportional to the size of the object touching it. The size of this resistance (RTOUCH) can be calculated using two different methods. The second method requires the user to know the resistance of the X-plate and Y-plate tablets. Three touch screen conversions are required: a measurement of the X position (XPOSITION), the Y position (YPOSITION), and the Z1 position. The following equation also calculates the touch resistance (RTOUCH): RTOUCH = RXPLATE x (XPOSITION/4096) x [(4096/Z1) - 1] - RYPLATE x [1 - (YPOSITION/4096)] First Method The first method requires the user to know the total resistance of the X-plate tablet (RX). Three touch screen conversions are required: measurement of the X position, XPOSITION (Y+ input); measurement of the X+ input with the excitation voltage applied to Y+ and X- (Z1 measurement); and measurement of the Y- input with the excitation voltage applied to Y+ and X- (Z2 measurement). These three measurements are illustrated in Figure 26. The AD7879/AD7889 have two special ADC channel settings that configure the X and Y switches for the Z1 and Z2 measurements and store the results in the Z1 and Z2 result registers. The Z1 measurement is selected by setting the CHNL ADD[2:0] bits to 101 in Control Register 1 (Address 0x01); the result is stored in the X+ (Z1) result register (Address 0x0A). The Z2 measurement is selected by setting the CHNL ADD[2:0] bits to 100 in Control Register 1 (Address 0x01); the result is stored in the Y- (Z2) result register (Address 0x0B). The touch resistance (RTOUCH) can then be calculated using the following equation: RTOUCH = (RXPLATE) x (XPOSITION/4096) x [(Z2/Z1) - 1] MEASURE X POSITION X+ TOUCH RESISTANCE Y- Y+ X+ TEMPERATURE MEASUREMENT A temperature measurement option called the single-conversion method is available on the AD7879/AD7889. The conversion method requires only a single measurement on ADC Channel 001. The results are stored in the temperature conversion result register (Address 0x0D). The AD7879/AD7889 do not provide an explicit output of the temperature reading; the system must perform some external calculations. This method is based on an on-chip diode measurement. The acquisition time is fixed at 16 ms for temperature measurement. Conversion Method The conversion method makes use of the fact that the temperature coefficient of a silicon diode is approximately -2.1 mV/C. However, this small change is superimposed on the diode forward voltage, which can have a wide tolerance. Therefore, it is necessary to calibrate by measuring the diode voltage at a known temperature to provide a baseline from which the change in forward voltage with temperature can be measured. This method provides a resolution of approximately 0.3C and a predicted accuracy of 2C. The temperature limit comparison is performed on the result in the temperature conversion result register (Address 0x0D), which is the measurement of the diode forward voltage. The values programmed into the high and low limits should be referenced to the calibrated diode forward voltage to make accurate limit comparisons. Y+ X- (2) MEASURE Z1 POSITION TOUCH RESISTANCE Y- X- Y+ X+ TOUCH RESISTANCE X- MEASURE Z2 POSITION 07667-026 Y- (3) Figure 26. Three Measurements Required for Touch Pressure Rev. C | Page 15 of 40 AD7879/AD7889 Temperature Calculations Example If an explicit temperature reading in degrees Celsius is required, calculate for the single-measurement method as follows: Using VCC = 2.5 V as reference, 1. Calculate the scale factor of the ADC in degrees per LSB. Degrees per LSB = ADC LSB size/-2.1 mV = (VCC/4096)/-2.1 mV 2. 3. 4. Degrees per LSB = (2.5/4096)/-2.1 x 10-3 = -0.291 The ADC output is 983 decimal at 25C, equivalent to a diode forward voltage of 0.6 V. The ADC output at TAMB is 880. Save the ADC output, DCAL, at the calibration temperature, TCAL. Take the ADC reading, DAMB, at the temperature to be measured, TAMB. Calculate the difference in degrees between TCAL and TAMB by T = (DAMB - DCAL) x degrees per LSB 5. Add T to TCAL. Rev. C | Page 16 of 40 T = (880 - 983) x -0.291 = 30C TAMB = 25 + 30 = 55C AD7879/AD7889 MEDIAN AND AVERAGING FILTERS As explained in the Touch Screen Principles section, touch screens are composed of two resistive layers, normally placed over an LCD screen. Because these layers are in close proximity to the LCD screen, noise can be coupled from the screen onto these resistive layers, causing errors in the touch screen positional measurements. The AD7879/AD7889 contain a filtering block to process the data and discard the spurious noise before sending the information to the host. The purpose of this block is not only the suppression of noise; the on-chip filtering also greatly reduces the host processing loading. The processing function consists of two filters that are applied to the converted results: the median filter and the averaging filter. The median filter suppresses the isolated out-of-range noise and sets the number of measurements to be taken. These measurements are arranged in a temporary array, where the first value is the smallest measurement and the last value is the largest measurement. Bit 6 and Bit 5 in Control Register 2 (MED1, MED0) set the window of the median filter and, therefore, the number of measurements taken. Table 10. Median Averaging Filters (MAVF) Settings Setting M=A M>A M