am. How to get PIC32MZ2048ECH100 working on USB?

It is important to write correct USB descriptors for the desired application. PC USB Projects website prefers HID (Human Interface Device) interface that suffices for most control applications. The descriptors are basically the same as for application libraries prior to Harmony, but one has to take into account that Harmony is object based (GNU C++), so a human programmer must also provide appropriate USB descriptors. Incorrect descriptors may cause, some objects not to initialize and the microcontroller USB interface would not even power-up. It is important to know that this is not a hardware fault!

However just installing the latest MPLAB X (v2.26) and Harmony (v1.0) and selection the required libraries in Harmony Configuration Tool is not enough to get your PIC32MZxxxxECyxxx microcontroller talking to your PC through a USB port.

Though PIC32MZ2048ECH100 is not so much different from PIC32MX270F128B it is only supported by the newest Microchip application development environment. Harmony plug-in for MPLAB X 2.15 (or newer) enables you to easily configure and include the application libraries in a new project. There are also a number of examples based on Harmony and various starter kits that may be directly used with PIC32MZ micontrollers with a few simple modifications.

SOFTWARE: PIC32MZ2048ECH100 microcontroller may be attached to a PC as an external disk drive! Get PIC32MZ2048ECH100 USB flash drive.zip with the HEX file from Downloads section. Read more here to learn how. The HEX file may also be used to test PIC32MZ2048ECH100 basic circuit.

PROGRAMMING EXAMPLE: Multithreading support

After a correct configuration is entered the microcontroller HID USB interface would normally power-up and attach to the PC. You may verify this in Windows 7 Control Panel-->Device Manager.

NOTE: It is usually quicker to modify a ready to use a Harmony USB example than starting from scratch. Harmony Configuration Tool plug-in does not support USB descriptors. It only generates two empty user functions that are used in for all USB interfaces. Is is up to a human programmer to fill both structures and write appropriate descriptors. However, Harmony Configuration Tool may still be useful for other configuration options that must be altered in order to use a different microcontroller.