Short for Universal Serial Bus, standard that supports an external busdata transfer rates of 12 Mbps. A single USB port can be used to connect up to 127 peripheral devices, such as mice, modems, and keyboards. USB also supports Plug-and-Play installation and hot plugging.
Starting in 1996, a few computer manufacturers started including USB support in their new machines. It wasn't until the release of the best-selling iMac in 1998 that USB became widespread. It is expected to completely replace serial and parallel ports.
USB was designed to allow many peripherals to be connected using a single standardized interface socket and to improve the plug-and-play capabilities by allowing devices to be connected and disconnected without rebooting the computer (hot swapping). Other convenient features include providing power to low-consumption devices without the need for an external power supply and allowing many devices to be used without requiring manufacturer specific, individual device drivers to be installed.
USB is intended to help retire all legacy varieties of serial and parallel ports. USB can connect computer peripherals such as mice, keyboards, PDAs, gamepads and joysticks, scanners, digital cameras, printers, personal media players, and flash drives. For many of those devices USB has become the standard connection method. USB was originally designed for personal computers, but it has become commonplace on other devices such as PDAs and video game consoles. As of 2008, there are about 2 billion USB devices in the world.
The design of USB is standardized by the USB Implementers Forum (USB-IF), an industry standards body incorporating leading companies from the computer and electronics industries. Notable members have included Agere (now merged with LSI Corporation), Apple Inc., Hewlett-Packard, Intel, NEC, and Microsoft.
Host controllers
The computer hardware that contains the host controller and the root hub has an interface geared toward the programmer which is called Host Controller Device (HCD) and is defined by the hardware implementer.
In the version 1.x age, there were two competing HCD implementations, Open Host Controller Interface (OHCI) and Universal Host Controller Interface (UHCI). OHCI was developed by Compaq, Microsoft and National Semiconductor; UHCI was by Intel.
VIA Technologies licensed the UHCI standard from Intel; all other chipset implementers use OHCI. UHCI is more software-driven, making UHCI slightly more processor-intensive than OHCI but cheaper to implement. The dueling implementations forced operating system vendors and hardware vendors to develop and test on both implementations which increased cost.
HCD standards are out of the USB specification's scope, and the USB specification does not specify any HCD interfaces. In other words, USB defines the format of data transfer through the port, but not the system by which the USB hardware communicates with the computer it sits in.
During the design phase of USB 2.0 the USB-IF insisted on only one implementation. The USB 2.0 HCD implementation is called the Enhanced Host Controller Interface (EHCI). Only EHCI can support hi-speed transfers. Most of PCI-based EHCI controllers contain other HCD implementations called 'companion host controller' to support Full Speed and Low Speed devices. The virtual HCD on Intel and VIA EHCI controllers are UHCI. All other vendors use virtual OHCI controllers.
Device classes
Devices that attach to the bus can be full-custom devices requiring a full-custom device driver to be used, or may belong to a device class. These classes define an expected behavior in terms of device and interface descriptors so that the same device driver may be used for any device that claims to be a member of a certain class. An operating system is supposed to implement all device classes so as to provide generic drivers for any USB device. Device classes are decided upon by the Device Working Group of the USB Implementers Forum.
Device classes include:
Class | Usage | Description | Examples |
---|---|---|---|
00h | Device | Unspecifiedclass 0 | (Device class is unspecified. Interface descriptors are used for determining the required drivers.) |
01h | Interface | Audio | speaker, microphone, sound card |
02h | Both | Communications and CDC Control | ethernet adapter, modem, serial port adapter |
03h | Interface | Human Interface Device (HID) | keyboard, mouse, joystick |
05h | Interface | Physical Interface Device (PID) | force feedback joystick |
06h | Interface | Image | Digital Camera (Most cameras function as Mass Storage for direct access to storage media). |
07h | Interface | Printer | laser printer, Inkjet printer |
08h | Interface | Mass Storage | USB flash drive, memory card reader, digital audio player |
09h | Device | USB hub | full speed hub, hi-speed hub |
0Ah | Interface | CDC-Data | (This class is used together with class 02h - Communications and CDC Control.) |
0Bh | Interface | Smart Card | USB smart card reader |
0Dh | Interface | Content Security | - |
0Eh | Interface | Video | webcam |
0Fh | Interface | Personal Healthcare | - |
DCh | Both | Diagnostic Device | USB compliance testing device |
E0h | Interface | Wireless Controller | Wi-Fi adapter, Bluetooth adapter |
EFh | Both | Miscellaneous | ActiveSync device |
FEh | Interface | Application Specific | IrDA Bridge |
FFh | Both | Vendor Specific | (This class code indicates that the device needs vendor specific drivers.) |
Note class 0: Use class information in the Interface Descriptors. This base class is defined to be used in Device Descriptors to indicate that class information should be determined from the Interface Descriptors in the device.
USB signalling
USB supports three data rates:
- A Low Speed (1.1, 2.0) rate of 1.5 Mbit/s (187.5 kB/s) that is mostly used for Human Interface Devices (HID) such as keyboards, mice, and joysticks.
- A Full Speed (1.1, 2.0) rate of 12 Mbit/s (1.5 MB/s). Full Speed was the fastest rate before the USB 2.0 specification and many devices fall back to Full Speed. Full Speed devices divide the USB bandwidth between them in a first-come first-served basis and it is not uncommon to run out of bandwidth with several isochronous devices. All USB Hubs support Full Speed.
- A Hi-Speed (2.0) rate of 480 Mbit/s (60 MB/s).
Experimental data rate:
- A Super-Speed (3.0) rate of 4.8 Gbit/s (600 MB/s). The USB 3.0 specification will be released by Intel and its partners in mid 2008 according to early reports from CNET news. According to Intel, bus speeds will be 10 times faster than USB 2.0 due to the inclusion of a fiber optic link that works with traditional copper connectors. Products using the 3.0 specification are likely to arrive in 2009 or 2010.
USB signals are transmitted on a twisted pair data cable with 90Ω ±15% impedance,[6] labeled D+ and D−. These collectively use half-duplex differential signaling to combat the effects of electromagnetic noise on longer lines. D+ and D− usually operate together; they are not separate simplex connections. Transmitted signal levels are 0.0–0.3 volts for low and 2.8–3.6 volts for high in Full Speed and Low Speed modes, and ±400mV in High Speed (HS) mode. In FS mode the cable wires are not terminated, but the HS mode has termination of 45Ω to ground, or 90Ω differential to match the data cable impedance.
USB uses a special protocol to negotiate the High Speed mode called "chirping". In simplified terms, a device that is HS capable always connects as an FS device first, but after receiving a USB RESET (both D+ and D- are driven LOW by host) it tries to pull the D- line high. If the host (or hub) is also HS capable, it returns alternating signals on D- and D+ lines letting the device know that the tier will operate at High Speed.
Clock tolerance is 480.00 Mbit/s ±500ppm, 12.000 Mbit/s ±2500ppm, 1.50 Mbit/s ±15000ppm.
The USB standard uses the NRZI system to encode data, and uses "bit stuffing" by always injecting one artificial "zero" bit if the stream of data contains six consecutive "ones" before converting the bit stream to NRZI.
Though Hi-Speed devices are commonly referred to as "USB 2.0" and advertised as "up to 480 Mbit/s", not all USB 2.0 devices are Hi-Speed. The USB-IF certifies devices and provides licenses to use special marketing logos for either "Basic-Speed" (low and full) or Hi-Speed after passing a compliance test and paying a licensing fee. All devices are tested according to the latest spec, so recently-compliant Low-Speed devices are also 2.0 devices.
The actual throughput currently (2006) attained with real devices is about two thirds of the maximum theoretical bulk data transfer rate of 53.248 MB/s. Typical hi-speed USB devices operate at lower speeds, often about 3 MB/s overall, sometimes up to 10-20 MB/s
USB cables
Pin | Name | Cable colour | Description |
---|---|---|---|
1 | VCC | Red | +5V |
2 | D− | White | Data − |
3 | D+ | Green | Data + |
4 | GND | Black | Ground |
The maximum length of a standard USB cable is 5.0 meters (16.4 ft). The primary reason for this limit is the maximum allowed round-trip delay of about 1500 ns. If a USB device does not answer to host commands within the allowed time, the host considers the command to be lost. When USB device response time, delays from using the maximum number of hubs and delays from cables connecting the hubs, host and device are summed, the maximum delay caused by a single cable turns out to be 26 ns. USB 2.0 specification states that the cable delay must be less than 5.2 ns per meter, which means that maximum length USB cable is 5 meters long. However, this is also very close to the maximum possible length when using a standard copper cable.
Pin | Name | Color | Description |
---|---|---|---|
1 | VCC | Red | +5 V |
2 | D- | White | Data - |
3 | D+ | Green | Data + |
4 | ID | none | permits distinction of Micro-A- and Micro-B-Plug Type A: connected to Ground Type B: not connected |
5 | GND | Black | Signal Ground |
The data cables are a twisted pair to reduce noise and crosstalk.
Maximum Useful Signalling Distance
Although a single cable is limited to 5 meters, the USB specification permits up to five USB hubs in a long chain of cables and hubs. Consequently the maximum possible signalling distance is 30 meters, using six 5-meter cables and five hubs. In actual use, the last hub is a more convenient endpoint since some USB devices include built-in cables intended to directly connect to a hub, setting the maximum useful signalling distance at 25 meters.
Because USB is able to provide power for additional devices connected to the bus, a special type of USB extender cable was created which consists of a miniature one-port USB hub molded into one end of a 5 meter cable. These mini-hubs are fully self-contained within the cable, requiring no separate bulky hub device, and are as simple to use as plugging cables together, with each hub drawing power through all the previous single-port hubs in the chain.
The bus power is limited however, so the most practical application is to use four single-port hub extender cables, one plain 5 meter cable, and then a powered multiport hub at the very end to support multiple additional USB devices. This is especially useful where a cool and quiet work area is needed, permitting a keyboard, mouse, flash drive, printer, etc to be used 25 meters from a loud heat-generating computer.
USB compared with FireWire
USB was originally seen as a complement to FireWire (IEEE 1394), which was designed as a high-speed serial bus which could efficiently interconnect peripherals such as hard disks, audio interfaces, and video equipment. USB originally operated at a far lower data rate and used much simpler hardware, and was suitable for small peripherals such as keyboards and mice.
The most significant technical differences between FireWire and USB include the following:
- USB networks use a tiered-star topology, while FireWire networks use a repeater-based topology.
- USB uses a "speak-when-spoken-to" protocol; peripherals cannot communicate with the host unless the host specifically requests communication. A FireWire device can communicate with any other node at any time, subject to network conditions.
- A USB network relies on a single host at the top of the tree to control the network. In a FireWire network, any capable node can control the network.
- USB runs with a 5v power line, whereas Firewire can supply up to 30v.
These and other differences reflect the differing design goals of the two buses: USB was designed for simplicity and low cost, while FireWire was designed for high performance, particularly in time-sensitive applications such as audio and video. Although similar in theoretical maximum transfer rate, in real-world use, especially for high-bandwidth use such as external hard-drives, FireWire 400 generally, but not always, has a significantly higher throughput than USB 2.0 Hi-Speed. The newer FireWire 800 standard is twice as fast as FireWire 400 and outperforms USB 2.0 Hi-Speed both theoretically and practically. The chipset and drivers used to implement USB and Firewire have a crucial impact on how much of bandwidth prescribed by the specification is achieved in the real world, along with compatibility with peripherals. Audio peripherals in particular are affected by the USB driver implementation.
One reason USB supplanted FireWire, and became far more widespread, is cost; FireWire is more expensive to implement, producing more expensive hardware.
DESCRIPTION OF AN USBThe Universal Serial Bus (USB) specification is a proposed standard recently promulgated by a group of computer companies including Compaq Computer Corporation. Digital Equipment Corporation, IBM, Intel Corporation, Microsoft Corporation and Northern Telecom. Described below are various aspects of the Universal Serial Bus. Further background concerning the Universal Serial Bus may be obtained from the Universal Serial Bus Specification. Revision 1.0. which is hereby incorporated
The Universal Serial Bus specification defines a Universal Serial Bus system in terms of Universal Serial Bus "interconnects".
scheduling, and
Universal Serial Bus devices include hubs and functions. Hubs provide additional attachment points to the Universal Serial Bus and may be integrated with a host, which ordinarily provides only one attachment point for connecting a hub or a function. Functions provide capabilities to the system. such as joystick, keyboard. microphone. and speaker capabilities.
The basic data transfer protocol of the Universal Serial Bus is described as follows, with particular attention to Fig. 1. Fig.
Following the SYNC field in each packet is a packet identifier (PID(T) for the token packet. PID(D) for the data packet. PID(H) for the handshake packet, and PID(S) for the start-of-frame packet. which may be considered a type of token packet). The packet identifiers PID(T), PID(D),
Only one type of start-of-frame packet identification field 1008, PID(S), is defined: a start of frame time stamp. The address and endpoint fields of the token packet are replaced in the start of frame packet with a time-stamp field. The time-stamp field for the start of frame packet provides a clock tick which is available to all devices on the bus. The start-of-frame packet is sent by the host every 1 ms
The data packet 1004 includes a packet identifier PID(D), a data field DATA. and a 16-bit cyclical redundancy checksum field, CRC 16. Two types of packet IDs for the data field, data 0 and data 1, identify whether the data packet is being sent for the first time or whether being sent as a retry. The data field DATA may vary in length from 0 to N bytes. Failure of the cyclical redundancy checksum on the data field DATA causes the receiver to issue an error ERR handshake.
The handshake packet 1006 includes only a packet identifier
An acknowledge handshake. ACK. indicates that the receiver will accept the data and that the CRC has succeeded. A negative acknowledge. NACK. indicates that the receiver cannot accept the data or that the source cannot send the data. An ERR field indicates that the receiver will accept the data. but that the CRC has failed. A stall handshake packet, STALL. indicates that the transmission or reception pipe is stalled. A stall handshake is defined only for stream-oriented end-points (as distinguished from message-oriented endpoints. discussed below).
Data flow on the Universal Serial Bus is defined in terms of
The Universal Serial Bus supports isochronous, asynchronous. and asynchronous interactive data flow. For isochronous data. access to USB bandwidth is guaranteed. A constant data rate through the pipe is provided. and in the case of delivery failure due to error, there is no attempt to retry to deliver the data.
Asynchronous interactive data flow provides a guaranteed service rate for the pipe, and the retry of failed transfer attempts. Asynchronous data flow accommodates access to the USB on a band-width available basis and also permits retry of data transfers.
Scheduling of the Universal Serial Bus is defined in terms of
Each frame,
The Universal Serial Bus provides both periodic service and aperiodic service. For periodic service corresponding to isochronous data. a fixed period exists
Turning now to Fig. 3, there is illustrated an abstracted block diagram of a Universal Serial Bus device, such as a hub or function. Universal Serial Bus device 1200 includes a device interface 1202 and a class interface
While the Universal Serial Bus is intended to be an
In addition, while the USB specification defines signaling whereby a USB device or hub controller may wake the network from a low power mode, the USB specification does not define a mechanism whereby the devices may power themselves down or awaken in response to the signaling. There is therefore a need to provide a USB compatible speaker and/or microphone having power management capabilities.
Moreover. in the case of a USB speaker and/or microphone. random power fluctuations. either at power-up or during normal operation. can feed through the speakers and cause annoying
Accordingly, there is a need to provide a USB compatible speaker and/or microphone having click suppression when the USB is unstable or during power-up and power-down.
No comments:
Post a Comment