节点文献
基于USB2.0接口陀螺测试系统的设计
The Development of Gyroscope Testing System Based on USB 2.0 Interface
【作者】 王强;
【导师】 张志文;
【作者基本信息】 西安工业大学 , 信号与信息处理, 2007, 硕士
【摘要】 针对在激光陀螺测试中,每4ms一次的数据采集并与计算机实时通信时出现的各种问题,设计了一种基于USB2.0高速接口的多路脉冲采集系统。本系统利用USB接口芯片中的端点缓冲区(FIFO)存放每4ms采集到的数据,并以1s为时间间隔,由主机把这些数据读入,成功的检测了陀螺在上电后2.8s内的点火次数和点火时间,陀螺在2.8~2.9s内的漂移量以及在2.9s以后在三个方向上自由度以4ms为周期的转动变化。文中首先详细地阐述了USB2.0基本规范,着重探讨了USB总线协议和通信原理;接着概述了陀螺测试方面的基本知识,介绍了USB脉冲数据采集系统硬件的搭建以及FPGA中电路原理图的设计;然后论述了相应固件程序和WDM模式驱动程序的总体结构以及驱动程序中各个子模块的功能和特点,并结合本设计说明如何编制一个WDM型设备驱动程序来实现应用程序与USB设备之间的通信;最后,详细论述应用程序如何对USB接口上传的数据进行实时处理和显示。硬件设计主要包括搭建信号预处理模块、FPGA计数模块以及数据采集系统和上位机之间的通信接口电路。本系统采用CYPRESS公司的CY7C68013芯片作为USB2.0接口芯片,采用ALTERA公司的FPGA EPF10K10实现计数模块,同时在FPGA内部构建系统控制器,实现对FIFO的控制。软件编程分为三部分:第一,为满足系统要求,使用C51语言编写USB固件程序;第二,在PC机中的Windows系统环境下,用VC++6.0和DrvierStudio编写USB设备驱动程序;第三,为保证数据采集的实时性,用VC++编写出的数据采集应用程序。通过本数据采集系统的设计,可以深刻地理解USB2.0协议,熟练地应用CY7C68013接口芯片,并且能更好领悟USB2.0接口的优势。本系统使用FPGA实现计数器及逻辑控制模块的功能,计数频率范围可达0.01Hz~16MHz;经测试,系统性能可靠,且能长时间稳定运行。
【Abstract】 In order to solve the problem of the Laser Gyroscope testing in communication with PC on every 4ms data collecting, a pulse data acquisition system is designed based on USB2.0 high speed interface in this paper. The system uses the buffers of USB endpoints(FIFO) in USB interface chip to store the data acquired in every 4ms,and transferes the data to the host every 1s. The testing system can fulfill all the parameters including the exact triggering time and tringgering times in 2.8s after system power on, the excursion of the gyroscope and the change of the free degree in three orientation on every 4ms.Firstly, this thesis introduces the USB2.0 basic specification, especially focusing on the bus protocol and communication theory of USB. Then it introduces the way to build up the hardware of the data collecting system and the circuit diagram in the FPGA. Secondly, the overall structure of the Firmware and the WDM driver is introduced, including every module’s function and the characters. Then combined with the application in developing a USB device, it presents how to build a WDM driver and how to work out the communication between them. At last, it focuses on how to program the application and display the data uploaded from the USB interface.The hardware design focuses on building up the circuit of pulse tranquilization、the counting system in FPGA and the communication between the MCU and computer. In this system CY7C68013 of the CYPRESS company is taken as the USB interface chip, and EPF10K10 of ALTERA company is used as the core device of the counting. The software mainly includes: the firmware code in C language to meet the system request; USB device driver code by VC++ and DriverStudio under the Windows operation system and application programme to assure real time data collecting in VC++. After this data collecting system, we can understand the USB2.0 protocol profoundly and apply the interface chip—CY7C68013 proficiently. In all, the advantages of this interface technique may helps to your design arrangement.In this system,the FPGA was used to perform the countings and logical control modules. test and the frequency range of it is 0.01Hz~16MHz. After examination and testing on the spot,the system is entirety accord with the practicality of the manufacture.
【Key words】 universal serial bus(USB); gyroscope testing; interface chip; protocol; firmware program; WDM; FPGA;
- 【网络出版投稿人】 西安工业大学 【网络出版年期】2008年 03期
- 【分类号】TP274.2;V241.5
- 【被引频次】3
- 【下载频次】332