基于LwIP的网口与串口数据透传设计*

许向阳, 张宇, 毕胜, 王晓君

集成电路与嵌入式系统 ›› 2023, Vol. 23 ›› Issue (9) : 78-82.

PDF(1300 KB)
PDF(1300 KB)
集成电路与嵌入式系统 ›› 2023, Vol. 23 ›› Issue (9) : 78-82.
应用精选

基于LwIP的网口与串口数据透传设计*

  • 许向阳, 张宇, 毕胜, 王晓君
作者信息 +

Network Port and Serial Port Data Penetration Design Based on LwIP

  • Xu Xiangyang, Zhang Yu, Bi Sheng, Wang Xiaojun
Author information +
文章历史 +

摘要

对于目前某些特殊设备只配备RS-422或LVDS串口而没有以太网口的情况,上位机与它们之间的数据透传只能依靠串口转换器实现,例如Moxa Uport系列USB转串口转换器等。这样的数据透传方式不仅传输距离近、效率低、成本高,而且不能够接入网络。针对这些问题,提出了一种基于LwIP TCP网口-串口数据透传设备设计方案,该数据透传设备使用ZYNQ-7020 SoC作为主控芯片设计了RS-422接口电路和LVDS接口电路,实现了网口数据与RS-422/LVDS串口数据的透传,最后在某地检设备上进行性能测试。测试结果表明该数据透传设备的RS-422和LVDS串口可实现在2 Mb/s以内的任意速率下无丢包、无误码的数据透传功能,为网口与串口之间的数据透传提供了一种可靠的实现方案。

Abstract

For some special devices only equipped with RS-422 or LVDS serial port without an Ethernet port,the data transparent transmission between the upper computer and they can only be realized by the serial port converter on the market,such as Moxa Uport series USB to serial port converter.This data transparent transmission mode not only has short transmission distance,low efficiency,high cost,but also cannot access the network.To solve these problems,a design scheme of TCP netword-serial data transmittal device based on LwIP is proposed.The data transmittal device uses ZYNQ-7020 SoC as the main control chip to design RS-422 interface circuit and LVDS interface circuit,which realizes the transmittal of network data and RS-422/LVDS serial data.Finally,through the performance test carried out on a certain inspection equipment,it is proved that the serial ports of RS-422 and LVDS of the data transparent transmission equipment can realize the data transparent transmission function without packet loss and error at any rate less than 2 Mb/s,which provides a reliable implementation scheme for the data transparent transmission between the network port and the serial port.

关键词

ZYNQ-7020 / RS-422 / LVDS / LwIP / 数据透传

Key words

ZYNQ-7020 / RS-422 / LVDS / LwIP / data penetration

引用本文

导出引用
许向阳, 张宇, 毕胜, 王晓君. 基于LwIP的网口与串口数据透传设计*[J]. 集成电路与嵌入式系统. 2023, 23(9): 78-82
Xu Xiangyang, Zhang Yu, Bi Sheng, Wang Xiaojun. Network Port and Serial Port Data Penetration Design Based on LwIP[J]. Integrated Circuits and Embedded Systems. 2023, 23(9): 78-82
中图分类号: TN919.3    TP336   

参考文献

[1] 邹传智.基于多串口转以太网的数据采集及分析系统设计[D].上海:东华大学,2017.
[2] 王庆贺,吴超,唐顺晨,等.基于DSP的以太网-RS422通信转换器的设计与实现[J].电子质量,2020(1):26-29,35.
[3] 胥泽飞.基于Zynq的智能相机硬件设计[D].南京:南京邮电大学,2018.
[4] 李金科,秦涛,吴爱平.基于ZYNQ的可配置高速数据传输系统设计[J].信息技术,2023,47(1):1-8.
[5] 陈晓锦,刘跃成,刘慧芳,等.高波特率网口与串口的转换模块设计[J].单片机与嵌入式系统应用,2022,22(8):75-78,82.
[6] 赖川,邓蕾,张显.基于STM32F407的FPGA动态加载设计[J].通信技术,2022,55(3):386-393.
[7] Xilinx Corporation.Zynq-7000 SoC Technical Reference Manual (UG585),2018.
[8] 李建翔,王洪凯,杨玉华,等.基于RS422+LVDS高速长线通信的设计与实现[J].仪表技术与传感器,2021(3):40-44,96.
[9] 江耘宇.一种组合导航计算硬件平台的设计与实现[D].重庆:重庆大学,2019.
[10] 李健一,闫强,李晓蕊.支持数据缓存的LVDS-以太网转接板设计[J].电脑编程技巧与维护,2023(1):82-84.

基金

*河北省省级科技计划项目,新一代电子信息技术创新专项(21310402D)。

PDF(1300 KB)

Accesses

Citation

Detail

段落导航
相关文章

/