STM32的USB虚拟串口设计

[ ]
    目:高分散白炭黑    基于STM32USB虚拟串口   
    院:                               
        业:                             
    名:                               
    号:                             
指导老师:                             
完成时间:        2014519        

 
 
USB接口由于支持热插拔和标准统一等特点得到了广泛应用,越来越多的电脑设备开始采用USB接口进行数据的传输,而如何在不改变现有应用软件的情况下,将设备移植到USB接口成为人们研究的热门。 
论文以USB通信设备类中的抽象控制模型为基础,研究了通信设备类及实现虚拟设备的原理,设计并实现了基于通信设备类的虚拟串口驱动程序。 
论文研究设计了基于通信设备类的虚拟串口驱动程序的结构和实现方案,程序主要由通信命令转换和数据传输两部分构成,通信命令转换符合通信设备类中抽象控制模型的规范,数据传输部分对现有虚拟串口的实现技术进行了改进。论文的主要工作如下:
1) 研究了USB协议的请求和传输模式,分析了通信设备类实现虚拟设备的方案。
2) 给出了一种符合通信设备类中抽象控制模型的虚拟串口实现方案。该方案提供了一种基于通信设备类开发虚拟设备的模板,对设计中的诸多问题进行了详细的说明,并改进了虚拟串口驱动程序中数据的处理流程。
3) 将改进后的数据处理流程应用于虚拟串口的实现中,生成了一种基于通信设备类的稳定、高速的虚拟串口。最后,在串口测试软件下对虚拟串口驱动程序进行了测试,达到了预期目标。
关键字: 通讯设备类;枚举过程;虚拟串口程序;抽象控制模型
   
               
Abstract
USB interface supports plug and play which has unified standards, so it  has a wide range of applications. More and more computer device use USB interface to transfer data, so how to make many old deaves to support USB interface without changing current application is becoming the hot field. 
USB Communication Device Class and it's abstract control model are studied, principles of Communication Device Class and implementation techniques of abstract device are also analyzed in the thesis. On the basis of this, design and implementation of virtual serial port driver based on Communication Device Class are given. 
The overall structure and implementation scheme of virtual serial port driver based on CDC are designed. The virtual serial port driver is made up of two parts which are communication command transfer module and data transmission module. The communication command transfer module satisfies the specification of abstract control model, and the data transfer part improves the technique of current virtual serial port. The main works in the thesis are as follows:
便携式洒弹器1) The request and transfer model for USB protocol are studied, and the implementation techniques of virtual serial port are analyzed. 
2) The implementation scheme of virtual serial port driver that satisfy abstract control mode in CDC is graven. A new template for the development of virtual serial port based on CDC is brought out, and it describes some issues for the virtual serial port driver in details,  at the same time, the processing steps for virtual serial port driver is improved. 
3) The improved  data processing steps for virtual serial port driver is applied in the implementation of ritual serial port driver, and a stable, high-speed virtual serial port is made. At last, the test for the virtual serial port driveon ActiveSync is given, and the test result show that it's function is achieved the requirement goals.
Keywords:    Communication Device Class ;Enumeration Process;
Virtual Serial Port Driver  ;Abstract Control Model   
   
                                 


                 
1变频器开关电源 绪论
1.1 USB虚拟串口设计背景及其意义
USB是一种统一的传输规范,但是接口有许多种,最常见的就是咱们电脑上用的那种扁平的,这叫做A型口,里面有4根连线,根据谁插接谁分为公母接口,一般线上带的是公口,机器上带的是母口。现在的很多电子设备都采用USB集成电路测试>监控杆基础接口来设计,使得各个设备之间的相互通信更为方便和快捷。然而越来越多的设备开始使用USB接口,对USB协议也是一个很大的挑战。一般在传输数据的接口与通信协议是一一对应的,而由于接口的不同,不太外设使用的协议也不同。
USB接口具有使用简单、支持热插拔、传输速度快、便于端口扩展等特点,在高速实时数据传输系统、数据采集系统等工业领域得到了广泛的应用。现代个人计算机往往都带有四个以上的USB接口。然而在现代嵌入式系统和工业现场中,最常用的标准外设是异步串行
通信接口(串口)刷毛辊,如何在没有串口的情况下得到串口数据,并完成数据传输成为一个亟待解决的问题。

本文发布于:2024-09-23 16:23:06,感谢您对本站的认可!

本文链接:https://www.17tex.com/tex/3/271732.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:串口   虚拟   设备   接口   实现   数据   进行   设计
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议