5.3.1 Setting Up PTG Mode Using MPLAB X IDE
Using MPLAB X IDE, follow these steps to download the project files into the microSDHC card in the MPLAB PICkit 4 and enter Programmer-To-Go mode.
- Insert a formatted FAT32-compatible microSDHC card into the PICkit 4.
- Ensure that you have the
appropriate connections to the device for Programmer-To-Go:
- PICkit 4 is connected to the computer via the USB cable.
- PICkit 4 is connected via the appropriate programming interface connector to the target board.
- The target board is powered from either the PICkit 4 or a power supply, depending on your Project Properties selection.
- In MPLAB X IDE, open the project you want to use and select the PICkit 4 tool for programming.
- Right-click on your project name to open the Project Properties dialog. Then click on PICkit 4 under Categories to display the Options for PICkit 4 on the right side of the display. Select the Programmer-To-Go option category.
- In the Image Name field, the default is “<your project name>_ptg,” though you can edit the name, if you wish. This will be the folder name on the microSDHC card that contains the appropriate files for Programmer-To-Go.
- In the Send image to tool, the check box is selected by default. With the box checked, the PTG image is created and then sent to the microSDHC card in the connected MPLAB PICkit 4.
- The Program Device
check box is selected by default. When the check box selected, the
device connected to the MPLAB PICkit
4 is programmed.Note: If both the Send image to tool and Program Device check boxes are unchecked, see Setting Up PTG Mode Without a Memory Card.
- Click Apply, then
OK. Use the Make and Program Device Main Project icon
on the toolbar and select Programmer-To-Go PICkit3/PICkit4 Main
Project.During this process, the device is programmed, then the microSDHC card is populated with the appropriate files for the Programmer-To-Go operation. The Output window displays a status message “Programming/Verify complete” when the process finishes successfully.Note: The PTG settings on the microSDHC card are the same as in the project (for example, memory, power, etc.).
The PICkit 4 is now in Programmer-To-Go mode. The LED should blink green to indicate the tool has been configured successfully for Programmer-To-Go.
- Disconnect the PICkit 4 and you’re ready to use Programmer-To-Go.