Understanding USB Technology: Architecture, Devices, and Communication

USB: Simplified PC Connectivity

The Universal Serial Bus (USB) was created to simplify and improve the connection of peripherals to PCs, offering a standardized and versatile interface.

Key Objectives of USB

  • Provide sufficient bandwidth for a wide range of devices.
  • Maintain a low-cost standard.
  • Enable Plug and Play functionality.

USB Architecture

USB architecture can be divided into three main areas:

1. USB Interconnection/Topology

The USB interconnection is structured in a tiered-star topology with up to seven layers. Each star is centered around a root hub. Each segment is a point-to-point connection between:

  • The host and a hub
  • The host and a device

A device that provides a new facility to the host. It contains a feature that can be considered the conjunction of a hub and a feature, called a composite device, which provides a way of union and added functionality.

2. USB Devices

Hubs provide connection points for USB devices, adding functionality to the system. These devices use a standard interface, allowing the USB system to understand the protocol and respond to standard USB operations. Only hubs can provide additional USB access points. Functions are new facilities to the host, either directly or through a hub.

3. Host Controller

The host, located within the PC, is unique and responsible for managing communication between USB peripherals and the PC’s CPU. It can be a combination of hardware, firmware, and software. The host controller manages the insertion of peripherals into the bus, assigning resources and controlling data flow between the peripherals and the CPU.

Physical Environment

The physical topology of USB connects upstream ports to downstream ports of another hub or device. Since USB can operate at three speeds, high-speed connections require a shielded, two-conductor cable with power and a twisted pair for signals. For low-speed communications, twisted-pair cabling is recommended but not mandatory.

9k =

Messaging and Data Transfer

Control Pipe

A bidirectional communication channel between the host and two control endpoints on a USB device (one for input and one for output). All devices have these endpoints at address 0, allowing the system to establish a monitoring pipe even before configuration. Through this pipe, the system reads descriptive information (descriptors) about the device, such as:

  • Device type
  • Possible configurations
  • Supported protocols
  • Number and type of endpoints in each configuration

Stream Pipe

A one-way communication channel between the host and an endpoint using bulk, interrupt, or isochronous transfers. Data is not structured by USB in this case.

Transmission Operator

The USB is synchronous and uses NRZI (Non-Return to Zero Inverted) encoding. A zero is inserted after every six consecutive ones to ensure reliable data transmission and maintain receiver synchronization. In this system, there are two opposing voltages; a reference voltage corresponds to a “1”. There is no return to zero between bits, so a series of ones corresponds to a uniform voltage. Zeros are marked by changes in voltage level, so a succession of zeros produces successive changes in tension between the signal conductors.