Release Notes for Microchip USB Firmware Framework
v2.5b – Microchip Full-Speed USB Solutions
August 31th, 2009
1. What's
New/Updated in Release v2.5
6. USB
Compliance Test ID (TID) Information
7. Alternative
Software Solutions
· Device
o
USB Device – Audio –
o USB Device – Composite – MSD + CDC example added
o USB Device – HID - Joystick example added
o USB Device – HID - Pen Digitizer example added
o USB Device – HID - Multi-Touch Digitizer example added
o USB Device – HID - Uninterruptible Power Supply example added
o USB Device – WinUSB – High Bandwidth example added
o USB Dual Role – MSD host + HID device example added
· Bug fixes in both host and device stacks.
· Fixed PIC32 USB Starter Kit host support
· New C# custom HID demo application
· Minor fixes in vendor class demos
· Includes PIC18F Starter Kit projects, including micro-SD bootloader
· Fixed host stack issue of attach and detach during enumeration process causing potential issues
· MDD File system has FSGetDiskProperties() function to determine remaining size of the disk
· Fixed issue with device stack in running with ping-pong in low-speed
· Fixed issues with MSD Host precompiled library project and OTG project
· Fixed issues in CDC host related to supporting multiple CDC devices
Please note that there are changes to the application interface to the USB firmware. It is important to review the migration notes as there have been major changes in functionality and behavior of the firmware. For more details about what has changed please refer to the Migration Notes located in the <Install directory>/Microchip/USB/Documents folder.
This release was tested with the following tools:
C18 – v3.30
C30 - v3.11b
C32 – v1.05 – Some examples require features new in the v1.05 version of the compiler.
MPLAB
v8.30
Upon initially plugging in a USB device, in some cases Windows will prompt the user for a driver. Rather than having users manually copy .sys files (driver binary files) into important system directories (such as within the “\Windows\system32\” directory structure) and manually add registry entries, Windows automates the driver installation process through the use of .INF files. INF files are plain text (can be edited with notepad) installation instruction script files.
Some types of USB devices will not require .INF files or user provided drivers (for example, a HID class mouse). For these types of devices, the operating system makes use of drivers already built into/distributed with the operating system, so no user provided driver or .INF file is necessary.
For other types of devices, Windows will prompt the user for a driver. In these cases, point Windows to the .INF file relevant for the USB device. All of the example projects included in the MCHPFSUSB framework which need an INF file are provided with an example INF file. The INF file will need slight modification (most importantly to change the VID and PID) before commercial distribution.
The INF file for the custom demo can be found in <Install Directory>\USB Tools\MCHPUSB Custom Driver\MCHPUSB Driver\Release.
The INF file for the CDC demos can be found in <Install Directory>\USB Tools\USB CDC Serial Demo\inf\win2k_winxp.
Every USB product line must have a unique combination of VID and PID. All firmware examples use Microchip's VID (0x04d8) and a unique PID. Prior to manufacturing and marketing a new USB product, the VID and PID need to be changed. New VID and PID numbers can be obtained by purchasing a VID from the USB Implementers Forum:
http://www.usb.org/developers/vendor
Alternatively, Microchip has a free VID sublicensing program. An application form for obtaining a PID (for use with Microchip’s VID: 0x04d8) from Microchip can be obtained by clicking here for the direct link.
Once a new VID/PID combination is obtained, both the firmware and the .INF file (when applicable) will need to be updated.
To modify the VID/PID in one of the example USB firmware projects, open the usb_descriptors.c file (found in each of the demo folders). They should appear in the table used for the USB Device Descriptor. Change both values as needed.
To modify the VID/PID in the .INF file, open the relevant INF file and search for the “[DeviceList]” sections. There are two sections, one for 32-bit and one for 64-bit, both sections should be identical. In these sections, some text will appear with the form “USB\VID_xxxx&PID_yyyy”. Update the “xxxx” and “yyyy” sections with the new hexadecimal format VID/PID values.
The example firmware projects included in the distribution are based around the MPLAB C18 and C30 compilers. Some demos require the full versions of the compilers (the boot loaders and a few of the demo applications). For most demos, either the commercial version, or the evaluation version can be used to build the example projects. Some The compilers may be obtained from http://www.microchip.com/c18, http://www.microchip.com/c30, and http://www.microchip.com/c32
Stack v2.4 adds some new demo files and folders to the existing directory structure. Details of their contents and purpose are described below.
.\<Install Directory>
\Microchip
\Include
\Help
\USB
\Documentation
\USB Device – CDC – Basic Demo
\CDC - Basic Demo – Firmware
\inf
\PC Software Example
\USB Device – CDC – Serial Emulator
\CDC - Serial Emulator
\inf
\USB Device - Composite - HID + MSD
\USB Device – Composite – MSD + CDC
\USB Device – HID –Custom Demos
\USB Device – HID – Digitizers
\USB Device – HID – Uninterruptable Power Supply
\USB Device – LibUSB – Generic Driver Demo
\USB Device – Mass Storage – Internal Flash
\USB Device – Mass Storage – SD Card data logger
\USB Device – Mass Storage – SD Card reader
\USB Device – MCHPUSB - Generic Driver Demo
\PC software
\Borland_C
\Visual C++ 2005 Express
\USB Device - WinUSB - Generic Driver Demo
\Driver and INF
\WinUSB Simple Demo – Firmware
\WinUSB Simple Demo - PC Application - MS VC++ 2005
\USB Device – WinUSB – High Bandwidth device
\USB Dual Role – MSD host + HID device
\USB Host – Charger – Simple Charger
\USB Host – Mass Storage – Simple Demo
\USB Host – Mass Storage – Thumb Drive Data Logger
\USB Host – MCHPUSB – Generic Driver Demo
\USB Host – Printer – Print Screen Demo
\USB Host – Printer – Simple Full Sheet Demo
\USB Host – Printer – Simple POS Demo
\USB OTG – MCHPUSB – Generic Driver Demo
\USB PC – WM_DEVICECHANGE Demo
|
|
Low Pin Count USB Development Kit (PIC18F14K50 Family) |
||||||||||||||
|
|
PICDEM Full Speed USB (PIC18F4550 family) |
||||||||||||||
|
|
|
PIC18F46J50 Full Speed USB Development Board |
|||||||||||||
|
|
PIC18F87J50 Full Speed USB Development Board |
||||||||||||||
|
|
|
|
|
PIC24F Starter Kit (PIC24FJ256GB110 family) |
|||||||||||
|
|
|
|
|
|
PIC24FJ64GB004 Plug-In-Module |
||||||||||
|
|
|
|
|
|
|
PIC24FJ256GB110 Plug-In-Module |
|||||||||
|
|
|
|
|
|
|
|
PIC32MX460F512L Plug-In-Module |
||||||||
|
|
|
|
|
|
|
|
|
PIC32 USB Starter Kit (PIC32MX460F512L family) |
|||||||
|
|
|
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|
|
Windows 2000 |
Windows XP (32-bit) |
Windows XP (64-bit) |
Windows Vista (32-bit) |
Windows Vista (64-bit) |
Windows 7 beta (32-bit) |
Windows 7 beta (64-bit) |
Linux |
Mac OS X |
||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|||||||||||
|
|
|
|
|
|
|
|||||||||||
|
|
|
|
|
|
|
|||||||||||
|
|
|
|
|
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
Several USB example firmware projects and hex files are included in the installation. Documentation explaining how to program and run each of the provided demos is available in each of the demo folders as well as the <Install Directory>\Microchip\USB\Documentation folder.
Microchip provides several full-speed USB demo board hardware platforms:
The PICDEM FS USB Demo Board (www.microchipDIRECT.com part number DM163025) enables evaluation of USB on the PIC18F4550 family devices.
The PIC18F87J50 FS USB Plug-In Module (PIM) demo board (www.microchipDIRECT.com part number MA180021) enables evaluation of USB on the PIC18F87J50 family devices. This board can be operated by itself or in conjunction with the High Pin Count (HPC) Explorer board (www.microchipdirect.com part number DM183022).
The PIC18F46J50 FS USB Demo Board (PIM) (www.microchipDIRECT.com part number MA180024) enables evaluation of USB on the PIC18F46J50 family devices. This board can be operated by itself or in conjunction with the High Pin Count (HPC) Explorer board (www.microchipdirect.com part number DM183022).
The Low Pin Count Development Board (PIC18F14K50 based) (www.microchipDIRECT.com part number DM164127).
The PIC24FJ256GB110 USB Plug-In Module (www.microchipdirect.com part number MA240014) enables evaluation of USB on the PIC24FJ256GB110 family devices. In addition to the PIM the Explorer 16 (www.microchipdirect.com part number DM240001) and USB Pictail Plus board (www.microchipdirect.com part number AC164131) are required for evaluation.
In addition to the USB specific hardware, the SD Card Pictail Plus board is used for some of the mass storage demos (www.microchipdirect.com part number AC164122).
See: <Install Directory>\USB Device – Audio –
This folder contains the USB
firmware required to attach to a computer as a
Neither the USB hardware on the
PIC® microcontroller, nor the firmware used is platform specific. Several different types of operating systems,
including modern Macintosh and Linux® operating systems have built in
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device - Bootloaders
This folder contains both the MCHPUSB bootloader for the PIC18F4550 family devices and the HID bootloader for the PIC18F87J50 family devices, PIC18F4550 family devices, PIC18F4450 family devices, PIC18F4553 family devices, and PIC24FJ256GB110 family devices. Both the firmware projects and the PC side applications are available in this folder.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device – CDC – Basic Demo
This project contains USB firmware which handles the USB chapter 9 requests needed for device enumeration, and it also provides an implementation example of a communication device class (CDC) device. The firmware emulates a COM port. In this demo the CDC firmware either echos a keypress back to the user with slight modification or prints a message to the screen when the pushbutton is pressed. For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
Along with the firmware, some PC resources are also provided. Windows operating systems will ask for a .inf file associated with any CDC device that is plugged in. This file can be located in the “<Install Directory>\USB Device – CDC – Basic Demo\inf” folder. There are also a couple of demo applications showing how to access the virtual COM port objects using VC++, VC#, and VB.net. These examples can be found in the “<Install Directory>\USB Device – CDC – Basic Demo\PC Software Example” folder.
Neither the USB hardware on the PIC® microcontroller, nor the firmware used is platform specific. Several different types of operating systems, including modern Macintosh and Linux® operating systems have built in CDC drivers. The CDC basic demo may be used on these other platforms in addition to Windows.
See: <Install Directory>\USB Device – CDC – Basic Demo
This project contains USB firmware which handles the USB chapter 9 requests needed for device enumeration, and it also provides an implementation example of a communication device class (CDC) device. The firmware emulates a COM port. In this demo the CDC firmware acts like a USB to RS232 converter. Data sent or received on the USB port will be passed to/from the RS232 port. For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
Along with the firmware, some PC resources are also provided. Windows operating systems will ask for a .inf file associated with any CDC device that is plugged in. This file can be located in the “<Install Directory>\USB Device – CDC – Serial Emulator\inf” folder. There are also a couple of demo applications showing how to access the virtual COM port objects using VC++, VC#, and VB.net. These examples can be found in the “<Install Directory>\USB Device – CDC – Basic Demo\PC Software Example” folder. Please note that the PC applications are in the “USB Device – CDC – Basic Demo” folder and not the “USB Device – CDC – Serial Emulator” folder.
Neither the USB hardware on the PIC® microcontroller, nor the firmware used is platform specific. Several different types of operating systems, including modern Macintosh and Linux® operating systems have built in CDC drivers. The CDC basic demo may be used on these other platforms in addition to Windows.
See: <Install Directory>\USB Device – Composite – HID + MSD
This project contains USB firmware which handles the USB chapter 9 requests needed for device enumeration, and it also provides an implementation example of a mass storage (MSD) device and a human interface device (HID). This demo is a composite device so it appears to the computer as two separate devices when attached to the computer. This demo combines the “USB Device – MSD – internal flash” and “USB Device – HID – Simple custom demo” demos into a single device. More information is provided in each of the corresponding demos (“USB Device – MSD – internal flash” and “USB Device – HID – Simple custom demo”) sections.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
Neither the USB hardware on the PIC® microcontroller, nor the firmware used is platform specific. Several different types of operating systems, including modern Macintosh and Linux® operating systems have built in HID and MSD drivers. This demo may be used on these other platforms in addition to Windows.
See: <Install Directory>\USB Device – Composite – MSD + CDC
This project contains USB firmware which handles the USB chapter 9 requests needed for device enumeration, and it also provides an implementation example of a mass storage (MSD) device and a communication device class (CDC) device. This demo is a composite device so it appears to the computer as two separate devices when attached to the computer. This demo combines the “USB Device – MSD – SD card reader” and “USB Device – HID – Simple custom demo” demos into a single device. More information is provided in each of the corresponding demos (“USB Device – MSD – internal flash” and “USB Device – CDC – Basic demo”) sections.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device – HID Custom Demos
The HID class driver is found on nearly every operating system without requiring drivers for installation. This lends itself for creating simple USB devices that do not require drivers when plugged into the computer. This folder contains a simple example of how to create a simple custom HID device to talk over the USB. This folder also contains a PC example of how to access the HID drivers from a PC application.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device – HID - Digitizers
This project contains USB firmware which handles the USB chapter 9 requests needed for device enumeration, and it also provides an implementation example of a HID class device. There are two firmware examples provided. These demos emulate a single touch digitizer and a multi-touch digitizer.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device – HID - Joystick
This project contains USB firmware which handles the USB chapter 9 requests needed for device enumeration, and it also provides an implementation example of a HID class device. The firmware emulates a basic USB joystick device.
When using this firmware, Windows should not prompt the user for any kind of driver or .INF files. The HID driver is provided with the operating system, so no additional files are needed. Several different types of operating systems, including modern Macintosh and Linux® operating systems have built in HID drivers. Neither the USB hardware on the PIC® microcontroller, nor the firmware used is platform specific. This demo may be used on these other platforms in addition to Windows.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device – HID - Keyboard
This project contains USB firmware which handles the USB chapter 9 requests needed for device enumeration, and it also provides an implementation example of a HID class device. The firmware emulates a basic USB keyboard device.
When using this firmware, Windows should not prompt the user for any kind of driver or .INF files. The HID driver is provided with the operating system, so no additional files are needed. Several different types of operating systems, including modern Macintosh and Linux® operating systems have built in HID drivers. Neither the USB hardware on the PIC® microcontroller, nor the firmware used is platform specific. The mouse in a circle demo may be used on these other platforms in addition to Windows.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device – HID - Mouse
This project contains USB firmware which handles the USB chapter 9 requests needed for device enumeration, and it also provides an implementation example of a HID class device. The firmware emulates a basic USB mouse device, although it is intended to be readily modified for developing other types of non-mouse HID class USB devices.
When using this firmware, Windows should not prompt the user for any kind of driver or .INF files. The HID driver is provided with the operating system, so no additional files are needed. Several different types of operating systems, including modern Macintosh and Linux® operating systems have built in HID drivers. Neither the USB hardware on the PIC® microcontroller, nor the firmware used is platform specific. The mouse in a circle demo may be used on these other platforms in addition to Windows.
Note: When using this firmware, the mouse cursor will continue to move in circles until the device is removed from the computer or until the designated push button is pressed on the board. For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device – HID – Uninterruptable Power Supply
This project contains USB firmware which handles the USB chapter 9 requests needed for device enumeration, and it also provides an implementation example of a HID class device. The firmware emulates a basic USB Uninterruptable Power Supply (UPS) device.
When using this firmware, Windows should not prompt the user for any kind of driver or .INF files. The HID driver is provided with the operating system, so no additional files are needed. Several different types of operating systems, including modern Macintosh and Linux® operating systems have built in HID drivers. Neither the USB hardware on the PIC® microcontroller, nor the firmware used is platform specific. This demo may be used on these other platforms in addition to Windows.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device – LibUSB – Generic Driver Demo
LibUSB is an open source vendor class driver that supports multiple operating systems. LibUSB allows users to write custom USB applications that use bulk, interrupt, or control transfers.
This demo provides an example application that sends simple pushbutton and LED commands from the host to the device. This demo is run the same way that the “USB Device – HID – Simple Custom Demo” is run except it uses LibUSB in place of the HID driver.
LibUSB devices require .inf files for installation on Windows Machines. These files can be found in the “<Install Directory>\USB Device – LibUSB – Generic Driver Demo\Libusb Simple Demo - Windows Application\Driver and inf” folder.
For more information about how to use the demo please see the getting started guide for this demo located in demo project folder.
See: <Install Directory>\USB Device - Mass Storage – Internal Flash
This project contains USB firmware which handles the USB chapter 9 requests needed for device enumeration, and it also provides an implementation example of a MSD class device. The firmware turns the hardware platform into a flash drive using the internal flash as the storage media. When the device is attached to the computer a new drive appears.
When using this firmware, Windows should not prompt the user for any kind of driver or .INF files. The MSD driver is provided with the operating system, so no additional files are needed. Several different types of operating systems, including modern Macintosh and Linux® operating systems have built in MSD drivers. Neither the USB hardware on the PIC® microcontroller, nor the firmware used is platform specific. This demo may be used on these other platforms in addition to Windows.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device - Mass Storage – SD Card reader
This project contains USB firmware which handles the USB chapter 9 requests needed for device enumeration, and it also provides an implementation example of a MSD class device. The firmware turns the hardware platform into a basic SD card reader. When the device is attached to the computer a new drive appears. If an SD card is inserted into the SD card PICTail Plus board, then the contents of the card are sent to the computer.
When using this firmware, Windows should not prompt the user for any kind of driver or .INF files. The MSD driver is provided with the operating system, so no additional files are needed. Several different types of operating systems, including modern Macintosh and Linux® operating systems have built in MSD drivers. Neither the USB hardware on the PIC® microcontroller, nor the firmware used is platform specific. The SD card reader demo may be used on these other platforms in addition to Windows.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device - Mass Storage – SD Card data logger
This project contains USB firmware which handles the USB chapter 9 requests needed for device enumeration, and it also provides an implementation example of a MSD class device. The firmware turns the hardware platform into a basic SD card data logger. When the device is attached to the computer a new drive appears. If an SD card is inserted into the SD card PICTail Plus board, then the contents of the card are sent to the computer. The firmware also allows users to log the potentiometer data into a comma separated file (CSV) file that can be opened once the device is attached to the computer.
When using this firmware, Windows should not prompt the user for any kind of driver or .INF files. The MSD driver is provided with the operating system, so no additional files are needed. Several different types of operating systems, including modern Macintosh and Linux® operating systems have built in MSD drivers. Neither the USB hardware on the PIC® microcontroller, nor the firmware used is platform specific. The SD card reader demo may be used on these other platforms in addition to Windows.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device – MCHPUSB - Generic Driver Demo
This project contains USB firmware which handles the USB chapter 9 requests needed for enumeration, and it also provides an implementation example of a custom or ‘vendor’ class device using Microchip’s USB general purpose driver.
This project serves as the basis for the firmware intended to be used with the “PICDEM FS USB Demo Tool” (launched with PDFSUSB.exe) or one of the other example PC example programs located in the “PC Software” folder of this project. The code provided in the project provides the firmware needed for the various features (such as temperature, potentiometer position) used by PDFSUSB.exe. A VC++ example shows how to read the potentiometer data.
When using this firmware, Windows should prompt the user for a driver when the USB cable is first connected. Upon receiving this prompt, point Windows to the .INF file located in the “<Install Directory>\Microchip\USB\Utilities\MCHPUSB Custom Driver\MCHPUSB Driver\Release” directory.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device – WinUSB – Simple Custom Demo
WinUSB is a vendor class driver
provided by Microsoft for use with Windows XP,
This demo provides an example application that sends simple pushbutton and LED commands from the host to the device. This demo is run the same way that the “USB Device – HID – Simple Custom Demo” is run except it uses WinUSB in place of the HID driver.
WinUSB devices require .inf files. These files can be found in the “<Install Directory>\USB Device – WinUSB – Simple Custom Demo\Driver and inf” folder.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Device – WinUSB – High Bandwidth Demo
WinUSB is a vendor class driver
provided by Microsoft for use with Windows XP,
This demo provides an example application sending a high amount of data using the WinUSB device driver.
WinUSB devices require .inf files. These files can be found in the “<Install Directory>\USB Device – WinUSB – High Bandwidth Demo\Driver and inf” folder.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Dual Role – MSD Host + HID Device
This project contains USB firmware that allows the device to behave either as an embedded host or a peripheral. When operating in host mode the device is able to talk directly to a FAT/FAT32 formatted USB thumb drives (exact behavior as the simple MSD host demo). When in device mode the device will behave like a custom HID device (exact behavior as the HID Custom Demo). The mode is selected through a push button.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Host – Bootloader
This project contains a USB thumb drive boot loader. This allows applications .hex files to be loaded by plugging in a thumb drive that contains a correctly named hex file.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Host – CDC – Serial Demo
This project contains USB firmware which handles the USB chapter 9 requests needed for enumeration, and it also provides an implementation example of a communication device class (CDC). CDC device typically include USB devices that look like serial ports to the computer (such as serial to USB converters, modems, and some cell phone models).
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Host – Charger – Simple Charger
This project contains USB firmware which handles the USB chapter 9 requests needed for enumeration, and it also provides an implementation example of a simple USB charger. USB devices that obey the USB specification will only draw 100mA from the bus until they are enumerated and less than 2.5mA when the bus is idle. In some situations this is not sufficient for a quick charge of the batteries. These devices often have a mode where they request more than 100mA but require permission from the host before drawing that current. This host is a simple host that enumerates devices for the purpose of allowing this charging rate.
Chargers and devices can also follow the USB Battery Charging specification (http://www.usb.org/developers/devclass_docs/batt_charging_1_0.zip). Not all devices implement this specification, however, so some devices will not be able to charge with chargers using this specification.
See: <Install Directory>\USB Host – HID - Keyboard
This project contains USB firmware which handles the USB chapter 9 requests needed for enumeration, and it also provides an implementation example of a human interface device (HID) class keyboard host. In addition to keyboards, many USB barcode scanners and magnetic card readers also have HID keyboard modes of operation. Please refer to each device’s user’s guide for more information about these features.
This demo allows a user to connect HID keyboard (or USB barcode scanner/magnetic card reader supporting HID keyboard emulation) to the Explorer 16 board. When a key is pressed it is printed on the LCD screen.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Host – HID - Mouse
This project contains USB firmware which handles the USB chapter 9 requests needed for enumeration, and it also provides an implementation example of a human interface device (HID) class mouse host.
This demo allows a user to connect HID mouse to the Explorer 16 board and view the button and coordinate information on the LCD screen.
See: <Install Directory>\USB Host – Mass Storage – Simple Demo
This project contains USB firmware which enables the embedded host devices (such as the PIC24FJ256GB110 family devices) to talk directly to a FAT/FAT32 formatted USB thumb drive. This demo provides a basic starting point for creating an application. When a drive is plugged into the host a test file is written to the drive. This file can then be viewed by a computer.
See: <Install Directory>\USB Host – Mass Storage – Thumb Drive Data Logger
This project contains USB firmware which enables the embedded host devices (such as the PIC24FJ256GB110 family devices) to talk directly to a FAT16 formatted thumb drive (memory stick). In this demo the thumb drive is connected to the USB PICtail Plus board attached to the Explorer 16. The embedded host reads the contents of the drive and sends that information through the serial port a computer so it can be more easily read by a user. The example program allows users to navigate the directories of the thumb drive, create new files, and log either the potentiometer data or the temperature sensor data into a comma separated (CSV) file. Once the new files are create the thumb drive can be removed from the Explorer 16 and attached to a computer so that the data written to the thumb drive and be viewed by the user.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Host – MCHPUSB - Generic Driver Demo
This project contains USB firmware which handles the USB chapter 9 requests needed for enumeration, and it also provides an implementation example of a custom or ‘vendor’ class host using Microchip’s USB general purpose driver.
This project serves as a hosting option for the “Device – MCHPUSB – Generic Driver” device demo. This demo allows a user to connect a demo programmed with the device demo and display the temperature and potentiometer data on the Explorer 16 LCD screen.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Host – Printer – Print Screen Demo
This project contains USB firmware which handles the USB chapter 9 requests needed for enumeration, and it also provides an implementation example of a printer host.
This project allows users to write data on the Graphics PICtail+ daughter board and print that image either on a full sheet printer or a point of sale (POS) printer.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Host – Printer – Simple Full Sheet Demo
This project contains USB firmware which handles the USB chapter 9 requests needed for enumeration, and it also provides an implementation example of a printer host.
This project shows a simple example how to print to a full sheet printer. It demos printing different fonts, images, and other objects available in the printer library.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Host – Printer – Simple POS Demo
This project contains USB firmware which handles the USB chapter 9 requests needed for enumeration, and it also provides an implementation example of a printer host.
This project shows a simple example how to print to a point of sales (POS) printer. This demo shows how to print images, different fonts, barcodes (when possible), and other objects available in the printer library.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB OTG – MCHPUSB – Generic Driver Demo
This project contains USB firmware which handles the USB chapter 9 requests needed for enumeration, and it also provides an implementation example of an OTG device using the MCHPUSB custom class driver as the demo class.
This project shows an example of a full OTG device using the MCHPUSB vendor class driver. This demo shows how host negotiation protocol (HNP) works. This demo also provides an example of session request protocol (SRP).
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB PC - WM_DEVICECHANGE Demo
This is a simple application written in Visual C++.net Express™ edition. This application gives an example of how to register for a WM_DEVICECHANGE notification on Windows operating systems. The WM_DEVICECHANGE feature allows applications to be notified when a hardware change has occurred on the computer. This example can be used to determine when a targeted device is plugged into a computer or removed from a computer. By registering for these notifications, application no longer need to periodically search to see if the device has arrived. Instead they are actively notified and can only look for their device when a change has occurred.
For more information about how to use the demo please see the getting started guide for this demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Precompiled Demos
Precompiled demos can be found in the <Install Directory>\USB – Precompiled Demos folder for each of the previously mentioned hardware platforms. To use these hex files with standard Microchip development tools such as MPLAB IDE and the MPLAB ICD2 programmer, open MPLAB IDE, click “Configure à Select Device”, then choose PIC18F4550 for the PICDEM FS USB Demo Board, or PIC18F87J50 for the PIC18F87J50 FS USB Demo PIM. Make sure an appropriate programmer is connected and has been selected. Then click “File à Import” and import the .hex file to be used. Then use the “Programmer à Program” menu choice to restore the device.
For more information about how to use each of these demos, please see the getting started guides for each demo located in the “<Install Directory>\Microchip\USB\Documentation\Getting Started” directory.
See: <Install Directory>\USB Tools\MCHP Custom Driver\MCHPUSB Driver\Release
Microchip provides a general purpose Windows driver which can be used by Windows applications to interface with a custom class USB device. This driver will not be necessary in many USB applications, such as USB HID class devices, which would normally use built in HID class drivers which distribute with the OS.
For USB applications that do not readily fit within the constraints of these other device class options, Microchip’s general purpose driver may be used. Windows applications can access USB devices either by directly interfacing with the driver (mchpusb.sys), or they may indirectly use the driver through a pre-compiled library.
The custom class firmware examples are intended to be used with the general purpose USB driver.
After installation, the release notes for the general purpose USB driver are located at: <Install Directory>\Microchip\USB\Utilities\MCHP Custom Driver\MCHPUSB Driver\MCHPUSB Driver Release Notes.htm
See: <Install Directory>\USB Tools\MCHPUSB Custom Driver\Mpusbapi
A custom class Windows application using the Microchip General Purpose USB driver may interface directly with the driver (mchpusb.sys). Doing so directly requires more effort and more time to learn than using a pre-compiled library that exposes a simple to use API including basic functions like open(), read(), write(), and close().
The MPUSBAPI.DLL file is a library which provides a number of functions including the basic ones needed for reading and writing to a USB device. A list of the functions available, and the calling conventions for those functions is currently documented in the form of inline comments in the source code for the DLL file. The DLL is compiled using Borland® C++ Builder™ 6 development environment, and the source code is provided in the “<install directory>\Microchip\USB\Utilities\MCHPUSB Custom Driver\Mpusbapi\Dll\Borland_C\Source” directory.
A load time linking and a run time linking example showing how to use the DLL are included in “<install directory>\Microchip\USB\Utilities\MCHPUSB Custom Driver\Mpusbapi\Example Applications\Borland_C” directory.
See: <Install Directory>\USB Tools\Pdfsusb
This computer program demonstrates basic USB communication using the Microchip Custom class driver with a Windows GUI based application. The USB Device – MCHPUSB – Generic Driver Demo Firmware is intended to be used in conjunction with the “PICDEM FS USB Demo Tool” which can be launched by executing the PDFSUSB.exe file. The features and use of this application are described in the PICDEM FS USB Demonstration Board User’s Guide (DS51526).
This application was originally intended to be used with the PICDEM FS USB Demo Board, but it can be used with the other available USB platforms as well. The demo tool makes use of hardware features, such as a temperature sensor and potentiometer which are not found on all of the hardware platforms. In order to use the demo tool with the PIC18F87J50 PIM, the PIM should be used while it is plugged into the HPC Explorer board. The HPC Explorer board has the needed potentiometer, temperature sensor, and additional LEDs.
In order to use the PICDEM FS USB Demo Tool with any of the hardware platforms, the board will need to be programmed with the code generated by the Custom class device example project or from the custom class precompiled examples.
See: <Install Directory>\USB Tools\USBConfig Tool
Each of the firmware projects requires a usb_config.h that defines several macros that the USB stack uses to know how it should perform. In the case of the embedded host applications there is also a .c file that needs to be create that describes the Targeted Peripheral List (TPL). The TPL is a list of supported devices. This .c file also contains various information that the stack needs to know in order to load and execute the correct client drivers for these devices.
The USBConfig.exe tool is a simple to use interface to help generate the files required by the USB stack.
At the moment the USBConfig.exe tool is only functional for the embedded
host examples.
Ø This merge will add support for features including, but not limited to, composite devices using multiples of the same device class, multiple configurations, and alternate interfaces.
Ø This merge will also align the host, device, and OTG API into a common format allowing for easier development of Dual Role and OTG applications.
When getting a USB peripheral
officially compliance tested, a peripheral checklist must be filled out and
submitted to the USB-IF. These
checklists are provided by the USB-IF.
On the peripheral checklist, one of the requested items is the TID
number associated with the USB silicon used in the device. Test ID numbers can be found at the
There are many third party software solutions available in designing your USB application. A few examples are listed below:
SnoopyPro (software based USB traffic logger)
- http://sourceforge.net/projects/usbsnoop/
HIDmaker FS (example USB firmware/software generator)
- http://www.tracesystemsinc.com/usb_tools.ivnu
USB Software Solutions from Jungo® (assorted USB tools and driver generator)
- http://www.jungo.com/products_st.html
Beagle USB 12 – (hardware based USB traffic logger)
- http://www.totalphase.com/products/beagle_usb12
Note: Links provided below point to the latest version of the documents to date. Please check www.microchip.com for the latest version.
Microchip USB Device Firmware Framework User’s Guide
AN950 – Power Management for PIC18 USB Microcontrollers with nanoWatt Technology
AN956 – Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software
AN1140 – USB Embedded Host Stack
AN1141 – USB Embedded Host Stack Programmer’s Guide
AN1142 – USB Mass Storage Class on an Embedded Host
AN1143 –
Generic Client Driver for a USB Embedded Host
AN1144 -
USB Human Interface Device Class on an Embedded Host
AN1145 – Using a USB Flash Drive on an Embedded Host
AN1189 – Implementing a Mass Storage Device Using the Microchip
AN1212 – Using USB Keyboard with an Embedded Host
AN1233 – USB
Printer Class on an Embedded Host
http://www.youtube.com/watch?v=ljF4KQ2mfD0
http://www.youtube.com/watch?v=cmtjKUv_yPs&feature=related
http://www.youtube.com/watch?v=BOosLeO7D58&feature=related
Microchip provides online support via our web site at http://www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information:
Microchip's customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest.
To register, access the Microchip web site at www.microchip.com, click on Customer Change Notification and follow the registration instructions.
Users of Microchip products can receive assistance through several channels:
Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is available on our website.
Technical support is available through the web site at: http://support.microchip.com
The Microchip
name and logo, the Microchip logo, MPLAB, and PIC are registered trademarks of
Microchip Technology Incorporated in the
PICDEM is a
trademark of Microchip Technology Incorporated in the
Microsoft,
Windows, and Windows Vista are either registered trademarks or trademarks of
Microsoft Corporation in the
Borland, and
C++ Builder are trademarks or registered trademarks of Borland Software
Corporation in the
Linux is the
registered trademark of Linus Torvalds in the
PostScript is a
registered trademark of Adobe®