NU32v2: Starting a New Project and Putting it on the NU32v2

From Mech
Revision as of 15:22, 15 January 2011 by Andrew Long (talk | contribs)
Jump to navigationJump to search

Return to Using the NU32v2


**THIS PAGE IS UNDER CONSTRUCTION AND IS NOT COMPLETE**

**AWL 1/15/2011**


PIC32 Programming in C

Note: Code downloaded from Microchip is constantly evolving, and it is possible that the information below will be outdated for future code releases. This information is accurate for code downloaded from Microchip's website in January 2011. Also, sample code developed by us and others are generally modified from working code for different purposes, and therefore you may find unnecessary legacy code, programming inefficiency, or even incorrect code in some samples.

You should complete the instructions in NU32v2: Software to Install if you have not already. For this page specifically, you need to

  • download and install the MPLAB IDE (Integrated Development Environment) that you use for programming, compiling, debugging, and simulating your PIC code. The MPLAB C Compiler for PIC32 is included in the "complete" installation of the IDE
  • download the Serial Bootloader for NU32v2 PC application

The remainder of this page describes how to create a new Project in MPLAB, compile a general "Hello World" program to blink the LEDs on the NU32v2, and use the Serial Bootloader of NU32v2 PC application to put the program on the NU32v2.

Create a New Project in MPLAB for the NU32v2

Compiling the "Hello World" example code for NU32v2

Using the Serial Bootloader for NU32v2 PC Application

PIC32 Programming in C with the MPLAB X Beta IDE

Open 'MPLAB X IDE beta'. You will see the following screen.

Click Create New Project.

In Categories, select the Microchip Embedded folder. In Projects, select C/ASM Standalone Project. Click Next >.

In Family, select PIC32, and in Device, select PIC32MX795F512L.

In Select Tool, select PICkit3 if you are going to program the code onto your NU32v2, or select Simulator if you are going to practice coding on your computer.

In Select Compiler, select C32.

In Select Project Name and Folder, create a name for your project, select a location to save it to, ab