当前位置:网站首页>迪文串口屏教程(3)
迪文串口屏教程(3)
2022-07-15 16:02:00 【小途】
一、串口屏与PC机通信显示中文
临时做了一个界面,放置两个文本显示控件
文本1的变量地址0x0001
文本2的变量地址0x0010
控制具体设置参数如下:


如果串口屏需要显示中文的话,FONT1_ID要对应自动的字库,不然会出现乱码。显示中文要使用一个ASCLL码及汉子内码转换器,这个可以询问迪文的客服要。我这里整理有字符和转换器。我使用的字库是“60GBK16_宋体”,16号字库,其他字库可以自己生成。
链接:https://pan.baidu.com/s/1xYfefZ5bgN3M7k-AmVJt3w
提取码:mazl
把字库文件“60GBK16_宋体”放到下载目录下即可

下一步要我们将我们要显示的中文字符进行编码转换
最后向串口发送我们数据
文本1数据:5A A5 11 820001 BFAA C6F4 0000 0000 0000 0000 0000 0000
文本2数据:5A A5 11 820010 BFAA C6F4 0000 0000 0000 0000 0000 0000
最后显示的效果
二、串口屏与PC机通信显示整形数据
显示整形就非常简单了,在上位机放在数据变量显示控件,具体设置参数如下:

这时我们连接好串口,向串口发送数据:
5A A5 05 820020 0025
其中5AA5帧头;05数据长度;82写指令;0004变量地址;0025表示数据的十六进制。
显示效果如下:
三、串口屏与PC机通信显示图标
生成图标库文件可以去观看一个B站迪文的教学视频
https://www.bilibili.com/video/BV1VA411x7uK?p=2&vd_source=176871182e066b0cc001feb27c0798cf
我这里生成了一个图标库文件,拷贝到DWIN_SET文件夹下
屏幕控制具体配置如下
程序下载到屏幕显示如下
我们这时候只需要想串口发送5A A5 05 820021 0001绿灯就可以熄灭。
发送5A A5 05 820021 0000,绿灯亮起。
其中5AA5帧头;05数据长度;82写指令;0002变量地址;0000显示下限0所对应的图标
边栏推荐
- SQL notes
- Engineering monitoring vibrating wire wireless acquisition instrument external digital sensor access logic and data transmission
- The SQL implementation divides the values in the fields in the data table into multiple columns according to the separator
- 让企业数字化砸锅和IT主管背锅的软件供应链安全风险指北
- Neusoft Ruichi has reached a strategic cooperation with United electronics to seize a new outlet in the domestic basic software market
- 网上开期货账户安全不安全?
- 重装系统Win11后玩lol没有声音怎么办?
- Is it safe for qiniu securities to open an account? Is it reliable?
- 使用Excel2016的函数生成随机16、32、36位ID字符串内容
- Experience first! What kind of experience is it to write fluent in the browser?
猜你喜欢

Apache APISIX Meetup 南京站!我们 7.30 见!

Pychart tutorial: 5 very useful tips

哈工大讯飞联合实验室获得SemEval-2022最佳论文提名奖

三维重建之线结构光(一)

重装系统Win11后玩lol没有声音怎么办?

i7-12700H 和 R7-6800H,这两个 CPU 差距有多大?

Acquisition data transmission mode of vibrating wire wireless acquisition instrument for engineering monitoring instrument

仅需三步 轻松实现远程办公

If you don't want to step on those holes in SaaS, you must first understand the "SaaS architecture"

What is the difference between i7-12700h and r7-6800h CPUs?
随机推荐
40 + times improvement, explain in detail how to optimize the performance of juicefs metadata backup and recovery
[dynamic planning] - state compression DP
一文搞懂│什么是跨域?如何解决跨域?
What is the difference between i7-12700h and r7-6800h CPUs?
Using JMeter pressure test upload and download interface practice
双倍数据速率同步动态随机存储器(Double Data Rate Synchronous Dynamic Random Access Memory, DDR SDRAM)
对话印奇:我们所坚持的不会改变,旷视跳出企业科研“周期律”
Mysql/Mairadb主从复制
SQL daily practice (Niuke new question bank) - day 2: condition query
【用户文章】P4合并实践指南之实例拆解Resolve
重装系统Win11后玩lol没有声音怎么办?
SYD_ Calculator skill 2 [manage cos]
Use Tibco rendezvous to send Hello world to realize monitoring and sending
[dynamic planning] - counting DP
关于 c 打印异常的问题
什么是真正的HTAP?(一)背景篇
twelve
干货|语义网、Web3.0、Web3、元宇宙这些概念还傻傻分不清楚?(上)
2022年低压电工考试题模拟考试平台操作
The data transmission mode and online monitoring management system of multi-channel vibrating wire wireless acquisition instrument for engineering monitoring instruments