The universal serial bus (USB) is a standard interface for connecting a wide range of devices to the computer such as keyboard, mouse, smartphones, speakers, cameras etc. The USB was introduced for commercial use in the year 1995 at that time it has a data transfer speed of 12 megabits/s.
With some improvement, a modified USB 2 was introduced which is also called a highspeed USB that transfers data at 480 megabits/s. With the evolution of I/O devices that require highspeed data transfer also leads to the development of USB 3 which is also referred to as Superspeed USB which transfers data at 5 gigabits/s. The recent version of USB can transfer data up to 20 gigabits/s.
Content: Universal Serial Bus (USB)
- Key Objectives
- USB Architecture
- Isochronous Traffic on USB
- Types of USB Connectors
- Electrical Characteristics of USB
Key Objectives of Universal Serial Bus
Before getting into the details of the universal serial bus we will discuss some of the key objectives that are taken into account while designing a USB.
- The developed USB must be simple and a low-cost interconnection system that should be easy to use.
- The developed USB must be compatible with all new I/O devices, their bit rates, internet connections and audio, video application.
- The USB must support a plug-and-play mode of operation.
- The USB must support low power implementation.
- The USB must also provide support for legacy hardware and software.
When multiple I/O devices are connected to the computer through USB they all are organized in a tree structure. Each I/O device makes a point-to-point connection and transfers data using the serial transmission format we have discussed serial transmission in our previous content ‘interface circuit’.
As we know a tree structure has a root, nodes and leaves. The tree structure connecting I/O devices to the computer using USB has nodes which are also referred to as a hub. Hub is the intermediatory connecting point between the I/O devices and the computer. Every tree has a root here, it is referred to as the root hub which connects the entire tree to the hosting computer. The leaves of the tree here are nothing but the I/O devices such as a mouse, keyboard, camera, speaker.
The USB works on the principle of polling. In polling, the processor keeps on checking whether the I/O device is ready for data transfer or not. So, the devices do not have to inform the processor about any of their statuses. It is the processor’s responsibility to keep a check. This makes the USB simple and low cost.
Whenever a new device is connected to the hub it is addressed as 0. Now at a regular interval the host computer polls all the hubs to get their status which lets the host know of I/O devices that are either detached from the system or are attached to the system.
When the host becomes aware of the new device it gets to know about the capabilities of the device by reading the information present in the special memory of the device’s USB interface. So that the host can use the appropriate device driver to communicate with the device.
The host then assigns an address to this new device, this address is written to the register of the device interface register. With this mechanism, USB serves plug-and-play capability.
The plug and play feature let the host recognize the existence of the new I/O device automatically when the device is plugged in. The host software determines the capabilities of the I/O devices and if it has any special requirement.
The USB is hot-pluggable which means the I/O device can be attached or removed from the host system without performing any restart or shutdown. That means your system can keep running while the I/O device is plugged or removed.
Isochronous Traffic on USB
USB also supports the isochronous traffic where the data is transferred at a fixed timed interval, where the intervals are regular and of very short time. The isochronous data transmission is comparatively faster than asynchronous and synchronous data transfer.
To accommodate the isochronous traffic, the root hub sends a sequence of bits over the USB tree this indicates the start of isochronous data and after this sequence of bits, the actual data is transmitted.
Types of USB Connectors
The USB has different types of ports and connectors. Usually, the upstream port and connector are always the USB type A the downstream port and connector differ depending on the type of device connected. We will discuss all types of the USB connector.
USB Type A: This is the standard connector that can be found at one end of the USB cable and is also known as upstream. It has a flat structure and has four connecting lines as you can see in the image below.
USB Type B: This is an older standard cable and was used to connect the peripheral devices also referred to as downstream. It is approximately a square as you can see in the image below. This is now been replaced by the newer versions.
Mini USB: This type of USB is compatible with mobile devices. This type of USB is now superseded your micro-USB still you will get it on some devices.
Micro USB: This type of USB is found on newer mobile devices. It has a compact 5 pin design.
USB Type C: This type of USB is used for transferring both data and power to the attached peripheral or I/O device. The USB C does not have a fixed orientation as it is reversible i.e. you can plug it upside down or in reverse.
USB 3.0 Micro B: This USB is a superspeed USB. This USB is used for a device that requires high-speed data transfer. You can find this kind of USB on portable hard drives.
Electrical Characteristics of USB
The standard USB has four lines of connection among which two carry power (one carry +5 V and one is for Ground). The other two lines of connection are for data transfer. USB also supply power to connected I/O device that requires very low power.
Transferring of data over USB can be divided into two categories i.e., transferring data at low speed and transferring data at high speed.
The low-speed transmission uses single-ended signalling where varying high voltage is transmitted over one of the two data lines to represent the signal bit 0 or 1. The other data line is connected to the reference voltage i.e., ground. The single-ended signalling is prone to noise.
The high-speed data transmission uses the approach differential signalling. Here, the signal is transmitted over the two data lines that are twisted together. Here both the data lines are involved in carrying the signal no ground wire is required. The differential signalling is not prone to noise and uses low voltages as compared to single-ended transmission.
So, this is all about the universal serial bus which connects the I/O devices to the host computer. We have seen how it works and how many versions of USB we have.