USB Hosts

Last modified by Microchip on 2023/11/10 11:19

Single Host

When operating, Universal Serial Bus (USB) systems have a single host which controls all communications within the system. The host sends communication requests and devices respond to these requests. USB devices do not initiate data transfer events.

Traditionally, nodes in USB networks operate in either Device or Host mode in perpetuity. USB v2.0 and earlier specifications have no provision for role changing. A 2.0 device always acts as a device and a 2.0 host always operates as a host. USB On-the-Go (OTG) and USB v3.0 (and above) provide the ability for a node to change roles from an upstream-facing port (device) to a downstream-facing device (host) and vice versa.

USB host designs consist of a USB host controller hardware circuit and a software component.

USB Hardware

  • Detects the attachment and removal of USB devices
  • Supplies power to attached USB devices
  • Manages control and data flow between the USB host and USB devices
  • Provides Cyclic Redundancy Check (CRC) error checking of transactions

USB Host Software

  • Handles USB devices and their connectivity
  • USB device enumeration and configuration
  • Loads device drivers for the host CPU to access the attached devices

Host Application Tasks

USB connectivity adds a communications element to a design. In addition to the USB communication task, the product must also contain an application program. This application program can run on the same MCU running the USB communication tasks or may run on a separate CPU. Many developers of embedded USB applications using 32-bit PIC® MCUs combine the application software with the host USB interface software into the PIC32. Information on how this is accomplished can be found in the MPLAB® Harmony documentation.

Learn More