of USB in Microsoft Win9X
Microsoft Tech Net
USB is an external bus
standard for the computer that brings the Plug and Play capability of hardware
devices (such as keyboards, mouse devices, and hard drives) outside the
computer, eliminating the need to install cards into dedicated computer slots
and reconfigure the system. With USB, hardware devices can be automatically
configured as soon as they are physically attached—without the need to reboot
or run the setup sequence. USB is supported by WDM under Windows 98.
As seen in Figure 30.2,
USB uses a tiered topology, allowing you to attach up to 127 devices to the bus
simultaneously. USB currently supports up to five tiers. Each device can be
located up to five meters from its hub.
Figure 30.2 Example of
the USB topology
The three types of USB
The host, which is also known as the root, the
root tier or the root hub. It is built into the motherboard or installed
as a PCI adapter card. The host controls the traffic on the bus and can
also function as a hub.
The hub, which provides a point or port to attach
a device to the bus. Hubs are responsible for detecting devices attached
or detached from the bus and for providing power management for devices attached
to the hub. Hubs can either be Bus Powered (drawing power directly from
the bus) or self-powered (drawing power from an external source). A
self-powered device can be plugged into a bus-powered hub. A bus-powered
hub cannot be connected to another bus-powered hub or support more than (4)
downstream ports. A USB device that draws more than 100mA cannot be
connected to a bus-powered hub.
The 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 USB mouse. The
monitor in this case is also a bus-powered hub.
you plug a device into a particular port for the first time, Windows 98 must go
through the detection and enumeration process with that device.
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 cameras, data gloves, and
digitizers. For computer-telephony integration, USB provides an interface for
Integrated Services Digital Network (ISDN) and digital PBXs.
For USB, the computer host
controller is implemented through the OpenHCI or UHCI standards. To work with
USB, the host controller must comply with one of these standards.
The USB Connector and
The 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. The USB hub uses a type
A connector, and the device uses a type B connector.
Data Transfer Rates
Supported by USB
USB supports four data
transfer modes: interrupt, control, bulk, and isochronous. Each mode applies to
the endpoints of the same name and has separate characteristics. Isochronous and
interrupt endpoints reserve bandwidth and are guaranteed access to transfer data
at the established rate. Bulk and control endpoints are scheduled for best fit
or for whatever bandwidth is available, but 10% of the total bus bandwidth is
reserved for bulk and control transfers. Guaranteed data delivery is required to
support the demands of multimedia applications and devices.
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:
megabits per second (Mbps) for devices that do not require a large amount
of bandwidth, such as mouse devices and keyboards.
Mbps isochronous transfer rate for higher bandwidth devices, such as
telephones, modems, speakers, scanners, video devices, and printers.
USB Support for Plug and
Windows 98 supports Plug
and Play through USB in several ways.
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 and its capabilities and
protocols used. The serial number generates the Plug and Play ID, and the port
address indicates the port and hub the device is connected to. If the device
does not provide a serial number, USB uses the device's port address.
supports three power modes: On, Suspend, and Off. USB devices can be placed in
Suspend mode and still retain the ability to wake up the system.
USB Driver Interface
Windows 98 supports USB by
allowing USB device drivers to communicate with the USB driver stack. Between
the USB device drivers (for example, Human Interface [HID] drivers for keyboard,
mouse, and joystick) and the USB driver stack is the USB Driver Interface (USBDI).
In Windows 98, this communication takes place within the WDM layered
The USB driver
architecture is shown in Figure 30.3.
Windows 98 natively supports many USB devices, some devices might require
additional drivers or application software (for example, a device developed
after the release of Windows 98 might not be inherently recognized). Such a
device would ship with a diskette or other medium containing the required driver
or application software.
Figure 30.3 USB Driver
Figure 30.3 shows the
is the USB hub driver. It is loaded when Usbd.sys enumerates the root hub
built into each USB host controller as the driver for each host controller
is the USB class driver.
(Universal Host Controller Driver) and Ohcd.sys (Open Host Controller
Driver) are USB host controller drivers.
In addition, Hidclass.sys,
a WDM input class driver, sends and receives HID reports to and from its
minidrivers. Hidusb.sys, an HID device driver, sends and receives HID reports
over the USB. The PCI Enumerator loads the USB stack driver components when a
USB bus is detected on a platform and always loads at least the other core
Windows 98 is able to
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
For more information about
how device drivers communicate with the USB through the use of IRPs, see the
Windows 98 DDK.
For a complete Overview
Win98 Hardware Management by Microsoft, go here: