Microchip Technology Inc
Menu

PIC32 and SAM MCUs USB Quick Selector Guide

Microchip offers a wide range of 32-bit microcontrollers (MCUs) with support for Full-Speed or High-Speed USB, and options for Device, Host and On-The-Go (OTG) modes.

Basic USB Concepts

The Universal Serial Bus has grown to become a common interface in many embedded industrial, medical, automotive, and consumer applications.
PIC32USB-Intro-Collage

Terminology:

  • Host: A PC or other computer that enumerates and communicates to the devices.
  • Embedded Host: Embedded products such as set-top boxes, video game Consoles and data loggers that have some of the capabilities of a non-PC host.
  • Device: The peripherals (mice, keyboard, Flash drive, printer) that follow the commands of the host or embedded host.
  • On the Go (OTG): The capability of the application to act as either an embedded host or a device; applications with OTG have a single connector (Micro AB) for host or device role.
  • Dual Role: The capability of the application to act as an embedded host or a device, but have two separate connectors for each role (Type-A connector for host and Type-B connector for device.)
  • Enumeration: The process by which a USB host learns about a USB device that has just been connected to the bus; before the application is able to start running, the host queries the device for various information to determine what type of device it is, what device driver it needs to load for the device, what power requirements the device has, etc.

USB Classes:

A USB class categorizes and identifies the device functionality. It serves as a guide to developers/programmers for application development. Some common USB classes are as follows:

  • Audio
  • Mass Storage
  • HID
  • CDC
  • Generic
  • Printer

USB Speeds:

USB comes in many different speeds. Full-Speed and High-Speed USB are the most common speeds supported by 32-bit MCUs. The following is a list of the different USB options and their speeds:

USB Verion Maximum Transfer Rate
SuperSpeed+ 10 Gbps
SuperSpeed 5 Gbps
High Speed 480 Mbps
SuperSpeed+ 12 Mbps
SuperSpeed+ 1.5 Mbps

Connector Types and Cables

There are many types of connectors for USB including: Type-A, Type-B, Mini-A, Mini-AB, Mini-B, Micro-AB, Standard A, Standard B, USB 3.0 Micro-B, and Type-C.

The Micro USB connectors are the most common on cell phones for charging and connectivity. The Type-C is the newest connector, designed to support USB 2.0, USB 3.0, USB 3.1 and future USB specifications reaching up to 20 Gbps data rates. This chart describes some of the common cable types.

180115-MC32-DIAG-MCU32-USB-Guide-ps850

USB Controllers and Physical Interfaces (PHYs)

The USB controller handles all of the communication via a USB stack running on the MCU, while, the PHY provides the physical interface to the cable. Microchip's 32-bit MCUs integrate both the controller and PHY.

PIC32 and SAM MCUs USB

PIC32 and SAM MCUs for Full-Speed USB

The following are Microchip’s Full-Speed USB products with OTG, device and host functionality. Note that some MCUs only contain a USB device, while others contain a host and device or OTG functionality.

PIC32 and SAM MCUs for High-Speed USB Devices

The following are Microchip's 32-Bit products for High-Speed USB with OTG, host and device functionality.

 
 
 
Tabs / PIC32 USB Quick Selector Guide
Development Tools
Documentation
Application Demos/Notes

Development Tools

Microchip offers a wide range of development kits for both Full-Speed USB and High-Speed USB. There are a wide range of tools from starter kits to full integrated development environments such as MPLAB Harmony and Atmel Studio.

PIC32 and SAM FS USB Development Boards

There are a wide range of development boards for Full-Speed USB Development.

Description Part Number
PIC32 Ethernet Starter Kit II DM320004-2
PIC32 USB Starter Kit III DM320003-3
PIC32 Bluetooth Starter Kit DM320018
PIC32MX1/2/5 Starter Kit DM320100
SAMD11 Xplained Pro ATSAMD11-XPRO
SAMD21 Xplained Pro ATSAMD21-XPRO
SAML21 Xplained Pro ATSAML21-XPRO-B
SAML22 Xplained Pro ATSAML22-XPRO-B
SAM4S Xplained Kit ATSAM4S-XPLD
SAM4S Xplained Pro ATSAM4S-XPRO
SAM4E Xplained Pro ATSAM4E-XPRO
SAM4E Evaluation Kit ATSAM4E-EK
SAMG55 Xplained Pro ATSAMG55-XPRO
SAM4L Xplained Pro ATSAM4L8-XPRO
SAM4L Evaluation Kit ATSAM4L-EK
SAM E54 Xplained Pro ATSAME54-XPRO
PIC32MK GP Development Kit DM320106
Explorer 16/32 Development Kit DM240001-3
   PIC32MX460F512L Plug-In Module MA320002
   PIC32MX795F512L Plug-In Module MA320003
   PIC32MX250F128D Plug-In Module MA320011
   PIC32MX450/470 Plug-In Module MA320002-2
   PIC32MX270F256D Plug-In Module MA320014
   PIC32MX570F512L Plug-In Module MA320015
   USB PICTail Plus Daughter Card AC164131
PIC32 Bluetooth Audio Development Kit DV320032
   PIC32MX270F256D PIM for BT Audio Development Kit MA320013
   PIC32MX270F512L PIM for BT Audio Development Kit MA320017

PIC32 and SAM HS USB Development Boards

Microchip offers a wide range of development boards for High-Speed USB Development.

Description Part Number
PIC32MZ Embedded Connectivity with FPU (EF) Starter Kit DM320007
PIC32MZ Embedded Connectivity with FPU (EF) Starter Kit (Crypto) DM320007-C
SAME70 Xplained ATSAME70-XPLD
SAMV71 Xplained Ultra ATSAMV71-XULT
Explorer 16/32 Development Kit DM240001-3
   PIC32MZ EF PIM MA320019
   USB PICTail Plus Daughter Card AC164131
