摘要
介绍了在VxWorks实时操作系统下对多串口卡的通信设计.说明了多串口卡的硬件设置,阐述在应用层对SEM/MSP-8串口板进行初始化,设置基地址,连接中断等设计要点.成功实现了多个串口工作模式(RS232/RS422)的数据发送功能,中断接收功能.为了实现一对多通信,RS485传输模式采用了广播.提出了一种对单个字符设备传输协议的数据帧分析方法,改善了通信的可靠性.指出了VxWorks下使用看门狗定时及其原因.
How to use Multi-SeriaIPorts to communicate in the VxWorks real-time operating systems is in- troduced. The hardware' s setting options are described. The design points such as initialization of SEM/MSP-8 at the application-layer, the setting of the base address and the connecting interrupt are emphasized. Data send- ing function and interrupt receiving function are implemented successfully in the multi-serial ports working modes including RS232/RS422. In order to get one-to-several communication, the broadcast in the RS485 mode is adapted to different address. For the purpose of improving stability of transferring, a method of analyzing sin- gle data frame of transferring protocol in the single character equipment is put forward. At last, it points out how and why to use watchdog at VxWorks for timing.
出处
《光电技术应用》
2009年第2期47-50,61,共5页
Electro-Optic Technology Application