摘 要:分析了電阻式觸摸屏的結構,確定了觸摸點坐標校正的方法。針對51系列單片機與觸摸屏控制器ADS7846串行通信時,單片機串口方式1~3與ADS7846時序不相配,而方式0雖然與ADS7846時序相配,但輸入/輸出端數不相配。為此,提出了在單片機串口方式0的基礎上增加雙向傳輸GAL芯片,并據此設計了觸摸屏接口電路及軟件。分析和實驗表明,這種接口系統能夠正確獲得觸摸點坐標,電路簡化且易于實現,實用性強。
關鍵詞:電阻式觸摸屏;觸摸屏控制器;觸摸點坐標;接口電路;串行通信
中圖分類號:TP334.2 文獻標識碼:A
文章編號:1004-373X(2010)11-0088-03
Interface Design of Resistive Touch Screen Based on ADS7846
WANG Xuan-min, LI Ming-li, ZHANG Li-chuan, ZHANG Xiao-bo
(School of Information Engineering, Chang’an University, Xi’an 710064, China)
Abstract: The structure of resistive touch screen is analyzed, and the revision method of touch point coordinate is determined. For serial communication of the 51 SCM and touch screen controller ADS7846, the time order of SCM serial way 1~3 and ADS7846 was unsuitable. Way 0 time order was suitable, but input/output number was different. Adding two-way chip GAL on SCM serial way 0 was proposed. On the ground, the touch screen interface circuit and software were designed. The analysis and experiment indicate that interface circuit possessed below advantages. Touch point coordinate can be obtained accurately, the circuit is realized easily, and its practicality is good.
Keywords: resistive touch screen; touch screen controller; touch point coordinate; interface circuit; serial communication
觸摸屏作為智能儀器、儀表的輸入設備,是具有簡單、方便、自然的人機交互方式。按照工作原理和傳輸信息介質的不同,觸摸屏主要分為電阻式觸摸屏、電容式觸摸屏、紅外線式觸摸屏及表面聲波觸摸屏4類。電阻式觸摸屏對外完全隔離,不怕油污、灰塵、水,經濟性很好,適應于各種領域,其產品在觸摸屏產品中占90%的市場份額。現介紹電阻式觸摸屏的結構及接口設計。
1 電阻式觸摸屏的結構
電阻式觸摸屏的檢測部件是一塊與顯示器表面緊密配合的多層復合薄膜\\,由一層玻璃或有機玻璃作為基層,表面涂有一層阻性導體層(如銦錫氧化物ITO),上面再蓋有一層外表面被硬化處理、光滑防刮的塑料層,塑料層的內表面也涂有一層阻性導體層。在兩導體層之間有一層具有許多細小隔離點的隔離層,把兩導體層隔開絕緣,如圖1所示。當手指觸摸屏幕時,兩導體層在觸摸點位置產生了接觸,控制器檢測到這個接通點后計算出X,Y坐標,這就是電阻式觸摸屏的檢測原理。……