Use MPLAB® PM3 with MPLAB X IDE to program a device following the steps below:


1

Install MPLAB® X IDE

Install MPLAB X IDE software on your PC.

2

Setup Programmer Hardware

Setup MPLAB PM3 hardware in preparation for programming a device.

3

Install a Compiler

Install a language toolchain, such as one of the MPLAB XC C compilers, to build the project. Use MPLAB XC8 for 8-bit devices, MPLAB XC16 for 16-bit devices, and MPLAB XC32 for 32-bit devices.

4

Launch MPLAB X IDE and Create/Open a Project

Launch MPLAB X IDE and create or open an existing project. The project will be built to create a HEX file that will be programmed into your device.

To create a project in MPLAB X IDE:

  1. Ensure MPLAB X IDE is aware of your compiler toolchain by selecting Tools > Options > Embedded > Build Tools and find your compiler in the list.
  2. Select File > New Project and set up an MPLAB X IDE project by following the steps in the project wizard. Once complete, the project tree will open in the Projects window.
  3. Select File > New File to open a file template in which to enter your code. Or you can import the existing code into the project by right-clicking on the Source Files folder of the project tree and selecting "Add Existing Item".

To open an existing project, select File > Open Project, browse to your project, and click Open Project.

5

Setup for Programming

Once you have a project open in MPLAB X IDE, check the properties for your project and ensure that MPLAB PM3 is set up correctly to program your device.

6

Generate a Hex File

To build the project to generate a HEX file, right-click on the project name in the Projects window and select "Build" from the drop-down menu. If you have build errors, check your project setup and any flagged issues in your code. Then, build again.

IDE_Build.jpg

7

Insert and Program the Device

Insert the device to be programmed into the socket module. Position pin one on the device to match the pin one indicator in the socket module. Secure the device by pushing down the silver lever on the socket or closing the clamshell.

On the MPLAB X IDE toolbar, click on the Run icon. The project will be built (if necessary) and device will be programmed. The program will immediately begin execution on completion of programming.

Click on the Upload Target Project icon to transfer what is in target memory to MPLAB X IDE.

ProgramIcons.gif
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.