Although it took several years for the Universal Serial Bus (USB) to catch on, it is now firmly entrenched in the PC marketplace. All major PC manufacturers routinely include USB ports on their new offerings, and users have begun including USB connectivity as a "must have" on their PC purchasing criteria. With both Windows 98 and Mac OS/8.x incorporating native support for USB, the impetus for designing USB-compliant hosts, hubs, and peripheral devices has never been greater.
PCs have always had different kinds of ports for peripherals like mice, keyboards, printers, and audio speakers. Additionally, if you purchased a product such as a scanner with an SCSI interface, the PC case had to be opened to install the SCSI card. USB, though, supports any compatible device by providing a "one-size-fits-all" connector. PC users can install and remove peripherals without having to open the computer's case.
Also, USB's "hot insertion and removal" feature permits users to install or disconnect peripherals while their computers stay up and running. USB "hubs," both standalone and incorporated into such devices as monitors and keyboards, provide extra downstream ports for plugging in other peripherals.
USB's "user-proof" commitment has shifted even more responsibility onto the device designer, to build in greater margins for error and conduct more extensive testing on every new product. Of course, this heightened requirement for in-depth testing must constantly be balanced against the market imperative to bring out competitive products as quickly as possible. Exacerbating the situation, USB interfaces represent foreign territory to many designers, whose expertise lies more in the core areas of the peripherals they are creating. These include keyboards, scanners, telephones, and other devices.
From a design and testing standpoint, the successful creation of new USB devices within tight market-driven time schedules hinges critically upon three key factors:
- Developing a thorough understanding of the USB specifications and objectives;
- Deploying appropriate USB-specific tools for development, test, and production;
- Participating in industry-wide USB compliance testing ("plugfests").
Specifications And Objectives
Originally developed by Intel, Compaq, Microsoft, IBM, DEC, NEC, and Northern Telecom, and now administered by the USB Implementers Forum, the USB specification provides a single, universal, Plug and Play (PnP) standard. Currently, the USB Specification is at revision level 1.1 (though 2.0 is scheduled for release this month). It's available on the Internet, along with a lot of additional USB-related informationtechnical and otherwiseat http://www.usb.org/developers/.
Basically, a USB host controller on the PC motherboard (or PCI add-in card) manages all USB peripherals. This is done with the assistance of subsidiary hub controllers. Together, they help reduce the load on the host's CPU time, thereby improving overall system performance. In turn, USB system software installed in the operating system manages the host controller. Microsoft has issued an OEM USB service supplement to Windows 95 and has incorporated full USB support into Windows 98 and the upcoming Windows 2000. Apple also incorporates USB in its newest Macintosh machines.
USB physical interconnections are arranged in tiered-star topologies, with a hub forming the center of each star (Fig. 1). Each wire segment directly connects a device to a hub, or one hub to another. (The host PC itself is designated the "root hub.") USB cables have simple, rectangular, four-wire connectors that plug into devices and their associated hubs. The upstream and downstream connectors differ slightly to prohibit invalid circular connections. The maximum length USB cable segment is 5 meters, with up to six segments (separated by hubs) permitted between the host and any specific device.
From a test and verification standpoint, tight control over USB power distribution becomes a definite area of concern. First, every device must be able to enumerate at 100 mA or less. For instance, the device requires the ability to be queried by the host using no more than 100 mA of current. It also must be able to successfully respond with all of the required self-identifying information. And, all USB devices need the capacity to support standby operation at 500 µA and still be able to be awakened by the host.
Since USB devices can be attached or detached at any time, device enumeration is a dynamic, ongoing activity. Hubs continually report per-port status to the host and identify ports used to attach new USB devices. The host enables such ports, determines if the newly attached devices are hubs or devices, and assigns them unique USB addresses. Then, the host establishes a unique control pipe for each new device and sends out attachment notifications to interested host software that may need to use the device. The dynamic nature of the USB environment, coupled with the commitment for flawless, user-transparent operation, requires that every new device design be tested across the entire dynamic range of possibilities.
Every active USB device must consistently provide robust, error-free operation despite a variety of potential problems. These can be anything, from voltage sags and spikes during device connection or disconnection to intermittent timing problems, and even subtle host-to-host differences in protocol handling. Though its specification is remarkably stable for a fairly new technology, USB is still in its early years of adoption. Some of its elements continue to change and develop.
One of the greatest obstacles to successful USB device development is basing critical decisions on assumptions about how the bus should be working, rather than on empirical data about how it is actually working. Therefore, it is vital that designers see everything that is going on with their devices across the USB.