摘要
在工业控制中,常需要进行PC机和单片机之间的通信,而串行通信是最常用的通信手段。本文在对Win32(Windows9x/NT/2000)环境下实现串行通信的API(Application Program Interface)函数介绍的基础上,结合Win32的多线程技术和消息响应机制,给出了在Win32环境下以VisualC++6.0为开发平台的多线程串行通信程序的实现方案,最后以印花机控制系统PC机程序的开发为例实现了简单、高效、多线程的串行通信程序,并给出了部分代码。
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 multi- threading technology, message response mechanism under Win32 (Windows9x/NT/2000). Provide a method of implementation of high -efficiency serial communication which use API function and multi-threading technology with Visual C++ 6.0 under Win32, Finally,this paper realize a serial communication program which high - efficiency and multi-threading on PC in Printing machine Control system. And also gives some codes of serial communication.
出处
《现代电子技术》
2005年第19期110-112,共3页
Modern Electronics Technique