[2.1.3] USB interface

The Universal Serial Bus (USB) Interface

Every day, you likely connect devices to your computer using USB - charging your phone, plugging in a keyboard, transferring photos from a camera, or backing up files to an external drive. The Universal Serial Bus (USB) has become the most widely adopted connection standard in computing, found on billions of devices worldwide. Understanding how USB works and how it transmits data is essential for comprehending modern computer connectivity and peripheral communication. USB has revolutionised how we connect devices by providing a single, standardised interface that replaced dozens of incompatible connectors.

USB is more than just a physical connector - it is a complete communication protocol and electrical standard that defines how data is transmitted, how devices are powered, and how computers recognise and communicate with peripherals. This benchmark explores what USB is, how it transmits data between devices, and why it has become the dominant connection standard for computer peripherals and mobile devices.

What Is USB?

Definition and Purpose

The Universal Serial Bus is an industry standard that establishes specifications for cables, connectors, and communication protocols for connection and power supply between computers and peripheral devices. Developed in the mid-1990s by a consortium of companies including Intel, Microsoft, and IBM, USB was designed to replace the multitude of different connector types that existed at the time - serial ports, parallel ports, PS/2 connectors, and others. The goal was to create a single, universal standard that would simplify device connectivity and improve the user experience.

USB serves multiple purposes simultaneously: it provides a standardised physical connection, enables high-speed data transmission, supplies electrical power to connected devices, and implements automatic device recognition (plug and play). This combination of features in a single interface makes USB exceptionally versatile and convenient, explaining its widespread adoption across computers, mobile devices, peripherals, and consumer electronics.

Key Characteristics of USB

Several characteristics distinguish USB from earlier connection standards:

  • Universal compatibility: A single USB port can connect to thousands of different device types - keyboards, mice, printers, cameras, storage drives, smartphones, and more
  • Hot-swappable: Devices can be connected and disconnected whilst the computer is running, without needing to restart or power down
  • Plug and play: The computer automatically detects connected devices and installs necessary drivers, requiring minimal user intervention
  • Power delivery: USB provides electrical power through the same cable that carries data, eliminating the need for separate power supplies for many devices
  • Serial transmission: USB uses serial data transmission, sending bits one at a time along a single channel for reliable communication over varying distances
  • Host-controlled: The computer (host) manages all communication with connected devices (peripherals)

How USB Transmits Data

Serial Data Transmission

Despite its name containing the word "bus" (which traditionally implies parallel communication), USB uses serial transmission to send data. Serial transmission means that data bits are sent one at a time in sequence along a single data channel, rather than multiple bits simultaneously on multiple wires. This approach was chosen because serial transmission is more reliable over longer distances, requires fewer wires (reducing cable cost and complexity), and avoids the timing synchronisation problems that plague parallel transmission.

In a USB cable, there are typically four wires: two for power (positive and ground) and two for data transmission (D+ and D-). The data wires form a differential pair - the same signal is sent on both wires but with opposite polarity. This differential signalling helps reduce electromagnetic interference and allows for more reliable data transmission. The receiving device compares the two signals and determines the correct value, making the communication resistant to noise and electrical interference that might affect both wires equally.

The USB Communication Model

USB communication follows a host-controlled model. The computer acts as the host or master, whilst connected devices act as peripherals or slaves. Only the host can initiate data transfers - peripherals must wait to be asked by the host before they can send or receive data. This centralised control simplifies the protocol and prevents collisions that might occur if multiple devices tried to transmit simultaneously.

Data transmission occurs in structured units called packets. Each packet contains addressing information (which device is being communicated with), control information (what type of transaction this is), the actual data payload, and error-checking information. The host continuously polls (checks) connected devices, asking if they have data to send or if they are ready to receive data. This polling happens very rapidly - thousands of times per second - creating the illusion of continuous, simultaneous communication with multiple devices.

Data Transfer Types

USB supports different types of data transfers optimised for different purposes:

  • Control transfers: Used for device configuration and sending commands. These have the highest priority and are used when a device is first connected to configure it
  • Bulk transfers: Used for large amounts of data where speed is important but timing is not critical, such as transferring files to a storage device. Bulk transfers use any available bandwidth but can be interrupted by higher-priority transfers
  • Interrupt transfers: Used for devices requiring rapid response, such as keyboards and mice. Despite the name, these are actually regular polling operations that occur frequently
  • Isochronous transfers: Used for time-sensitive data like audio and video streaming, where maintaining consistent timing is more important than perfect accuracy. These transfers are guaranteed bandwidth and timing

USB Versions and Evolution

USB 1.x and USB 2.0: The Foundation

