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:
- Ensure MPLAB X IDE is aware of your compiler toolchain by selecting Tools > Options > Embedded > Build Tools and find your compiler in the list.
- 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.
- 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.
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.