牛卧堂MCU技术交流

标题: [NUC126] 4-Wired Resistive Touch Panel Controlled [打印本页]

作者: admin    时间: 2023-8-7 16:44
标题: [NUC126] 4-Wired Resistive Touch Panel Controlled


Currently, there are 4-wired, 5-wired, 7-wired and 8-wired types resistive touch panel on the market. This sample code based on 4-wired resistive ADC touch panel.
The X-axis direction of touch panel is regarded as resistor and the Y-axis direction of the touch panel is regarded as another resistor, too. When user press the touch screen, we can get two sampling result from X-axis and Y-axis resistor by ADC. After sampling finished, calculating the touch point by the ADC sampling result.

For example, the resolution of touch panel is 128x160. Because the NUC126 is equipped with 12 bits ADC, the 5V will be divided into 4096 parts. The ADC sampling result on the far left point, 0 point on X-axis will map to probably 500 but 0. The ADC sampling result on the far right point, 128 point on X-axis will map to probably 3200 but 4095, too. Hence, the result of ADC sampling should be normalized.

You can download the sample code at https://www.nuvoton.com/resource-downlo ... 1227115130

作者: 匿名    时间: 2023-8-11 10:01
为什么是英文介绍不是中文?




欢迎光临 牛卧堂MCU技术交流 (http://www.nuvoton-mcu.com/) Powered by Discuz! X3.2