NWA-PCUG 05/99 NewsLetter Article 18861 N. Hwy 112, Springdale, AR 72762-9303 USB Explained Is the Universal Serial Bus for You? By Karl Rehak LVPCUG The Universal Serial Bus (USB) is now making inroads into computer systems. Devices are being announced and delivered weekly that support this new attachment method. This article will highlight how the USB works, some physical considerations of hooking up USB devices and a summary of which devices are good candidates for USB attachment. The intent of the USB architecture is to provide a replacement for the aging serial and parallel ports on existing computers. Those ports have not changed much since the original PC design and their use imposes limitations. One limitation is cable length. Cable size and complexity are other limitations. USB uses one IRQ no matter how many devices are in use and it offers instant plug and play for its device set. After loading the device software the computer user can plug the physical device anywhere in the USB network and it springs to life. The unit can be plugged in to a different port each time with no consequence. A USB device can be unplugged from the system at any time as well. The technology is appropriately named. "Universal," conveys the notion of being for all things. While the port does have speed limitations (discussed later), the 'one plug fits all' design is clearly there. "Serial" describes the flow of information in the bus. The flow is more like an advanced data network protocol than the traditional PC Serial bus data flow. The traditional serial bus has IRQ, DMA and device limits that dictate its use; USB departs from all of that. It is a "Bus" architecture in that it provides a way to funnel information from many devices into and out of a computer system in an orderly manner. The connecting cables are made up of four wires. Two of the wires supply voltage and two are data signal wires. The bus operates at either 12 megabits per second or 1.5 megabits per second, depending on the attached device. The devices tell the bus what their speed is through the voltage cables. High speed devices shift the positive voltage lead while slow speed devices shift the negative voltage. Devices that do not need a lot of power, like digital cameras, can draw their power from the bus. That means they operate without a wall plug. Devices like some scanners and printers that have heavy power demands need to be plugged into the wall to operate. A model of the Visioneer scanner uses power supplied by the bus. USB is a hub architecture. Hubs are what are connected, hubs connect to hubs. The computer has an upstream "root hub" at the computer that is the signal source, and the input/output devices have a downstream hub to terminate the signal. The hubs do all of the talking. The illustration shown is a connector for an 'A' hub, it is rectangular in shape and is about 3/16 in. by 1/2 in. in size. The plug at the computer is an 'A' plug. The plug at the device, or downstream end, is a 'B' plug. That plug is shaped like a triangle with two of the angle edges flattened. It is about 1/4 by 5/16 in. in size. Cables are designated by their length and types of plugs they have. A typical cable used is a "6 ft. A B" cable, meaning it is six feet long and is configured with an 'A' plug at one end for the computer and a 'B' plug at the other end for the device. This is a typical device connection cable. Intermediate hubs can be included in a configuration. A typical distribution hub would have one downstream 'B' plug which comes from the computer, and it provides from four to eight 'A' plugs for distribution to the downstream devices. The maximum cable length is 5 meters, or about 16 feet. Since each hub is a repeater, the signal can be propagated through additional cables for up to six total hubs, that is five connecting cables of up to 15 feet each with the final upstream and downstream hubs at each end. The intermediate distribution hubs can optionally provide additional power to their downstream hubs or simply distribute what is provided by the upstream hub. Most often the use of additional power at the hub is via a power supply transformer plugged into the wall. It can be plugged in to provide additional device power at any time. Windows 95B (the OEM release) and Windows 98 include USB support. Most systems boards made in the last two years include two USB root hubs. Installing the USB on a system requires the installation of the software and turning on the USB ports in the BIOS. A connecting cable from the system board to a screw down strip at an available card slot provides the external USB connections. This twin USB plug at the rear of the computer provides the exit "root hub" appearance on the computer. The internal cable with screw down strip cost about $5.00, so the cost of setting up USB on a computer is nominal. For those computers that do not have a built in USB port, there are PCI based USB port cards that cost about $40 to provide the capability. ATX systems boards already have integrated external hubs and no internal cables are necessary. The USB port extension that was added to my computer had five wires, one more than the basic four needed for use. The fifth wire is a heavy black wire and it was suggested that the wire be clipped before the hub is used. That was done with no problems. That extra wire, is at most, an extra ground wire. The web site www.usb.org provides valuable information regarding the USB technology. It also includes a program that tests a computer for USB compliance. This is an easy way to check out a computer before any USB devices are added. The USB Network What happens when a device is plugged into a USB port? The wheels are set in motion. The root hub at the computer senses the presence of the new device and initially communicates with the device on "pipe 0," the default physical device communications channel. Pipes are the data sub bands of the hub architecture that maintain the physical connections of devices. Once a device is recognized, the root hub interrogates the device to find out what it is and what it is capable of on pipe 0. All of the devices on the USB ports are then enumerated and each is assigned a unique device number, which also includes a corresponding pipe number for physical device communications. The computer loads the software needed to control the device and handles its information flow. The hubs are then running and information is passed in and out of the computer over the signal leads. The enumeration process is initiated every time a device is plugged into or removed from the network. A maximum of 127 devices can be attached to a hub. Device Support The USB architecture is defined as an intermediate speed bus. With its maximum speed of 12 megabits per second, what are a USB port's device limitations and what devices are candidates for attachment? Clearly, the typical devices attached to serial and parallel ports are excellent candidates for USB attachment. These include most printers, modems, pointing devices, scanners, cameras and like devices. Certainly game paddles, joysticks and steering wheels etc. can be attached to the USB port. In fact special purpose game controllers are a natural since they can be connected and used as needed. Keyboards are now available for USB attachment. Microsoft just announced a high quality speaker system that supports USB as well as traditional sound board support. The product review indicated that the sounds chopped at times under game conditions on the USB port, indicating a borderline USB attachment candidate. However, under routine computer use USB speakers behaved just fine. USB attached speakers eliminate the need for a sound board in the computer hence they play a perceptively clearer digital sound. Similarly, low end video monitors can be used on USB, while high end graphics will require the use of the internal AGP port and a graphics card. Again, as in speakers, the key to low end or high end graphics is based on the eventual use of the device. Devices like speakers create a special demand on USB ports in that they are streaming devices. As such, space on the USB port must be reserved for them even when they are quiescent. Such devices are called "isochronous" and are defined as a special class of supported devices in the USB architecture. Conclusion In conclusion, in looking at the back of a typical computer, the following devices are better left to dedicated PCI or AGP ports - monitors, speakers and LANs. The devices that are reasonably good candidates for USB connection are printers, scanners, keyboards, pointing devices, game controllers, digital cameras and modems (excluding cable modems). Iomega has announced a USB ZIP drive. Other manufacturers will be adapting this technology to their products over time. There are also products available that convert existing serial and parallel devices to USB devices. The use of USB in a computer system liberates many of the physical constraints of cable length and device location in a Small Office /Home Office (SOHO) environment. It is reasonable to have multiple devices for special purpose applications like sheet feed scanners, flat bed scanners and slide scanners all sharing space on a USB channel. The end user is free to set up a working environment needed for their productive use free of the traditional constraints imposed by Comm and LPT ports. The textbook referenced for this article is "USB Explained" by Steven McDowell and Martin Sayer, Prentice Hall publisher. The web sites http://www.usb.org and http://www.ti.com/sc/usb were also referenced for technical information. The web site of Rogers System Specialist, http://www.rogerssystems.com, was used for USB product pricing. Proof reading was done by Chuck Buchheit, Rob Winchell and Howard Mark of the LVPCUG. Their suggestions are appreciated. This article is furnished as a benefit of our membership in the Association of Personal Computer User Groups (APCUG), an international organization to which this user group belongs. The author, Karl Rehak, is in his second term as President of the Las Vegas PC User Group. Prior to that he was Vice President for one term and spent some time being the Advertising Director. Karl is also SIG (Special Interest Group) leader for the Windows Development SIG.