摘要
针对在进行多串口通信时单片机串口不够用的问题,提出了一种单片机多路模拟串口的实现方法。介绍了标准的串行通信数据格式,分析了硬件串口的工作原理,以及软件扩展串口的数据发送和数据接收实现方法。通过实验分析证明了软件扩展多路串口的可行性、易用性及通用性,在基于GPRS的分水点流量远程监控终端的应用中取得了预期的效果。
Aiming at the problem of no enough Serial ports are provided from single chip computer in serial communications need multiple serial ports, the implementing method of emulated multiple serial ports for single chip computer is given. The standard data format of serial communication data is introduced, and the operational principle of the hardware serial port and the implementation of expanding data transmitting and receiving of serial port by using software are analyzed. Through experimental analysis, the feasibility, ease operation, and generalization of serial port software expansion are verified. The method has been applied in remote flow monitoring terminal based on GPRS for water distribution spots.
出处
《自动化仪表》
CAS
2008年第10期67-69,共3页
Process Automation Instrumentation
关键词
串行通信
软件串口
单片机
延时
中断
Serial communication Software serial port Single chip computer Time delay Interrupt