MK712 Touch Screen Controller ICROCLOCK Description Features The MK712 Touch Screen Controller IC provides all the screen drive, A to D converter and control circuits to easily interface to 4-wire analog resistive touch screens. * Fully integrated, lowest power solution * Low standby current of 0.5A (typical) at 5.0V * Active current while converting less than 10 mA * Resolves 350 dots/inch on 10.5" display * Maximum speed of 197 points/second * Ratiometric conversion may eliminate screen calibration * Automatically wakes up and goes back to standby * 3.3V or 5V supply * 12 bit A/D converter * Simplifies the writing of software for touch screens * Extended temperature range available * Capacitors are the only external components required * Touch screen is directly driven - no external transistors are required * Programmable conversion rate * A to D Converter is monotonic * Parallel interface * See the MK715 for a serial interface The IC continually monitors the screen waiting for a touch. In this mode, the supply current is typically 0.5A. When the screen is touched, the IC performs analog to digital conversions to determine the location of the touch, stores the X and Y locations in the registers, and issues an interrupt. This process is repeated up to 197 times per second until no further screen touches are detected, at which time the low current mode is resumed. Block Diagram 8 D0-D7 A0-A2 3 CS RD WR CLKIN (14.318 MHz) INT TOUCH REGISTERS STATUS LOW STATUS HIGH X-LOW X-HIGH Y-LOW Y-HIGH CONTROL RATE 12 Bit A/D, Screen Driver and Controller 0 1 2 3 4 5 6 7 Pin Assignment XH XL YH YL NC INT TOUCH VDD VDD XH XL YH YL GND GND WR RD CS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 28 27 26 25 24 23 22 21 20 19 18 17 16 15 D0 D1 D2 D3 D4 D5 VDD GND D6 D7 CLKIN A0 A1 A2 1 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I ICROCLOCK MK712 Touch Screen Controller Pin Descriptions Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Name NC INT TOUCH VDD VDD XH XL YH YL GND GND WR RD CS A2 A1 A0 CLKIN D7 D6 GND VDD D5 D4 D3 D2 D1 D0 Type O O P P TS TS TS TS P P I I I I I I I I/O I/O P P I/O I/O I/O I/O I/O I/O Description No Connect Interrupt. Goes high to signal an interrupt. Cleared on next read. Touch signal. Goes low when screen is touched. Goes high when not touched. Connect to +5V or +3.3V.* Connect to +5V or +3.3V.* Connect to X-high on touch screen. (Right side) Connect to X-low on touch screen. (Left side) Connect to Y-high on touch screen. (Top) Connect to Y-low on touch screen. (Bottom) Connect to ground. Connect to ground. Write enable. Active low. Read enable. Active low. Chip select. Active low. Register address 2. Register address 1. Register address 0. Clock input. Typically 14.3 MHz. Best if driven by a MicroClock clock synthesizer. Data bit 7. Data bit 6. Connect to ground. Connect to +5V or +3.3V.* Data bit 5. Data bit 4. Data bit 3. Data bit 2. Data bit 1. Data bit 0. Key: I = Input, O = Output, I/O = Input and Output, P = Power, TS = Touch Screen pin.. *Note: All VDD's must be connected to the same voltage. Interrupts Interrupts are controlled by register 6 (see Register Description). The INT pin (pin 2) goes high to signal an interrupt. Interrupts are then cleared by reading any register. However, if the MK712 is in the process of generating an interrupt during a read cycle, then the interrupt is not cleared and INT will stay high. This internal process may take 100ns, and so to guarantee that the interrupt is cleared, two successive read cycles may be necessary. 2 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK IC Operation (Periodic Conversions Enabled) Power ON N Is Screen Touched? Y Write D4, D5 Reg 0 And D2, D3 Reg 1 To 1 Issue Interrupt (If Enabled) Convert Y Co-Ordinates Store Y Co-Ordinates In Reg 4 and Reg 5 Convert X Co-Ordinates Store X Co-Ordinates in Reg 2 and Reg 3 Write D7 Reg 0 To 1 Issue Interrupt (If Enabled) Y Is Screen Touched? N Write D4, D5 Reg 0 And D2, D3 Reg 1 To 0 Issue Interrupt (if Enabled) 3 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK Register Description The MK712 register set is designed to be compatible with the Gazelle pen digitizer registers allowing a software driver for the Gazelle digitizer to be used with the MicroClock MK712. The eight 8-bit registers are defined below: STATUS LOW (0 READ) 7 6 5 4 3 2 1 Y-HIGH (5 READ) 0 7 6 5 4 3 2 1 0 Always zero 1 = touch Always zero 1 = conversion complete, cleared on Y-HIGH read NOTE: When the screen is touched bits 4 and 5, register 0, and bits 2 and 3 of register 1 are all set to one. High order bits of Y co-ordinate Always zero CONTROL (6 R/W) 7 6 5 4 3 2 1 0 1 = enable interrupts 1 = interrupt on conversion complete ( if bit 0 = 1) 1 = interrupt on change in touch status (if bit 0 = 1) STATUS HIGH (1 READ) 7 6 5 4 3 2 1 0 Always zero 1 = touch Always zero 1 = interrupt on change in touch status (if bit 0 = 1) 1 = enable periodic conversions at rate indicated by RATE register 1 = read one point. Cleared when conversion complete. Only functions when bit 4 = 0 0 = powerdown (PD). Conversions, interrupts and TOUCH output disabled 1 = powerdown (PD). Conversions, interrupts and TOUCH output disabled. X-LOW (2 READ) 7 6 5 4 3 2 1 0 Low order bits of X co-ordinate NOTE: Bits 2 or 3 and bits 6 or 7 are logically OR'd. For example writing bit 2 or bit 3 to a one will enable interrupts on change in touch status. X-HIGH (3 READ) 7 6 5 4 3 2 1 0 High order bits of X co-ordinate Always zero RATE (7 R/W) 7 6 5 4 3 2 1 5 4 3 2 1 0 Count controls frequency of conversion when periodic conversions are enabled. See table on page 5. Y-LOW (4 READ) 7 6 0 Low order bits of Y co-ordinate 4 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK Rate Register (Register 7) Programming Count P.P.S. Count P.P.S. Count P.P.S. 0 to 8 Not Permitted 28 95 100 32 9 197 29 93 105 31 10 187 30 90 110 29 11 177 31 88 115 28 12 169 32 86 120 27 13 161 33 84 125 26 14 154 34 82 130 25 15 147 35 80 135 24 16 141 40 72 140 24 17 136 45 65 145 23 18 131 50 60 150 22 19 126 55 55 155 21 20 122 60 51 165 20 21 118 65 47 175 19 22 114 70 44 185 18 23 110 75 42 195 17 24 107 80 39 205 16 25 104 85 37 225 15 26 101 90 35 235 14 27 98 95 34 255 13 P.P.S. = Points Per Second. With a 14.318 MHz clock. Calculating Points Per Second The formula for determining P.P.S. is: P.P.S. = fin 35716 + (4096 x COUNT) Where fin is the frequency of the CLKIN input. Power-On Reset On application of power, an internal reset is generated that clears all bits in registers 0, 1, and 6. Register 7 is set to 32 giving a rate of 86 PPS. Note that clearing register 6 puts the IC into the power down condition. Initializing the MK712 The interrupt on the MK712 can only be cleared by reading a register or by writing register 6 to the power down condition. After a fault condition, initialize the MK712 by writing register 6 to zero and then writing register 6 to the desired value. This will always clear pending interrupts. 5 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK Recommended Circuit RD CS WR A0 - A2 D0 - D7 From Microprocessor CLKIN 14.318 MHz +3.3V or +5V 22F VDD VDD VDD 0.1F TOUCH INT To Power Management To Interrupt Controller XH X HIGH XL X LOW YH Y HIGH YL Y LOW To Touch Screen 0.1F GND GND GND 0.01F 0.01F 0.1F 0.1F Pen Bounce When the screen is untouched, the Y plate is driven high and the X plate is driven low. When the screen is touched, the X plate is pulled high, which is detected by the MK712. This initiates a conversion (as long as periodic conversions are enabled). Some de-bounce is provided by the time constant of the screen decoupling capacitors combined with the screen resistance. However, once conversions have started, pen bounce will not be detected until after both the X and Y points have been taken. If the pen is lifted during a conversion, this will also not be detected until the conversion is complete. This is typically indicated by a point with the correct Y coordinates, but minimum (for that screen) X coordinates. Screen Decoupling The component values suggested should give excellent results. However, for screens with a high resistance operating at a high conversion rate, extra interrupts may be issued. This is because the time constant of the screen decoupling capacitors and screen resistance is high, resulting in the screen appearing to be untouched and then touched between conversions. These extra interrupts can be eliminated by reducing the size of the screen decoupling capacitors on pins XH, XL, YH, and YL. This will, however, slightly reduce the noise rejection, which could decrease the accuracy of the conversion. 6 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK Optimizing Performance when Reading and Writing Registers Reading and writing the MK712 generates digital noise that may reduce the accuracy of the A to D converter. This noise has several causes, including board layout, data bus loading, and power supply voltage. By appropriately timing the register operations, the effects of this noise can be minimized. After an interrupt is issued, the MK712 allows a minimum of 1 millisecond to elapse before initiating the conversion cycle. This allows the screen drivers to settle. For best performance, complete all register operations within this 1ms window after an interrupt. Power Down/Stopping the Clock If the screen is untouched, the supply current is under 3A. If the input clock is stopped, the supply current is also less than 3A. When the screen is touched with no clock, TOUCH goes low and INT goes high, but no further operations occur until the clock starts. A to D conversions are invalid until after the clock has stabilized at the correct frequency and one full conversion cycle has been completed. Input Clock The MK712 is highly tolerant of different clock frequencies (from 12 to 20 MHz), rise times, and duty cycles. However, any input clock undershoot or overshoot will cause the MK712 to draw extra current. This can be eliminated by using a MicroClock clock synthesizer and properly terminating the clock driver. MicroClock makes low power clock synthesizers with 14.3 MHz power down. Resistive Touch Screen (4 Wire) Resistive touch screens consist of 2 resistive plates that are separated by a small gap. Each plate has an electrode at each end and when the screen is touched, the two plates are shorted together at that point. YH Y PLATE X PLATE Electrode XL XH YL If a voltage is applied, for example, between XL and XH, then a voltage divider is formed on the X PLATE. When the Y PLATE is touched to the X PLATE, a voltage will be developed on the Y PLATE that is proportional to distance of the touch from XL and XH. By accurately measuring this voltage, the position of the touch can be determined. 7 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK Recommended Method for Reading Points If the user is pressing lightly on the touch screen, it is likely that the screen contact will be intermittent. The screen will bounce, causing false points. This effect can be reduced by insuring that the screen is touched both before and after a conversion. By doing this, the first and last point in a series of points are discarded. The following algorithm checks that a point has valid touches both before and after a conversion, and it distinguishes between change-in-touch interrupts and conversion complete interrupts. Register 6 bits 0, 1, and 2 must all be true (logical 1) in order to use this method. Start Wait for Interrupt Interrupt Read Register 0 D7D5, store as D7D5(n) Read X and Y, store as point n Increment n No Is D7D5(n-1) = 11b and D7D5(n) =11b? Are this point and the previous point valid? (11b = binary 11) Yes Write point n-1 to display Write previous point. Warning - When Using a Switching Regulator Power Supply When using the MK712 in a system where the power is supplied by a switching regulator, do not perform screen conversions when the regulator is operating in the power saving mode. Some switching regulators feature a low power mode (for example, Linear Technology's "Burst Mode") where the output is turned on and off in order to save power. The extra power supply noise generated when using this mode causes spurious data points to be returned from the MK712, so it should be disabled when the MK712 is doing screen conversions. 8 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK Analog to Digital Converter Operation The 12-bit ADC converts X and Y co-ordinates at a rate determined by registers 6 and 7. The converter uses a ratiometric technique to give absolute co-ordinates on the screen, largely independent of variations in screen resistance, temperature or power supply voltage. The total voltage applied across the screen is defined as full-scale for the converter (i.e. 4095) and any point touched on the screen is proportional to this. For example, if the screen is touched exactly in the center, the converter will read 2047. This feature may allow for the elimination of calibration upon startup. However, the full scale voltage is defined at the IC pins and so any parasitic interconnect resistance will be included in full scale. In addition, the interconnect resistances on the screen also account for about 20% of the total resistance. This means that approximately the bottom 10% and top 10% of full scale are inaccessible. The converter is guaranteed to be monotonic, with no missing codes. BOARD AND WIRE INTERCONNECT XH SCREEN INTERCONNECT FULL SCALE (4095) MK712 YL SCREEN X CO-ORDINATE XL SCREEN INTERCONNECT BOARD AND WIRE INTERCONNECT 9 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I ICROCLOCK MK712 Touch Screen Controller Electrical Specifications Parameter Conditions Minimum Typical Maximum Units 7 VDD+0.5 70 260 150 V V C C C 5.5 V V V V V V V V V V mA mA A A A mA pF ABSOLUTE MAXIMUM RATINGS (note 1) Supply voltage, VDD Inputs and Clock Outputs Ambient Operating Temperature Soldering Temperature Storage temperature Referenced to GND Referenced to GND -0.5 0 Max of 20 seconds -65 DC CHARACTERISTICS Operating Voltage, VDD Input High Voltage, VIH Input Low Voltage, VIL Output High Voltage, VOH Output High Voltage, VOH Output Low Voltage, VOL Input High Voltage, VIH Input Low Voltage, VIL Output High Voltage, VOH Output Low Voltage, VOL Operating Supply Current, IDD, at VDD=5V Operating Supply Current, IDD, at VDD=3.3V Operating Supply Current, IDD standby, clock Operating Supply Current, IDD standby Operating Supply Current, IDD power down Short Circuit Current Input Capacitance VDD=5V VDD=5V IOH=-2mA VDD=5V, IOH=-12mA VDD=5V, IOL=12mA VDD=3.3V VDD=3.3V VDD=3.3V, IOH=-6mA VDD=3.3V, IOL=6mA 300 screen, 100 PPS note 4 note 5 note 6 PD=0 or PD=1, no clock Each output 3.0 2.0 0.8 VDD-0.4 2.4 0.4 1.9 0.4 2.4 0.4 5 3 0.5 0.5 0.2 50 7 3 3 3 AC CHARACTERISTICS Input Clock Frequency, pin 18 Input Clock Duty Cycle, pin 18 Output Rise Time Output Fall Time Resolution Non-linearity Touch Screen Resistance Note 2 at 1.5V 0.8 to 2.0V, VDD=5V 2.0 to 0.8V, VDD=5V 12 25 Monotonic, note 3 100 14.32 20 75 3 3 12 2 2000 MHz % ns ns bits LSB Notes: 1. Stresses beyond those listed under Absolute Maximum Ratings could cause permanent damage to the device. Prolonged exposure to levels above the operating limits but below the Absolute Maximums may affect device reliability. 2. Consult MicroClock about the best device to use to generate the input clock. 3. With no missing codes. 4. Assumes no 14.3MHz input clock overshoot, 300 screen, 100 PPS 5. Assumes no 14.3MHz input clock overshoot, no touch 6. With no touch, no clock 10 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK Register Interface Timing # Symbol Description Min Max Unit Note READ AND WRITE CYCLES 1 2 3 TRASC TRAHC TRCCY Address Setup to CS Low Address Hold from CS High CS High to CS Low 5 0 40 ns ns ns 10 40 0 40 ns ns ns ns ns ns ns ns READ CYCLE ONLY 4 5 6 7 8 9 10 11 TRSCR TRRD TRCHR1 TRCHR2 TRDC TRDR TRDHC TRDHR CS Low to RD Low RD Pulse Width RD High to CS High RD High to CS Low CS Low to Data RD Low to Data CS High to Data Release RD High to Data Release 2 2 35 35 20 20 1 1 WRITE CYCLE ONLY 12 13 14 15 16 17 18 19 20 TRCSW TRWR TRCHW TRWH TRWCY TRDW TRDHW TRDWC TRDHWC Notes: CS Low to WR Low WR Pulse Width WR High to CS High WR High to CS Low WR High to WR Low Data Setup to WR High Data Hold from WR High Data Setup to CS High Data Hold from CS High 10 40 0 40 40 15 15 15 15 ns ns ns ns ns ns ns ns ns 2 3 4 3 4 1. RD edges may precede or follow CS edges. 2. WR edges may precede or follow CS edges. 3. Either TRDW or TRDWC specification must be met. 4. Either TRDHW or TRDHWC specification must be met. 5. It is not permitted to have both RD and WR low at the same time. 11 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK Register Read A0 - A2 1 2 CS 3 RD 4 6 5 7 10 9 D0 - D7 8 11 Register Write A0 - A2 1 2 CS 3 WR 12 13 14 15 16 D0 - D7 17 19 18 20 12 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK 12 MK712 Power Supply Current vs. Touchscreen Resistance VDD=3.3V 10 8 IDD (mA) 6 4 197 points per second 147 points per second 86 points per second 13 points per second 2 0 100 1000 10000 Touchscreen Resistance () Graph 1 18 16 14 12 MK712 Power Supply Current vs. Touchscreen Resistance VDD=5V MK712 Power Supply Current vs. Touchscreen Resistance Vdd= 5 V IDD 10 (mA) 8 6 4 197 points per second 147 points per second 86 points per second 13 points per second 2 0 100 1000 Touchscreen Resistance () 10000 Graph 2 13 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK MK712 Power Supply Current vs. Conversion Rate Screen Resistance = 320 9 8 VDD=5V 7 IDD 6 (mA) 5 VDD=3.3V 4 3 2 1 0 0 50 100 150 200 Conversion Rate (Points Per Second) Graph 3 14 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK Suggested Layout 22F Pin 1 2 3 4 5 G V 0.1F 0.1F 0.01F 6 7 To Touch 8 9 Screen 0.01F 0.1F G 10 11 12 13 14 28 27 26 25 24 23 22 21 20 19 18 17 16 15 V G 0.1F G = connection to ground plane V = connection to VDD plane Notes: 1. The 14.318 MHz input clock on pin 18 should have a 33 series termination resistor at its source. Consult MicroClock for the best way to generate this clock. 2. All digital signals should be kept well away from pins 4, 5, 6, 7, 8, 9, 10, and 11, and any traces connected to those pins. 15 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I MK712 Touch Screen Controller ICROCLOCK 28 pin SOIC wide Package Outline and Package Dimensions E e H b Millimeters Min Max 2.3368 2.6416 0.356 0.483 0.229 0.305 17.678 18.085 7.366 7.620 10.008 10.643 1.27 BSC 0.406 0.076 0.279 28 pin SSOP (QSOP) h x 45 D Q Symbol A b c D E H e h Q Inches Min Max 0.092 0.104 0.014 0.019 0.009 0.012 0.696 0.712 0.290 0.300 0.394 0.419 .050 BSC 0.016 0.003 0.011 A c Ordering Information Symbol A b c D E H e h Q Part/Order Number Marking Package Temperature MK712S MK712STR MK712SI MK712SITR MK712R MK712RTR MK712RI MK712RITR MK712S MK712S MK712SI MK712SI MK712R MK712R MK712RI MK712RI 28 pin SOIC Add tape and reel 28 pin SOIC Add tape and reel 28 pin SSOP Add tape and reel 28 pin SSOP Add tape and reel 0 to +70C 0 to +70C -30 to +70C -30 to +70C 0 to +70C 0 to +70C -30 to +70C -30 to +70C Millimeters Min Max 1.55 1.73 0.203 0.305 0.190 0.254 9.780 10.160 3.810 4.064 5.840 6.223 0.635 BSC 0.410 0.127 0.254 While the information presented herein has been checked for both accuracy and reliability, Integrated Circuit Systems, Incorporated (ICS) assumes no responsibility for either its use or for the infringement of any patents or other rights of third parties, which would result from its use. No other circuits, patents, or licenses are implied. This product is intended for use in normal commercial applications. Any other applications such as those requiring special processing, high reliability, or other extraordinary environmental requirements are not recommended without additional processing by ICS. ICS reserves the right to change any circuitry or specifications without notice. ICS does not authorize or warrant any ICS product for use in life support devices or critical medical instruments. (c)1995 ICS/MicroClock 16 Revision 10089 Printed 4/7/00 Integrated Circuit Systems/MicroClock*525 Race St.*San Jose*CA*95126*(408)295-9800tel*www.icst.com MDS 712 I