触摸屏分为电阻式,电容式,声表面波式和红外线扫描式等类型。使用的最多的是4线电阻式触摸屏。s3c2440触摸屏由横向电阻比和纵向电阻线组成,由nYPON.YMON...nXPON...XMON四个控制信号控制4个MOS管(s1,s2,s3,s4)的通断。
控制器----
s3c2440触摸屏控制器有2种处理模式---
1--X/Y位置分别转换模式。触摸屏控制器包括两个控制阶段,X坐标转换和Y坐标转换阶段。
2---X/Y位置自动转换模式。触摸屏控制器将自动转换X和Y坐标。
工作流程---
1---select separate x/y psition conversion mode or atuo (sepuential)x/y position conversion mode to get x/y position.
2---set touch screen interface to waiting interrupt mode.
3---if interrupt cocurs,then appropriate conversion(separate x/y position conversion mode or auto(sequential)x/y position conversion mode) is acticated.启动数模转换
4---after get the proper value about x/y position,return to waitting for interrupt mode.
中断等待-----
1--INT_TC中断---当按下触摸屏时产生TC中断,开始启动数模转换。
2--INT_ADC---当转换完成后,产生ADC中断,通知已准备好x和y坐标。