Device

USB Library ››
… visits
Parent Previous Next

Make your PIC appear on the computer as the kind of USB device your project needs. Start with a small working test, then add the rest of your application.


This guide follows USB Device Library 0.20.0 and the included USB Device Configuration Tool 1.17.1.

New to USB? Start here

  1. Build your first USB application. Choose what the computer should see and make a small test.
  2. Choose the PIC and clock. Match the settings to your actual board.
  3. Use the configuration tool. Generate the starting program and save your settings.
  4. Keep USB running. Learn where to put your own code and how to check a command's result.

The download includes tested starting examples. Find the supplied files, or build the Windows test apps to try CDC and HID communication.

What do you want to make?

Your goal

Read this guide

Examples

Exchange commands and readings with a PC app

HID data

HID Data Demo application with VS2026 WPF 


Make a keyboard, mouse, joystick or media control

HID input devices

HID Keyboard text entry


HID Mouse random movement


Use a serial terminal or a COM-port application

CDC serial

CDC Data Demo application with VS2026 WPF 


Show measurements or settings as files on a small drive

MSC virtual files

MSC Virtual drive and files


Show readings and controls in a web browser

Browser over USB

RNDIS vrtual network server and external page


RNDIS vrtual network server and built-in pages


Choose one USB mode for a firmware build. For a first data test, HID data or CDC serial is a useful starting point.

Before you copy code: use the tool's Integration output for your exact PIC and board clock. The shorter examples in this guide show application work; they do not replace the generated device setup.

When you need help

Created with the Personal Edition of HelpNDoc: Bring your WinHelp HLP help files into the present with HelpNDoc's easy CHM conversion