节点文献

基于USB的数据采集系统设计

The Design of Data Acquisition System Based on USB

【作者】 王栋

【导师】 王富东;

【作者基本信息】 苏州大学 , 控制理论与控制工程, 2009, 硕士

【摘要】 随着现代工业领域对数据采集的要求越来越高,传统的以采用数据采集卡为主的方法由于传输速度慢、安装麻烦、抗干扰能力弱等诸多问题已难以适应如今数据采集的要求。通用串行总线USB具有速度快、支持热插拔及传输线少等优点,因此将USB应用于数据采集系统可以很好的解决传统数据采集系统的不足,具有广泛的应用价值。本文针对高速数据采集系统的需要,设计了基于USB的数据采集系统。系统设计工作包括硬件设计和软件设计两部分,硬件部分本系统选用了ATMEL公司的单片机AT89C5131作为微控制器,负责接收由A/D转换得到的数字量数据,并通过其内置的USB控制器实现单片机和PC机之间的USB数据通信。本系统设计的主要工作难点是系统软件的设计,包括固件程序、USB驱动程序和应用程序的设计三部分。其中,固件程序利用Keil C软件开发,而USB驱动程序则通过DriverWorks自动生成并适当修改而成;通过固件程序和USB驱动程序的设计使得单片机可作为USB设备被PC机识别,从而可以将采集的数据通过USB数据线传输给PC机。PC机上的应用程序利用VC++开发,并使用MFC设计了PC机上的USB数据采集界面,可实现采集数据的波形图显示功能。本文最后通过对系统的测试,在设计的数据采集界面上显示出了输入随机信号的波形图。实践证明,本系统设计已初步取得成功,可以实现USB数据采集功能。

【Abstract】 As the demand to data acquisition is more and more hign in modern industry field,the traditional method which mainly makes use of data acquisition card has not adapted to the hign requirement of modern data acquisition because of the low transmission speed、incovenient installation、weak ability of anti-jamming and other problems.USB(Universal Serial Bus) has many advantages,such as hign transmission speed、sustaining hot plug and few transmission lines.So the application of USB in data acquisition system can be the solution of the deficiency of traditional data acquisition system,and it will has widely application value.Aiming to the need of hign speed data acquisition system,we design a data acquisition system based on USB in this paper.The design work of this system consists of hardware design and software design.In hardware design,the AT89C5131 MCU of ATMEL company is apllied as microcontrollers to receive digital datas converted from A/D.Meanwhile,the USB controller in the MCU can realize the USB data communication between MCU and PC.The main difficulty in the design work is the software design.The design of firmware program、USB drive program and user program are included in the software design.The firmware program is developed through the software of Keil C,and the USB diver program is generated automatically by DriverWorks and modified appropriately;Through the design of firmware program and USB drive program, the MCU can be identified as USB slave device by the host PC, and the datas collected can be transmitted to PC by USB data wire.The user program of PC is developed by VC++,and the USB data acquisition interface is designed by MFC to display the wave form of the datas collected.In the end of this paper,we test the system,and the wave forms of the inputting random signals can be displayed on the data acquisition interface designed.The practice work indicates that the design work of this system has received initial success,and the USB data acquisition function can be realized by the system.

【关键词】 数据采集USB单片机固件
【Key words】 Data acquisitionUSBMCUFirmware
  • 【网络出版投稿人】 苏州大学
  • 【网络出版年期】2009年 09期
节点文献中: 

本文链接的文献网络图示:

本文的引文网络