USB 1.0 and 1.1 (1996-1998):

  • Transfer speeds: 1.5 Mbps (Low Speed) and 12 Mbps (Full Speed)
  • Introduced the basic USB architecture and connector types
  • Sufficient for keyboards, mice, and basic peripherals
  • Limited adoption initially due to slow speeds for data-intensive devices

USB 2.0 (2000):

  • Transfer speed: 480 Mbps (High Speed) - 40 times faster than USB 1.1
  • Backwards compatible with USB 1.x devices
  • Fast enough for external hard drives, digital cameras, and video capture
  • Became the dominant standard for over a decade
  • Still widely used today for devices that do not require extreme speeds

Real-world performance: Whilst USB 2.0 has a theoretical maximum of 480 Mbps, actual file transfer speeds are typically 280-320 Mbps (35-40 MB/s) due to protocol overhead and other factors. This is sufficient for most peripherals but limiting for high-capacity storage devices and high-resolution video.

Impact: USB 2.0 achieved true universality. By the mid-2000s, virtually all computers and peripherals adopted USB 2.0, fulfilling the original vision of a universal connection standard. Legacy connectors like serial ports, parallel ports, and PS/2 ports largely disappeared from consumer devices.

USB 3.x: SuperSpeed and Beyond

USB 3.0 (2008):

  • Transfer speed: 5 Gbps (SuperSpeed) - over 10 times faster than USB 2.0
  • Introduced additional wires in the cable for simultaneous bidirectional communication
  • Blue connector colour to distinguish from USB 2.0
  • Backwards compatible with USB 2.0
  • Real-world speeds of 300-400 MB/s for file transfers

USB 3.1 (2013):

  • USB 3.1 Gen 1: Same as USB 3.0 (5 Gbps) - a naming confusion
  • USB 3.1 Gen 2: 10 Gbps (SuperSpeed+) - double the speed of USB 3.0
  • Improved power delivery capabilities
  • Real-world speeds approaching 1 GB/s for external SSDs

USB 3.2 (2017):

  • USB 3.2 Gen 1: 5 Gbps (same as USB 3.0)
  • USB 3.2 Gen 2: 10 Gbps (same as USB 3.1 Gen 2)
  • USB 3.2 Gen 2×2: 20 Gbps using both sets of differential pairs in USB-C cables
  • Confusing naming scheme led to consumer confusion

Technical improvements: USB 3.x achieved higher speeds by adding additional data lanes, implementing more efficient encoding schemes, and using higher signal frequencies. Unlike USB 2.0 which operates in half-duplex mode (one direction at a time), USB 3.x operates in full-duplex mode, allowing simultaneous bidirectional data transfer.

Applications: USB 3.x speeds are essential for external SSDs, high-resolution webcams, 4K video capture devices, and fast backup solutions. The dramatically faster speeds make external storage competitive with internal drives for many applications.

USB-C: The Modern Standard

Physical connector (2014):

  • Reversible design - can be plugged in either orientation
  • Smaller and more durable than previous USB connectors
  • Single connector type for both hosts (computers) and peripherals
  • Eliminates the frustration of "USB doesn't fit the first time"

Enhanced capabilities:

  • Supports USB 2.0, USB 3.x, and USB4 protocols over the same physical connector
  • USB Power Delivery: Can provide up to 100 watts of power, enough to charge laptops
  • Alternate modes: The connector can carry non-USB signals like DisplayPort video or Thunderbolt data
  • Can act as host or peripheral depending on the connected device

USB4 (2019):

  • Transfer speeds up to 40 Gbps - matching Thunderbolt 3
  • Requires USB-C connector
  • Backwards compatible with USB 3.2, USB 2.0, and Thunderbolt 3
  • Improved resource allocation for multiple devices on a single port

Confusion and limitations: Unfortunately, USB-C's versatility has created confusion. Not all USB-C cables support the same features - some only support USB 2.0 speeds, others support full USB 3.2 or USB4 speeds. Some support Power Delivery, others do not. Some support video output, others are data-only. This makes it difficult for consumers to know which cable to use for which purpose.

Industry adoption: USB-C is rapidly becoming the universal connector across all device categories. Modern laptops, tablets, smartphones, and peripherals increasingly use USB-C exclusively. The European Union has mandated USB-C as the standard charging port for mobile devices, further accelerating adoption.

Advantages of USB

Universality and Compatibility

The primary advantage of USB is in its name: universality. A single USB port can connect to thousands of different device types without requiring specialised connectors or ports for each device category. This universality has simplified computer design, reduced manufacturing costs, and improved the user experience dramatically. Users no longer need to identify which port is for which device or worry about having the right connector available.

