Getting Started with PIC32
Revision as of 09:37, 24 August 2009
Follow these steps to get started with PIC32.
MPLAB is the software used for editing, compiling, debugging code. This software creates the HEX files to download to the PIC.
Download and Install Microchip MPLAB (Microchip's free IDE for editing, debugging and compiling code)
Download and Install Microchip C32 Compiler (the academic version is free)
Download and Install Microchip Applications Library located at bottom of page. This zip file contains common source code and header files. There is a separate stack for PIC32, but it has been rumored that the PIC32 stack is going to get merged with the applications library therefore the code on this website is based on the application library stack.
- Source and header files from the framework need to be added to the project if using USB communication
An advantage of the PIC32 is that a bootloader can be installed. This means you do not need a programmer to put new programs on the PIC. The UBW32 comes preloaded with a bootloader, but the NU32 board does not.
The HID bootloader is used to put HEX files on the PIC32. The HID bootloader should be included in the Applications Library downloaded above. It will be located under the start menu Programs -> Microchip -> MCHPFSUSB v2.5 -> Tools -> HIDBootLoader
NOTE: occassionally, the bootloader will get stuck verifying that the program is running. (There must be a bug in the bootloader application code) It will take 90-100% of CPU. End task manually with the task manager if this happens.
See Programming HID Bootloader on PIC32 for directions on how to install a bootloader on your PIC.
You can test your bootloader by programming this HelloWorld hex file on to PIC using the directions to load programs with HID Bootloader.
The directions here detail how to code and program Hello World on to the PIC32 using the HID Bootloader.