作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2012, Vol. 38 ›› Issue (20): 215-218. doi: 10.3969/j.issn.1000-3428.2012.20.056

• 工程应用技术与实现 • 上一篇    下一篇

RS485总线通信协议的设计与实现

冯子陵,俞建新   

  1. (南京大学计算机科学与技术系,南京 210046)
  • 收稿日期:2011-11-24 修回日期:2012-02-16 出版日期:2012-10-20 发布日期:2012-10-17
  • 作者简介:冯子陵(1987-),男,硕士研究生、CCF会员,主研方向:嵌入式系统设计,物联网;俞建新,副教授

Design and Implementation of RS485 Bus Communication Protocol

FENG Zi-ling, YU Jian-xin   

  1. (Department of Computer Science and Technology, Nanjing University, Nanjing 210046, China)
  • Received:2011-11-24 Revised:2012-02-16 Online:2012-10-20 Published:2012-10-17

摘要: 针对目前接口标准的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

中图分类号: