节点文献
基于Win32 API的多线程串行通信程序设计
Programming of Multi-threading Serial Communication Based on Win32 API
【摘要】 在工业控制中,常需要进行PC机和单片机之间的通信,而串行通信是最常用的通信手段。本文在对Win32(Windows9x/NT/2000)环境下实现串行通信的API(Application Program Interface)函数介绍的基础上,结合Win32的多线程技术和消息响应机制,给出了在Win32环境下以VisualC++6.0为开发平台的多线程串行通信程序的实现方案,最后以印花机控制系统PC机程序的开发为例实现了简单、高效、多线程的串行通信程序,并给出了部分代码。
【Abstract】 In industrial control,they often need to carry on the communication between the PC and singlechip computer,and serial communication is the most frequently used communication means.This paper introduces some API(Application Program Interface) functions which can realize serial communication,and multithreading technology,message response mechanism under Win32(Windows9x/NT/2000).Provide a method of implementation of highefficiency serial communication which use API function and multithreading technology with Visual C~++6.0 under Win32.Finally,this paper realize a serial communication program which high[CD*2]efficiency and multithreading on PC in Printing machine Control system.And also gives some codes of serial communication.
【Key words】 serial communication; Win32; multithreading; message response; API;
- 【文献出处】 现代电子技术 ,Modern Electronic Technique , 编辑部邮箱 ,2005年19期
- 【分类号】TP273.5
- 【被引频次】12
- 【下载频次】206