USB 2.0 Cables
USB signals are transmitted on a twisted pair of data cables, labeled D+ and D-. These collectively use half-duplex differential signaling to combat the effects of electromagnetic noise on longer lines. Contrary to popular belief, D+ and D- operate together; they are not separate simplex connections.
The USB connector
provides a single 5 volt wire from which connected USB devices may
power themselves. A given segment of the bus is specified to deliver up
to 500 mA. This is often enough to power several devices, although this
budget must be shared among all devices downstream of an un-powered
hub. A bus-powered device may use as much of that power as allowed by
the port it is plugged into. Bus-powered hubs can continue to
distribute the bus provided power to connected devices but the USB
specification only allows for a single level of bus-powered devices
from a bus-powered hub. This disallows connection of a bus-powered hub
to another bus-powered hub. Many hubs include external power supplies
which will power devices connected through them without taking power
from the bus. Devices that need more than 500 mA or higher than 5 volts
must provide their own power.
• See over 100 audio video hookup diagrams
• Audio Video Cable Types
• VCR hookup to PC, VHS to DVD
hubs: Draw Max 100 mA at
power up and 500 mA normally.
The USB 2.0 specification divides USB devices into three categories based on transfer rates:
The primary differences between USB 1.1 and 2.0 specifications are the addition of lower-latency 480 Mb/s transfers and improved host software specifications. USB 1.1 compliant devices will not become obsolete because all USB 1.1 devices are compatible with the USB 2.0 standard (they are classified as full- or low-speed devices).
Universal Serial Bus (USB)
One of the reasons that USB was implemented was to replace existing serial and parallel ports on computers. USB has several advantages for this application, which is why it has been included in most of the new PCs that have been shipped since Windows 98 was released in late June of 1998:
USB Implementers Forum, Inc. is a non-profit corporation formed by a group of companies that developed the initial USB specification. Among their activities is the development of a testing and certification program for compliance with the USB specification. Before a device can use the USB logo or icon, it must undergo rigorous testing and be certified as USB compliant.
While this compliance testing goes a long way toward ensuring device compatibility, there are no guarantees, however, that all USB certified devices will be able to work together compatibly over a particular USB bus. This is not only because of differences in interpreting and implementing the USB standard and failure by some manufacturers to adhere to the standards, but also because of the rapid development of technology itself. For example, because of the limited bandwidth of the USB 1.x standard, care must be exercised when combining devices compliant with that specification where data receipt is time-sensitive -- such as several devices on one bus that all transfer video simultaneously.
There are several different editions of the USB standard that have been released:
Windows 95 (and earlier versions of Windows) has no USB support, however a sub-release of Windows 95 (OEM Service Release 2) was issued to computer manufacturers and it added somewhat limited support for the USB protocol. Windows 98 added additional support and fixed some problems that were in the 95 OEM Service Release 2. Windows 98se (98 second edition) released in early June of 1999 had more robust support for USB. Both Windows 2000 and Windows Me released in early 2000 added additional features. Apple Computer's OS 9.0.4 was released late summer of 2000 and added much better support for USB for the Mac. Many problems associated with USB can be solved by using the latest version of the appropriate operating system.
In this article, the term USB includes all the above revisions as a general protocol. However, the operating details described below refer to USB 1.x (both USB 1.0 and 1.1) unless otherwise specified. Also, when a "device" is mentioned here, it is referring to a USB-compliant peripheral. With the release of Windows XP and the computers that can run it, USB is standard and devices can be connected and hot-plugged with automatic recognition by the Operating System.How USB Works
USB uses a four-wire cable interface. Two of the wires are used in a differential mode for both transmitting and receiving data, and the remaining two wires are power and ground. The source of the power to a USB device can come from the host, a hub, or the device can be "self powered." There are two different connector types on each end of a USB cable. One of these connectors is for upstream communications, and the other for downstream. Each cable length is limited to about 5 meters.
USB has four types of communication transfer modes:
In interrupt mode, interrupts do not occur in the usual sense. As in control mode, the host has to initiate the transfer of data. Interrupt mode works by the host querying devices to see if they need to be serviced.
Bulk mode and isochronous mode complement each other in a sense. Bulk mode is used when data accuracy is of prime importance, but the rate of data transfer is not guaranteed. An example of this would be disk drive storage. Isochronous mode sacrifices data accuracy in favor of guaranteed timing of data delivery. An example of this would be USB audio speakers.
The PC host typically has connections for two external USB ports. Each of these two connectors on the PC is actually a connection to a separate root hub inside the PC. If either of the two root hubs needs to have more than one device connected to it, a downstream USB hub is required to expand connections. Hubs are used to add to the number of devices that can be connected to one USB port. They can be considered to be a repeater of sorts and also a controller. When a device is connected downstream of a hub, the hub does the connect detection of the new device and notifies the host.
Hubs can be inside the device itself -- for example, in a keyboard that may have an additional two downstream USB connectors for additional devices. A hub can have a combination of high and low speed devices connected to it, up to a maximum of four additional hubs downstream from itself. A hub's upstream port to the PC must be high speed. The hub acts as a traffic cop, handling communication to downstream devices as either high or low speed. A hub can ignore a downstream device that is not behaving properly. Hubs can be either self-powered or receive power from the USB bus. USB 1.x hubs support both low and high-speed data transfers.
There are several hardware requirements for devices that are placed on the USB bus. Five volts is the nominal supply voltage on the bus. A device that requires 100mA or less can be powered from the host or any hub, provided that the total available power hasn't already been exhausted by other devices. A device on the bus can draw up to 500mA from it. However, not all USB hosts (especially a battery powered PC) or bus-powered hubs will allow a device to draw more than 100mA from the bus. For this reason, a USB device that draws more than 100mA should, in most cases, be self-powered .
A device tells the host how much current is required for its operation. Self-powered devices usually get their power from a separate power supply or batteries. A battery-powered device plugged into the bus can get its power from the bus if it meets the tests above, and it can then switch back over to battery power when it is disconnected from the bus or when the host is shut down. When a device is in suspend mode, it cannot draw any more than 500uA from the bus if it is bus-powered. Also, if a device has not seen any activity on its bus in 3 mS, it needs to go into suspend mode. A host can initiate a resume command to a device that is in suspend mode. A device can also issue a remote wakeup to an inactive host to make it active.
All devices have endpoints, which are memory buffers. An endpoint can be as simple as an addressable single register, or it can be a block of memory that is used to store incoming and/or outgoing data. There may be multiple endpoints inside a device. Each device has at least one endpoint -- "endpoint 0"-- which is used as a control endpoint. It must be able to both send and receive data, but can only communicate in one direction at a time. Typically, when a device receives data such as an Out or Setup command from the host, this data is stored in the endpoint and the device's microprocessor is interrupted and works on this data. When a device receives an In command that is addressed to it from the host, data for the host that is stored in the endpoint is sent to the host.
The host is considered to be the master in most all cases. One exception is when a device issues a remote wakeup to the host as discussed above. There are time limits for both the host and device to respond to each other. For example, if the host requests data from a device using an In command, the device must send the data back to the host within 500mS, in some cases. Depending on the transaction type, the host and/or the device may respond to data received with an acknowledgement. Data transfer involves quite a bit of error-checking and handshaking. The different types of data packets sent and received use different ways to verify correct data transfer.
A logical connection link needs to be set up between the host and a device before a transaction can occur. This connection is referred to as a Pipe. It is set up as soon as possible after a host has recognized a device as being connected. When the host responds to a connect signal from the device, one of the parameters that is sent to the host is the device's required data transfer type and speed. The host can refuse to establish a Pipe if the host does not have enough bandwidth to support the device's request or if its power requirements cannot be met. The device at its discretion can lower its requested data rate and try again until the host accepts it and initiates a Pipe.
When a device is connected, it also sends to the host descriptor information on the types of endpoints in the device, the type of data transfer it uses, size of data packets, endpoint addresses within the device, and if used, the time required between data transfers.
The following describes a typical data flow for a device when it is initially plugged into a host's bus while the host is active. Remember that the host has an internal USB hub, and additional hubs may be connected downstream from the host's hub.
USB On-The-Go icon
USB On-The-Go (OTG) allows two USB devices to talk to each other without requiring the services of a personal computer. USB OTG retains the standard USB host/peripheral model, where a single host talks to USB peripherals. OTG introduces the dual-role device (DRD), capable of functioning as either host or peripheral. Part of the magic of OTG is that a host and peripheral can exchange roles if necessary. To add OTG dual-role capability, the transceiver must be augmented to allow the OTG device to function as either host or peripheral.
Before OTG, the concept
of an embedded host was already established in the USB world. Instead
of duplicating the full UHCI/OHCI USB controllers and drivers built
into personal computers, most embedded host chips provide limited
hosting capabilities. This makes them better suited to the embedded
environment than to the PC with its huge resources and infinite
capacity for drivers and application software. In addition to requiring
a dual role peripheral/host USB controller, OTG requires additional
circuitry to support two new protocols, called HNP and SRP. In OTG
nomenclature, the initial host is called the A-Device, and the initial
peripheral is called the B-Device. The word initial
is important. Once connected, OTG dual-role devices can exchange roles,
host and peripheral, using the new Host Negotiation Protocol (HNP). The
cable orientation determines the initial roles. Dual-role devices use a
new receptacle called the mini-AB. The mini-A plug, the mini-B plug and
the mini-AB receptacle add a fifth pin (ID) to give different
electrical identities to the cable ends. This ID pin is connected to
ground inside the mini-A plug and left floating in the mini-B plug. The
OTG device receiving the grounded ID pin is the default A-device
(host), and the device with the floating ID pin is the default B-Device
Wireless USB is the new wireless extension to USB that combines the speed and security of wired technology with the ease-of-use of wireless technology. Wireless connectivity has enabled a mobile lifestyle filled with conveniences for mobile computing users. Wireless USB will support robust high-speed wireless connectivity by utilizing the common WiMedia MB-OFDM Ultra-wideband (UWB) radio platform as developed by the WiMedia Alliance.
UWB technology offers a solution for high bandwidth, low cost, low power consumption, and physical size requirements of next-generation consumer electronic devices.