PicKit4 as a programmer in IDE

Discuss the Integrated Development Environment (IDE)

Moderators: David Barker, Jerry Messina

Post Reply
bitfogav
Registered User
Registered User
Posts: 148
Joined: Sat Oct 09, 2010 1:39 pm
Location: United Kingdom

PicKit4 as a programmer in IDE

Post by bitfogav » Wed Jun 10, 2020 1:21 pm

Hey guys, I am trying to install PicKit4 as a programmer tool into the IDE, I have followed the excellent instructions as per the wiki page Adding MPLABX IPECMD.
I have MplabX and Mplab v8.92 installed and running windows 10 64bit, but I have been unsuccessful in getting the PicKit4 to work with the IDE.
The PicKit 4 works fine using it in MPLAB X IPE v5.40.

The command window loads after I compile the programme in the IDE, but before I can read anything on the pop up command window, it closes, and nothing uploads to the microchip. I have tried entering the correct parameters to keep the command window open but this doesn't work?.

This is no big deal but would be nice to use this feature in the IDE.

My question is, is there any pointers that I have missed or could have missed, relating to windows 10, as I'm also a new user to windows 10.

Jerry Messina
Swordfish Developer
Posts: 1173
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: PicKit4 as a programmer in IDE

Post by Jerry Messina » Wed Jun 10, 2020 3:23 pm

Did you try adding OB option? That should put it in batch mode and keep the window open.
Maybe that would help...

bitfogav
Registered User
Registered User
Posts: 148
Joined: Sat Oct 09, 2010 1:39 pm
Location: United Kingdom

Re: PicKit4 as a programmer in IDE

Post by bitfogav » Wed Jun 10, 2020 3:35 pm

Thanks for you're suggestion Jerry. I have been using the following parameters, but no that doesn't seem to keep the command window open.

-TPPK4-OB-W-M-OL-P$target-device$-F$hex-filename$

That's why I wasn't sure if something relating to windows is stopping it or some compatibility issue?.

Jerry Messina
Swordfish Developer
Posts: 1173
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: PicKit4 as a programmer in IDE

Post by Jerry Messina » Wed Jun 10, 2020 4:15 pm

Ahh. Try this:

Code: Select all

-TPPK4 -OB -W -M -OL -P$target-device$ -F$hex-filename$
Each option must be immediately preceded by a switch, which can be either a dash “-’ or a slash “/” and options must be separated by a single space.
If that fixes it I'll add a note to the wiki page to make that clear.

bitfogav
Registered User
Registered User
Posts: 148
Joined: Sat Oct 09, 2010 1:39 pm
Location: United Kingdom

Re: PicKit4 as a programmer in IDE

Post by bitfogav » Wed Jun 10, 2020 11:52 pm

Yes that's fixed it.. :D

Doh!! what a simple mistake, I should have copied and pasted the parameter into the IDE :lol: thanks Jerry for your help.
Last edited by bitfogav on Thu Jun 11, 2020 12:20 pm, edited 1 time in total.

bitfogav
Registered User
Registered User
Posts: 148
Joined: Sat Oct 09, 2010 1:39 pm
Location: United Kingdom

Re: PicKit4 as a programmer in IDE

Post by bitfogav » Thu Jun 11, 2020 12:20 pm

I should have also read the documentation 'IPECMD.htm'! :lol:

I also see you can use the PicKit3 too with the same command line and parameters, makes the command line a very versatile tool.

I was also wondering how the PicKit set the correct target voltage, and I think I'm right in saying that the command line program will select the correct voltage depending on the selected device, but this can be set manually using the following parameter followed by the voltage value.

Code: Select all

-W(value)

Jerry Messina
Swordfish Developer
Posts: 1173
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: PicKit4 as a programmer in IDE

Post by Jerry Messina » Thu Jun 11, 2020 12:49 pm

There are some individual commandline programs (pk3cmd.exe, icd3cmd.exe) but I think it's easier to just use the single ipecmd.
It allows you to use any of the current programmers (no pickit2 support, but that one's getting a bit old anyway). Heck, they've even "discontinued support" for the pickit3 & ICD3 in MPLABX since they're no longer available.
I was also wondering how the PicKit set the correct target voltage, and I think I'm right in saying that the command line program will select the correct voltage depending on the selected device, but this can be set manually using the following parameter followed by the voltage value.
Yes, '-W' uses the default voltage for the device, or you can specify it ie '-W2.5', '-W3.3', '-W5.0' etc.
If you want to use the target's supply then leave off the '-W' option

One thing to note if you're using the PK3/ICD3 is once MPLABX has touched your programmer, if you want to use it with MPLAB 8.92 or one of the old standalone utilities you'll have to force it to reload the programmer's OS. MPLABX reprograms it with firmware that's not compatible w/the old programs.

Post Reply