摘要
提出了一种用C语言实现PC机串行通信的方法,分析了PC机串行通信原理,采用计算机自身携带的RS-232C标准接口进行通信。该方法程序小,硬件连接简单,且可应用到PC机与单片机或其它仪器仪表的串行通信中去,因此具有较广的使用价值。实验证明该方法能实现PC机的可靠数据传输。
A method of computer serial communication is proposed in the paper. The data is transferred between two COM ports with the Asynchronous Communications protocol. The program is written in C program. The hardware is simple, and the program is less than 1 KB. The program not only can be applied to the Asynchronous Communications between the two personal computer (PC) COM ports, but also can be applied to the serial communication between PC and microprocessor or apparatus. The experiment shows the data can be a transferred between the two PCs reliably.
出处
《江西科学》
2005年第5期578-580,共3页
Jiangxi Science
关键词
串口
串行通信
RS232
异步通信协议
COM port, Serial communication, RS232, Asynchronous communications protocol