Use the MPLAB® PM3 with MPLAB X IDE to program a device following the steps below.
Install MPLAB® X IDE
Install the MPLAB X IDE software on your PC.
Set Up Programmer Hardware
Set up the MPLAB PM3 hardware in preparation for programming a device.
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 finding 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 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.
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.
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 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 the Upload Target Project icon to transfer what is in target memory to MPLAB X IDE.