What is USB?

What is the USB Interface? When is this interface used?

1 Answer
Can you answer this question?

Editorial Team - everything RF

Feb 26, 2021

Universal Serial Bus (USB) was designed to standardize the connection of peripherals to personal computers, both to communicate with and to supply electric power. The USB interface is self-configuring, eliminating the need for the user to adjust the device's settings for speed or data format or configure interrupts, input/output addresses, or direct memory access channels. The connectors are standardized at the host, so any peripheral can use the most available receptacles. The USB interface is hot-swappable i.e. devices can be exchanged without rebooting the host. Small devices can be powered directly from the USB interface, eliminating the need for additional power supply cables. Installing a device that relies on the USB standard requires minimal operator action. It has largely replaced interfaces such as serial ports and parallel ports and has become commonplace on a wide range of devices.

A broad variety of USB hardware exists, including eleven different connectors.

A USB system consists of a host with one or more downstream ports, and multiple peripherals, forming a tiered-star topology. Up to 127 devices may be connected to a single host controller. USB device communication is based on pipes (logical channels). A pipe is a connection from the host controller to a logical entity within a device, called an endpoint. Because pipes correspond to endpoints, the terms are sometimes used interchangeably.

There are two types of pipe: stream and message

  • A message pipe is bi-directional and is used for control transfers. Message pipes are typically used for short, simple commands to the device, and status responses from the device, used, for example, by the bus control pipe number 0.
  • A stream pipe is a unidirectional pipe connected to a uni-directional endpoint that transfers data using an isochronous, interrupt, or bulk transfer:
    • Isochronous transfers - At some guaranteed data rate (for fixed-bandwidth streaming data) but with possible data loss (e.g., real-time audio or video)
    • Interrupt transfers - Devices that need guaranteed quick responses (bounded latency) such as pointing devices, mice, and keyboards
    • Bulk transfers - Large sporadic transfers using all remaining available bandwidth, but with no guarantees on bandwidth or latency (e.g., file transfers)

Advantages of using the USB Interface

  • The USB standard eliminates the requirement to develop proprietary interfaces to new peripherals.
  • The wide range of transfer speeds available from a USB interface suits devices ranging from keyboards and mice up to streaming video interfaces.
  • A USB interface can be designed to provide the best available latency for time-critical functions or can be set up to do background transfers of bulk data with little impact on system resources.
  • The USB interface is generalized with no signal lines dedicated to only one function of one device.

Disadvantages of using the USB Interface

  • USB cables are limited in length, as the standard was intended for peripherals on the same table-top, not between rooms or buildings. However, a USB port can be connected to a gateway that accesses distant devices.
  • USB has a strict tree network topology and master/slave protocol for addressing peripheral devices; those devices cannot interact with one another except via the host, and two hosts cannot communicate over their USB ports directly. Some extension to this limitation is possible through USB On-The-Go in, Dual-Role-Devices and Protocol Bridge.
  • A host cannot broadcast signals to all peripherals at once—each must be addressed individually. Some very high-speed peripheral devices require sustained speeds not available in the USB standard.
  • While converters exist between certain legacy interfaces and USB, they may not provide a full implementation of the legacy hardware. For example, a USB-to-parallel-port converter may work well with a printer, but not with a scanner that requires bi-directional use of the data pins.