Universal Serial Bus (USB) is an external peripheral bus standard designed to bring Plug and Play capability for attaching peripherals externally to the PC. USB eliminates the need for special-purpose ports, reduces the need to use special-purpose I/O cards (thus reducing the need to reconfigure the system with each new device added), and saves important system resources such as interrupts (IRQs); regardless of the number of devices attached to a system's USB ports, only one IRQ is required. PCs equipped with USB enable peripherals to be automatically recognized and configured as soon as they are physically attached, without the need to reboot or run setup. USB allows up to 127 devices to run simultaneously on a single bus, with peripherals such as monitors and keyboards acting as additional plug-in sites, or hubs. USB cables, connectors, hubs, and peripherals can be identified by icons, as shown in Figure 15.1. Note the "plus" symbol added to the upper icon, which indicates that port supports USB 2.0 (Hi-Speed USB) in addition to the standard 1.x support. Figure 15.1. These icons identify USB cables, connectors, hubs, and peripherals.
Intel has been the primary proponent of USB, and all its PC chipsets starting with the PIIX3 South Bridge chipset component (introduced in February 1996) have included USB support as standard. Other chipset vendors have followed suit, making USB as standard a feature of today's desktop and notebook PCs as the serial and parallel ports once were. Six other companies initially worked with Intel in codeveloping the USB, including Compaq, Digital, IBM, Microsoft, NEC, and Northern Telecom. Together, these companies have established the USB Implementers Forum (USB-IF) to develop, support, and promote USB architecture.
The USB-IF formally released USB 1.0 in January 1996, USB 1.1 in September 1998, and USB 2.0 in April 2000. The 1.1 revision was mostly a clarification of some issues related to hubs and other areas of the specification. Most devices and hubs should be 1.1 compliant, even if they were manufactured before the release of the 1.1 specification. The biggest change was USB 2.0, which is 40 times faster than the original USB and yet fully backward compatible. USB ports can be retrofitted to older computers that lack built-in USB connectors through the use of either an add-on PCI card (for desktop computers) or a PC Card on Cardbus-compatible notebook computers. You can also use USB add-on cards to update an older system that has only USB 1.1 on the motherboard. As of mid-2002, virtually all motherboards include four or more USB 2.0 ports as standard. Notebook computers were slower to catch onit wasn't until early 2003 that most notebook or laptop computers included USB 2.0 ports as standard. USB Technical DetailsUSB 1.1 runs at 12Mbps (1.5MBps) over a simple four-wire connection. The bus supports up to 127 devices connected to a single root hub and uses a tiered-star topology, built on expansion hubs that can reside in the PC, any USB peripheral, or even standalone hub boxes. Note that although the standard allows up to 127 devices to be attached, they all must share the 1.5MBps bandwidth, meaning that for every active device you add, the bus will slow down some. In practical reality, few people will have more than 8 devices attached at any one time. For low-speed peripherals, such as pointing devices and keyboards, the USB also has a slower 1.5Mbps subchannel. The subchannel connection is used for slower interface devices, such as keyboards and mice. USB employs what is called Non Return to Zero Invert (NRZI) data encoding. NRZI is a method of encoding serial data in which 1s and 0s are represented by opposite and alternating high and low voltages where there is no return to a zero (or reference) voltage between the encoded bits. In NRZI encoding, a 1 is represented by no change in signal level, and a 0 is represented by a change in level. A string of 0s causes the NRZI data to toggle each bit time; a string of 1s causes long periods with no transitions in the data. This is an efficient transfer encoding scheme because it eliminates the need for additional clock pulses that would otherwise waste time and bandwidth. USB devices are considered either hubs or functions, or both. Functions are the individual devices that attach to the USB, such as a keyboard, mouse, camera, printer, telephone, and so on. Hubs provide additional attachment points to the USB, enabling the attachment of more hubs or functions. The initial ports in the PC system unit are called the root hub, and they are the starting point for the USB. Most motherboards have two, three, or four USB ports, any of which can be connected to functions or additional hubs. Some systems place one or two of the USB ports in the front of the computer, which is very convenient for devices you use only occasionally, such as digital cameras or flash memory card readers. External hubs (also called generic hubs) are essentially wiring concentrators, and through a star-type topology they allow the attachment of multiple devices. Each attachment point is referred to as a port. Most hubs have either four or eight ports, but more are possible. For more expandability, you can connect additional hubs to the ports on an existing hub. The hub controls both the connection and distribution of power to each of the connected functions. A typical hub is shown in Figure 15.2. Figure 15.2. A typical USB hub with four ports.
Besides providing additional sockets for connecting USB peripherals, a hub provides power to any attached peripherals. A hub recognizes the dynamic attachment of a peripheral and provides at least 0.5W of power per peripheral during initialization. Under control of the host PC driver software, the hub can provide more device power, up to a maximum of 2.5W, for peripheral operation. Tip For the most reliable operation, I recommend that you use self-powered hubs, which plug into an AC adapter. Bus-powered hubs pull power from the PC's USB root hub connector and aren't always capable of providing adequate power for high-power requirement devices, such as optical mice. A newly attached hub is assigned a unique address, and hubs can be cascaded up to five levels deep (see Figure 15.3). A hub operates as a bidirectional repeater and repeats USB signals as required both upstream (toward the PC) and downstream (toward the device). A hub also monitors these signals and handles transactions addressed to itself. All other transactions are repeated to attached devices. A USB 1.1 hub supports both 12Mbps (full-speed) and 1.5Mbps (low-speed) peripherals. Figure 15.3. A typical PC with USB devices can use multiple USB hubs to support a variety of peripherals, connected to whichever hub is most convenient.Maximum cable length between two full-speed (12Mbps) devices or a device and a hub is 5 meters using twisted-pair shielded cable with 20-gauge wire. Maximum cable length for low-speed (1.5Mbps) devices using non-twisted-pair wire is 3 meters. These distance limits are shorter if smaller-gauge wire is used (see Table 15.2).
Although USB 1.1 is not as fast at data transfer as FireWire or SCSI, it is still more than adequate for the types of peripherals for which it is designed. USB 2.0 operates a surprising 40 times faster than USB 1.1 and allows transfer speeds of 480Mbps or 60MBps. Because it is fully backward-compatible and supports older 1.1 devices, I recommend purchasing only motherboards and add-in USB cards that conform to the faster USB 2.0 (Hi-Speed USB) standard. One of the additional benefits of USB 2.0 is the capability to handle concurrent transfers, which enables your USB 1.1 devices to transfer data at the same time without tying up the USB bus. USB 2.0 drivers were not provided with the initial launch of Windows XP but are available through system update downloads or service packs. Use the Windows Update feature to connect to the Microsoft site and download any updates as necessary. Add-on USB 2.0 cards might include their own drivers, which should be installed. Four main styles of connectors are specified for USB, called Series A, Series B, Mini-A, and Mini-B connectors. The A connectors are used for upstream connections between a device and the host or a hub. The USB ports on motherboards and hubs are usually Series A connectors. Series B connectors are designed for the downstream connection to a device that has detachable cables. In all cases, the mini connectors are simply smaller versions of the larger ones, in a physically smaller form factor for smaller devices. The physical USB plugs are small (especially the mini plugs) and, unlike a typical serial or parallel cable, the plug is not attached by screws or thumbscrews. There are no pins to bend or break, making USB devices very user friendly to install and remove. The USB plug shown in Figure 15.4 snaps into place on the USB connector. Figure 15.4. USB Series A and Series B plugs and receptacles.
Note that a Mini-A/B socket is a dual-purpose socket that can accept either Mini-A or Mini-B plugs. The newer mini plugs and sockets have plastic portions inside the connectors that are required to be color-coded as shown in Table 15.3.
Tables 15.4 and 15.5 show the pinouts for the USB connectors and cables. Most systems with USB connectors feature one or two pairs of Series A plugs on the rear of the system. Some also feature one or two pairs on the front of the system for ease of use with items that are not permanently connected.
USB conforms to Intel's Plug and Play (PnP) specification, including hot plugging, which means that devices can be plugged in dynamically without powering down or rebooting the system. Simply plug in the device, and the USB controller in the PC detects the device and automatically determines and allocates the required resources and drivers. Microsoft has developed USB drivers and included them automatically in Windows 98 and later. Windows 95B and 95C have very limited support for USB 1.1; the necessary drivers are not present in the original Windows 95 or 95A. With Windows 95B, the USB drivers are not automatically included; they are provided separately, although a late release of Windows 95Windows 95Cincludes USB support. Many USB devices will not work with any Windows 95 release, including those that have the USB support files included. Windows 98 and later have USB 1.1 support built in; however, additional drivers are required for USB 2.0 or later. In most cases, these drivers can be downloaded from Microsoft using the Windows Update feature. USB support is also required in the BIOS for devices such as keyboards and mice. This is included in all newer systems with USB ports built in. Aftermarket PCI and PC Card boards also are available for adding USB to systems that don't include it as standard on the motherboard. USB peripherals include printers, CD-ROMs, modems, scanners, telephones, joysticks, keyboards, and pointing devices such as mice and trackballs. A free utility called USBReady is available from http://www.usb.org; it examines your PC's hardware and software and informs you of your PC's USB capabilities. Most PCs built in 1995 or earlier don't support USB. During 1996 most PC motherboards began supporting USB, and if your system dates from 1997 to 1998 or later, USB support is almost a certainty. One interesting feature of USB is that, with certain limitations, attached devices can be powered by the USB bus. The PnP aspects of USB enable the system to query the attached peripherals as to their power requirements and issue a warning if available power levels are being exceeded. This is important for USB when it is used in portable systems because the battery power that is allocated to run the external peripherals might be limited. You can determine the amount of power available to each port in a USB root or generic hub and the amount of power required by a USB peripheral with the Windows Device Manager (see Figure 15.5). Figure 15.5. The Power tab of the properties sheet for a USB generic hub lists available power and power usage by device.Devices that use more than 100mA, such as the webcam shown in Figure 15.5, must be connected to a root hub or a self-powered generic hub. Devices that use 100mA or less can be connected to bus-powered hubs, such as those built in to some keyboards and monitors. Tip If a device plugged in to a self-powered hub stops working, check the power source for the self-powered hubit might have failed or been disconnected. In such cases, a self-powered hub becomes a bus-powered hub, providing only 100mA per port instead of the 500mA per port available in self-powered mode. To avoid running out of power when connecting USB devices, use a self-powered hub. Another of the benefits of the USB specification is the self-identifying peripheral, a feature that greatly eases installation because you don't have to set unique IDs or identifiers for each peripheralthe USB handles that automatically. Also, USB devices can be "hot" plugged or unplugged, meaning that you do not have to turn off your computer or reboot every time you want to connect or disconnect a peripheral. However, to prevent data loss with USB drives and storage devices, you need to use the Eject Hardware or Safely Remove Hardware feature in the Windows system tray. Click the device, select Stop, click OK, and wait for the system to indicate that the device has been stopped before you remove it. Enabling USB SupportMany systems shipped before Windows 98 was introduced in mid-1998 have onboard USB ports that were disabled at the factory. In some cases, especially with Baby-AT motherboards, there is no way to tell from the outside which systems have USB support built in. This is because many of these same systems were not shipped with the USB header cables necessary to bring the USB root hub connectors from the motherboard to the rear of the system. If USB support is disabled in the system BIOS, restart your system and locate the BIOS setup screen that refers to the USB ports. Enable the USB feature. If you see a separate entry for USB IRQ, enable this as well. After you restart the computer with a USB-aware operating system, your "new" USB root hub will be detected and the drivers will be installed if you are using Windows 98 or newer; you might need to manually install drivers with late releases of Windows 95. If your system has USB connectors present, you also will be able to use the "new" USB ports as soon as the system is rebooted after the USB drivers are installed. However, if your motherboard vendor didn't provide USB connectors, you must buy USB header cables. Before you order them, check the configuration of your motherboard's USB header pins. The standard is two rows of five pins each. Companies such as Belkin, CyberGuys, and Cables To Go sell header cables that are compatible with standard USB header pins if your motherboard supplier doesn't have the header cable in stock. Figure 15.6 shows a typical USB header cable set. Figure 15.6. A typical USB header cable set; plug it into your motherboard to connect devices to the additional onboard USB ports (if present).
One of the biggest advantages of an interface such as USB is that it requires only a single interrupt (IRQ) from the PC. Therefore, you can connect up to 127 devices and they will not use separate interrupts, as they might if each were connected over a separate interface. This is a major benefit of the USB interface. The USB interface can also be adapted to older peripherals. See the section "USB Adapters," later in this chapter, for details. USB 2.0/Hi-Speed USBUSB 2.0 (also called Hi-Speed USB) is a backward-compatible extension of the USB 1.1 specification that uses the same cables, connectors, and software interfaces, but it runs 40 times faster than the original 1.0 and 1.1 versions. The higher speed enables higher-performance peripherals, such as higher-resolution web/videoconferencing cameras, scanners, and faster printers, to be connected externally with the same easy plug-and-play installation of current USB peripherals. From the end user's point of view, USB 2.0 works exactly the same as 1.1only faster and with more interesting, higher-performance devices available. All existing USB 1.1 devices work in a USB 2.0 bus because USB 2.0 supports all the slower-speed connections. USB data rates are shown in Table 15.6.
If your motherboard or system features USB 2.0compatible (Hi-Speed USB) ports, you might need to enable USB 2.0/Hi-Speed USB support in the system BIOS and install an appropriate driver. Otherwise, USB 2.0/Hi-Speed USB ports will be used as USB 1.1 ports.
The support of higher-speed USB 2.0 peripherals requires using a USB 2.0 hub. You can still use older USB 1.1 hubs on a 2.0 bus, but any peripherals or additional hubs connected downstream from a 1.1 hub will operate at the slower 1.5MBps USB 1.1 maximum speed. Devices connected to USB 2.0 hubs will operate at the maximum speed of the device, up to the full USB 2.0 speed of 60MBps. The higher transmission speeds through a 2.0 hub are negotiated on a device-by-device basis, and if the higher speed is not supported by a peripheral, the link operates at a lower USB 1.1 speed. As such, a USB 2.0 hub accepts high-speed transactions at the faster USB 2.0 frame rate and must deliver them to high-speed USB 2.0 peripherals as well as USB 1.1 peripherals. This data rate matching responsibility requires increased complexity and buffering of the incoming high-speed data. When communicating with an attached USB 2.0 peripheral, the 2.0 hub simply repeats the high-speed signals; however, when communicating with USB 1.1 peripherals, a USB 2.0 hub buffers and manages the transition from the high speed of the USB 2.0 host controller (in the PC) to the lower speed of a USB 1.1 device. This feature of USB 2.0 hubs means that USB 1.1 devices can operate along with USB 2.0 devices and not consume any additional bandwidth. Some manufacturers of add-on USB 2.0 cards are equipping the cards with both external and internal USB 2.0 ports. How can you tell which devices are designed to support USB 1.1 and which support the emerging USB 2.0 standard? The USB Implementer's Forum (USB-IF), which owns and controls the USB standard, introduced new logos in late 2000 for products that have passed its certification tests. The logos are shown in Figure 15.7. Figure 15.7. The USB-IF USB 1.1compliant logo (left) compared to the USB-IF USB 2.0compliant logo (right).
As you can see from Figure 15.7, USB 1.1 is also known simply as USB, and USB 2.0 is also known as Hi-Speed USB. Also note the icons shown earlier, where the addition of the plus symbol to the standard USB trident is used to identify ports that support USB 2.0. USB On-The-GoIn December 2001, the USB-IF released a supplement to the USB 2.0 standard called USB On-The-Go. It was designed to address the one major shortcoming of USB: the fact that a PC was required to transfer data between two devices. In other words, you couldn't connect two cameras together and transfer pictures between them without a PC orchestrating the transfer. With USB On-The-Go, however, devices that conform to the specification still work normally when they are connected to a PC, but they also have additional capabilities when connected to other devices supporting the standard. Although this capability can also work with PC peripherals, it was mainly added to address issues using USB devices in the consumer electronics area, where a PC might not be available. Using this standard, devices such as digital video recorders can connect to other recorders to transfer recorded movies or shows, items such as personal organizers can transfer data to other organizers, and so on. The addition of the On-The-Go supplement to USB 2.0 greatly enhances the use and capabilities of USB both in the PC and consumer electronics markets. USB AdaptersIf you still have a variety of older peripherals and yet you want to take advantage of the USB connector on your motherboard, several signal converters or adapters are available. Companies such as Belkin and others currently have adapters in the following types:
These adapters usually look just like a cable, with a USB connector at one end (which you plug into your USB port) and various other interface connectors at the other end. In some cases, you attach standard USB and device cables to a standalone adapter, such as with the USB-to-Ethernet adapter shown in Figure 15.8. Figure 15.8. A typical USB-to-Ethernet adapter from D-Link.
There is more to these devices than just a cable: If the unit is a one-piece device, active electronics are hidden in a module along the cable or are sometimes packed into one of the cable ends. The electronics are powered by the USB bus and convert the signals to the appropriate other interface. If you cannot install a native adapter card for your device, converting it to use the USB port through an adapter is much better than not using the device at all. For example, a USB-to-Ethernet adapter such as the one shown in Figure 15.8 can enable a computer without expansion slots to connect to a broadband Internet device such as a cable or DSL modem. However, some drawbacks do exist to these adapters. For example, USB-to-parallel converters work only with printers and not other parallel-connected devices, such as scanners, cameras, external drives, and so on. Before purchasing one of these adapters, ensure that it will work with the device or devices you have in mind. If you need to use more than one non-USB device with your system, consider special USB hubs that also contain various combinations of other port types; these are sometimes referred to as multifunction USB hubs, USB port replicators, or USB docking stations. These special hubs are more expensive than USB-only hubs but are less expensive than the combined cost of a comparable USB hub and two or more USB adapters. Another type of adapter available is a direct-connect cable, which enables you to connect two USB-equipped PCs directly together using USB as a network. These are popular for people playing two-player games, with each player on his own system. Another use is for transferring files because this connection usually works as well or better than the direct parallel connection that otherwise might be used. Also available are USB switchboxes that enable one peripheral to be shared among two or more USB buses. Note that both the direct connect cables and USB switchboxes are technically not allowed as a part of the USB specification, although they do exist. Legacy-Free PCsUSB adapters might find more use in the future as more and more legacy-free PCs are shipped. A legacy-free PC is one that lacks any components that were connected to or a part of the traditional ISA bus. This especially includes the otherwise standard Super I/O chip, which integrated serial, parallel, keyboard, mouse, floppy, and other connections. A legacy-free motherboard therefore does not have the standard serial, parallel, and keyboard/mouse connectors on the back and lacks an integrated floppy controller. The devices previously connected to those ports must instead be connected via USB, ATA/IDE, PCI, and other interfaces. Legacy-free systems are primarily found on the low-end, consumer-oriented systems. For those systems, USB will likely be one of the only external connections provided. To compensate for the loss of the other external interfaces, most legacy-free motherboards feature four or more integrated USB connectors on one or two buses. |