ti触摸屏控制芯片使用技巧
TFT触摸屏使用说明

2一、.4寸TFT 触摸屏使用说明要正确使用TFT 触摸屏,需要借助相应的单片机实验板,这里,以顶顶电子开发板DD-900实验开发板为例进行介绍,值得庆幸的是,DD-900上设有3V 电压输出端,因此,可以方便地为TFT 触摸屏供电。
TFT 触摸屏模块介绍随着TFT 触摸屏价格的不断下降,其应用也越来越广泛,学习TFT 触摸屏现已成为一种时尚,以前,很多人只有在ARM 单片机中才能看到TFT 触摸屏的风采,现在,随着51单片机性能的提高,51单片机也能玩TFT 触摸屏了,这里,我们介绍的是一款2.4寸TFT 触摸屏模块,其正面与反面外形如图所示:这款触摸屏模块主要具备如下特点:1.2.4寸320*240 ,65K/262K 色;2.屏带PCB 板, PCB 板设有2.4寸液晶屏、SD 卡座、触摸屏控制芯片ADS7843,通过40脚插针将屏、卡座和触摸芯片功能引脚,引脚间距为2.54mm ,采用杜邦线可十分方便地与单片机进行连接。
PCB 引出脚排列及功能如图所示:3.屏设置为8位,用户也可根据实际情况设置为16位。
4.控制IC 为ILI9325。
二、供电及连接说明DD-900实验开发板采用的是5V 供电,因此,单片机应采用5V 单片机,如STC89C516RD+、STC12C5A60S2等,晶振采用30M ,注意TFT 要采用3V 供电,否则有可能烧屏,TFT 与单片机连接时可加限流电阻,电阻大小为470欧左右,也可以不加,但单片机不可设置为推挽模式,各引脚连接如下: TFT 触摸屏 DD-900实验开发板 说明 GND GND 屏与背光供电VCC 3V LED+ 3V DB8~DB15 P00~P07 液晶屏部分DB0~DB7不连接(这里采用是8位方式,不用连接)RS P26 WR P25 RD P24 CS P27 RES P23 D_CLK P21 触摸控制部分D_CS P20 D_DIN P22 D_BUSY P34 D_DOUT P33 D_Penirq (中断) P35 SD_OUT 根据程序进行定义 SD 卡座部分(前两个实验,此部分未采用) SD_SCK 根据程序进行定义SD_DIN根据程序进行定义SD_CS 根据程序进行定义注意:在TFT 的PCB 板上标有TFT 的引脚功能,一定要认清管脚与标注的对应关系。
ITT Burny 数控系统操作说明说

BURNY 10 LCD PLUS
操作手册
AO-70247-0
This information is subject to the controls of the Export Administration Regulations [EAR]. This information shall not be provided to non-U.S. persons or transferred by any means to any location outside the United States contrary to the requirements of the EAR.
informationshallnonuspersonsanymeansanylocationoutsideunitedstatescontraryearpage10存取部件程序建立部件程序及板材测试执行切割部件setupjogcutjobjogplate编辑编辑现存部件程序客定图形或ascii文件写新部件程序下载选择来源设备选择文档选择部件程序选择目的地目录抄寫文件至burny10带有转移部件程序储存选择目的地设备选择来源目录文件种类选择文件选择目的地文檔根据目的地设备选择转移密码部件程序作业建立作业表上放置部件程序作业表上考验及更改部件程序内容由作业表上移除作业图形由50标淮普通图形之一建立部件程序由客定普通图形建立部件程序公用程式考验控制参数数值改变控制参数数值由调整控制参数建立机器删除由部件程序asciiauxcad配置或客定图形目录删除文件由软盘内删除文件当切割中不能执行ao702470revbaburny10lcdplus
4.1 部件程序和工作文件 9
4.2 模式详述
9
触摸屏控制方法,个人总结(欢迎拍砖,但不要打脸)

