USB Data Transfer & Protocol

Like all digital interfaces, USB, Universal Serial Bus has a defined protocol for the data transfer .


USB Universal Serial Bus Includes:
USB introduction     USB standards     Connectors, pinouts & cables     Data transfer & protocol     USB 3     USB-C    


USB, Universal Serial Bus is very easy to use providing a reliable and effective means of transferring data.

To achieve this the system has a defined data transfer protocol that enables the data to be formatted and carried in a defined way that provides the reliable communication.

Although some changes have been made between the different updates to the USB standard, the protocol, signalling and data transfer modes are basically the same.

USB signalling and data transfer basics

For USB 1 and 2 a four wire system is employed. As detailed elsewhere, the cables carry: power, ground and then there is a twisted pair for the differential data transfer. The lines are designated data+ and data -.

The data uses an NRZI system, i.e. non-return to zero.In terms of operation, when the USB host powers up, it polls each of the slave devices in turn.

The USB host has address 0, and then assigns addresses to each device as well as discovering the slave device capabilities in a process called enumeration. [Enumeration also takes place when a new device is connected].

Transactions between the host and device comprise a number of packets. As there are several different types of data that can be sent, a token indicating the type is required, and sometimes an acknowledgement is also returned.

Each packet that is sent is preceded by a sync field and followed by an end of packet marker. This defines the start and end of the packet and also enables the receiving node to synchronise properly so that the various date elements fall into place.

There are four basic types of data transaction that can be made within USB.

  • Control:   This type of data transaction within the overall USB protocol is used by the host to send commands or query parameters. The packet lengths are defined within the protocol as 8 bytes for Low speed, 8-64 bytes for Full, and 64 bytes for High Speed devices.
  • Interrupt:   The USB protocol defines an interrupt message. This is often used by devices sending small amounts of data, e.g. mice or keyboards. It is a polled message from the host which has to request specific data of the remote device
  • Bulk:   This USB protocol message is used by devices like printers for which much larger amounts of data are required. In this form of data transfer, variable length blocks of data are sent or requested by the Host. The maximum length is 64-byte for full speed Devices or 512 bytes for high speed ones. The data integrity is verified using cyclic redundancy checking, CRC and an acknowledgement is sent. This USB data transfer mechanism is not used by time critical peripherals because it utilises bandwidth not used by the other mechanisms.
  • Isochronous:   This form of data transfer is used to stream real time data and is used for applications like live audio channels, etc. It does not use and data checking, as there is not time to resend any data packets with errors - lost data can be accommodated better than the delays incurred by resending data. Packet sizes can be up to 1024 bytes.

The data transfer methodology and protocol for USB provides an effective method of transferring the data across the interface in an effective and reliable manner.



Wireless & Wired Connectivity Topics:
Mobile Communications basics     2G GSM     2G GPRS     2G GSM EDGE     3G UMTS     3G HSPA     4G LTE     5G     LMR / PMR     WiFi     IEEE 802.15.4     DECT cordless phones     NFC- Near Field Communication     Ethernet     Serial data     USB     Z-Wave     SigFox     LoRa    
    Return to Wireless & Wired Connectivity