摘要: 针对目前接口标准的RS485总线通信协议不统一问题,设计一个高效稳定的通信协议。介绍RS485总线网络的组网方式,给出RS485总线通信协议的设计方法。借鉴CSMA/CD协议,提出一种简单高效的冲突处理方法。在ARM7、ARM9、DE2-70 3种嵌入式开发平台,以及μC/OS、Linux、VxWorks 3种操作系统上进行实验和测试,结果表明,该通信协议在通用性、稳定性、实时性和可扩展性等方面均符合接口标准技术要求。
关键词:
RS485总线,
通信协议,
嵌入式系统,
冲突处理,
帧结构
Abstract: Because there is not normal communication protocol for RS485 bus network, a fast and steady communication protocol is designed. This paper introduces the method of creating the RS485 bus network and a detailed design of communication protocol for RS485 bus network. A simple and efficient conflict processing method is proposed with special reference to CSMA/CD protocol. The communication protocol is implemented and tested on ARM7, ARM9 and DE2-70 embedded development platforms with uC/OS, Linux or VxWorks operating systems. Experimental results show that this communication protocol meets the technical requirements in terms of versatility, stability, real-time and scalability aspects.
Key words:
RS485 bus,
communication protocol,
embedded system,
conflict processing,
frame structure
中图分类号:
冯子陵, 俞建新. RS485总线通信协议的设计与实现[J]. 计算机工程, 2012, 38(20): 215-218.
FENG Zi-Ling, SHU Jian-Xin. Design and Implementation of RS485 Bus Communication Protocol[J]. Computer Engineering, 2012, 38(20): 215-218.