第二种是软件滤波,程序读取了 10 次触摸屏的物理坐标,然后冒泡排序,最后去掉最前面的和最后面的,只保留中间 3 个,再对
xl = (xp-xpmin)*LCDXSIZE/(xpmax-xpmin) yl = (yp-ypmin)*LCDYSIZE/(ypmax-ypmin) 定位:
这里定位的作用是求处上面的 xpmin,xpmax,ypmin 和 ypmax,方法就是在屏幕上知道 2 点,求这两点所在直线上的一点(而且知 在屏上分别画出 4 个点,其实 3 个点足以,但是一般都用 4 个点,取得这四个点的物理坐标。假设分别为: | --x1,y1-------------------x2,y2---| --x标为 cx1,cy1 利用比例关系 可以求出 xpmin,同样用比例关系 cx2,cy2, cx3,cy3 x1/(cx1-xpmin) x2/(cx2-xpmin) = | cx4,cy4 = x2/(cx2-xpmin) | |
u16 Touch_AdjX(u16 ady) //320 { u16 sy=0; int r = ady - TouchXMin; r *= 320; sy=r/(TouchXMax - TouchXMin); if (sy>=320) return 0xFFFF;
C 文件:: #include "Touch.h" #include "systick.h" #include "Graphics.h"
vu16 TouchX, TouchY; vu8 TouchPress=0, TouchState=TOUCH_NONE; //state 有 4 种状态,0 无按键,1 按下,2 抬起,3move u8 TouchCalibrated = 0; u16 TouchXMin, TouchXMax, TouchYMin, TouchYMax; /******************************** 初始化触摸屏需要的端口 芯片--TSC2046 ********************************/ void Touch_Init(void) { GPIO_InitTypeDef GPIO_InitStructure; //EXTI_InitTypeDef EXTI_InitStructure; //NVIC_InitTypeDef NVIC_InitStructure; //SPI_InitTypeDef SPI_InitStructure;
PIC单片机控制触摸屏心得

PIC单片机控制触摸屏一、触摸屏基本原理:触摸屏并非液晶显示屏,而是显示屏前面的透明薄膜。
它有三层构成:X电极层、Y电极层、中间隔离层。
两电极层平常是相互绝缘的,当手指触摸屏幕时,平常相互绝缘的两层导电层就在触摸点位置有了一个接触,因其中一面导电层接通Y轴方向的5V均匀电压场,使得侦测层的电压由零变为非零,控制器侦测到这个接通后,进行A/D转换,并将得到的电压值与5V相比即可得触摸点的Y轴坐标,同理得出X轴的坐标,这就是所有电阻技术触摸屏共同的最基本原理。
二、PIC单片机pic16f77简介:1、我所使用的是40脚封装的芯片。
管脚如下图:I/O口的方向有TRISX寄存器设置。
0是输出1是输入,若为输出,则PORTX寄存器和RXw位可以控制引脚的高低电平。
2、AD转换模块:AD转换模块有三个寄存器:ADCON0、ADCON1、ADRES。
AD转换的步骤:其中第4步中需要等待的采集时间有时不能按照文档中所说的16us左右。
如果单纯的用一路AD通道,则16us的采集时间是可以的。
但是若涉及到多通道之间的相互转换后,这个时间就不能保证采集的信号是正确的,应该延长采集时间。
我看到网上有人说用1ms 的延时,具体延时应根据实际情况测量一下。
AD转换结果位于ADRES寄存器中,8位。
3、通用串口USART:建议大家调试程序的时候多用一下USART,太好用了。
下面是有关寄存器:TXREG :发送缓冲器,RCREG :接收缓冲器。
4、中断:下面是与中断有关的寄存器:中断编程需要注意的问题:PIC单片机的编程软件是MPLAB,它只有一个中断函数,并且有interrupt关键字。
多个中断同时使能时,需要在中断函数里判断中断标志位,来判断是哪个外设发生了中断。
三、控制电路:程序设计:(1)、检测是否有触控操作:首先使T1、T3导通,T2、T4截止,AD转换ADY 的电压值,若为0或某一范围内,则认为没有触控操作,否则有触控操作。
ITT GMD机组带触摸屏的参数设置方法

供水机组HMI操作说明监控主画面显示机组设定状态显示设定的主泵的数量和有无辅泵当泵在运行时会闪烁,有故障或检修状态时为黄色。
设定压力,显示机组设定的工作压力,单位BAR。
显示机组出口实际水压。
显示变频、机组状态。
点击进入用户登录界面点击进入输入用户名:“8”。
点击设定用户密码“88888888”,设定完成点击密码:输入8个8,完成确定。
“”。
密码正确点击,进入机组参数设定界面:按上图所示,设定系统所需压力、主泵数量、压力传感器量程。
点击进入PID参数设定界面。
点击可将PID设定成手动或自动/正常为自动。
上面参数为PID的比例,积分时间,微分时间三个参数。
正常按系统初始值设定,可微小调整。
按界面显示设定其他参数,正常不需要调整。
点击进入水泵控制界面加载,变频运行的水泵运行到加泵频率之上,压力仍然小于系统设定压力减去加泵偏差加泵延时,上述条件满足后,经过加泵延时时间后,系统进行加泵操作。
减载,同上原理。
用户可能调整参数1,变频状态加载延时当变频泵升到49HZ且压力低于设定压力时,延时设定的时间后将变频泵变为工频运行,未运行的泵变为变频。
2,变频状态减载延时当变频泵的频率降到35HZ时,压力高于设定值,延时时间到后,将停止工频泵,先启先停的原理。
需要有变频工作变为工频运动的水泵启动的延时时间,单位秒。
未运行的水泵由停止变为变频运行的延时时间,单位为秒。
可设定系统是否允许机组进入休眠。
进入休眠条件:1,已启用休眠功能2,变频运行频率<3,机组实际压力>机组设定压力-休眠压力偏差4,机组只有1台泵正在变频运行,无工频运行。
5,以上4条同时满足且满足实际时间大于“进入休眠延时”休眠唤醒条件,1,机组实际压力<机组设定压力2,条件1满足且满足时间>休眠唤醒延时时间休眠瞬间唤醒条件,机组实际压力<机组设定压力+瞬时唤醒偏差。
其他参数界面,显示个水泵状态及故障复位。
点击按钮可切换水泵状态,工作或检修,当水泵的状态为检修时,其不参与机组自动控制。
TI StellarisWare图形库使用指南

TI StellarisWare图形库使用指南[V1.0][作者: Richard Ma][Email: mxschina@]1.前言 (1)2.基础知识 (2)2.1.显示驱动层 (Display Driver Layer) (2)2.1.1.基本功能 (2)2.1.2.图形输出驱动 (3)2.1.3.用户输入驱动 (3)2.2.基本图形层 (Graphics Primitives Layer) (4)2.3.控件层 (Widget Layer) (4)3.StellarisWare图形库基本使用 (6)3.1.开发环境及StellarisWare安装 (6)3.2.图形库添加与编译 (显示部分) (7)3.2.1. 建立新项目 (7)3.2.2. 添加图形库 (8)3.2.3. 驱动程序初始化 (10)3.3.图形库添加与编译 (触摸部分) (10)4.基本图形绘制 (12)4.1. 绘图上下文 (tContext) (12)4.2. 颜色设置 (12)4.3. 绘制基本图形 (13)4.4. 绘制文字 (14)4.5. 绘制图片 (16)4.5.1. 图片表示方式 (16)TI StellarisWare图形库使用指南 Richard Ma4.5.2. 图片生成工具 (17)5.控件使用 (19)5.1. 控件使用示例代码 (19)5.2. 控件使用步骤说明 (23)5.2.1. 配置显示及用户输入 (24)5.2.2. 创建控件及属性配置 (24)1)控件名 (25)2)控件管理–控件树 (25)3)显示设备对象(pDisplay) (27)4)位置和尺寸 (27)5)控件风格(Style)及其它属性 (27)6)事件响应 (27)5.2.3.控件添加绘制及管理 (28)6.各控件功能及属性 (29)6.1. 画布控件(Canvas) (29)6.2. 选择/多选框控件(Checkbox) (33)6.3. 容器控件(Container) (36)6.4. 图形按钮控件(Image Button) (39)6.5. 列表框控件(ListBox) (43)6.6. 按钮控件(Push Button) (46)6.7. 单选按钮控件(Radio Button) (51)6.8. 拖滑/进度条控件 (Slider) (54)1.前言TI Stellaris系列Cortex-M3/Cortex-M4F系列MCU的方便强大,StellarisWare软件库提供的快速软件开发解决方案功不可没。
Veriti操作说明 2

