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

基于USB中断通道的TMC仪器控制协议研究及其实现

发布时间:2018-04-09 01:09

  本文选题:USBTMC 切入点:USB 出处:《电子科技大学》2017年硕士论文


【摘要】:USB总线拥有支持热插拔、即插即用和传输速度快等优势,现已经被越来越多的厂家应用到测试测量类(Test and Measurement Class,TMC)仪器中。但随着电子技术的发展,计算机逐渐成为TMC仪器的控制核心,由于采用计算机为控制核心的控制主机和仪器主机都仅提供USB Host接口,在利用USB总线实现控制主机与仪器主机的通信时,两者是不能直接通过USB Host接口互连通信。本课题研究USBTMC总线桥,控制主机与仪器的USB Host接口通过总线桥互连,实现控制主机对仪器的控制。该总线桥符合USB协议以及USBTMC协议的要求,可提高总线桥在使用上的规范性和兼容性。本文主要内容如下:1、完成总线桥总体方案设计。根据通用USB协议和USBTMC协议以及针对测试测量仪器的数据传输需求,完成对USBTMC总线桥的需求分析,通过需求分析得到了总线桥的连接方式和传输模型,确定了采用两块CY7C68013A USB接口芯片“背靠背”的连接方式来实现总线桥总体方案的设计。2、设计总线桥的固件程序。固件程序设计主要在于总线桥描述符文件设计、USBTMC类请求设计、总线桥数据传输设计。类请求设计重点在于两块芯片间的握手交互,数据传输设计主要是由中断传输、Bulk传输以及USB芯片的GPIF模式和Slave FIFO模式进行设计,其中中断传输用于解决USB通信壁垒、Bulk传输遵循USBTMC协议独有的格式规定。3、设计总线桥的设备驱动程序。分析总线桥主机端设备驱动需求,选择VISA和cyusb.sys作为USB设备驱动,控制主机应用程序直接调用visa32.lib函数接口,仪器主机应用程序调用由CyAPI.lib设计并二次封装的Instr USBInterface.dll函数接口。4、测试验证总线桥功能。确定测试方法和工具,本次测试利用单机闭环测试来测试总线桥在主机的识别连接、总线桥数据传输的正确性、稳定性以及速度测试、类请求命令测试,采用联机测试来测试总线桥在仪器控制上的应用。本课题所完成的USBTMC总线桥,经过测试和验证,总线桥支持USBTMC协议,能够正确响应处理协议所规定的请求命令,在数据传输方面,传输速度可达12MB/s,且传输稳定,可满足应用需求。
[Abstract]:USB bus has the advantages of supporting hot plug and play, plug and play and high transmission speed. It has been used by more and more manufacturers to test and Measurement class TMC instruments.However, with the development of electronic technology, computer has become the control core of TMC instrument. Because the control host and instrument host with computer as the control core only provide USB Host interface.When using USB bus to realize the communication between the host computer and the instrument host, they can not communicate directly through the USB Host interface.The USBTMC bus bridge is studied in this paper. The USB Host interface between the control host and the instrument is connected through the bus bridge to realize the control of the host computer to the instrument.The bus bridge meets the requirements of USB protocol and USBTMC protocol, which can improve the specification and compatibility of the bus bridge.The main contents of this paper are as follows: 1: 1, complete the overall design of bus bridge.According to the general USB protocol, USBTMC protocol and the data transmission requirement of the testing and measuring instruments, the requirement analysis of the USBTMC bus bridge is completed, and the connection mode and transmission model of the bus bridge are obtained through the demand analysis.Two CY7C68013A USB interface chips "back to back" are adopted to realize the design of bus bridge. 2. The firmware program of bus bridge is designed.Firmware program design mainly lies in bus bridge descriptor file design, USBTMC class request design, bus bridge data transmission design.Class request design focuses on the handshake interaction between the two chips. The design of data transmission is mainly carried out by interrupt transmission bulk transmission and GPIF mode and Slave FIFO mode of USB chip.Interrupt transmission is used to solve USB communication barrier. Bulk transmission follows the unique format of USBTMC protocol. 3. The device driver of bus bridge is designed.This paper analyzes the requirement of bus bridge host device driver, selects VISA and cyusb.sys as USB device driver, and controls host application program to call visa32.lib function interface directly.The instrument host application program calls the Instr USBInterface.dll function interface. 4, which is designed by CyAPI.lib and encapsulated twice, to test and verify the bus bridge function.Determine test methods and tools, this test uses single-machine closed-loop test to test the bus bridge in the host computer identification connection, bus bridge data transmission correctness, stability and speed testing, class request command test,The application of bus bridge in instrument control is tested by on-line test.The USBTMC bus bridge completed in this paper is tested and verified that the bus bridge supports the USBTMC protocol and can correctly respond to the request commands stipulated by the processing protocol. In the aspect of data transmission, the transmission speed is up to 12m / s, and the transmission is stable, which can meet the requirements of the application.
【学位授予单位】:电子科技大学
【学位级别】:硕士
【学位授予年份】:2017
【分类号】:TP336

【参考文献】

相关期刊论文 前5条

1 周学智;;基于WDM模型的USB驱动设计[J];工业控制计算机;2013年06期

2 余志荣;杨莉;;基于NI-VISA与LabVIEW的USB接口应用设计[J];单片机与嵌入式系统应用;2007年01期

3 刘宏伟,郑立云;USB2.0传输类型分析[J];计算机工程与设计;2005年07期

4 刘延波,郑世强,王斌,吴瑛;USB设备固件程序设计[J];信息工程大学学报;2004年02期

5 陈健 ,陈晓曙;多功能USB设备的结构设计研究[J];电子工程师;2003年03期

相关硕士学位论文 前5条

1 周子超;SCPI在示波器中的实现及其在上位机上的应用[D];电子科技大学;2016年

2 易曼萍;基于MVP架构的任意波形发生器人机接口设计[D];电子科技大学;2016年

3 申阳德;测试测量仪器USB桥驱动及固件设计[D];电子科技大学;2015年

4 吴圆霞;任意波形发生器SCPI服务程序及参数自动校正系统设计[D];电子科技大学;2014年

5 翟果;通用测试仪器USBTMC协议的研究与实现[D];电子科技大学;2013年



本文编号:1724162

资料下载
论文发表

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


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

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