PicKit4 as a programmer in IDE

Discuss the Integrated Development Environment (IDE)

Moderators: David Barker, Jerry Messina

bitfogav
Registered User
Registered User
Posts: 169
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: 1469
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: 169
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: 1469
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: 169
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: 169
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: 1469
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.

richardb
Posts: 306
Joined: Tue Oct 03, 2006 8:54 pm

Re: PicKit4 as a programmer in IDE

Post by richardb » Wed Jul 15, 2020 10:28 am

I don't mean to hijack this thread but it is programmer related.


Working remotely is generally ok but could be smoother if i could leave the programmer connected to a remote system.

I have noticed that the pickit 3 when used with the mplabx ipe if the power is cycled or the pc restarted the pic kit is left in reset. is there any way around this?

Regards


Richard
Hmmm..

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

Re: PicKit4 as a programmer in IDE

Post by bitfogav » Thu Jul 16, 2020 10:58 am

richardb wrote:
Wed Jul 15, 2020 10:28 am
I have noticed that the pickit 3 when used with the mplabx ipe if the power is cycled or the pc restarted the pic kit is left in reset. is there any way around this?
Hi Richard.

I'm not sure if this will fix the PicKit 3 reset, but there is a setting in the settings tab in IPE which allows you to change the Reset mode. If this isn't exactly what you are looking for then it's possibly down to the limitations of the PicKit 3/IPE..

settingsIPA.png
settingsIPA.png (42.39 KiB) Viewed 4884 times

richardb
Posts: 306
Joined: Tue Oct 03, 2006 8:54 pm

Re: PicKit4 as a programmer in IDE

Post by richardb » Fri Jul 17, 2020 5:40 am

Thanks, its already set to "release from reset"

i assume you guy's see this issue ? i'm wondering if its just my setup.

Rich
Hmmm..

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

Re: PicKit4 as a programmer in IDE

Post by Jerry Messina » Fri Jul 17, 2020 9:14 am

Haven't really looked for it.

So the problem is if the PC is restarted then the pickit3 will hold the MCLR line low after the PC reboots?

richardb
Posts: 306
Joined: Tue Oct 03, 2006 8:54 pm

Re: PicKit4 as a programmer in IDE

Post by richardb » Fri Jul 17, 2020 12:54 pm

Yes.
Hmmm..

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

Re: PicKit4 as a programmer in IDE

Post by Jerry Messina » Fri Jul 17, 2020 1:32 pm

Then that sounds like it's just the Pickit3 doing that on its own...
I can't think of any way to stop that until you run the program and have it release reset.

Maybe run the commandline programmer at startup and tell it to release reset?
No idea if that would work or not.

richardb
Posts: 306
Joined: Tue Oct 03, 2006 8:54 pm

Re: PicKit4 as a programmer in IDE

Post by richardb » Fri Jul 17, 2020 2:01 pm

That's not a bad idea, thanks Jerry. I will investigate.
Hmmm..

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

Re: PicKit4 as a programmer in IDE

Post by bitfogav » Fri Jul 17, 2020 2:03 pm

richardb wrote:
Fri Jul 17, 2020 5:40 am
i assume you guy's see this issue ? i'm wondering if its just my setup.
I've tested this as a have a test board setup right now with a pickit 3 but I can't confirm my pickit 3 holds reset, even with the pickit 3 still connected to the pic and not powered, if I disconnect my pickit 3 or restart my PC then my PIC works exactly how its programmed.. But that being said I do always use the following reset circuity on my projects or test boards.. But like Jerry said maybe it is the pickit 3?..
pickitDiode.png
pickitDiode.png (11.4 KiB) Viewed 4844 times

Post Reply