Universal Serial Bus
Universal Serial Bus (USB) is a standard-based, external bus for the computer that brings the Plug and Play capability of hardware devices (such as keyboards, pointing devices, and hard drives) outside the computer, eliminating the need to install internal cards into dedicated computer slots and reconfigure the system. Using USB technology, you can configure hardware devices as soon as they are physically attached—without the need to restart or run a set up sequence. USB is supported by the Windows Driver Model (WDM) under Windows 2000 Professional.USB has the following significant advantages over older I/O standards:
All USB devices use the same type of I/O connector, eliminating the need for different cables and connectors.You can plug multiple USB devices into a single USB port.USB supports hot plugging, which means that you can install or remove a USB device while the computer is running, and the operating system automatically reconfigures itself accordingly.
There are many different types of USB devices that you can purchase. Table C.2 categorizes the types of USB devices that are available, and points you to additional information available in this Resource Kit.Table C.2 USB Device Categories
Category | Devices | See the chapter in this book entitled: |
---|---|---|
Input | Keyboards, joysticks, and pointing devices | "Multimedia" |
Storage | Disk drives, CD-ROM drives, and removable media | "Data Storage and Management" |
Communications | Modems, ISDN adapters, and network adapters | "Local and Remote Network Connections" |
Output | Monitors, printers, and audio devices | "Device Management" |
Imaging | Scanners and digital cameras | "Multimedia" |
USB Topology
As illustrated in Figure C.1, USB uses a tiered topology, allowing you to attach up to 127 devices to the bus simultaneously. USB currently supports up to five tiers, and each device can be located up to five meters from its hub.
Figure C.1 Example of the USB topology
The three types of USB components are:
Host. Also known as the root, the root tier, or the root hub, the host is built into the motherboard or installed as an adapter card in the computer. The host controls all traffic on the bus and can also function as a hub. Hub. Provides a point, or port, to attach a device to the bus. Hubs are also responsible for detecting devices which are attached or detached from them and for providing power management for devices attached to them. Hubs are either bus-powered, drawing power directly from the bus, or self-powered, drawing power from an external source. You can plug a self-powered device into a bus-powered hub. You cannot connect a bus-powered hub to another bus-powered hub or support more than four downstream ports. You cannot connect a bus-powered device that draws more than 100 milliamperes (mA) to a bus-powered hub. Device. A USB-capable device, which is attached to the bus through a port. USB devices can also function as hubs. For example, a USB monitor can have ports for attaching a USB keyboard and a mouse. In this case, the monitor is also a hub.
NOTE
When you plug a device into a particular port for the first time, Windows 2000 Professional must go through the detection and enumeration process with that device. In the enumeration process, Plug and Play devices are identified by the operating system.
USB Functions
A function is a USB device that is able to transmit or receive data or control information over the bus. A function is typically implemented as a separate peripheral device, with a cable that plugs into a port on a hub. However, it is possible to implement multiple functions and an embedded hub with a single USB cable. This is known as a compound device. A compound device appears to the host as a hub with one or more permanently attached USB devices.Each function contains configuration information that describes its capabilities and resource requirements. Before you can use a function, it must be configured by the host. This configuration includes allocating USB bandwidth and selecting function-specific device configurations.
Choosing Devices Supported by USB
You can connect the following USB devices to your computer: monitor controls, audio I/O devices, telephones, modems, speakers, keyboards, mouse devices, joysticks, scanners, printers, low-bandwidth video devices, digital still-image cameras, data gloves, and digitizers. For computer-telephony integration, USB provides an interface for Digital Subscriber Line (DSL), Integrated Services Digital Network (ISDN), and digital Private Branch Exchanges (PBXs).For USB, the computer host controller is implemented through the Open Host Controller Interface (OHCI) standard or the Universal Host Controller Interface (UHCI) standard. To work with USB, the host controller must comply with one of these standards.USB Connector and CableThe USB specification defines a standard connector, socket, and cable, which all USB devices can use. This single standard eliminates the confusion caused by the current mixture of connector and cable types required for hardware devices.Data Transfer Rates Supported by USBUSB supports two data transfer modes: isochronous and asynchronous. An isochronous transfer requires a constant bandwidth within certain time constraints. A constant bandwidth is required to support the demands of multimedia applications and devices. Unlike asynchronous transfers, no handshaking occurs and delivery is not guaranteed. By contrast, asynchronous transfers employ a handshaking system and allow data streams to be broken at random intervals.There are three variants of the asynchronous mode: interrupt, control, and bulk. Each mode applies to the endpoints of the same name and has unique characteristics. In the USB architecture, the term endpoint refers to a USB logical device.Interrupt Interrupt endpoints reserve bandwidth and are guaranteed access to transfer data at the established rate. This mode is used when a device transfers unsolicited data to a host.Control The control mode is used to transfer specific requests. It is generally used during device configuration.Bulk A bulk transfer is used to transfer large blocks of data that have no periodic or transfer rate requirement. Printing uses bulk transfers.The USB host determines the data transfer rate and the priority assigned to a data stream. USB supports the following maximum data transfer rates, depending on the amount of bus bandwidth a device requires:
1.5 megabits per second (Mbps) for devices that do not require a large amount of bandwidth, such as pointing devices and keyboards.12 Mbps isochronous transfer rate for higher bandwidth devices, such as telephones, modems, speakers, scanners, video devices, and printers.
USB Support for Plug and PlayWindows 2000 Professional supports Plug and Play configuration of USB devices by using the following methods.Hot Plug-in Capability You can plug a USB device into the system anytime. The USB hub driver enumerates the device and notifies the system that the device is present.Persistent Addressing USB devices use descriptors to identify the device, its capabilities, and the protocols it uses. A descriptor contains a Vendor ID (VID) and Product ID (PID) that tell the computer exactly which drivers to load. An optional serial number differentiates one device from another of the same type. Older devices might have a Plug and Play ID, which can also be used to identify the device type and subtype.Power Options Support USB supports three power modes: On, Suspend, and Off.USB Driver InterfaceWindows 2000 Professional supports USB by allowing USB device drivers to communicate with the USB driver stack. The USB Driver Interface (USBDI) is between the drivers for USB devices (such as keyboards, mice and joysticks) and the USB driver stack. In Windows 2000 Professional, communication through the USBDI takes place in the Windows Driver Model (WDM) architecture.Windows 2000 Professional can recognize a USB device once the client device driver communicates with the USB driver stack. This requires that a WDM I/O request packet (IRP) be issued to pass information across the USBDI between the client device driver and the USB driver stack.For more information about how device drivers communicate with the USB through the use of I/O Request Packets (IRPs), see Driver Development Kits link on the Web Resources page at http://windows.microsoft.com/windows2000/reskit/webresources