英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流

 找回密码
 立即注册
搜索
电子烟方案单片机单片机开发深圳单片机开发
单片机方案国产单片机8位单片机电子烟方案开发
查看: 3566|回复: 0
打印 上一主题 下一主题

TouchClock : Design your own GLCD Clock

[复制链接]
跳转到指定楼层
1#
发表于 2012-8-21 15:22:56 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
This is how the library reads the X raw coordinate of a touch  :
X+ and X- are in high Z : RA0 and RA2 are inputs
Y+ is set to +5V : RA3 is output high
Y- is set to 0V : RA1 is output low
X+ voltage is read by ADC
Y+ is set to 0V : RA3 is output low
Y- is set to 5V: RA1 is output high
X- voltage is read by ADC and averaged with X+ value, the result is the raw X
coordinate.
The same is then done to read the Y coordinate, please see TSlib.c file in .ZIP file
above.
X and Y raw coordinates are then adjusted using calibration coordinates to get X and
Y coordinates in pixel.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|公司首页|Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流 ( 粤ICP备09008620号 )

GMT+8, 2024-5-1 02:56 , Processed in 0.051997 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表