Loading a hex program using PICkit 3 and MPLABX-v5.52

I am a newbie. I need to discover how to load a hex program on a Microchip 18F45K80-I/PT (E3) 16151HY using a PICkit 3 (ser BUR184871703) and MPLABX-v5.52.

To do the HEX i believe you have to use the IPE which is loaded with the MPLABX.

Here is a link to the page.
https://www.microchip.com/mplab/mplab-integrated-programming-environment

MPLAB IPE V3.35 is not available from MC any longer. I cant find it in their archives.

This is what was originally used to program the hex file onto the chip.

The version of IPE should not matter. The hex file will stay constant. IPE should be installed with MPLAB X v5.52, and that should work fine for uploading the hex file to the PIC18.

Ok. Thank you! I will give it a go and get back to you.

One other question, does the PICkit 3 need to be recognized by the MPLAB X v5.52 before I start this?

I have attempted programming. I get a CAUTION notice that says:

"Check the device selected in MPLAB IDE (PIC18F45K80) is the same one that physically attached to the debug tool. Selecting a 5V device when a 3.3V device is connected can result in damage to the device when the debugger checks the device ID. Do you wish to continue?

Note: If you would like to program this device using a low voltage programming, select CANCEL on this dialog. Then go to the PICkit 3 node of the project properties and check the Enable Low Voltage Programming check box of the Program Options Options Category pane (low voltage programming is not valid for debugging operations)."

I went to the node and changed it to ‘low voltage programming’ but with no affect. I changed the voltage to 3V and no affect. I changed both with no affect.

Here is what the output stated after the attempts:

"*****************************************************

Connecting to MPLAB PICkit 3…

Currently loaded firmware on PICkit 3
Firmware Suite Version…01.32.09 *
Firmware type…dsPIC33F/24F/24H

Now Downloading new Firmware for target device: PIC18F45K80
Downloading bootloader
Bootloader download complete
Programming download…
Downloading RS…
RS download complete
Programming download…
Downloading AP…
AP download complete
Programming download…


Connecting to MPLAB PICkit 3…

Currently loaded firmware on PICkit 3
Firmware Suite Version…01.56.00
Firmware type…PIC18F

Target device was not found (could not detect target voltage VDD). You must connect to a target device to use PICkit 3.


Connecting to MPLAB PICkit 3…

Currently loaded firmware on PICkit 3
Firmware Suite Version…01.56.00
Firmware type…PIC18F

Target device was not found (could not detect target voltage VDD). You must connect to a target device to use PICkit 3.


Connecting to MPLAB PICkit 3…

Currently loaded firmware on PICkit 3
Firmware Suite Version…01.56.00
Firmware type…PIC18F"

Thoughts?

How you get this to work is dependant on how the circuitry around the PIC18F45K80 is designed. There are a whole bunch of different conditions that can cause the symptoms you’re seeing and without the schematics for the circuit, and schematics for how you are connecting it, there is no way to be certain what need to be done to get it working.

That said the people on the official Microchip forum do this kind of troubleshooting all the time and are 1000 times better at troubleshooting PICkit issues than I am.

FYI - PICkit is a hobbyist level tool, if this is for a business the ICD3/4 or RealIce are professional grade. (I have all of these for my work)

1 Like

Thanks Paul. The programs are pre-built and readied for this controller. Originally, the controller was installed with MPLAB IPE V3.35, but that is no longer available. The process for using that loader was clear. Using MPLABX-v5.52 is not the same, so its difficult to know what the output means. What I have seen with others is that they ignore that message and continue to program, but I am suspect and cautious. I am hoping someone can interpret a bit. All the connections are per the instructions.

Further, I am not the programmer, but I have a machine down and I am trying to reload it and get it running.

How are you powering the target device? From the PICkit or externally?

This usually has something to do with the “Power Target from PICkit” setting not being checked when you need it to.

Powering 18F device externally

It’s still available in the official Microchip archives here (get the MPLAB X v3.35 download):
https://www.microchip.com/development-tools/pic-and-dspic-downloads-archive

However as @ReidLandsrud mentioned new versions of MPLAB IPE are included with new versions of the MPLAB X IDE and should be nearly identical in setup and usage (Microchip intentionally makes few changes to the UI of the IPE).

BTW according to Microchip the latest version of the MPLAB X IDE is v5.20.

1 Like

A quick follow up because I used MPLAB X for the first time in a couple years today. I actually had to install it from scratch because of a Windows 10 fresh start last fall.

MPLAB IPE is an option when installing but the installer can be set to install either or both MPLAB X IDE and MPLAB IPE. Didn’t notice what the default choice is but definitely check which options are selected before clicking next (I know I too often skip reading many dialog prompts during an install and just click next to get it done)

The “Check the device selected in MPLAB IDE …” error message in no way indicates anything is wrong with your settings. It’s meant as a reminder that MPLAB, and all of the Microchip in-circuit debuggers/programmers, can not tell if you have set the power configuration correctly. The first time I went to use my new MPLAB X IDE installation I saw the message and then remembered the details. I checked off the box to make MPLAB X stop reminding me of this operational detail.

The warning may seem overly cautious on Microchip’s part however, if you accidently set the power options wrong you can burn out the micro and possibly other circuits on your PCB. The powering options are voltage and device or programmer as supplier. IIRC, the available options depend on which in-circuit debugger/programmer you are using.

1 Like

I open the IPE, connect the PICkit 3 to the chip. It does not recognize it .
I open the 5v supply to the circuit. The IPE shows me the Chip selected, and the serial number of the PicKit3.
When I click on connect. It shows Connection failure.

I don’t use PICKit3 so can’t help directly.

You may want to ask on the MPLAB X IPE section of the Microchip forum, the people who hangout there are very expert in PICKit3 and IPE.
https://www.microchip.com/forums/f292.aspx