找回密码
 立即注册

QQ登录

只需一步,快速开始

打印 上一主题 下一主题
开启左侧

[NUC126] 4-Wired Resistive Touch Panel Controlled

[复制链接]
跳转到指定楼层
楼主
admin 发表于 2023-8-7 16:44:10 | 只看该作者 回帖奖励 |正序浏览 |阅读模式


  • Application: This sample code based on NUC126 for implementing the 4-wired resistive touch panel controlled.
  • BSP Version: NUC126 Series BSP CMSIS v3.00.003
  • Hardware: NuTiny-NUC126
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
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 顶 踩
牛卧堂
回复

使用道具 举报

沙发
匿名  发表于 2023-8-11 10:01:32
为什么是英文介绍不是中文?
回复 支持 反对

使用道具

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

新唐MCU