Research and Design of USB Devices Based on Mcu
- Author
- ZhongZhiBin
- Advisor
- MengHao
- School
- Anhui Agricultural University
- Major
- Applied Computer Technology
- Classification
- TP334.7 Interface devices,plug-in
- Degree
- Master's thesis
- Year
- 2010
- Downloads
- 387
- Citations
- 4
Abstract
USB is an abbreviation of Universal Serial Bus. It is originally launched by Intel and Microsoft, its biggest feature is Hot-plug and Plug and Play. A host enumerate a device and load the necessary drivers when the device is plugged, it can communicate with a computer immediately, so it is convenient than the use of PCI and PS/2 buses. USB appears primarily to simplify the connection of personal computers and peripheral devices, to increase easy use. The Plug and Play of USB will make computers become more accessible and popular. USB also has many advantages, such as easily use, easily carry, high transmission speed, high scalability, standardization and cheap. As long as a device is connected with computers, it can be achieved practically by USB. So USB function is evident strong and the research of related developments of USB devices is very significant.In the paper, the system main hardware circuit is based on the MCU STC11F32XE and the USB driver chip PDIUSBD12 which be used to design USB devices,uses it to research and design a multi-media USB keyboard, a USB MIDI device and a custom USB storage device, the specific methods and processes of the design USB devices are given. For hardware design, need to master the relevant external circuit design, including the circuit design of MCU and USB driver chip PDIUSBD12. In the hardware design process, focus on the stability and reliability of the circuit. In the software design process, study in depth the relevant USB protocol and the development of USB firmware, USB device firmware design methods and processes are given. For a custom USB storage device, a USB device driver is inevitably developed. Therefore, need to study in depth the development of methods and techniques of USB driver based on WDM. The design driver mainly uses VC++6.0, Driver Studio and the DDK to achieve, the steps to create the driver framework and the main functions achievement based on this framework are given. In addition, for practical application and the convenience debug, further study the design of the suitable PC application.The system has successfully achieved the a multi-media USB keyboard, the USB MIDI device and the custom USB storage device. In actual test, these devices can stably and reliably run and have strong anti-interference ability. The Custom USB device driver and the PC application can stably and reliably run, can be applied to the actual development process of related projects. These successful designs of USB devices lay a solid foundation for USB devices development, and provide a valuable reference.
Table of contents
Abstract 3-4
Abstract 4-9
1 Introduction 9-12
1.1 thesis topic background 9-10
1.2 status quo at home and abroad and research purposes 10-11
main research content of 1.3 topics and major work 11-12
2 USB standard 12-24
2.1 USB Overview 12-13
2.2 USB topology 13-15
2.3 USB Electrical Characteristics 15-16
2.4 USB descriptors, and the relationship between 16-18
2.5 USB device enumeration process 18-19
2.6 USB communications package structure 19-21
2.7 USB transmission type 21-24
2.7.1 USB Affairs 21
2.7.2 USB bulk transfer 21-22
2.7.3 USB interrupt transmission 22
2.7.4 USB and other transmission 22-23
2.7.5 USB control transfer 23-24
3 system hardware design 24-32
3.1 overall demand 24
3.2 microprocessor module 24-26
3.2.1 STC11F32XE Microcontroller Overview 25-26
3.2.2 STC11F32XE microcontroller pin 26
3.3 USB interface communication module 26-30
3.3.1 PDIUSBD12 Overview 27
3.3.2 PDIUSBD12 features 27-28
3.3.3 of PDIUSBD12 pin functions 28-30
3.3.4 PDIUSBD12 microcontroller connected 30
3.4 aided design module 30-32
4 USB firmware research and design 32-45
4.1 firmware definition and design overview 32
4.2 USB interrupt handling 32-34
4.3 Read Endpoint 0 data realization 34-37
4.4 device descriptor realization and return 37-39
4.5 set address request processing 39-41
4.6 configuration description character collection implementations and return 41-43
the 4.7 string descriptor language ID request to achieve 43-45
the
multimedia USB keyboard with design 45-55
5.1 Human Interface Device Overview 45
5.2 device descriptor realization 45-46
5.3 configuration descriptor collection to achieve 46-47
5.4 USB HID report descriptor 47-50
5.5 report descriptor realization 50-55
USB MIDI device research and design 55-63
6.1 Musical Instrument Digital Interface Introduction 55
6.2 MIDI principle 55-56
6.3 USB MIDI device data flow model 56
6.4 USB MIDI descriptor realization 56-60
6.4.1 device description character and configuration descriptor collection 56-57
6.4.2 audio control interface descriptor 57
6.4.3 special audio control interface descriptor 57
6.4.4 MIDI stream interface descriptors 57-58
6.4.5 class special MIDI the stream interface descriptors 58-59
6.4.6 endpoint descriptors and special class endpoint descriptor 59-60
6.5 USB MIDI device data return 60-63
7 self-definition USB storage devices and design 63-85
7.1 system design objectives and overall demand 63-64
7.1.1 system designed to 63
7.1.2 system overall demand 63-64
7.2 descriptor to achieve 64
7.3 self-definition USB device driver design 64-78
7.3.1 driver structure based on the the WDM type of USB 64-66
7.3.2 USB drive development programming environment to establish 66-67
7.3.3 USB drive to create a method and steps 67-72
7.3.4 USB device driver programming design 72-75
7.3.5 driver installation 75-78
7.4 host computer application designed 78-85
7.4.1 obtain all of the specified class of device information collection function 78-79
7.4.2 function to obtain a device interface information from the device information collection 79
7.4.3 to obtain detailed information of the specified device interface function 79-80
7.4.4 open device function 80-81
7.4.5 application to access the driver 81-83
7.4.6 application software use 83-85
8 USB device test 85-94
8.1 multimedia USB keyboard test 85-88
8.2 USB MIDI device test 88-91
8.3 self-definition USB storage device test 91-94
8.3.1 the amount of data the test 91-92
8.3.2 speed test 92-94
9 Conclusion 94-95
the
References 95-97
Acknowledgements 97-98
the
Appendix: MCU USB device with the design part of the circuit schematic diagram 98-100
Author 100-101
studying for a degree during the thesis 101
Related dissertations
- Research and Implementation of Infrared Touch Screen Based on HID Class
- Research and Application of USB Driver Based on S3C2440A Embedded Linux System
- Application design with USB interface based on PIC MCU
- Development and application of modern appliances wireless intelligent control system
- Study of Data Transmission System Based on USB2.0and FPGA
- Study and Design of Data Communication and the Host of Telemetry and Command System Basing on GSM Network
- Research and Application of USB Device Driver Based on Windows WDM
- The Software Development on Interface System of Imaging Tracker Capability Evaluation System
- Data Acquisition and Signal Processing Based on USB2.0
- The Research and Design of LCD Figure and Character Display System Based on USB
- The Development and Application of USB Device Drivers Based on Windows WDM
- Research and Design of Data Acquisition System Based on USB
- On-line Signature Data Collection and USB Communication
- Research and Develop Dynamic Signal Analyzer Based on USB2.0
- Research on USB Protocol and USB Interface Drivers
- Realization of Virtual Frequency Spectrum Analyzing Instrument Based on USB
- Data Collecting System Based on USB Interface with Application
- Realization of intelligent instrument system based on embedded Linux and USB communication
- USB Interface Technology and Application Study
- Vehicle traveling data recorder