Backwards compatibility ensures that older devices continue to work with newer computers, and newer devices can work with older computers (albeit at reduced speeds). A USB 2.0 mouse works perfectly on a USB 3.2 port, and a USB 3.2 external drive works on a USB 2.0 port (though it will only achieve USB 2.0 speeds). This compatibility protection for existing investments in peripherals and ensures smooth technology transitions.

Ease of Use

USB's plug-and-play capability means users can simply connect a device and begin using it immediately, with the computer automatically detecting the device, loading necessary drivers, and configuring settings. This is a stark contrast to earlier technologies that required manual driver installation, system configuration, and often computer restarts. Hot-swapping allows devices to be connected and disconnected without powering down the computer, providing flexibility and convenience that earlier standards lacked.

Power Delivery

USB's ability to provide electrical power alongside data transmission eliminates the need for separate power supplies for many devices. Low-power devices like keyboards, mice, and USB flash drives can be entirely bus-powered, requiring no external power source. With USB Power Delivery, even power-hungry devices like external hard drives, monitors, and laptops can be powered through USB-C cables, dramatically reducing cable clutter and improving portability.

Cost and Reliability

USB's widespread adoption has driven down manufacturing costs for cables, connectors, and controller chips. The reliability of serial transmission and the robust error-checking built into the USB protocol ensure dependable data transmission. USB cables are relatively inexpensive, readily available, and durable compared to earlier connector types.

Common USB Applications

Peripheral Connectivity

USB connects virtually all computer peripherals: keyboards, mice, printers, scanners, webcams, microphones, speakers, game controllers, and more. This standardisation has simplified peripheral manufacturing and ensured cross-platform compatibility - the same USB keyboard works on Windows, macOS, Linux, and even some tablets and smartphones.

Data Storage and Transfer

USB flash drives (memory sticks) and external hard drives provide portable storage and backup solutions. The high speeds of USB 3.x make external SSDs practical for professional work, with performance approaching internal drives. USB storage devices are used for software installation, system recovery, data backup, and file sharing between computers.

Mobile Device Connectivity

Smartphones and tablets use USB (typically USB-C or micro-USB) for charging and data synchronisation with computers. This allows file transfer, device backup, software updates, and tethering (using the phone's mobile internet connection on a computer). Modern smartphones can even act as USB hosts, allowing them to connect to keyboards, mice, or storage devices.

Charging and Power

USB has become the dominant charging standard for portable electronics. USB chargers are nearly universal, reducing the need for device-specific power adapters. USB Power Delivery allows everything from smartphones to laptops to charge through USB-C ports, simplifying travel and reducing electronic waste from proprietary chargers.

Limitations and Considerations

Cable Length Restrictions

USB has practical cable length limits due to signal degradation and timing requirements. USB 2.0 cables should not exceed 5 metres without active repeaters or hubs. USB 3.x cables are effectively limited to 3 metres for reliable operation. Longer distances require active extension cables or USB-over-Ethernet adapters.

Bandwidth Sharing

Multiple devices connected to the same USB host controller share available bandwidth. If you connect several high-speed devices to the same USB hub or port, they must share the available bandwidth, potentially reducing individual device performance. This is particularly noticeable with USB 2.0 where 480 Mbps must be divided among all connected devices.

Version and Cable Confusion

The proliferation of USB versions and the inconsistent naming schemes (particularly for USB 3.x) have created consumer confusion. Not all USB-C cables support the same speeds or features, making it difficult to identify which cable provides which capabilities. Users may experience performance problems when using cables that do not support the speeds their devices require.

 Key Takeaways

  • USB (Universal Serial Bus) is an industry-standard interface that provides a single, universal connection method for computer peripherals, combining data transmission, device recognition, and power delivery in one cable
  • USB transmits data using serial transmission, sending bits one at a time along a differential pair of wires, which provides reliable communication whilst reducing cable complexity and cost compared to parallel transmission
  • USB communication follows a host-controlled model where the computer (host) manages all data transfers with connected devices (peripherals), using structured packets and continuous polling to coordinate communication with multiple devices
  • USB has evolved through multiple versions from USB 1.0 (12 Mbps) through USB 2.0 (480 Mbps), USB 3.x (5-20 Gbps), to USB4 (40 Gbps), with each generation providing backwards compatibility whilst dramatically increasing transfer speeds
  • Key advantages of USB include universality (one port type for thousands of devices), hot-swapping capability, plug-and-play device recognition, power delivery through the data cable, and widespread industry adoption reducing costs
  • USB-C represents the modern standard with a reversible connector, support for multiple protocols (USB, DisplayPort, Thunderbolt), enhanced power delivery (up to 100W), and consolidation of host and peripheral connectors into a single design