PicKit4 as a programmer in IDE
Moderators: David Barker, Jerry Messina
PicKit4 as a programmer in IDE
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.
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.
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: PicKit4 as a programmer in IDE
Did you try adding OB option? That should put it in batch mode and keep the window open.
Maybe that would help...
Maybe that would help...
Re: PicKit4 as a programmer in IDE
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?.
-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?.
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: PicKit4 as a programmer in IDE
Ahh. Try this:
Code: Select all
-TPPK4 -OB -W -M -OL -P$target-device$ -F$hex-filename$
If that fixes it I'll add a note to the wiki page to make that clear.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.
Re: PicKit4 as a programmer in IDE
Yes that's fixed it..
Doh!! what a simple mistake, I should have copied and pasted the parameter into the IDE thanks Jerry for your help.
Doh!! what a simple mistake, I should have copied and pasted the parameter into the IDE thanks Jerry for your help.
Last edited by bitfogav on Thu Jun 11, 2020 12:20 pm, edited 1 time in total.
Re: PicKit4 as a programmer in IDE
I should have also read the documentation 'IPECMD.htm'!
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.
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)
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: PicKit4 as a programmer in IDE
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.
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.
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.
Yes, '-W' uses the default voltage for the device, or you can specify it ie '-W2.5', '-W3.3', '-W5.0' etc.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.
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.
Re: PicKit4 as a programmer in IDE
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
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..
Re: PicKit4 as a programmer in IDE
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..
Re: PicKit4 as a programmer in IDE
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
i assume you guy's see this issue ? i'm wondering if its just my setup.
Rich
Hmmm..
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: PicKit4 as a programmer in IDE
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?
So the problem is if the PC is restarted then the pickit3 will hold the MCLR line low after the PC reboots?
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: PicKit4 as a programmer in IDE
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.
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.
Re: PicKit4 as a programmer in IDE
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?..