Difference between revisions of "Getting Started with PIC32"

From Mech
Jump to navigationJump to search
Line 8: Line 8:
1. Download and Install MPLAB IDE vX.XX Full Release Zipped Installation located near the bottom of this [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&redirects=mplab page].
1. Download and Install MPLAB IDE vX.XX Full Release Zipped Installation located near the bottom of this [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&redirects=mplab page].


2. Download and Install MPLAB C Compiler for PIC32 vX.XX Academic Version from [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en536656 here] (the academic version is free)
2. Download and Install MPLAB C Compiler for PIC32 vX.XX Academic Version located near the bottom of this [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en536656 page] (the academic version is free)


3. Download and Install [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537044 Microchip Applications Library] located at bottom of page. I put this folder in C:/Program Files/Microchip. This zip file contains common source code and header files needed for some programming.
3. Download and Install [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537044 Microchip Applications Library] located at bottom of page. Put this folder in C:/Program Files/Microchip (the Microchip folder will be created when you install MPLAB).


= Bootloader =
= Bootloader =

Revision as of 12:59, 15 December 2009

Follow these steps to get started with PIC32.

Software

This section discusses the software that must be installed on your computer. This software is only compatible with Windows. We are going to install MPLAB (software used for editing, compiling, and debugging code), the C32 compiler (software to create the program) and the Microchip Applications Library (common source files for programming).

1. Download and Install MPLAB IDE vX.XX Full Release Zipped Installation located near the bottom of this page.

2. Download and Install MPLAB C Compiler for PIC32 vX.XX Academic Version located near the bottom of this page (the academic version is free)

3. Download and Install Microchip Applications Library located at bottom of page. Put this folder in C:/Program Files/Microchip (the Microchip folder will be created when you install MPLAB).

Bootloader

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.6 -> 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.

First Program

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.