kidzsearch.com > wiki
Universal Serial Bus
The standard was made to improve plug and play devices. This means that a device can simply be plugged into a free socket. The computer will then recognise it. The computer sometimes installs special software so that the device can directly be used. When it is no longer needed it is disconnected again. This technology is called "hot swapping", meaning it can be plugged and unplugged while the power is on. The computer does not need to be restarted to use a USB device.
USB can also provide a small amount of power to the attached device through the USB cord. Devices that only need a little power can get it from the bus and do not need a separate electric power plug. That allows gadgets like USB battery chargers, lights, and fans.
As of 2012, USB has replaced different other standards. Many devices that used different standards, such as printers connected to the parallel port or modems connected to the serial port, use USB. Industral applications often still use some of these technologies: An example is the serial port; some applications require real-time scheduling. This means that they need a guaranteed response time. USB can not give these guarantees, and cannot be used for such applications.
The first version of the Universal Serial Bus was created in 1995. This new technology became an instant success. Since the introduction of USB, people that make electronic devices thought about how it could be used in the future. Today, USB connects a computer or other devices like laptops and MP3 players to peripheral devices.
The bus was introduced by seven companies which represent the leaders in the industry of information technology: Compaq, IBM, Intel, Microsoft, NEC, Northern Telecom, and Digital Equipment Corporation (DEC).
Several years earlier, adopters and developers of USB held a meeting called Plugfest at a special hotel in California to test their devices. They selected a hotel that included rooms for sleeping and for testing. The meeting lasted three days. During the meeting, the representatives of about 50 companies connected their USB devices to one general host system.
The logo of the USB device also has its own history. The USB logo was in development for several months.
- 1994 - Seven companies united to begin the development of USB.
- 1995 - 340 companies formed the USB Implementation Forum.
- 1996 - More than five hundred USB products were already developing around the world.
- 1997 - USB Implementation Forum became richer with 60 more companies.
- 1998 - USB becomes the most popular technology on the market of electronics.
- 2000 - The introduction of USB 2.0. Today it represents the most widely used USB device.
- 2005 - USB becomes wireless.
- 2008 - USB 3.0 is introduced. It is over 10 times faster than USB 2.0
Currently, there are four different USB standards that are used: USB 1.0, USB 1.1, USB 2.0 and USB 3.0. USB 4.0 is said to be released in 2016 and will be 10 times the speed of 3.0 USB 1.0 is now rarely used.
USB offers four different transfer speeds: 1.5 MBit per second (called low speed), 12 MBit per second (Full Speed), 480 MBit/second (Hi Speed) and 5Gbit per second (called super speed. Hi speed is only available in USB 2.0 and Super speed is only available in USB 3,0. Please note that these speeds are raw data speeds (in Million bits per second). The actual data rate is usually lower (and maxes out at around 320 MBit per second due to protocol overhead).
In order to use the hi speed transfer rate, the USB controller and the connected device both need to support it. USB is backwards compatible. Faster and slower USB devices and controllers can be connected together, but they will run at the slower speed.
Almost all computers sold today have USB ports, and most of them support USB 2.0. The number of ports they have is usually limited, though. Between two and six ports are common. USB allows connecting USB hubs to add more USB ports.
The hubs themselves are also USB 1.1 or USB 2.0 compliant. On an USB 2.0 controller, standards can be mixed. Devices connected to a USB 1.1 hub will only go as fast as USB 1.1 rates.
USB was designed to be easy to use. When the connectors were designed, lessons learned from other connection techologies were also applied to USB connectors.
- It's difficult to plug in a USB connector the wrong way. They can not be plugged in upside down, and it is obvious from the look and kinesthetic sensation of making a connection when it's plugged in the right way. Sometimes, however, it's not obvious at a glance to inexperienced users (or if a user can not actually see the plug) which way the connector goes, so it might be necessary to try both ways. Usually the side of the connector with the "trident" logo is on top.
- Only a moderate force is needed to insert or remove the plug. This was in the specification. USB cables and small USB devices are held in place by the gripping force from the receptacle . USB does not need screws, clips, or thumbturns that other connectors need. The force needed to make or break a connection is small. This allows connections to be made in awkward positions or by those with motor disabilities.
- The connectors enforce the directed topology of a USB network. USB does not support cyclical networks, so the connectors from incompatible USB devices are themselves incompatible. Unlike other communications systems (e.g. RJ-45 cabling) gender-changers are almost never used, making it difficult to create a cyclic USB network.
- The connectors are designed to be tough. Early connector designs were fragile, with pins or other delicate components which could easily bend or break, even if treated gently. The electrical contacts in a USB connector are protected by a plastic tongue. The entire connecting assembly is usually further protected by an enclosing metal sheath. As a result USB connectors can safely be handled, inserted, and removed, even by a small child.
- The connector construction always ensures that the external sheath on the plug contacts with its counterpart in the receptacle before the four connectors within are connected. This sheath is typically connected to the system ground, allowing otherwise damaging static charges to be safely discharged by this route (rather than via delicate electronic components). This means of enclosure also means that there is a (moderate) degree of protection from electromagnetic interference afforded to the USB signal while it travels through the mated connector pair (this is the only location when the otherwise twisted data pair must travel a distance in parallel). As well, the power and common connections are made after the system ground but before the data connections. This type of staged make-break timing allows for safe hot-swapping and has been used for connectors in the aerospace industry.
- The newer USB micro receptacles are designed to allow up to 10,000 cycles of insertion and exertion between the receptacle and plug, compared to 500 for the standard USB and Mini-USB receptacle. This is done by adding a locking device and by moving the leaf-spring connector from the jack to the plug, so that the most-stressed part is on the cable side of the connection. This change was made so that the connector on the (relatively inexpensive) cable would bear the most wear instead of the micro-USB device.
- The USB standard specifies relatively big tolerances for compliant USB connectors. This is done to minimize incompatibilities in connectors produced by different vendors (a goal that has been very successfully achieved). Unlike most other connector standards, the USB specification also defines limits to the size of a connecting device in the area around its plug. This was done to prevent a device from blocking adjacent ports due to its size. Compliant devices must either fit within the size restrictions or support a compliant extension cable which does.
- Two-way communication is also possible. Usually cables have only plugs, and hosts and devices have only receptacles: hosts having type-A receptacles and devices type-B. Type-A plugs only join with type-A receptacles, and type-B with type-B. However, an extension to USB called USB On-The-Go allows a single port to act as either a host or a device — chosen by which end of the cable plugs into the socket on the unit. Even after the cable is hooked up and the units are talking, the two units may "swap" ends under program control. This facility targets units such as PDAs where the USB link might connect to a PC's host port as a device in one instance, yet connect as a host itself to a keyboard and mouse device in another instance.
How USB is done
A USB system has an asymmetric design. It is made of a host, several downstream USB ports, and multiple peripheral devices connected in a star topology. Additional USB hubs may be included in the tiers, allowing branching into a tree structure with up to five tier levels.
A USB host can have multiple host controllers. Each host controller provides one or more USB ports. Up to 127 devices, including the hub devices, may be connected to a single host controller.
USB devices are linked in series through hubs. There is always one hub known as the root hub. The root hub is built into to the host controller. There are special hubs, called "sharing hubs". These allow multiple computers to access the same peripheral devices. They work by switching the access between PCs, either manually or automatically. They are popular in small-office environments. In network terms, they converge rather than diverge branches.
A physical USB device can have several logical sub-devices that are referred to as device functions. A single device may provide several functions, for example, a webcam (video device function) with a built-in microphone (audio device function).
USB device communication is based on pipes (logical channels). Pipes are connections from the host controller to a logical entity on the device named an endpoint. The term endpoint is occasionally used to incorrectly refer to the pipe. A USB device can have up to 32 active pipes, 16 into the host controller and 16 out of the controller.
Each endpoint can transfer data in one direction only, either into or out of the device, so each pipe is uni-directional. Endpoints are grouped into interfaces and each interface is associated with a single device function. An exception to this is endpoint zero, which is used for device configuration and which is not associated with any interface.
When a USB device is first connected to a USB host, the USB device enumeration process is started. The enumeration starts by sending a reset signal to the USB device. The speed of the USB device is determined during the reset signaling. After reset, the USB device's information is read by the host, then the device is assigned a unique 7-bit address. If the device is supported by the host, the device drivers needed for communicating with the device are loaded and the device is set to a configured state. If the USB host is restarted, the enumeration process is repeated for all connected devices.
The host controller polls the bus for traffic, usually in a round-robin fashion, so no USB device can transfer any data on the bus without an explicit request from the host controller.
The computer hardware that contains the host controller and the root hub has an interface for the programmer. It is called Host Controller Device (HCD) and is defined by the hardware implementer.
For USB 1.0 and 1.1, there were two different HCD implementations, Open Host Controller Interface (OHCI) and Universal Host Controller Interface (UHCI). OHCI was developed by Compaq, Microsoft and National Semiconductor, UHCI by Intel.
VIA Technologies licensed the UHCI standard from Intel; all other chipset implementers use OHCI. UHCI relies more on software. This means UHCI is slightly more processor-intensive than OHCI but easier and cheaper to make. Because there were two different implementations, operating system vendors and hardware vendors needed to develop and test on both of them. This increased cost.
The USB specification does not specify any HCD interfaces and is not concerned with them. 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 that there was only one implementation. The USB 2.0 HCD implementation is called the Enhanced Host Controller Interface (EHCI). Only EHCI can support hi-speed (480 Mbit/s) transfers. Most of PCI-based EHCI controllers have other HCD implementations called 'companion host controller' to support Full Speed (12 Mbit/s) and 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 it can provide generic drivers for any USB device. Device classes are decided upon by the Device Working Group of the USB Implementers Forum.
USB device classes
Device classes include:
|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, external drives|
|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|
|DCh||Both||Diagnostic Device||USB compliance testing device|
|E0h||Interface||Wireless Controller||Wi-Fi adapter, Bluetooth adapter|
|EFh||Both||Miscellaneous||ActiveSync and Palm sync 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 Class Codes at USB.org