USB device system is divided into two parts, USB host side and USB device side, the USB interface of the U disk as an example, the U disk itself is a USB device,pc machine USB interface and related control circuit for the USB host part.
Each part is composed of hardware part and software part, hardware part consists of USB host controller and USB interface chip, firmware (software) is composed of drivers on both sides.
In order to standardize the USB devices of different vendors, IEEE specifies the corresponding specifications, so long as the devices at different end meet this specification, they can communicate normally.
Host Controller Protocol
The host Controller protocol has OHCI, EHCI, UHCI, XHCI.
For specific functions within the Protocol specification, implemented by hardware or by software, depending on the application and environment, there is a OHCI and UHCI host Controller protocol for the USB1.1 protocol.
OHCI put some functional implementation on the hardware, therefore, the software is relatively easy to develop, often used in embedded systems
UHCI the implementation of some functions more on the software, therefore, the hardware can be done relatively simple, suitable for mass production, commonly used in PC
In order to solve the problem of low transmission speed of USB1.1, the USB specification is upgraded to USB2.0, and the corresponding host controller specification is upgraded to EHCI.
Further upgrade the USB specification to USB3.0, for the host controller specification is XHCI. Is the difference between different USB host controllers.
USB Hardware Interface
USB Plug and socket, according to different use environment, divided into three types, type largest, mini medium, micro smallest. Each type is divided into Class A and Class B two specifications.
USB3.0 interface, USB3.0 4 additional lines compared to USB2.0, but is designed to maintain compatibility with USB2.0.
is a protocol comparison of different specifications:
Encoding method
USB with Nrzi (non-zero reversal code), level reversal represents the logic 0, the level unchanged represents the logic 1. Each USB packet is preceded by a synchronization domain (0000_0001), which is encoded as a square wave. In order to prevent the transmission error caused by the same data, USB specifies a force 0 protocol, that is, if the data to be transmitted has 7 consecutive 1, before the transmission will be forced to insert a 0 after the sixth 1, forcing the reversal of the sending signal, so that the two sides of the acceptance frequency synchronization.
Classification of USB
USB is just a form of interface, based on this interface, can have multiple devices, in order to facilitate unified management, for different devices, the USB specification specifies a different device type, detailed USB class classification to participate in this link:
Http://www.xat.nl/en/riscos/sw/usb/class.htm
Enumeration of USB
USB enumeration, USB Emulation, is the meaning of USB initialization, simply speaking, is the USB host and device dialogue.
USB data transfer
A USB transmission, composed of different transactions (Transaction), a transaction consists of different packages (Packet), and a package is made up of different domains. See:
Data transmission is divided into two categories: periodic and non-cyclical.
Periodically, there are interrupt transmissions and equal-time transmissions.
Non-cyclical controlled transmission and bulk transfer
Reference Links:
USB Device Description:
http://blog.csdn.net/ljzcom/article/details/8574411
USB Device Driver Development:
http://blog.csdn.net/ljzcom/article/details/8574387
Probe process for USB devices:
http://blog.csdn.net/ljzcom/article/details/7419867
Data structure of USB device driver development:
http://blog.csdn.net/ljzcom/article/details/7693209
http://blog.csdn.net/ljzcom/article/details/7693212
http://blog.csdn.net/ljzcom/article/details/7693219
Technorati Tags: USB
USB Interface Introduction