Previous Section  < Day Day Up >  Next Section

Hack 82 Get the Most out of USB

figs/beginner.gif figs/hack82.gif

Use separate USB ports to get the best performance out of your high-speed devices.

The USB port in your PC is designed to supply up to 12 (USB 1.1) or 480 (USB 2.0) megabits per second throughput to attached devices, but that is total throughput and must be shared with all connected devices. If you use two USB ports on your PC at the same time, it's best to have two USB controllers, each delivering the total throughput. Although this limitation is more noticeable with the slow USB 1.1 speeds, you'll certainly notice it if you do something I/O-intensive with USB 2.0, such as copying large files between two USB mass storage devices.

To check if you have two USB controllers, open Windows Device Manager and expand the Universal Serial Bus controllers branch in the list. If you have two separate controllers, they will be listed, as shown in Figure 8-6.

Figure 8-6. Device Manager lists two USB controllers
figs/pchk_0806.gif


If you need to connect and use two high-speed USB devices at the same time, such as a scanner, external disk drive, video camera, or network adapter, connect them to different ports on your PC so neither one suffers from sharing bandwidth. If you need to support more than two high-speed devices operating at the same time, you will have to add a USB hub or install additional USB controllers, either with an add-in PCI card for your desktop or a PC card for your laptop. If you're going to install a new PCI-based USB interface, get a USB 2.0-compliant card to get two upgrades in one.

To see how much bandwidth is being used on your USB ports, expand the properties of the Universal Serial Bus controllers listing in Device Manager and select the Advanced tab. As shown in Figure 8-7, you will see how much of your USB bandwidth is consumed.

Figure 8-7. Windows keeps track of USB bandwidth used
figs/pchk_0807.gif


Monitoring the bandwidth used on a specific USB port can tell you if one device, such as your video camera or video-to-USB capture device, is hogging all the throughput and whether it's time to add another separate interface to share the available bandwidth across multiple ports.

8.10.1 Use USB-Powered Hubs for Stability

USB ports are supposed to be able to provide up to 500 milliamps (mA) of current to power-attached devices. No single USB device is supposed to draw more than 500 mA from a USB port, and if it needs more, it is required to provide its own power source. Some devices, such as a data connection to a PDA or cell phone, may not use any power from the port, but beware that many of these cables are now used to charge these devices as well.

Those cute little two- and four-port USB hubs are handy to expand the number of devices you can connect to your port, but obviously a single device, or combination of devices, that tries to draw more than 500 mA will overload your USB port and one or more devices will stop working due to lack of power.

If your USB devices only function intermittently, it is likely that power is your problem. Running a USB web cam, charging your PDA and cell phone, and using a USB mouse at the same time might change your Universal Serial Bus into an unusable serial bus. For around $20, you can get a powered USB hub with more than enough capacity to supply multiple power-grabbing devices without a glitch. Do the math when you buy it. For example, if you get a four-port powered hub, be sure the power supply that comes with it is rated for two amperes so you can get a full 500 mA per port.

    Previous Section  < Day Day Up >  Next Section