Technopedia

The technologist’s encyclopedia

USB

USB (Universal Serial Bus) is the dominant cabled peripheral interface: the plug you use for keyboards, mice, cameras, drives, and chargers. Its utility comes from three design decisions — a host-enumerated tree topology (devices are cheap and dumb), hot-plug with automatic configuration (plug it in, it just works), and power over the same cable (one cable for data and watts). It is relevant whenever a general-purpose computer must connect to peripheral devices that are not peers.

Authoritative sources

Generations and data rates

Definition. Each USB generation defines a line rate per lane; from USB 3.2 onward, two lanes can be bonded (×2). USB4 abandons dedicated USB semantics and packets everything (USB 3, DisplayPort, optionally PCIe) over the lanes.

GenerationYearLine rateEncodingEffective payload
USB 1.0 Low/Full19961.5 / 12 Mb/sNRZI~1.2 / 9.6 Mb/s
USB 2.0 High2000480 Mb/sNRZI + 8b/10b-like bit stuffing~280 Mb/s real-world
USB 3.0 (Gen 1)20085 Gb/s8b/10b~4 Gb/s
USB 3.1 (Gen 2)201310 Gb/s128b/132b~9.7 Gb/s
USB 3.2 Gen 2×220172 lanes × 10 Gb/s128b/132b~19.4 Gb/s
USB4 Gen 3×220192 lanes × 20 Gb/s (NRZ)128b/132b~38.5 Gb/s per direction
USB4 v2 Gen 4202280 Gb/s (PAM3, 25.6 GBd)PAM3 + FEC~77 Gb/s per direction
Details: reading the naming, and why rates doubled

The naming went through three confusing eras. Originally rates were named directly (1.5/12/480 Mb/s). Then “USB 3.2 Gen 1×1 / Gen 2×2” named the lane speed and the lane count: Gen 2×2 means two lanes at 10 Gb/s each. Marketing names (“SuperSpeed”, “SuperSpeed+”, “USB 20Gbps”) are a fourth layer entirely — always check the line rate.

The rate doublings came from three independent levers, in order:

  1. Faster symbol rate (480 Mb/s → 5 Gb/s → 10 Gb/s): more transitions per second, limited by the cable’s attenuation (see the parent page’s skin-effect section).
  2. More bits per symbol: USB4 v2 switches from NRZ (1 bit/symbol) to PAM3 (three voltage levels, ~1.58 bits/symbol) at 25.6 GBd, nearly doubling the rate at the same symbol rate — the same trick Thunderbolt 5 uses.
  3. More lanes: bonding the two TX and two RX differential pairs of the USB-C connector into one logical link (×2).

Each lever costs something: symbol rate costs cable length, multi-level signalling costs SNR margin, lane bonding costs power and silicon.

Topology: the host-device tree

Definition. USB is a tiered star: exactly one host (the “root hub”) owns the bus; hubs extend it (up to 7 tiers); every device gets one of 127 addresses assigned by the host during enumeration. Devices never speak to each other.

Details: what happens when you plug in a device
  1. Detect. The device pulls the D+ (full-speed) or D− (low-speed) line up through a resistor; the hub notices the voltage change on its port.
  2. Reset. The host resets the port and listens at the default address 0.
  3. Describe. The host asks for descriptors — standardized data structures that say what the device is (class: HID, mass storage, video…), its endpoints, and its power needs.
  4. Assign. The host gives the device a unique address (1–127) and loads the matching driver.
  5. Schedule. From then on the host polls: USB has no device-initiated traffic (except remote wakeup). Time is divided into 1 ms frames; the host schedules each endpoint’s share.

This polling model is why a cheap mouse and a 10 Gb/s drive share one protocol, and why USB latency for device-initiated events is bounded by the polling interval (1–125 µs for interrupt endpoints).

Example problem

You daisy-chain a 4-port hub into a 7-port hub into a 4-port hub, and fill every port with devices. How many devices can be addressed, and what limits the count?

Solution

Each hub consumes one address itself, so the total is bounded by 127 addresses (7 bits) minus the hubs. The deeper limit is the 7-tier rule (root hub + 6 hubs of depth) and, practically, power: each hub must supply 500 mA per port from its own upstream connection, so an unpowered hub chain runs out of watts long before it runs out of addresses.

Power delivery

Definition. USB carries 5 V by default: 500 mA per port for USB 2.0 (2.5 W), 900 mA for USB 3.0 (4.5 W). USB-C raises the default to 1.5 A or 3 A (up to 15 W), and USB Power Delivery (PD) negotiates up to 48 V × 5 A = 240 W (PD 3.1) over the CC pins.

Details: how negotiation works

Power negotiation happens on the CC (Configuration Channel) pins, separate from the data lanes:

The consequence: a single USB-C cable can charge a laptop (100 W+) while carrying 80 Gb/s of data — the power and data domains are negotiated independently.

Example problem

A USB-C monitor needs 15 W and also receives DisplayPort video from the laptop. Explain what the CC pins and the data lanes each do here.

Solution

The CC pins carry the PD negotiation: the monitor (a sink) and the laptop (a source) agree on a contract — e.g. 5 V at 3 A — and the laptop then sources 15 W on VBUS. The video is unrelated to that negotiation: it rides the four high-speed differential pairs as a DisplayPort tunnel. One cable, two independent contracts: power on VBUS/CC, data on the TX/RX pairs.

Transfer types

Definition. USB defines four transfer types on every endpoint: control (enumeration, configuration), bulk (best-effort, high throughput, retried — drives), interrupt (small, bounded-latency polls — keyboards), and isochronous (guaranteed bandwidth, no retries — audio/video streams).

Details

The four types are the same trade-off between latency guarantees and loss tolerance, resolved differently:

This is the same distinction as TCP (bulk, retries) vs. UDP with a reserved rate (isochronous) in networks, and the same one that drove FireWire’s isochronous channels.

Quiz

Example problem

A 2.5 W (500 mA) USB 2.0 webcam works when plugged directly into the laptop, but fails when plugged into an unpowered hub that also has a 500 mA drive attached. Why?

Solution

The hub itself consumes one unit load (100 mA, or 500 mA if bus-powered design requires it) and must divide its single upstream 500 mA allocation among its downstream ports. Two 500 mA devices demand 1 A from a port that supplies 0.5 A. The hub must reject or fail the over-current draw — the fix is a self-powered hub with its own supply, which is exactly why powered hubs exist.