5.4 Using Programmer-To-Go

Complete the following steps when you are ready to start programming devices using the MPLAB PICkit 5 in PTG mode:

  1. Connect the PICkit 5 tool, with a microSDHC card inserted, to the target board with the device specified in your project.
  2. Ensure that you have the appropriate connections to the device for Programmer-To-Go:
    • PICkit 5 is connected via appropriate programming interface connector on the target board. Ensure you match pin 1 on the target board with the pin 1 indicator on the PICkit 5.
    • The target board is powered from either the PICkit 5 or a power supply, depending on your project properties selection.
    Note: In Programmer-To-Go mode, if the target is providing power to the MPLAB PICkit 5, the target board must be capable of providing 350 mA of power for the PICkit 5 tool to operate properly.
  3. When the PICkit 5 LED changes to a blinking green state, it is ready to program. If no image is on the microSDHC card, the MPLAB PICkit 5 tool blinks red to indicate a PTG error.
  4. To start programming the device, either:
    • firmly press (not hold) on the center of PICkit 5 shield (logo) on the front of the tool.
    • use the PTG app on your BLE device to select an image and perform programming.
    After the tool checks the device ID, the LED changes to blinking purple indicating that it is programming the device.
  5. When programming is complete, the LED changes back to a flashing green to indicate a successful programming/verify operation. It is now ready for the next programming operation.
Note: A long press on the PICkit 5 push button reinitializes the tool. This can be used to reinitialize the PICkit 5 after detecting an error. It can also be used if you want to swap another microSDHC card with a different Programmer-To-Go image.

LED Status Sequence

When the PICkit 5 is in Programmer-To-Go mode and is properly connected to the target board, the following sequence occurs:

Status Meaning
Fast blinking yellow Initializing power settings.
Blinking green PICkit 5 is ready to program or programming completed successfully.
Blinking purple Programming in progress.
Blinking red Errors during initializing:
  • A microSDHC card is not detected.
  • The microSDHC card format is not supported. This should be reported by MPLAB X IDE or MPLAB IPE when the “Send image to tool” check box was selected.
  • Initialization files are not found on the microSDHC card. Check if Programmer-To-Go image is present in the microSDHC card.
Errors during programming:
  • The power settings are not set properly. For example, if the tool is supplying power, but it detects VDD from the target. Or if the target is supposed to be supplying power but the PICkit 5 tool does not detect VDD from the target, the LED will blink red to indicate an unexpected event.
  • Memory verify errors.
  • Device ID does not match.
  • If the data files for programming are not found or are corrupted.