How USB Ports Work

usb
USB Cables let you attach accesories to your computer Isabel Pavia / Getty Images

Just about any computer that you buy today comes with one or more Universal Serial Bus connectors. These USB connectors let you attach mice, printers and other accessories to your computer quickly and easily. The operating system supports USB as well, so the installation of the device drivers is quick and easy, too. Compared to other ways of connecting devices to your computer (including parallel ports, serial ports and special cards that you install inside the computer's case), USB devices are incredibly simple.

­In this article, we'll look at USB ports from both a user and a technical standpoint. You'll learn why the USB system is so flexible and how it's able to support so many devices so easily -- it's truly an amazing system.

Advertisement

Anyone who has been around computers for a while knows the problem that the Universal Serial Bus is trying to solve -- in the past, connecting devices to computers has been a real headache.

  • Printers connected to parallel printer ports, and most computers only came with one. Things like external storage media, which need a high-speed connection into the computer, would use the parallel port as well, often with limited success and not much speed.
  • Modems used the serial port, but so did some printers and a variety of odd things like personal digital assistants (PDAs) and digital cameras. Most computers had at most two serial ports, and they were very slow in most cases.
  • Devices that needed faster connections came with their own cards, which had to fit in a card slot inside the computer's case. Unfortunately, the number of card slots is limited and some of the cards are difficult to install.

The goal of USB is to end all of these headaches. The Universal Serial Bus gives you a single, standardized, easy-to-use way to connect up to 127 devices to a computer.

Just about every peripheral made now comes in a USB version. A sample list of USB devices that you can buy today includes:

In the next section, we'll look at the USB cables and connectors that allow your computer to communicate with these devices.

Advertisement

USB Cables and Connectors

The rectangular socket is a typical USB socket.

Connecting a USB device to a computer is simple -- you find the USB connector on the back of your machine and plug the USB connector into it.

If it's a new device, the operating system auto-detects it and asks for the driver disk. If the device has already been installed, the computer activates it and starts talking to it. USB devices can be connected and disconnected at any time.

Advertisement

A typical USB connector, called an "A" connection

Many USB devices come with their own built-in cable, and the cable has an "A" connection on it. If not, then the device has a socket on it that accepts a USB "B" connector.

A typical "B" connection

The USB standard uses "A" and "B" connectors to avoid confusion:

  • "A" connectors head "upstream" toward the computer.
  • "B" connectors head "downstream" and connect to individual devices.

By using different connectors on the upstream and downstream end, it's impossible to ever get confused -- if you connect any USB cable's "B" connector into a device, you know that it'll work. Similarly, you can plug any "A" connector into any "A" socket and know that it'll work.

Advertisement

USB Hubs

Most computers that you buy today come with at least one or two USB sockets. But with so many USB devices on the market, you easily run out of sockets very quickly. For example, you could have a keyboard, mouse, printer, microphone and webcam all running on USB technology, so the obvious question is, "How do you hook up all the devices?"

The easy solution to the problem is to buy an inexpensive USB hub. The USB standard supports up to 127 devices, and USB hubs are a part of the standard.

Advertisement

A typical USB four-port hub accepts 4 "A" connections.

A hub typically has four new ports, but may have many more. You plug the hub into your computer, and then plug your devices (or other hubs) into the hub. By chaining hubs together, you can build up dozens of available USB ports on a single computer.

Hubs can be powered or unpowered. As you'll see on the next page, the USB standard allows for devices to draw their power from their USB connection. A high-power device like a printer or scanner will have its own power supply, but low-power devices like mice and digital cameras get their power from the bus in order to simplify them. The power (up to 500 milliamps at 5 volts for USB 2.0 and 900 milliamps for USB 3.0) comes from the computer. If you have lots of self-powered devices (like printers and scanners), then your hub doesn't need to be powered -- none of the devices connecting to the hub needs additional power, so the computer can handle it. If you have lots of unpowered devices like mice and cameras, you probably need a powered hub. The hub has its own transformer and it supplies power to the bus so that the devices don't overload the computer's supply.

Advertisement

The USB Process

When the host powers up, it queries all of the devices connected to the bus and assigns each one an address. This process is called enumeration -- devices are also enumerated when they connect to the bus. The host also finds out from each device what type of data transfer it wishes to perform:

  • Interrupt - A device like a mouse or a keyboard, which will be sending very little data, would choose the interrupt mode.
  • Bulk - A device like a printer, which receives data in one big packet, uses the bulk transfer mode. A block of data is sent to the printer (in 64-byte chunks) and verified to make sure it's correct.
  • Isochronous - A streaming device (such as speakers) uses the isochronous mode. Data streams between the device and the host in real-time, and there is no error correction.

The host can also send commands or query parameters with control packets.

Advertisement

As devices are enumerated, the host is keeping track of the total bandwidth that all of the isochronous and interrupt devices are requesting. They can consume up to 90 percent of the 480 Mbps of bandwidth that's available (USB 3.0 increases that speed to 4.8 gigabits per second). After 90 percent is used up, the host denies access to any other isochronous or interrupt devices. Control packets and packets for bulk transfers use any bandwidth left over (at least 10 percent).

The Universal Serial Bus divides the available bandwidth into frames, and the host controls the frames. Frames contain 1,500 bytes, and a new frame starts every millisecond. During a frame, isochronous and interrupt devices get a slot so they're guaranteed the bandwidth they need. Bulk and control transfers use whatever space is left. The technical links at the end of the article contain lots of detail if you'd like to learn more.

Advertisement

USB Features

Inside a USB cable: There are two wires for power -- +5 volts (red) and ground (brown) -- and a twisted pair (yellow and blue) of wires to carry the data. The cable is also shielded.

The Universal Serial Bus has the following features:

  • The computer acts as the host.
  • Up to 127 devices can connect to the host, either directly or by way of USB hubs.
  • Individual USB cables can run as long as 5 meters; with hubs, devices can be up to 30 meters (six cables' worth) away from the host.
  • With USB 2.0,the bus has a maximum data rate of 480 megabits per second (10 times the speed of USB 1.0).
  • A USB 2.0 cable has two wires for power (+5 volts and ground) and a twisted pair of wires to carry the data. The USB 3.0 standard adds four more wires for data transmission. While USB 2.0 can only send data in one direction at a time (downstream or upstream), USB 3.0 can transmit data in both directions simultaneously.
  • On the power wires, the computer can supply up to 500 milliamps of power at 5 volts. A USB 3.0 cable can supply up to 900 milliamps of power.
  • Low-power devices (such as mice) can draw their power directly from the bus. High-power devices (such as printers) have their own power supplies and draw minimal power from the bus. Hubs can have their own power supplies to provide power to devices connected to the hub.
  • USB devices are hot-swappable, meaning you can plug them into the bus and unplug them any time. A USB 3.0 cable is compatible with USB 2.0 ports -- you won't get the same data transfer speed as with a USB 3.0 port but data and power will still transfer through the cable.
  • Many USB devices can be put to sleep by the host computer when the computer enters a power-saving mode.

The devices connected to a USB port rely on the cable to carry power and data.

Advertisement

USB 2.0 and 3.0

The standard for USB version 2.0 was released in April 2000 and serves as an upgrade for USB 1.1.

USB 2.0 (High-speed USB) provides additional bandwidth for multimedia and storage applications and has a data transmission speed 40 times faster than USB 1.1. To allow a smooth transition for both consumers and manufacturers, USB 2.0 has full forward and backward compatibility with original USB devices and works with cables and connectors made for original USB, too.

Advertisement

Supporting three speed modes (1.5, 12 and 480 megabits per second), USB 2.0 supports low-bandwidth devices such as keyboards and mice, as well as high-bandwidth ones like high-resolution webcams, scanners, printers and high-capacity storage systems. The deployment of USB 2.0 allowed PC industry leaders to forge ahead with the development of PC peripherals to complement existing high-performance PCs. In addition to improving functionality and encouraging innovation, USB 2.0 increases the productivity of user applications and allows the user to run multiple PC applications at once or several high-performance peripherals simultaneously.

The USB 3.0 (SuperSpeed USB) standard became official on Nov. 17, 2008 [source: Everything USB]. USB 3.0 boasts speeds 10 times faster than USB 2.0 at 4.8 gigabits per second. It's meant for applications such as transferring high-definition video footage or backing up an entire hard drive to an external drive. As hard drive capacity grows, the need for a high-speed data transfer method also increases.

Adoption of the USB 3.0 standard has been slow. Chip manufacturers must design motherboard hardware that supports USB 3.0. Computer owners have the option to purchase cards that they can install in their computers to give USB 3.0 support. But hardware support is just part of the problem -- you also need support from your operating system. Even though Microsoft announced that Windows 7 would eventually support the USB 3.0 standard, the company shipped its operating system without USB 3.0 support. Recent distributions of the Linux operating system support USB 3.0.

You might not think data transfer cables create controversy. But some reporters, such as ZDNet writer Adrian Kingsley-Hughes, suggests that one reason USB 3.0 adoption has been slow is because Intel has delayed production on motherboards with USB 3.0 support purposefully to give one of its own products a head start [source: Kingsley-Hughes]. That product is Light Peak, a data transfer technology that has an initial top data transfer speed of 10 gigabits per second with future theoretical speeds reaching 100 gigabits per second. Since Intel is a major manufacturer of chips, only a few computers with motherboards made by other companies currently support USB 3.0.

Intel representatives deny such claims. Company executives have said that the Light Peak technology isn't going to replace USB ports and that both Light Peak and USB 3.0 will work together. In the meantime, you can find computers and accessories that incorporate USB 3.0 on the market today.

For more information on USB and related topics, check out the links on the next page.

Advertisement

Frequently Answered Questions

What are the three types of USB ports?
The three types of USB ports are USB Type A, USB Type B and USB Type C.

Lots More Information

Related Articles

More Great Links

  • Chan, Norman. "Everything You Need to Know About USB 3.0, Plus First Spliced Cable Photos." Maximum PC. Aug. 18, 2008. (Jan. 28, 2011)http://www.maximumpc.com/article/features/everything_you_need_know_about_usb_30_plus_first_spliced_cable_photos
  • Europa. "Harmonisation of a charging capability of common charger for mobile phones - frequently asked questions." June 29, 2009. (Jan. 31, 2011) http://europa.eu/rapid/pressReleasesAction.do?reference=MEMO/09/301
  • Everything USB. "SuperSpeed USB 3.0 FAQ." Feb. 1, 2011. (Feb. 1, 2011) http://www.everythingusb.com/superspeed-usb.html
  • Faas, Ryan. "Will Light Peak leave USB 3.0 in the dust?" IT World. Nov. 5, 2010. (Jan. 31, 2011) http://www.itworld.com/hardware/126694/will-light-peak-leave-usb-30-dust
  • Ganapati, Paul. "Intel's Light Peak Technology Could Kill USB 3.0." Wired. April 15, 2010. (Jan. 28, 2011) http://www.wired.com/gadgetlab/2010/04/intels-light-peak-technology-could-kill-usb-30/
  • Intel. "Extensible Host Controller Interface (xHCI) Specification for USB 3.0." (Jan. 31, 2011) http://www.intel.com/technology/usb/xhcispec.htm
  • Kingsley-Hughes, Adrian. "Is Intel delaying USB 3.0 to give Light Peak an advantage?" ZDNet. June 3, 2010. (Jan. 31, 2011) http://www.zdnet.com/blog/hardware/is-intel-delaying-usb-30-to-give-light-peak-an-advantage/8493
  • Knupffer, Nick. "USB 3.0 for the masses - Dispelling the myths." Intel. June 11, 2008. (Jan. 31, 2011) http://blogs.intel.com/technology/2008/06/usb_30_for_the_masses_dispelli.php
  • Lilly, Paul. "Intel's Light Peak Technology vs USB 3.0." Tested. April 15, 2010. (Jan. 28, 2011) http://www.tested.com/news/intels-light-peak-technology-vs-usb-30/160/
  • Perenson, Melissa J. "USB 3.0 Finally Arrives." PCWorld. Jan. 10, 2010. (Jan. 28, 2011) http://www.pcworld.com/article/186566/usb_30_finally_arrives.html
  • Universal Serial Bus. "USB 3.0 Specification." (Jan. 28, 2011) http://www.usb.org/developers/docs/

Advertisement

Loading...