Veriti PCR仪简明操作说明Applied Biosystems触摸屏常用按键说明:操作步骤:1、打开PCR仪的热盖,插入样品管。
盖好热盖。
2、打开PCR仪的电源,仪器程序开始初始化,需等待几分钟。
3、初始化完成后,显示主菜单:4、点“Browse/New Methods”,进入PCR程序列表:5、可以直接点一个PCR程序,选择“Start Run”运行;点右边的符号,可以选择不同的文件夹。
如要新建一个PCR程序,点“New”,出现PCR程序:6、添加一段程序:点中上方的“Stage”位置,该位置变红;再点“Add”,软件将加入一段新的程序。
7、修改循环数、温度、时间:点中循环次数、温度或时间位置,下方出现数字键。
依次点数字键,出现合适数字后,点“Done”确定。
8、增加一个步骤:点“Step”位置,该位置变红;再点“Add”,软件将加入一个新的步骤。
9、删除一个步骤:点“Step”位置,在点“Delete”,软件将该步骤删除。
10、建立梯度模式:1)点中一个步骤,再点“Option”键,出现选项如下2)点“VeriFlex step”,出现梯度创建窗口:输入6个梯度温度,温度下方的“1-2”是指对应的1、2两行加热孔,全部输好后,点“Done”确定。
注意:相邻的两个梯度温度之差最大不能超过5℃!11、建立渐变模式:1)点中一个步骤,再点“Option”键,出现选项如下2)点“Auto Delta”,出现渐变模式创建窗口。
点“Staring Cycle”,输入起始循环数;点“Delta Temperature”,输入温度变化值;点“Delta Time”,输入时间变化值。
渐变模式适用于touchdown PCR,可以提高PCR反应的特异性。
例:输入起始循环数为2,温度变化值为+0.5℃,时间变化值为+5s,则表示从第2个循环开始,每循环一次升温0.5℃,时间增加5s。
12、增加暂停步骤:1)点中一个步骤,再点“Option”键,出现选项如下3)点“Pause”,出现如下窗口。
触摸屏控制芯片ADS7843中文资料

触摸屏控制芯片ADS7843中文资料当触笔触到屏上时,对应的位置就会产生相应大小的电压,输入到芯片,AD 转换后得到一个数据。
而触摸校准就是将接受到的原始模数转换值转换成屏幕像素坐标。
再就是了解触摸芯片,知道他的工作方式,以及跟STM32的连线。
触摸实验中,我的实验板是用SPI口来实现数据的传输的,即SPI与xpt2046相连。
触摸屏控制芯片ADS7843中文资料ADS7843是一个内置12位模数转换、低导通电阻模拟开关的串行接口芯片。
供电电压2.7~5 V,参考电压VREF为1 V~+VCC,转换电压的输入范围为0~ VREF,最高转换速率为125 kHz。
ADS7843引脚图及引脚功能说明了:ADS7843的引脚配置如图3所示。
表1为引脚功能说明,图4为典型应用。
ADS7843典型应用电路ADS7843之所以能实现对触摸屏的控制,是因为其内部结构很容易实现电极电压的切换,并能进行快速A/D转换。
图5所示为其内部结构,A2~A0和SER/为控制寄存器中的控制位,用来进行开关切换和参考电压的选择。
ADS7843之所以能实现对触摸屏的控制,是因为其内部结构很容易实现电极电压的切换,并能进行快速A/D转换。
图5所示为其内部结构,A2~A0和SER/为控制寄存器中的控制位,用来进行开关切换和参考电压的选择。
2.3 ADS7843的控制字及数据传输格式ADS7843的控制字如表4所列,其中S为数据传输起始标志位,该位必为"1"。
A2~A0进行通道选择(见表2和3)。
MODE用来选择A/D转换的精度,"1"选择8位,"0"选择12位。
SER/选择参考电压的输入模式(见表2和3)。
PD1、PD0选择省电模式:"00"省电模式允许,在两次A/D转换之间掉电,且中断允许;"01"同"00",只是不允许中断;"10"保留;"11"禁止省电模式。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
TOUCH SCREEN CONTROLLER TIPSBy Skip Osgood, CK Ong, and Rick DownsBurr-Brown makes a number of specialized analog-to-digi-tal converters for touch screen applications. The ADS7843,ADS7845, and the new ADS7846 converters all are de-signed for specific touch screen applications. Applications using these devices can benefit greatly from the tips pre-sented in this application bulletin. Most of the examples discuss the ADS7843, but the techniques shown are appli-cable to all of the devices.We begin by looking at the theory of operation of a resistive touch screen, and using these specialized A/D converters with such a screen. Techniques are presented for improving accuracy and minimizing errors; the operation of the pen interrupt line (PENIRQ) is explored, ESD protection meth-ods for the converters, and issues surrounding interfacing these converters to popular microprocessors are discussed.RESISTIVE TOUCH SCREENSA resistive touch screen works by applying a voltage across a resistor network and measuring the change in resistance at a given point on the matrix where a screen is touched by an input stylus, pen, or finger. The change in the resistance ratio marks the location on the touch screen.The two most popular resistive architectures use 4-wire or 5-wire configurations (as shown in Figure 1). The circuits determine location in two coordinate pair dimensions, al-though a third dimension can be added for measuring pres-sure in 4-wire configurations.THE 4-WIRE TOUCH SCREEN COORDINATE PAIR MEASUREMENTA 4-wire touch screen is constructed as shown in Figure 2.It consists of two transparent resistive layers.The 4-wire touch screen panel works by applying a voltage across the vertical or horizontal resistive network. The A/D converts the voltage measured at the point the panel is touched. A measurement of the Y position of the pointing device is made by connecting the X+ input to a data converter chip, turning on the Y+ and Y– drivers, and digitizing the voltage seen at the X+ input. The voltageFIGURE 1. 4-Wire and 5-Wire Touch Screen Circuits.Four-Wire Five-WireFIGURE 2. 4-Wire Touch Screen Construction.measured is determined by the voltage divider developed at the point of touch. For this measurement, the horizontal panel resistance in the X+ lead doesn’t affect the conversion due to the high input impedance of the A/D converter. Voltage is then applied to the other axis, and the A/D converts the voltage representing the X position on the screen through the Y+ input. This provides the X and Y coordinates to the associated processor.THE 5-WIRE TOUCH SCREEN COORDINATEPAIR MEASUREMENTA 5-wire touch screen is constructed as shown in Figure 3. The resistive panel consists of one transparent resistive layer and a top metal contact area separated by insulating spacers. The 5-wire touch screen panel works by applying a voltage at the corners of the bottom resistive layer and measuring the vertical or horizontal resistive network with the wiper, or 5th wire. The A/D converts the voltage measured at the wiper point the panel is touched. A measurement of the Y position of the pointing device is made by connecting the upper left and upper right corners of the resistive layer to V+ and the lower left and lower right corners to ground. This biases the panel for a vertical deflection input to the data converter chip, and is measured by the A/D converter through the wiper touch point to the panel. The voltage measured is determined by the voltage divider developed at the point of touch. For the horizontal measurement, the upper left corner and lower left corner are connected to ground and the upper right and lower right corners are connected to V+ through the drivers and the wiper input is converted representing the horizontal deflection of the panel.DIFFERENTIAL vs SINGLE-ENDED MODEThe accuracy and reliability of conversions depend upon the ability of the converter to compensate for continuously varying operating conditions. These changing conditions have an effect on the voltages representing the X and Y coordinates. For example, if the A/D converter is configured for an absolute voltage reading (single-ended mode), changes in driver voltage drops will cause a misinterpreted input reading. However, if the A/D converter is configured in a ratiometric, or differential, mode, these errors can be virtu-ally eliminated.TOUCH SCREEN SETTLING TIMEWhen the touch panel is pressed or touched, there are two mechanisms that will affect the voltage level at the contact point of the touch panel. These two mechanisms will cause the voltage across the touch panel to “ring” (oscillate), and then slowly settle (decay) down to a stable DC value. The two mechanisms are:1)Mechanical bouncing caused by vibration of the top layersheet of the touch panel when the panel is pressed.2)Electrical ringing due to parasitic capacitance betweenthe top and bottom layer sheets of the touch panel and at the input of ADS7843 that causes the voltage to “ring”(oscillate).Single-Ended ModeIn single-ended mode, when a touch on the touch panel is detected, the processor that controls the ADS7843 will send a control byte to instruct the ADS7843 to perform a conver-sion. The ADS7843 then begins supplying voltage through the internal FET switches to the panel at the beginning of the acquisition period causing the voltage at the pressed point to rise. This rising voltage will “ring” as described above for a period of time before it finally settles to a stable voltage. After the acquisition period, all internal FET switches will turn off and the A/D converter will go into a conversion period. If the next control byte does not come during the current conversion period, the ADS7843 will go into power down or wait for the next instruction. With large capacitance across the panel, typically for filtering noise, caution should be exercised to insure that the corresponding input voltage for the X-position or Y-position coordinate pair has settled. In the single-ended mode, the input voltage must be settled during the last three clock cycles of the Data In word, or errors will occur.Differential ModeThe operation of differential mode is similar to single-ended mode except that the internal FET switches will continue to be ON from the start of the acquisition period to the end of the conversion period. The voltage across the panel will also become the reference voltage to the A/D converter, provid-ing a ratiometric operation. This means that if the voltage across the panel varies because of power supply changes, changes in the driver impedance with supply changes or temperature, or variations in the touch panel resistance with temperature these changes will be compensated for by the ratiometric operation of the A/D Converter.FIGURE 3. 5-Wire Touch Screen Construction.However, if the selected channel of the next control byte to the ADS7843 is the same as the previous control byte and it comes during the current conversion period, the switches will not turn OFF after completing the current conversion. This will allow the input voltage to have a longer settling time and the settled voltage can be captured by the next control byte.Difference Between Differential Mode andSingle-Ended ModeIn both single-ended and differential modes, the ADS7843 acquires (samples) the input analog voltage from the touch panel for only three clock cycles (shown as t ACQ in Figure 4). Hence, the input voltage has to settle within t ACQ in order for the ADS7843 to capture the correct voltage.FIGURE 4. Timing Diagram of Differential and Single-ended Mode Operation for ADS7843.Turning the drivers on causes the touch panel’s voltage to rise rapidly, then settle to the final value, as shown in Figure 4. In order to acquire the correct value for conversion, the acquisi-tion must be complete when the touch panel has completely settled. There are two ways of accomplishing this.One method is shown in Figure 4 (a), using the ADS7843 in single-ended mode, and using a relatively slow clock. A slow clock extends the acquisition time, since it extends the three clock periods for acquisition. The drivers turn on at the beginning of the first of these three clock periods, and the panel must then settle completely during the following two clock cycles, so that at the end of the third clock cycle, the acquired voltage is accurate.The second method, shown in Figure 4 (b), uses the differen-tial mode and a much faster clock rate. Control Byte B turns the drivers on, and as before, the touch panel’s voltage rises rapidly, and begins to settle. In this case, a conversion is done, and then a second conversion is begun, by send Control Byte C. If Control Bytes B and C are the same, the internal X/Y switch of the ADS7843 will not turn off after completing a conversion for Control Byte B. Thus, the touch panel voltage will be settled by the time the conversion from Control Byte C begins, and this conversion will be accurate. This method requires that the conversion result from Control Byte B be discarded, as it will not be accurate since its acquisition period occurred at the time that the touch panel voltage was still ringing.Another advantage to using the second method is the potential for power savings. Figure 4 shows that the conversion period for Control Byte C (using the fast clock) ends before the conversion period for Control Byte A (using the slow clock). After the end of conversion for Control Byte C, the ADS7843 can go into power down mode and wait for the next sampling period. For the slow clock case, with Control Byte A, the next sample period may have to come immediately after the current conversion, leaving no time for power down.Using a fast clock in single-ended mode would not be of any help, because as shown in Figure 4 (c), the drivers turn off between conversions. This results in the touch panel’s voltage rising at the beginning of each conversion—the touch panel will never have a chance to settle in this case. ADVANTAGES OF DIFFERENTIAL MODE OPERATION•Able to handle touch panel with long settling time without extending acquisition time of the A/D converter. Figure 4 shows that if control byte B and C are the same, the internal X/Y switch of the ADS7843 will not turn off after completing a conversion for control byte B. This will provide enough time for the touch panel voltage to settle to a stable voltage.The converted data for control byte B will not be correct as its acquisition period occurred at the time that the touch panel voltage was still ringing. However, the converted data for control byte C will be correct because at the time of acquisition the touch panel voltage had already settled to a stable voltage.•By using a faster clock, the ADS7843 will have some spare time to go into power down mode and hence conserve battery energy.Figure 4 shows that the conversion period for control byte C (fast clock) ends before the conversion period for control byte A (slow clock). After the end of conversion for control byte C, the ADS7843 can go into power down mode and wait for the next sampling period. However, for control byte A, the next sample period may have to come immediately after the current conversion, and hence no time for power down.NOISY ENVIRONMENTSGreat care is needed in touch screen applications to prevent a noisy environment from detracting from the high perfor-mance of the measurement system. A touch screen on the input of a high impedance A/D converter is just like adding an antenna to the input of the system. The touch screen can pick up noise signals from the back-light source for the LCD display or from external EMI/RFI sources. The simplest way to minimize these noise sources is by adding capacitors from the touch screen drivers to ground, forming a low-pass filter.A typical value to start with is 0.01µF capacitors from each input/output to ground. Figure 5 shows the range of choices for filter capacitors, depending upon the touch panel plate resistance and desired number of coordinate-pair readings per second.FIGURE 5. Filter Capacitor Selection Depends Upon Plate Resistance and the Number of Coordinate-Pair Readings per Second Desired. The worst thing you can do is to put a series resistor in the lines from the driver to form a low-pass filter on the input.A series resistor will limit and lower the resolution of the converter because of the added voltage drop across the resistor. This drop could be significant depending upon the impedance of the touch screen used.One issue to be aware of when adding capacitors for filtering is the effect they have on settling time of the touch-screen when the drivers are turned on. Depending on the A/D data rate and the mode of operation, the touch screen could neversettle to accurate levels, especially if operated in the single-ended mode. In the differential mode the touch-screen is connected during both acquisition and measurement mode and unless commanded to the power-down mode will con-tinue to be connected through the drivers. Although it also relies on 3 clock cycles to acquire the input to the A/D, the touch-screen will eventually settle; keeping the power ap-plied to the drivers over multiple measurements allows for a longer settling time. Depending on the time constant set by the touch-screen impedance and the filter capacitor neces-sary to reduce the noise to an acceptable level, several conversions may be required.Several options are open for obtaining accurate results. The first alternative is to stretch the acquisition period, clocks 6, 7, and 8, by slowing the clock down during this time to achieve the necessary time delay for settling. By determin-ing the time constant and allowing 9 time constants for 12-bit settling time, this will assure the touch-screen has settled. This can be done only during clock 6, 7, and 8, or can be done through the entire process. The minimum clock frequency to insure there is no droop in the sample-hold during the mearsurement cycle is 10kHz. The second alter-native is to provide digital comparison of the measured voltage over several conversions and accept the reading when 2 or more consecutive readings are within acceptable limits, such as 2 or 3 counts.In some applications, the noise levels can be very large and further filtering will be required to obtain stable readings. Utilizing an L/C pie filter on each of the four input/output lines can be used to achieve this level of filtering.THE PEN INTERRUPTThe function of the pen interrupt pin is frequently misunder-stood. This section serves to give more detailed information on the function of PENIRQ, and touches on the aspect of offset error that is introduced by the internal diode at the PENIRQ pin. Preventing false triggering of the PENIRQ is also explored .OPERATION OF PENIRQThe pen Interrupt feature of ADS7843 is implemented with a simple analog circuit; an open anode built-in diode.By simply pulling-up the PENIRQ pin of ADS7843 to V CC, a basic interrupt function can be implemented. Figure 6 shows the simplified schematic with the ADS7843 set to power down mode and pen interrupt enabled (PD1, PD0 = 00).While the touch panel is untouched, the internal diode of the ADS7843 is not biased, and no current (or negligible leak-age current) will flow. The voltage level at point A will be approximately V CC.When the touch panel is pressed, the internal diode of ADS7843 is forward biased and current flows to complete this current loop to ground (refer to current path of I F in Figure 6). Now, the voltage at point A is pulled LOW to about one forward voltage drop of the diode. The LOW going voltage level a point A will signal the processor thatFIGURE 6. Simplified Schematic of ADS7843 for PD0, PD1 = 00. FIGURE 7. Simplified Schematic of ADS7843 for A2A1A0 = 001.the panel is pressed. The processor will then execute its interrupt service routine to instruct the ADS7843 to perform a conversion.The simple pull-up method shown in Figures 6 and 7 will introduce error to the A/D conversion. This error is often called offset error as it is caused by a DC leakage current through the internal diode (refer to the I F current path in Figure 7). The current raises the voltage potential at the input of the A/D converter and creates a conversion error. This error is only introduced at Y-axis conversion because in X-axis conversion the internal diode is reversed biased. Figure 7 shows the simplified schematic with the ADS7843 configured for Y-axis conversion (A2A1A0 = 001). There are two current paths (labeled as I F and I TOUCH in Figure 7) through the touch panel when the panel is pressed. The I TOUCH is the necessary current that develops voltage potential across the pressed point, whereas I F is the un-wanted current through the diode that causes an offset error in the conversion.that it will activate the ADS7843.This allows sharing of the serial bus and prevents noise from being coupled at the DIN input to be interpreted as a control byte.version result as DATA X and the Y-axis conversion result as DATA Y.FIGURE 9. Input Protection for ADS7843.Flowchart 1Figure 10 shows an example of using the software de-bouncing method to overcome touch panel signal ringing for both an interrupt signal and conversion.In this solution, DATA1 is used to store current conversion results, DATA2 is used to store previous conversion results, and DATA X and DATA Y are used to store valid X-axis and Y-axis conversion results, respectively. DATA1 and DATA2 are used together to realize S/W de-bouncing that confirms the conversion result is valid when the current and previous conversion results are the same. This provides a flexible approach for the software to handle touch panels of different settling characteristics. It is, however, prone to misinterpretation of valid conversions when the ringing frequency of the input voltage is very close to the sampling rate.Flowchart 2Figure 11 is another example that uses the software de-bouncing solution to overcome signal ringing problems for the interrupt signal, and takes the last (n th) conversion result as the valid conversion.This solution is much simpler than the previous one, but is only suitable for touch panels that have similar settling characteristics. It takes the last conversion result as a valid conversion result instead of using S/W de-bouncing method. The value of “n” is dependent on the settling time of the input voltage to the ADS7843. The user has to test out a number of touch panels before deciding on the value of “n”. NOTE:If you need to put the ADS7843 into power-down mode with PENIRQ enabled, you will need to execute an additional conversion cycle with PD1 and PD0 set to ‘00’. However, if the 15-Clock conversion cycle mode is used, you can set PD1 and PD0 as ‘00’ for both X and Y-axis conversion.FIGURE 10.FIGURE 11.IMPORTANT NOTICETexas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinue any product or service without notice, and advise customers to obtain the latest version of relevant information to verify, before placing orders, that information being relied on is current and complete. All products are sold subject to the terms and conditions of sale supplied at the time of order acknowledgment, including those pertaining to warranty, patent infringement, and limitation of liability.TI warrants performance of its semiconductor products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are utilized to the extent TI deems necessary to support this warranty. Specific testing of all parameters of each device is not necessarily performed, except those mandated by government requirements.Customers are responsible for their applications using TI components.In order to minimize risks associated with the customer’s applications, adequate design and operating safeguards must be provided by the customer to minimize inherent or procedural hazards.TI assumes no liability for applications assistance or customer product design. TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right of TI covering or relating to any combination, machine, or process in which such semiconductor products or services might be or are used. TI’s publication of information regarding any third party’s products or services does not constitute TI’s approval, warranty or endorsement thereof.Copyright © 2000, Texas Instruments Incorporated。