王春媚



摘 要: 传统多串口并行通信数据传输系统无法自主获取串口号,需手动选择再打开串口,需要使用者事先了解接口编码,这无形增加了系统的工作时间。为此,设计一种基于FPGA的多串口并行通信数据传输系统,该系统中的串口数据接收模块采集多串口数据,并通过控制寄存器达到控制通信数据波特率的目的。系统利用Nios Ⅱ处理器使8种信道共同进行传输工作,其将数据传输到并串转换模块。并串转换模块对输出的8位并行数据添加通道标识、并串转换处理,再将处理后的并行数据传递到串口输出选择模块中。依据数据脉冲上升沿设计串口输出选择模块,该模块通过多路分配器将有数据通道的数据串行逐位送出。系统在软件中进行了传输设计、Nios Ⅱ处理器流程设计以及通信设备类的设计与封装。实验结果表明,所设计系统在 FPGA上正确实现了8个串口数据的传输,并且具有较高的数据接收成功率。
关键词: 多串口; 并行通信; 数据传输系统; 数据采集
中图分类号: TN911?34; TP393 文献标识码: A 文章编号: 1004?373X(2017)04?0086?05
Design of a data transmission system for multi?serial port parallel communication
WANG Chunmei
(Tianjin Light Industry Vocational Technical College, Tianjin 300350, China)
Abstract: The traditional multi?serial port parallel communication data transmission system is unable to obtain the serial port number autonomously, which means that its users must know the interface code in advance. This increases the working time of the system intangibly. Therefore, a multi?serial port parallel communication data transmission system based on FPGA was designed. In this system, the serial port data receiving module is used to collect the multi?serial port data and control the communication data baud rate through the control register, and the Nios Ⅱ processor is adopted to make eight kinds of channels work together for data transmission to the parallel?serial conversion module. The parallel?serial conversion module adds channel identification to the output 8?bit parallel data, executes the conversion processing. and sends the processed parallel data to the serial port output choosing module. The serial port output choosing module is designed according to the data pulse rising edge. The module sends out the data in each channel bit by bit in serial mode through demux. The transmission system design, the workflow design of Nios Ⅱ processor and communication equipment design and packaging are performed in the software. The experimental results show that the system has realized the data transmission in eight serial ports on the FPGA, and has high success rate of data reception.
Keywords: multi?serial port; parallel communication; data transmission system; data acquisition
0 引 言
随着计算机技术的迅猛发展,测试系统的总线技术也得到了一定的提高,人们对计算机与设备的通信能力要求越来越高。串口传输技术的出现,是实现以上要求的重要发明[1?4]。传统多串口并行通信数据传输系统无法自主获取串口号,需手动选择再打开串口,需要使用者事先了解串口号,大大降低了系统的运行效率。因此,研究出可自主辨识串口号的多串口并行通信数据传输系统,成为相关人员分析的热点[5?6]。……