Programmer To Go BETA

Programmer-To-Go (PTG) BETA first support is in MPLAB® X IDE v5.25.

For future versions of PTG, see the "Release Notes for MPLAB PICkit 4" and MPLAB PICkit 4 Help, included with each MPLAB X IDE installation.

The MPLAB® PICkit™ 4 Programmer-To-Go (PTG) functionality allows a device memory image to be downloaded into the microSDHC card inserted in the PICkit 4 for later programming into a specific device. That image contains the programming algorithm information. No software or PC is required to program devices once the PICkit 4 programmer is set up for PTG. You can use the MPLAB X IDE or the MPLAB IPE to set up the MPLAB PICkit 4 for PTG mode.

Although the PICkit 4 unit is capable of programming and debugging, when using the PTG feature, you can only program. No debugging capabilities are available in PTG mode.

MicroSDHC Card: You can use any formatted FAT32-compatible microSDHC card.

pk4_unit.png
Figure 1: MPLAB PICkit 4 Diagram

Limitations for Beta Programmer-To-Go

Known limitations are:

  1. You must have a formatted FAT32-compatible microSDHC card inserted into the MPLAB PICkit 4 in order to use the PTG feature.
  2. Devices Supported:
    • Baseline
    • PIC16
    • PIC16Enhanced
    • PIC18F
    • PIC18FEnhanced
    • PIC32
    • dsPIC33
    • dsPIC/PIC24
    • dsPIC30
    • ATSAM
  3. No check for Device ID is performed.
  4. In PTG mode, if the target is powered, no additional power is needed for the MPLAB PICkit 4 to operate. The target board must be capable of providing 350 mA of power for the PICkit 4 tool to operate properly. If the target board cannot provide enough power, you will need to provide power directly to the PICkit 4 through its USB port with either a power supply, computer, or USB power bank.
  5. If High Voltage (HV) programming is not required, it is recommended to use Low Voltage Programming (LVP) if the device supports it.
  6. When using PTG in HV programming mode and target power, a 100 Ω resistor is required in series with NMCLR if the PICkit 4 will be powered from the target. Overshooting in PTG mode may cause the device to consume more current during the programming cycle. The series resistor dampens the overshoot during programming mode entry. As an alternative to the series resistor, you may add some capacitance (0.1 µf) on NMCLR which will also change the overshoot profile. Depending on your device, you may find more information on the device data sheet for recommendations on the MCLR circuit. You may already have the resistor and capacitor as recommended for Electrostatic Discharge or Electrical Overstress for the device.
  7. Target Voltage is limited to 5.0 V maximum.

Setting Up Programmer-To-Go Mode

Follow these steps to download the project files into the microSDHC card in the MPLAB PICkit 4 and get it set up for PTG mode.

1

Insert a microSDHC card

Insert a formatted FAT32-compatible microSDHC card into the PICkit 4.

2

Open MPLAB X IDE or MPLAB IPE

In MPLAB X IDE, open the project you want to use for PTG and choose the PICkit 4 tool for programming.

In MPLAB IPE, in Advanced mode, go to the Settings dialog.

3

Connect to a Device

Ensure that you have the appropriate connections to the device for PTG:

  • PICkit 4 is connected to the computer via the USB cable
  • PICkit 4 is connected via ICSP™ connector
  • The target board is powered from either the PICkit 4 or a power supply, depending on your project properties selection.

4

Set Up MPLAB X IDE or MPLAB IPE

In MPLAB X IDE, right-click on the PICkit 4 to open the Project Properties dialog. Under the Options for PICkit 4, select the Programmer-To-Go option category.

Figure 2: MPLAB X IDE Programmer-To-Go Options

pk4_options_ide.png

Figure 3: MPLAB IPE, Settings Dialog

pk4_options_ipe.png

In the Image Name field, the default is “<your project name>_ptg”, however, you can edit the name if you wish. This will be the folder name on the microSDHC card that contains the appropriate files for PTG.

The checkbox for Send image to tool will be selected by default.

5

Download to the microSDHC card

In MPLAB X IDE, click Apply and then OK. Click the down arrow of the Make and Program Device Main Project icon on the toolbar and select Programmer-To-Go PICkit3/PICkit4 Main Project.

Figure 4: Select PTG from Menu

pk4_menu_selection.png

In MPLAB IPE, click the PTG button.

Download image to PICkit 4 microSDHC Card.

During this process, the device is programmed and then the PTG directory is populated with the appropriate files for the PTG operation into the microSDHC card. The Output window displays a status message “Programming/Verify complete” when the process finishes successfully.

6

Complete PTG Setup

The PICkit 4 is now in PTG mode. The LED should blink green to indicate the tool has been configured successfully for PTG.

Disconnect the PICkit 4 from the computer and the target board used to set up PTG.

Using Programmer-To-Go

When you are ready to start programming devices using the MPLAB PICkit 4 in PTG mode, follow these steps.

1

Connect to a Device

Connect the PICkit 4 tool to the target board with the device specified in your project.

Ensure that you have the appropriate connections to the device for PTG:

  • PICkit 4 is connected via the In-Circuit Serial Programming (ICSP) connector on the target board. Ensure you match pin 1 on the target board with the pin 1 indicator on the PICkit 4.
  • The target board is powered from either the PICkit 4 or a power supply, depending on your project properties selection.

In PTG mode, if the target is powered, no additional power is needed for the MPLAB PICkit 4 to operate. The target board must be capable of providing 350 mA of power for the PICkit 4 tool to operate properly.

2

Ensure PICkit 4 Initialization Completes

When the PICkit 4 is initially connected to the target board ICSP pins, it will go through an initial LED sequence. When the PICkit 4 LED changes to a blinking green state, it is ready to program.

3

Program a Device

To start programming the device, firmly press (not hold) on the center of PICkit 4 shield on the front of the tool. The LED will change to blinking purple indicating that it is programming the device.

When programming is complete, the LED changes back to flashing green to indicate a successful programming/verify operation. It is now ready for the next programming operation.

4

Other Operations

Repeat the process above for each device you want to program.

To reinitialize the tool, use a long press on PICkit 4 pushbutton. This can be used to reinitialize the PICkit 4 after detecting an error. It can also be used if you want to swap in another microSDHC card with a different PTG image.

LED Status Sequence and Error Indications

When the PICkit 4 is in PTG mode and is properly connected to the ICSP pins on the target board, the following sequence occurs:

  1. Upon connection to the target board, the LED is solid purple, followed by fast blinking yellow while it initializes the power settings.
  2. Then the LED changes to a blinking green indicating a successful initialization. The PICkit 4 is ready to program.
  3. On a pushbutton press, the PICkit 4 initiates programming and the LED changes to a blinking purple. When programming is successful and complete, the LED returns to blinking green.
  4. Repeat steps 1-3 for each device you want to program.

If there are any errors during initialization, the LED will change to a blinking red. A red LED could indicate the following:

  • microSDHC card is not detected
  • microSDHC card format is not supported - This should be reported by MPLAB X IDE or MPLAB IPE when the "send image to tool" was set.
  • Initialization files not found on microSDHC card - Check if PTG image is present in microSDHC card.
  • Power settings are not accurate:
    • If the tool is supplying power, and tool detects VDD from the target.
    • If the target is supposed to be powered and the tool does not detect VDD from the target.

If there are any errors during programming, the LED will change to a blinking red. This could indicate:

  • Memory verify errors
  • Device ID not found
  • If the data files for programming are not found or corrupted
  • If the device is Code protected
© 2020 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.