PIC32 Bluetooth Audio Development Kit DV320032
   PIC32MZ EF Audio 144-pin PIM for BT Development Kit MA320018

Software Development Tools

For the software development tools, the MPLAB® Harmony is for the PIC32 Devices. While, the Atmel Studio and Atmel START are for the SAM based products.

Description Part Number
MPLAB® Harmony Integrated Software Framework MPLAB Harmony
Atmel Studio Atmel Studio
Atmel Start Atmel START
Advanced Software Framework (ASF) ASF

Application Demos/Notes for the PIC32 and SAM USB Devices

MPLAB® Harmony Demonstration Applications for USB Device

The following demonstration applications are for USB Devices and are based on MPLAB Harmony.

  • cdc_com_port_dual:This application demonstrates the ability of the MPLAB Harmony USB Device Stack to support multiple instances of the same Device class.
  • cdc_com_port_single: The application demonstrates two-way communication between the USB device and the personal computer host.
  • cdc_msd_basic: This demonstration application creates a composite USB Device that enumerates as a COM port and as Flash drive simultaneously.
  • cdc_serial_emulator: This application demonstrates the use of the CDC device class in implementing a USB-to-Serial Dongle.
  • cdc_serial_emulator_msd: This demonstration application creates a USB Device that combines the functionality of the cdc_serial_emulator and msd_basic demonstration applications.
  • hid_basic: This application creates a custom HID device that can be controlled by a personal computer-based utility.
  • hid_joystick: This demonstration application creates a custom HID joystick.
  • hid_keyboard: This demonstration application creates a Generic HID keyboard.
  • hid_mouse: This demonstration application creates a USB HID based two-button mouse device.
  • hid_msd_basic: This demonstration application creates a USB Device that combines the functionality of the hid_basic and msd_basic demonstration applications.
  • msd_basic: This demonstration application creates a Flash drive using the Mass Storage Device Class.
  • msd_fs_spiflash: This application demonstrates accessing the SPI Flash connected to the PIC32 device as a media by multiple clients.
  • msd_multiple_luns: This application demonstrates the creation of a USB device with multiple logical units
  • msd_sdcard: This application demonstrates the usage of a SD card reader through the USB Mass Storage Device (MSD) class to transfer data between a computer and SD card.
  • Vendor: This demonstration application creates a custom USB device using the USB Device Layer Endpoint functions.

MPLAB Harmony Demonstration Applications for USB HOST

The following demonstration applications are for USB HOST and are based on MPLAB Harmony.

  • audio_speaker: This application demonstrates the use of the Audio v1.0Host Class Driver to enumerate and an audio speaker device.
  • cdc_basic:This application demonstrates the use of the CDC Host Class Driver to enumerate and operate a CDC Device.
  • cdc_msd: This demonstration application creates a USB Host that can support different device classes in one application.
  • hid_basic_keyboard: This application demonstrates the use of the USB HID Host Client Driver to enumerate and operate a HID keyboard device.
  • hid_basic_mouse_usart: This application demonstrates the use of the USB HID Host Client Driver to enumerate and operate a HID mouse device.
  • hub_cdc_hid: This application demonstrates the capability of the USB Host Stack to access and manage multiple USB Devices through a Hub.
  • hub_msd: This application demonstrates the use of the Hub Driver and the MSD Host Client Driver, with File System, to support multiple MSD devices and Hub.
  • msd_basic: This application demonstrates the use of the MSD Host Class Driver to write a file to a USB Flash drive.

MPLAB Harmony Demonstration Applications for Multiple USB Controllers

This section describes the demonstrations that make use of multiple USB controllers on certain PIC32 microcontrollers.

  • cdc_com_port_dual: This application demonstrates dual USB Device operation on a PIC32 microcontroller with Two USB Controllers.
  • msd_dual: This application demonstrates the capability of a PIC32 microcontroller and the MPLAB Harmony USB Host stack to work with two USB Controllers in an application.

MPLAB Harmony Demonstration Applications for Audio

For more information on USB Audio Applications, please refer to the Digital Audio Quick Selector Guide

Application Notes for SAM MCUs with USB Support

The following are the application notes associated with the SAM based Microcontrollers.

Title and Link AN_42336: AT09331: ASF USB Stack Manual AN_42337: AT09332: USB Device Interface (UDI) for Communication Class Device (CDC) AN_42338: AT09333: USB Host Interface (UHI) for Communication Class Device (CDC) AN_42339: AT09334: USB Device Interface (UDI) for Human Interface Device Generic (HID Generic) AN_42340: AT09335: USB Device Interface (UDI) for Human Interface Device Keyboard (HID Keyboard) AN_42341: AT09336: USB Device Interface (UDI) for Human Interface Device Mouse (HID Mouse) AN_42342: AT09337: USB Host Interface (UHI) for Human Interface Device Mouse (HID Mouse) AN_42343: AT09338: USB Device Interface (UDI) for Mass Storage Class (MSC) AN_42344: AT09339: USB Host Interface (UHI) for Mass Storage Class (MSC) AN_42345: AT09340: USB Device Interface (UDI) for Vendor Class Device AN_42346: AT09341: USB Host Interface (UHI) for Vendor Class Device AN_42261: AT06475: SAM D21 USB AN_42375: AT07694: SAM D11 USB Mass Storage Device AN_42476: AT04155: SAM4L USB Host MSC Bootloader with Optional AES AN_32208: AT02985: User’s Guide for USB-CAN Demo on SAM4E-EK AN_42670: AT12859: USB Host MSC Class For SAM S70/E70/V70 AN_42565: AT13722: USB Dual Role Implementation on SAM V7x E7x S7x