当前位置:主页 > 科技论文 > 计算机论文 >

基于FPGA的CAN-USB协议转换系统的设计

发布时间:2018-10-08 07:51
【摘要】:CAN总线作为工业现场中优秀总线的代表,自诞生以来就得到了快速的发展,在工业现场、汽车电子以及航天航空等各个领域都得到了广泛应用。但由于其接口与数据报文的特殊性,其数据格式并不能被PC机识别,因此在数据采集、性能调试以及故障分析等方面并不方便,这在一定程度上阻碍了CAN总线更大规模的普及。因此设计出一种能够将CAN总线数据转换为能被PC机识别信号的系统就显得十分有必要。传统的借助于ISA以及PCI板卡方式的数据转换设备虽然能达到这个目的,但由于接口复杂、不支持Laptop、数据传输速度慢以及造价昂贵等缺点,并不适合在工业现场中推广。而USB接口具有接口简单、支持热插拔、使用方便、数据传输速度快等优点,现已成为PC机的标准接口之一。基于以上的这些前提,本文以FPGA作为主控制器,设计出了一种基于FPGA的CAN-USB协议转换系统。 本文从四个方面对整个系统的设计提出了完整的方案,分别是协议转换方案的提出、系统的硬件设计、系统的软件设计以及系统的仿真与调试。在整个系统中,设计了以FPGA为主控制器,SJA1000为CAN控制器,CY7C68013为USB控制器的协议转换系统。该协议转换系统根据现场总线中的命令要求来对源协议数据进行采集,采集到的数据存储在FPGA的异步FIFO中进行源协议的解码以及目标协议的重新编码,最终在时钟的控制下通过目标协议的数据传输方式送至用户或现场总线节点。 在该系统的设计中充分考虑到了CAN总线协议的发展,通过对CAN数据统一编码再重新解读的方式,系统不但适用于传统的Basic CAN模式,也适用于更高级的PeliCAN模式,在系统的兼容性上,所设计的系统充分达到了现场总线的应用要求。除此之外,由于系统采用了FPGA来作为系统的主控制器,基于其高速的数据采集能力和通信能力,可以在系统的基础上进行拓展,使得系统不单单可以进行协议的转换,还可以实现工业现场视频数据、设备运行参数的监控,这使得系统的可扩展性得到了大大地提高。仿真结果表明系统具有硬件设计简单、系统集成度高、易扩展以及成本低廉等优点,同时由于在设计中引入了信号可靠性的概念,系统具有较强的稳定性,具有较高的应用和推广价值。
[Abstract]:As the representative of excellent bus in industrial field, CAN bus has been developed rapidly since its birth. It has been widely used in many fields such as industrial field, automobile electronics, aerospace and so on. However, because of the particularity of its interface and data packet, its data format can not be recognized by PC, so it is not convenient in data acquisition, performance debugging and fault analysis, which to some extent hinders the popularization of CAN bus on a larger scale. Therefore, it is necessary to design a system that can convert CAN bus data into a signal that can be recognized by a PC machine. Although the traditional data conversion equipment with the aid of ISA and PCI card can achieve this goal, because of the complex interface, the low speed of supporting Laptop, data transmission and the expensive cost, it is not suitable to be popularized in the industrial field. The USB interface has the advantages of simple interface, hot-plug support, convenient use and fast data transmission. It has become one of the standard interfaces of PC machine. Based on these premises, a CAN-USB protocol conversion system based on FPGA is designed with FPGA as the main controller. This paper presents a complete scheme for the whole system design from four aspects, namely, the protocol conversion scheme, the hardware design of the system, the software design of the system, and the simulation and debugging of the system. In the whole system, a protocol conversion system with FPGA as main controller and SJA1000 as CAN controller and CY7C68013 as USB controller is designed. The protocol conversion system collects the source protocol data according to the command requirements in the field bus. The collected data is stored in the asynchronous FIFO of FPGA to decode the source protocol and re-encode the target protocol. Finally, under the control of the clock, the data transmission mode of the target protocol is sent to the user or fieldbus node. In the design of the system, the development of CAN bus protocol is fully taken into account. By rereading the unified encoding of CAN data, the system is not only applicable to the traditional Basic CAN mode, but also to the more advanced PeliCAN mode. In terms of system compatibility, the designed system fully meets the application requirements of fieldbus. In addition, because the system uses FPGA as the main controller of the system, based on its high speed data acquisition ability and communication ability, it can be extended on the basis of the system, so that the system can not only carry out protocol conversion. It can also realize the monitoring of industrial scene video data and equipment operation parameters, which greatly improves the expansibility of the system. The simulation results show that the system has the advantages of simple hardware design, high system integration, easy expansion and low cost. At the same time, because the concept of signal reliability is introduced in the design, the system has strong stability. It has high value of application and popularization.
【学位授予单位】:安徽理工大学
【学位级别】:硕士
【学位授予年份】:2014
【分类号】:TP336

【参考文献】

相关期刊论文 前5条

1 欧阳晓青,黄鲁,王荣生;一种嵌入式USB主机的应用[J];电子技术;2004年07期

2 王静红;刘教民;于富强;王丽娜;王震洲;;采用CY7C68013芯片的系统固件程序设计[J];河北师范大学学报(自然科学版);2008年02期

3 张云;杜坤梅;邓浩;;基于CAN总线在卫星飞轮系统中通讯的设计[J];哈尔滨商业大学学报(自然科学版);2006年01期

4 李绪友;盛明;;基于FPGA及USB的数据采集系统设计[J];黑龙江科技信息;2008年14期

5 宋沛;格雷码到BCD码的转换[J];机电工程技术;2003年05期



本文编号:2255996

资料下载
论文发表

本文链接:https://www.wllwen.com/kejilunwen/jisuanjikexuelunwen/2255996.html


Copyright(c)文论论文网All Rights Reserved | 网站地图 |

版权申明:资料由用户5fae8***提供,本站仅收录摘要或目录,作者需要删除请E-mail邮箱bigeng88@qq.com