基于USB的数据采集系统设计
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着现代工业领域对数据采集的要求越来越高,传统的以采用数据采集卡为主的方法由于传输速度慢、安装麻烦、抗干扰能力弱等诸多问题已难以适应如今数据采集的要求。通用串行总线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数据采集功能。
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.
引文
[1]边海龙,贾少华.USB2.0设备的设计与开发[M].北京:人民邮电出版社.2004
    [2]萧世文.USB2.0硬件设计[M].北京:清华大学出版社.2002
    [3]许永和.8051单片机USB接口程序设计(上)[M].北京:北京航空航天大学出版社.2004
    [4]王江舟.USB数据采集系统设计[J].电脑知识与技术.2008.4(3).656-666
    [5]谢兰英.基于USB数据采集系统的研究与设计[D].湖北:武汉理工大学.2007
    [6] Chandran Nair.基于USB数据采集设备的测量应用.电子工程专辑网站.2007
    [7]廖济林.USB2.0应用系统开发实例精讲[M].北京:电子工业出版社.2006
    [8]肖踞雄,翁铁成,宋中庆.USB技术及应用设计[M].北京:清华大学出版社.2003
    [9]周立功.USB2.0与OTG规范开发指南[M].北京:北京航空航天大学出版社. 2004
    [10]马伟.计算机USB系统原理与其主/从机设计[M].北京:北京航空航天大学出版社.2004
    [11] MAXIM.MAX1316 Data Sheet.2004
    [12]张春平.USB数据采集系统的设计与应用[D].河北:河北工业大学.2004
    [13] CYPRESS.CY7C68013 Data Sheet.2005
    [14] MICROCHIP.PIC24FJ256GB110 Data Sheet.2008
    [15] ATMEL.AT89C5131A-M Data Sheet.2003
    [16] ATMEL.AT89C5132 Data Sheet.2004
    [17]余永权.ATMEL89系列单片机应用技术[M].北京:北京航空航天大学出版社.2002
    [18]才永胜,李杏春,王占国.AT89C5131在USB设计中的应用[J].仪器仪表用户. 2006.13(6).105-106
    [19]吴明琪,马潮.嵌入式系统的USB虚拟串口的设计[J].单片机与嵌入式系统应用.2005.4.62-66
    [20] ATMEL.AT89C5131A USB Bootloader.2003
    [21]邹丽新,翁桂荣.单片微型计算机原理[M].苏州大学出版社.2001
    [22] National Semiconductor.ADC0808/ADC0809 Data Sheet.1999
    [23]翁桂荣,邹丽新.单片微型计算机接口技术[M].苏州大学出版社.2002
    [24] Philips Semiconductor.74HC/HCT373 Data Sheet.1993
    [25] Philips Semiconductor.74HC/HCT393 Data Sheet.1990
    [26] Philips Semiconductor.74ALS00A Data Sheet.1991
    [27] Philips Semiconductor.74ALS04B Data Sheet.1991
    [28] ATMEL.AT28C64B Data Sheet.1999
    [29]谭保华,熊健民.基于USB总线技术的高速数据采集卡设计[J].计算机测量与控制.2008.16(12).1982-1984
    [30]潘叶辉,袁中凡,杨春生,江东.新型便携式骑车动态参数检测系统[J].中国测试技术.2007.33(6).48-51
    [31]周坚.单片机C语言轻松入门[M].北京:北京航空航天大学出版社.2006
    [32]张岳新.Visual C++程序设计[M].苏州大学出版社.2002
    [33] ATMEL.Implementing the USB Enumeration Process on the AT8xC5131/32/22 and AT8xC51SND1.2003
    [34]杜德生,李树林.USB在数据采集系统中的应用[J].自动化技术与应用. 2008.27(9).126-128
    [35]韩显丰,周绍骑.基于USB技术的温度采集系统的设计与实现[J].后勤工程学院学报.2009.25(1).60-63
    [36]李鉴,黄大勇.基于CY7C68013的USB数据采集系统[J].微计算机信息.2009. 25(1-1).97-98
    [37]吴鹏,陶正苏,胡宇贞.基于单片机USB接口的PC主机驱动程序和应用程序设计[J].电子器件.2005.28(3).612-614
    [38]朱丽,陈钟荣,张秀再.基于VC的USB接口通信程序设计[J].电子工程师. 2008.34(3).57-60
    [39]黄庆,朱杰.基于MFC数据采集系统界面软件[J].电子测量技术. 2004.2.63-64

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700