摘要
文章介绍的ASCII型通讯协议是通过C语言编程实现的,通过对各种命令格式的定义以及单片机和组态王各对应参数的配置,实现了单片机与King View的通讯,用户可以直接利用King View软件中提供的通用单片机ASCII串口实现对单片机按键状态和继电器开关状态的采集。经过实验验证,结果表明该程序具有稳定性、可移植性、实用性等优点。
The article introduces the ASCII type communication protocol is realized by C language programming, through the definition of various command format and MCU and the corresponding parameters of King View configuration, realize the single chip microcomputer and King View communication, users can directly use King View software provided in the general microcontroller ASCII a serial port of single chip microcomputer button state and the state of the relay switch acquisition. Through the experiment, the results show that the program has the advantages of stability, portability and practicality.
出处
《电子技术(上海)》
2016年第1期71-73,共3页
Electronic Technology
基金
曲阜师范大学校级创新项目经费资助