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

标题: TouchClock : Design your own GLCD Clock [打印本页]

作者: star    时间: 2012-8-21 15:22
标题: TouchClock : Design your own GLCD Clock
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.
[attach]752[/attach]





欢迎光临 英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流 (http://enroobbs.com/) Powered by Discuz! X3.2