Basic Components of a USB System Architecture
The USB System Architecture consists of the following main components:
USB Host
The main responsibility of the host computer is to control the communications between the host system and USB devices.
The host computer contains two layers: a USB host controller hardware layer, and a software layer, which includes USB device drivers for a wide range of USB devices such as keyboards, mice, digital still cameras, scanners, mass storage devices etc. The drivers convert data between the format that is used by the host computer and the format used by the USB devices.
USB hardware layer is responsible for:
Detecting the attachment and removal of USB devices
Monitoring device status and collecting activity statistics
Providing power to attached USB devices
Managing control and data flow between the USB host and USB devices
Checking the basic validity of bus transactions
USB software layer is responsible for:
Handling USB devices and their connectivity
USB devices enumeration and configuration
Loading appropriate device drivers
Managing the power on the bus and bus bandwidth
Managing the data transfer between the software and hardware
USB Devices
The USB Devices are peripherals that use the USB protocol for two way communication with the host computer.
|
USB Flash Drive
|
USB MP3 Player
|
USB Image Still Camera
|
USB Video Camera
|
The main responsibility of the USB Device is to provide the end user with various specific functions, such as a keyboard, a data/fax modem device, a digital microphone, or a video camera. For this reason the official USB Specification uses the term "function" to refer to USB peripheral devices. To provide the user with additional attachment points to connect more peripherals there is a special type of USB device called USB Hub.
USB Hub is just a device with multiple USB ports for plugging in the USB devices and other hubs. Internal root hub on the host controller and the external hubs are functionally the same.
USB Cable
USB Cable is a cable to connect between host computer and USB device.
The USB specification limits the maximum length of a standard USB cable between full- and high-speed devices to 5 meters. For a low-speed device the limit is 3 meters. The primary reason for USB cable's length limit is the maximum allowed delay of a signal. In practice, some USB devices may work with longer than specified cable. However, using a longer cable lowers the signal quality provided by the USB bus below the specification tolerance limit. This may prevent USB devices from working properly or even from working at all. Using USB devices over a greater length require one or several USB hubs or USB Active Extension Cable (USB Repeater Cable) that contains active electronics which regenerate the USB signal for maximum reliability and performance over extended distances. With powered USB hubs or USB active extension cables USB connections can be extended to maximum theoretical distance of about 30 meters.
USB Host Controller
A USB Host Controller is the hardware either on the computer motherboard or PCI card. It provides an interface for transferring streams of data between the host computer and the USB devices. The host computer may have one or multiple USB host controllers with different types of interface.
USB Host Controller Interface
A Host Controller Interface (HCI) is a register level interface which allows host controller hardware to communicate with the operating system of a host computer. There are three types of USB host controller interface:
Open Host Controller Interface (OHCI)
Universal Host Controller Interface (UHCI)
Enhanced Host Controller Interface (EHCI)
Host controller interface standards are not defined in the USB specification itself. There are separate specifications for each type of HCI:
With USB revision 1.0 and 1.1, there were two HCI specifications, OHCI specification developed by Compaq, Microsoft and National Semiconductor and the UHCI specification developed by Intel. Both HCI standards provide the same capabilities and work with all USB devices but do not support high-speed transfers. The differences however is that the OHCI places more of the burden on a hardware and makes for simpler software and the UHCI's hardware implementation is simpler and cheaper, but requires a more complex software and thus puts more load onto the CPU. The dueling implementations forced vendors to develop and test the hardware and software on both HCI implementations which increased cost. With the introduction of USB revision 2.0 a new Enhanced Host Controller Interface specification was developed by Intel, Compaq, NEC, Lucent and Microsoft. The single integrated EHCI specification eliminates many of the problems that existed because of competing OHCI and UHCI standards. EHCI used by all USB 2.0 devices and the only HCI that can support high-speed transfers.
Using USBlyzer - Identifying the USB Host Controller Type
You can see whether a particular host controller is OHCI, UHCI or EHCI compliant by opening USBlyzer and checking for the word "Open", "Universal" or "Enhanced" in host controller's description in the Device Tree panel.
Also note that selecting root node in the Device Tree panel brings up the statistics regarding the number and type of installed USB host controllers, hubs and devices on your USB system in USB Properties panel.
USB Host Controller is a Bus Master
The Universal Serial Bus is a host controlled bus. All data transfers are initiated and controlled by the host on a scheduled basis. All USB peripherals are slaves responding to host commands with the only exception of "remote wakeup" command which USB device can issue to make the suspended host active.
Since only one master controls the bus, two USB devices cannot communicate directly with each other. However, USB On-The-Go (OTG) extension enables direct data exchange between peripheral USB devices, where one USB Device acts as the master and the other as the slave. There is also a device on the market called the "USB Bridge" that allows you to link two USB devices together to transfer data without the need of a host computer. In this case USB bridge is itself works as a master.
Two USB hosts also cannot communicate directly as they both are masters on the bus. To connect two PCs to each other you need a special USB Data Cable (also known as a "USB to USB Adapter"). There is a device in the cable that acts as a slave for both connected computers.
The host computer may have one or multiple USB Host Controllers and each host controller contains an implicit USB Hub, called the Root Hub. A USB Root Hub is an internal device that is directly attached to the USB Host Controller and provides a number of initial attachment points called USB Ports for connecting USB devices and external USB hubs to the host computer.
|
Nowadays typical computer motherboards have many USB ports. Normally two or four of them reside directly on the motherboard, at its back, others are available through connector.
|
|
Most of the newer computer cases have frontal USB Ports which can be connected to the motherboard.
|
|
Another possibility to extend the number of USB Ports is to install a USB PCI Card.
|
To connect the USB device to a computer one has to find a free USB port connector on the back or front of the machine and plug the USB device into it.
|