logo资料库

FTS_AN_CTPM_Standard(FTS_AN_CTPM_Standard_eng).pdf

第1页 / 共28页
第2页 / 共28页
第3页 / 共28页
第4页 / 共28页
第5页 / 共28页
第6页 / 共28页
第7页 / 共28页
第8页 / 共28页
资料共28页,剩余部分请下载后查看
Confidential Application Note for CTPM Touch panel [Document ref] 0.8 18 Aug 2010 Xiaoxu Du Confidential [Distribution list] Application Note for CTPM Project name Document ref Version Release date Owner Classification Distribution List Approval This document contains information proprietary to FocalTech Systems, Ltd., and may not be reproduced, disclosed or used in whole or part without the express written permission of FocalTech Systems, Ltd. Copyright © 2010, FocalTech Systems, Ltd All rights reserved R3-B4-A, South Area, Shenzhen Hi-Tech Industrial Park, Shenzhen, Gungdong, P.R. China ZIP :518057 T +86 755 26588222 F +86 755 26712499 E support@focaltech-systems.com www.focaltech-systems.com Confidential
CTPM Application Note Revision History Date 18 Jan, 2010 17 Mar,2010 22 Mar,2010 26 Mar,2010 08 May,2010 07 Jul, 2010 18 Aug, 2010 22 Dec, 2010 Version List of changes 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Initial draft Add raw data protocol Add system information protocol Add calibration related parameters Add information to operating mode Change Protocol and add information Modified to release version Modify explanation for register 0xA4 Author + Signature Xiaoxu Du Xiaoxu Du Xiaoxu Du Xiaoxu Du Xinming Wang Yunfeng Yuan Xiaoxu Du Xiaoxu Du FocalTech Systems, Ltd. ii Confidential
CTPM Application Note Table of Contents I2C Interface .................................................................................................................................... 2  1  1.1  CTPM interface to Host .................................................................................................................. 2  I2C Read/Write Interface description .............................................................................................. 2  1.2  1.3  Interrupt signal from CTPM to Host ............................................................................................... 3  1.4  Wakeup signal from Host to CTPM ................................................................................................ 4  2  CTP Register Mapping .................................................................................................................... 4  2.1  Operating Mode .............................................................................................................................. 4  2.1.1  DEVICE_MODE ................................................................................................................... 7  2.1.2  GEST_ID ............................................................................................................................... 7  TD_STATUS .......................................................................................................................... 8  2.1.3  TOUCHn_XH (n:1-5) ............................................................................................................ 8  2.1.4  2.1.5  TOUCHn_XL (n:1-5) ............................................................................................................. 8  TOUCHn_YH (n:1-5) ............................................................................................................ 9  2.1.6  TOUCHn_YL (n:1-5) ............................................................................................................. 9  2.1.7  2.1.8  ID_G_THGROUP ................................................................................................................. 9  ID_G_THPEAK ..................................................................................................................... 9  2.1.9  ID_G_ THCAL ....................................................................................................................... 9  2.1.10  ID_G_ THWATER ................................................................................................................. 9  2.1.11  2.1.12  ID_G_ THTEMP ................................................................................................................... 9  ID_G_ THDIFF ................................................................................................................... 10  2.1.13  ID_G_ CTRL ....................................................................................................................... 10  2.1.14  2.1.15  ID_G_ TIMEENTERMONITOR .......................................................................................... 10  ID_G_ PERIODACTIVE ..................................................................................................... 10  2.1.16  ID_G_ PERIODMONITOR ................................................................................................. 10  2.1.17  ID_G_ AUTO_CLB_MODE ................................................................................................ 10  2.1.18  2.1.19  ID_G_ LIB_VERSION_H .................................................................................................... 11  ID_G_ LIB_VERSION_L ..................................................................................................... 11  2.1.20  ID_G_ CIPHER ................................................................................................................... 11  2.1.21  2.1.22  ID_G_ MODE ..................................................................................................................... 11  ID_G_ PMODE ................................................................................................................... 11  2.1.23  ID_G_ FIRMWARE_ID ....................................................................................................... 11  2.1.24  2.1.25  ID_G_ STATE ...................................................................................................................... 11  ID_G_ FT5201ID ................................................................................................................ 12  2.1.26  ID_G_ ERR .......................................................................................................................... 12  2.1.27  2.1.28  ID_G_ CLB .......................................................................................................................... 12  2.2  Test Mode ..................................................................................................................................... 12  2.2.1  DEVICE_MODE ................................................................................................................. 14  ROW_ADDR ........................................................................................................................ 14  2.2.2  2.2.3  ROWDATAN_H ................................................................................................................... 14  ROWDATAN_L .................................................................................................................... 15  2.2.4  2.3  System information Mode ............................................................................................................. 16  2.3.1  DEVICE_MODE ................................................................................................................. 17  2.3.2  BIST_COMM ....................................................................................................................... 17  FocalTech Systems, Ltd. iii Confidential
CTPM Application Note 2.3.3  BIST_STAT .......................................................................................................................... 17  BL_VERH ............................................................................................................................ 17  2.3.4  BL_VERL ............................................................................................................................. 18  2.3.5  FTS_IC_VERH .................................................................................................................... 18  2.3.6  FTS_IC_VERL ..................................................................................................................... 18  2.3.7  APP_IDH ............................................................................................................................. 18  2.3.8  2.3.9  APP_IDL ............................................................................................................................. 18  2.3.10  APP_VERH ......................................................................................................................... 19  2.3.11  APP_VERL .......................................................................................................................... 19  2.3.12  CID_n(n:0-4) ....................................................................................................................... 19  3  CTPM Application Introduction ................................................................................................... 20  3.1  Standard Application information of FT5X06 .............................................................................. 20  Standard application circuit of FT5206GE1 ....................................................................... 20  Standard application circuit of FT5306DE4 ....................................................................... 21  Standard application circuit of FT5206EE8 ....................................................................... 22  Communication between host and CTPM .................................................................................... 22  4  4.1  Communication Contents .............................................................................................................. 22  4.2  I2C Example Code ........................................................................................................................ 23  3.1.1  3.1.2  3.1.3  FocalTech Systems, Ltd. iv Confidential
CTPM Application Note Terminology CTP – Capacitive touch panel CTPM – Capacitive touch panel module FocalTech Systems, Ltd. 1 Confidential
CTPM Application Note 1 I2C Interface 1.1 CTPM interface to Host Figure 1-1 shows how CTPM communicates with the Host,there are three kind of communication between CTPM and Host,we will introduce each communication in this section. Transfer the data via I2C Send interrupt when there is a valid touch Host send Wakeup signal to CTPM CTP TX RX CTP Controller MCU Serial Interface /INT /WAKE Host Figure 1-1 CTPM and Host connection The Power Supply voltage of CTPM is 2.8V~3.3V, interface supply voltage is 2.8V~3.3V. There are Control Interface and Data Interface. As the control interface. For the detail, please refer to Table 1-1. Figure 1-1 demonstrates, Serial interface is the data interface, /INT and /WAKE are Table 1-1 Description for TP module and Host interface Port Name Serial interface Voltage 2.8~3.3V Polar LOW LOW 2.8~3.3V 2.8~3.3V /INT /WAKE* 1.2 I2C Read/Write Interface description Write N bytes to I2C slave Description Serial interface is for data transfer between Host and CTPM. CTPM support both I2C and SPI interface The interrupt from the CTPM to the Host Wakeup signal from host to the CTPM D 0 A P A C K S T O P Slave Addr A A A 1 4 5 A 3 A 2 A 0 R W A R 7 Data Address[X] R R 1 6 R 5 R 4 R 3 R 2 W R I T E A C K S A 6 S T A R T R 0 A D 7 D 6 Data [X] D D D 2 4 5 D 3 D 1 D 0 A … D 7 A C K A C K Data [X+N-1] D D D 1 5 6 D 4 D 3 D 2 Set Data Address FocalTech Systems, Ltd. 2 Confidential
CTPM Application Note S A 6 S T A R T Slave Addr A A A 1 4 5 A 3 A 2 A 0 R W A R 7 W R I T E A C K Read X bytes from I2C Slave Data Address[X] R R 1 6 R 5 R 2 R 4 R 3 R 0 A P A C K S T O P Slave Addr A A A 1 4 5 A 3 A 2 A 0 R W A D 7 D 6 Data [N] D D D 2 4 5 D 3 D 1 D 0 A … D 7 R e a d A C K A C K S A 6 S T A R T Data [X+N-1] D D D 1 5 6 D 4 D 3 D 2 D 0 A P A C K S T O P 1.3 Interrupt signal from CTPM to Host As for standard CTPM, host need to use both interrupt control signal and serial data interface to get the touch data. There are two kind of method to use interrupt: interrupt trigger and interrupt query. Here is the timing to get touch data. Touch Start Touch End /INT Serial Data /INT Serial Data Blank Data Packet 0 Data Packet 1 …… Data Packet N Blank Figure 1-2 Interrupt query mode Touch Start Touch End Blank Data Packet 0 Data Packet 1 …… Data Packet N Blank Figure 1-3 Interrupt trigger mode Host use general I2C protocol to read the touch data or the information from CTPM . CTPM will send host a interrupt signal when there is a valid touch. Then host can use the serial data interface to get the touch data. If there is no valid touch detected, the /INT will not be pulled up, the host do not need to read the touch data. NOTE: “valid touch” may have different definition in various systems. For example, in some systems, the valid touch is defined as there is one more valid touch point. But in some other systems, the valid touch is defined as one more valid touch with valid gestures. In usual, /INT will be pulled up when there is a valid touch point, and to be low when a touch finishes. As for interrupt trigger mode, /INT signal will be low if there is a touch detected. But for per update of valid touch data, CTPM will produce a valid pulse for /INT signal, host can read the touch data periodically according to the frequency of this pulse. In this mode, the pulse frequency is the touch data update frequency. FocalTech Systems, Ltd. 3 Confidential
CTPM Application Note . 1.4 Wakeup signal from Host to CTPM Host can use the Wakeup Signal to wakeup the I2C slave device. This pin should be connected to GND when flash programming while in normal running mode it should not be connected to GND. 2 CTP Register Mapping This chapter describes the standard FTS Capacitive Touch Panel products communication registers in address order for each device mode. The most detailed descriptions of the Standard Products communication registers are in the Register Definitions section of each chapter. The device modes are listed in the table below, along with each mode’s register prefix. Prefix Device Mode Op Operating Te Test System Information Sy Val 000b 100b 001b Description Read touch point and gesture Read raw data Read system information related Reserved 2.1 Operating Mode In this mode the CTP is fully functional as a touch screen controller. Read and write access address is just logical address which is not enforced by hardware or firmware. Here is the operating mode register map. Operating Mode Register Map Address Name Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0 Host Op,00h DEVIDE_MODE Op,01h GEST_ID Op,02h TD_STATUS Op,03h TOUCH1_XH Op,04h Op,05h TOUCH1_XL TOUCH1_YH TOUCH1_YL TOUCH2_XH Op,06h Op,07h Op,08h Op,09h FocalTech Systems, Ltd. Device Mode[2:0] Gesture ID[7:0] 1stEvent Flag 1st Touch X Position[7:0] 1st Touch ID[3:0] 1st Touch Y Position[7:0] 2ndEvent Number of touch points[3:0] 1st Touch X Position[11:8] 1st Touch Y Position[11:8] 2ndTouch 4 Confidential Access RW R R R R R R R
分享到:
收藏