
- Image via Wikipedia
Universal Serial Bus (USB) is a serial bus standard to interface devices to a host computer, designed to allow many peripherals to be connected using a single standardized interface socket and to improve the Plug and playcapabilities by allowing hot swapping, providing power to low-consumption devices without the need for an external power supply and allowing many devices to be used without requiring manufacturer specific, individual device drivers to be installed.
USB can connect computer peripherals such as mice, keyboards, joysticks, scanners, digital cameras, printers, personal media players, flash drives, and external hard drives.
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 , 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 is 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.
The devices connected to a USB port rely on the USB cable to carry power and data.
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 are guaranteed the bandwidth they need. Bulk and control transfers use whatever space is left.
The Universal Serial Bus has the following features:
1-The computer acts as the host.Up to 127 devices can connect to the host, either directly or by way of USB hubs.
2-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.
3-With USB 2.,the bus has a maximum data rate of 480 megabits per second.A USB cable has two wires for power (+5 volts and ground) and a twisted pair of wires to carry the data.
4-On the power wires, the computer can supply up to 500 milliamps of power at 5 volts.Low-power devices (such as mice) can draw their power directly from the bus.
5-High-power devices (such as printers) have their own power supplies and draw minimal power from the bus. Hubs can havetheir own power supplies to provide power to devices connected to the hub.
6-USB devices are hot-swappable, meaning you can plug them into the bus and unplug them any time.
Many USB devices can be put to sleep by the host computer when the computer enters a power-saving mod .