摘要
为了将分散于工业现场的串口设备接入以太网,本文设计一种基于STM32F107VC微处理器的嵌入式RS485串口/以太网的数据转换器。移植嵌入式TCP/IP协议栈LwIP到ARM平台,构造双缓冲队列,保证串行通信的效率,通过软件编程实现串行通信协议和以太网的TCP/IP协议的相互映射,使得串口数据和以太网数据相互转换。实验表明,串口/以太网数据转换器能够正常工作,数据转换稳定、可靠。
In order to connect the serial devices that scattered in industrial field to the Ethernet, this article designed an embed- ded RS485 serial/Ethernet data converter which based on STM32F107VC microprocessor. The embedded TCP/IP protocol stack LwIP is transplanted to the ARM platform, and double-buffering queue is constructed to ensure the efficiency of serial communication. Serial communication protocol and Ethernet TCP/IP protocol are mapped to each other by software programming, so that the data can be converted between serial port and Ethernet. The experiments show that the serial/Ethernet data converter can work normally, data conversion is stable and reliable.
出处
《计算机与现代化》
2013年第11期95-99,共5页
Computer and Modernization