
The
expansion cards when came were the great advantage adding in computer functionality. But they had their own overheads such as to plug the devices in the integrated
PCI or
ISA slots. The designers came to resolve the issue with bringing in the universal serial bus (USB). USB devices can be connected or disconnected to universal serial bus with no need of powering off as in case of expansion cards.
USB Physical Structure
In a system USB structure consists of two elements: a host controller and
hubs. A USB hub allows a USB connector to fit the USB device. Host controller controls the chain of USB hubs through a
bus. One controller supports five hubs at a time with maximum of 127 USB devices. When the device inserted in the hub it connects to the controller through pipes. Pipes are the logical channels (byte streams) between controller and devices. One device connects to a controller through 32 unidirectional I/O pipes. 16 from controller to device and 16 from device to controller. Pipe 0 are reserved for bus management.
USB pipe Types
Data packets of length 2N are transferred through the pipes. Being unidirectional data is either transferred to or out of the device. Depending upon transfer modes a pipe can be categorized as:
Bulk Transfer
When a pipe transfers a huge amount of data such as a big file transfer. In this case the pipes avails all the available bandwidth.
Interrupt Transfer
In this case the pipe transfers the interrupts such as USB mouse,
touch pads, etc.
Control Transfer
When pipe transfers some control commands such as bus monitoring by pipe 0s.
Isochronous Transfer
When pipe transfers a real time data it is in this mode. Real time data can be audio or video.
USB BUS allocation
On inserting device in USB hub, host controller assigns a unique 7-bit address to the device. Then allows the device to use the bus for purpose. Bus allocation to number of devices is done in round robin fashion. Each device is allocated a time slot for the bus usage. High priority on the bus is allocated to interrupts transfer.
USB Device Descriptor
Each USB Device has built-in device descriptor
software. This descriptor configures the device to be used. For example a USB digital camera can allow either audio or both at a time. It is device descriptor that describes what interface is to be used.
USB Device drivers
Modern
operating systems such as windows or Linux have built-in device drivers for USB. In other cases USB device drivers can easily be installed on the systems. Microsoft windows allow checking the version of USB drivers through device manager. In Linux the commands Ispc –v and Isusb display all the related information about installed USB controllers.