本文介绍了在嵌入式实时操作系统Vxworks下串行设备的驱动架构及实现,提出了 一种基于RS-485总线的新型串口通信协议,重点讨论了基于这种协议的应用程序的设计方法,发送时主要采用了总线仲裁机制,接收时主要采用了字符合法性校验、长度校验、内容的CRC校验,提高了系统的通信效率和稳定性。 关键词:VxWorks;RS-485;通信协议;总线仲裁;CRC 校验 Abstract: This paper introduces the structure of the driver for serial device in VxWorks. A new serial communication protocol based on RS-485 data bus is brought up, and then the paper expounds how to design the application by this protocol. The application mainly uses the bus arbitration mechanism in transmission. In reception, it will do validity check of the characters, length check, CRC check. Thus, the system will work more stably and efficiently. Key words: VxWorks; RS-485; Communication Protocols; Bus Arbitration; CRC