文件名称:Touchscreen
介绍说明--下载内容均来自于网络,请自行研究使用
以总线方式操作控制TFT彩色液晶,模拟SPI控制触摸屏,将按下的点显示在TFT 2.4寸液晶上。因此,可以用此程序来在屏上画图案。由于触摸屏在采集时每次采集的值都有误差,这也是使用触摸屏较为麻烦的地方,通过查资料,发现
目前处理此问题主要通过软件算法实现,并且功能稳定的往往算法想法复杂,本程序采用简单的算法来
实现:当某一点按下后,在保持不放开的前提下,采集7个数据,并对数据进行升序排列,取中间3个数据
作为有效数据,并将平均值作为按下后的X,Y坐标。-Bus operation control TFT color LCD, to simulate SPI control touch screen display will press the point on a TFT 2.4 inch LCD. Therefore, it is possible to use this procedure to drawn on the screen pattern. Information search, found mainly achieved through software algorithms to deal with this problem, and stable function often complex algorithm ideas, the program uses the touch screen in each acquisition when the acquisition value has error, which is using the touch screen is a bit trickier, simple algorithm: some point after pressing the premise remain release, collecting seven data, and the data in ascending order, take the middle three data as valid data, and the average value as Next after the X, Y coordinates.
目前处理此问题主要通过软件算法实现,并且功能稳定的往往算法想法复杂,本程序采用简单的算法来
实现:当某一点按下后,在保持不放开的前提下,采集7个数据,并对数据进行升序排列,取中间3个数据
作为有效数据,并将平均值作为按下后的X,Y坐标。-Bus operation control TFT color LCD, to simulate SPI control touch screen display will press the point on a TFT 2.4 inch LCD. Therefore, it is possible to use this procedure to drawn on the screen pattern. Information search, found mainly achieved through software algorithms to deal with this problem, and stable function often complex algorithm ideas, the program uses the touch screen in each acquisition when the acquisition value has error, which is using the touch screen is a bit trickier, simple algorithm: some point after pressing the premise remain release, collecting seven data, and the data in ascending order, take the middle three data as valid data, and the average value as Next after the X, Y coordinates.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Touchscreen.c