Introduction to USB—Part I

This chapter presents a quick introduction to USB. The first section in this chapter introduces the basic concepts of the USB specification Revision 2.0. The second section explores the data flow model. The third section gives details about the device operation. Lastly, the fourth section describes USB device logical organization. The full protocol is described extensively in the USB Specification Revision 2.0.

A BRIEF HISTORY OF USB

The Universal Serial Bus (USB) is an industry standard maintained by the USB Implementers Forum (USB-IF) for serial bus communication. The USB specification contains all the information about the protocol such as the electrical signaling, the physical dimension of the connector, the protocol layer, and other important aspects. USB provides several benefits compared to other communication interfaces such as ease of use, low cost, low power consumption and, fast and reliable data transfer.

USB CONSORTIUMIn 1994, seven companies joined forces to define the USB standard: Compaq, Digital Equipment, IBM, Intel, NEC, Microsoft, Nortel. Each company had its own reasons to join the consortium, but they had three common goals:

To be fundamentally easier for users to connect peripheral devices to a computer while using a common infrastructure

To simplify the software configuration of any peripheral connected to the computer

To increase the achievable transfer bandwidth between the computer and the peripheral and vice-versa

USB 1.0 was released in 1996. It proposed Low Speed (LS) at 1.5 Mbits/sec and Full Speed (FS) at 12 Mbits/sec. In 1998, USB 1.1 was released to correct and clarify a few elements of the initial USB specification. LS was, and still is, used for human interface devices that do not require a lot of bandwidth, such as keyboard, mouse and joystick. FS was widely adopted for mass storage devices, printers, scanners and audio devices.

The market increasing need for bigger storage and faster communication links lead to the development of USB 2.0 in early 2000. This new USB standard kept the compatibility with LS and FS and added High Speed (HS) at 480 Mbits/sec.

TIMELINE

1969 Development of the serial port (RS-232C).

1994 The USB consortium is formed by Compaq, DEC, IBM, Intel, Microsoft, NEC and Nortel.

2000 USB 2.0 is released, specifying the implementation of a 480 Mbps bus.

2001 USB On-The-Go (OTG) supplement is added, which allows devices to communicate with each other.

2005 Wireless USB standard is released, which is a point to point wireless communications link.

2008 USB 3.0 is released, which delivers a transmission speed of up to 5 Gbit/s.

This book covers USB 1.1 and USB 2.0, as these are the standards commonly used in embedded systems. USB 3.0 requires resources not often available in typical embedded systems, and so will not be discussed in any detail.

USB cables are made of four 28-AWG conductors. A USB twisted pair, where the “D+” and “D-” conductors are twisted together in a double helix. The wires are enclosed in a further layer of shielding. Maximum cable length is five meters.

TYPE A AND B CONNECTORS

Connector Type A connects to the host (upstream ports), while connector Type B is often used to connect to devices (downstream ports).

The pins carrying electrical power (VBus and Gnd) are physically longer than the other two pins. So when connecting a device, the supply pins are connected first before the data pins. And when unplugging, the data pins disconnect before the power supply pins.