摘要
基于VC++6.0和Windows API函数开发了一种串口通信程序。该程序采用单线程消息响应机制,利用定时器消息响应查询串口来实现数据的接收。编程方法减小了设计难度,提高了开发效率。给出了基于消息机制的程序框图和部分程序代码,并编制了友好的人机交互界面。在实际使用过程中,稳定可靠,可作为其他串口通信编程的参考。
This paper Development a Programming of serial communication based on VC++6.0 and Windows API, the Pro- gramming with a single threaded and message response mechanism, receive data by querying serial port with the timer messages. With this approach it reduces the design difficulty, improves the development efficiency. This paper gives the block diagram, part of program codes and the friendly man-machine interface. It' s stable and reliable in the practical application. So this paper can be a reference for the other serial communication programs.
出处
《电脑编程技巧与维护》
2014年第18期66-68,共3页
Computer Programming Skills & Maintenance
基金
湖南省教育厅项目资助
项目编号:14C0649
作者简介
骆拓(1975-),男,硕士,工程师,研究方向:机械自动化、电机控制等研发
龚寄(1976-),女,硕士,讲师,研究方向:复杂机电系统建模及控制.