PICkit 2 on Win10 64 Bit?

Discuss PIC and electronic related things

Moderators: David Barker, Jerry Messina

Post Reply
Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

PICkit 2 on Win10 64 Bit?

Post by Jon Chandler » Sat Jul 14, 2018 8:51 am

Has anybody been successful in getting a PICkit 2 and the GUI to run on Win10?

The GUI seems to run, but as soon as you try to load a hex file for even older chips, the response is immediately:

Device Error - File Not Loaded

The GUI is v2.61, the device file is the latest version - I initially thought this was the problem.

I have tried MPLAB versions 8.91 and 7.1 and MPLab X v4.1 (which does not even support the PICkit 2). same behavior with all three.

Any ideas or suggestions?

Thanks,

Jon
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

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

Re: PICkit 2 on Win10 64 Bit?

Post by Jerry Messina » Sat Jul 14, 2018 2:12 pm

Hi Jon,

I don't have win10 so I can't really help much, but it seems you're not alone.

One link I found was https://www.microchip.com/forums/m883106.aspx mostly talking about the PK3 but maybe the same sort of things apply.
From the looks of it you'll probably need a dead chicken to get it working.

One thing I know will help...
format C:
<install real OS>

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: PICkit 2 on Win10 64 Bit?

Post by Jon Chandler » Sat Jul 14, 2018 3:38 pm

LOL, but I kind of like it otherwise.

The link doesn't descripe what's happening for me, but I have foind one or two tails of wor similar to mine, with answers making about as much sense. Some said MPLAB 8.9 was the problem, which was what I had started with. There were several suggestions I saw bit no concise answer, nor exactly clear statements whether anybody has gotten it to work.. Swordfish works beautifully though!

Another question just came to mind. MPLAB X doesn't seem to support the PICkit 2. Does it matter if I am using the PICkit GUI? Do I only need MPLAB to get the necessary files for Swordfish?

Thanks for the help Jerry!

Jon
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

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

Re: PICkit 2 on Win10 64 Bit?

Post by Jerry Messina » Sat Jul 14, 2018 8:18 pm

If you're using the PK2 GUI then you don't really need anything else. You won't get to program some of the newer devices, but there are some unofficial updates floating around that have added a few.

As far as Swordfish goes, it's sort of the same. If all you need is older chips then you can use the files and mpasm from MPLAB 8.92. If you want the newer devices then you'll need the mpasmx assembler and files from MPLABX.

Either way, once you generate the device files (if you have to, that is) you don't really need to keep either one around. I always like to keep at least the mpasm/mpasmx folder, but the rest can go if you have no need for it. The device file generator wiki page has the device files already generated available, but it doesn't have the microchip mpasm/mpasmx assembler and its files for download. For that you have to suffer the 1GB download/install.

FWIW, I still use MPLAB 8.92 for everything up to the latest K40 and Q10 series, where you're pretty much forced to switch to X for the programmer support, if nothing else. I do use the latest mpasmx assembler though, since they tend to fix device files from time to time.

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: PICkit 2 on Win10 64 Bit?

Post by Jon Chandler » Sat Jul 14, 2018 8:47 pm

I took a look at the PICkit 4. It seems to be a work in progress at this point. I may have to make the jump at some point.

Thanks for the info Jerry. I'll try to find the right dead chicken, phase of the moon, etc., and hopefully get my trusty PICkit 2 working.
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

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

Re: PICkit 2 on Win10 64 Bit?

Post by Jerry Messina » Sat Jul 14, 2018 9:43 pm

I took a look at the PICkit 4
I had some discount coupons so I got one, along with an ICD4. The jury's still out on those. Right now they both mostly gather dust.

There's a guy over on the GreatCowBasic site that has supposedly revamped the PK2/PK3 standalone apps to support all the new stuff, but he wants $.
As much as I like the PK2 I don't know if it makes much sense to invest in an old obsolete programmer with no support other than from him.
Poor misguided soul actually thought that microchip would pony up money for the development/support, and was shocked when they said, "eh, not so much".
I don't know what he was smoking.

I'd feel much more comfortable with microchip. At least then I know I'm being officially shafted.

User avatar
Coccoliso
Posts: 152
Joined: Mon Feb 17, 2014 10:34 am

Re: PICkit 2 on Win10 64 Bit?

Post by Coccoliso » Mon Jul 16, 2018 5:57 am

Hi,

to make the GUI version of the PicKit work I recompiled with Visual Studio 2015 (and NET framework 4.5.2) the source from a zip called "PICkit3 Programmer Application v3.10" using existing PK2DeviceFile.dat.
There is also a zip called "PICkit_3_Programmer_1_0_Setup_A" but if you install it you will not find the Pickit.
The nice thing is that the gui should be that of the PicKit 3 but it works and also recognizes the PicKit 2 when you run it.

The CMD version failed to make it work, it's in C ++ and uses an obsolete system library for the usb so even if recompiled it does not recognize the Pickit.


I forgot .. I disabled windows defender on the Swordfish folder because it prevents Smartscreen from doing strange things like not launching the programmer's exe


http://sfcompiler.co.uk/phpBB3/viewtopi ... +10#p10279
http://sfcompiler.co.uk/phpBB3/viewtopi ... +10#p11039

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: PICkit 2 on Win10 64 Bit?

Post by Jon Chandler » Mon Jul 16, 2018 6:28 am

Would you be willing to share your recompiled version?
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

User avatar
Coccoliso
Posts: 152
Joined: Mon Feb 17, 2014 10:34 am

Re: PICkit 2 on Win10 64 Bit?

Post by Coccoliso » Mon Jul 16, 2018 7:11 am

In fact I tried to attack the zip but there is the limit of 256k and are 600k of zip.

I sent you a private message in this forum,
if you reply with your email I will send you the compiled that I use.

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: PICkit 2 on Win10 64 Bit?

Post by Jon Chandler » Mon Jul 16, 2018 7:35 am

Thanks so much. PM replied to.
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

User avatar
Coccoliso
Posts: 152
Joined: Mon Feb 17, 2014 10:34 am

Re: PICkit 2 on Win10 64 Bit?

Post by Coccoliso » Wed Jul 18, 2018 9:12 am

Hi,
honestly I do not know if I'm working against the policies of this forum or copyright rules but it seems to me that Microchip lately no longer interests this hw/sw so..

this is the version I use
PicKit.zip
PicKit GUI
(209.78 KiB) Downloaded 1852 times
with this DAT
PK2DeviceFile.zip
PicKit Device File DAT
(22.32 KiB) Downloaded 1489 times
which should be the last available on the net.
Recognizes both the Pickit 2 and the Pickit 3 hw so I renamed the executable in PicKitSuite to differentiate it from the originals.
Please note that you can also run from the command line (like the pickit cmd) using the same command line but I've never used it directly from Swordfish ( programmer string is “/PPIC$target-device$ /F$hex-filename$ /M” )

Since it uses the 2015 net framework it should be able to run on W10 without installing anything else.

Let me know then ..

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: PICkit 2 on Win10 64 Bit?

Post by Jon Chandler » Wed Jul 18, 2018 3:28 pm

Awesome! Thank you so much. I will give this a try today.

Jon
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: PICkit 2 on Win10 64 Bit?

Post by Jon Chandler » Wed Jul 18, 2018 6:15 pm

Excellent! That solves the problem and seems to work perfectly.

I realize now that my description of the original problem was incorrect. The original PICkit 2 software appears to work in that it starts up properly and recognizes the PICkit 2 being plugged in. What it does not do correctly is recognize what chip is connected to the PICkit. Since it does not recognize the device, any hex file you load results in an error since the device won't agree with the hex code. A frustrating problem, now solved. Thanks again.

By the way, from the information in the "about screen", I think your modifications are ok. Here's the text:
You may use, copy, modify and distribute the Software for use with Microchip
products only. If you distribute the Software or its derivatives, the Software
must have this entire copyright and disclaimer notice prominently posted in a
location where end users will see it (e.g., installation program, program
headers, About Box, etc.)....
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

User avatar
Coccoliso
Posts: 152
Joined: Mon Feb 17, 2014 10:34 am

Re: PICkit 2 on Win10 64 Bit?

Post by Coccoliso » Thu Jul 19, 2018 7:37 am

Hi,

for the occasion I then took a look at the sources .. now I remembered what I had done :wink: .
sorry but my memory does not allow me a jump of 2 years back because I lose some shots :lol:
and because it's in another memory bank!

In fact, compared to the original,
- I extracted all the part of piloting the hardware and I made a separate library that became PICKitCmdLib.dll which does not exist in the original distribution program.
- I revisited the GUI program to insert calls to that library (and among other things this part I also rewrote it in VB.NET :shock: )
- I added the possibility to call the GUI also from the command simply by directly calling the HW library functions

then at this point :shock: I realized then that this gui it would support both the PicKit

If someone wants to try to make a command version "pure" without form below I put the part of code that verifies the PICkit, opens the DAT, checks the device and.. now you have to fill the handles of the events and see what to do then.

PICKitCmdLib.zip
PICKitCmdLib Sources
(66.37 KiB) Downloaded 622 times

Code: Select all


Imports PICkit2V2

Module Module1

    Private Sub ResetStatusBar(MaxValue As Integer)
    End Sub

    Private Sub StatusWinWr(Text As String)
    End Sub

    Private Sub StepStatusBar()
    End Sub

    Sub Main()
        PIC32MXFunctions.UpdateStatusWinText = New DelegateStatusWin(AddressOf StatusWinWr)
        PIC32MXFunctions.ResetStatusBar = New DelegateResetStatusBar(AddressOf ResetStatusBar)
        PIC32MXFunctions.StepStatusBar = New DelegateStepStatusBar(AddressOf StepStatusBar)
        dsPIC33_PE.UpdateStatusWinText = New DelegateStatusWin(AddressOf StatusWinWr)
        dsPIC33_PE.ResetStatusBar = New DelegateResetStatusBar(AddressOf ResetStatusBar)
        dsPIC33_PE.StepStatusBar = New DelegateStepStatusBar(AddressOf StepStatusBar)
        PIC24F_PE.UpdateStatusWinText = New DelegateStatusWin(AddressOf StatusWinWr)
        PIC24F_PE.ResetStatusBar = New DelegateResetStatusBar(AddressOf ResetStatusBar)
        PIC24F_PE.StepStatusBar = New DelegateStepStatusBar(AddressOf StepStatusBar)
        PK3Helpers.ResetStatusBar = New DelegateResetStatusBar(AddressOf ResetStatusBar)
        PK3Helpers.StepStatusBar = New DelegateStepStatusBar(AddressOf StepStatusBar)

        Dim v As PICkit2V2.Constants.PICkit2USB = PICkit2V2.Constants.PICkit2USB.notFound
        PICkit2V2.PICkitFunctions.SetPICKit3HW()
        v = PICkit2V2.PICkitFunctions.DetectPICkit2Device(PICkit2V2.PICkitFunctions.PK2Number, False)
        If v = PICkit2V2.Constants.PICkit2USB.found Then
            If PICkit2V2.PICkitFunctions.ReadDeviceFile("PK2DeviceFile.dat") Then
                Dim b As Boolean = PICkit2V2.PICkitFunctions.DetectDevice(PICkit2V2.Constants.SEARCH_ALL_FAMILIES, True, False)
                Dim s As String = PICkit2V2.PICkitFunctions.GetPartName
                s = PICkit2V2.PICkitFunctions.GetFamilyName
                b = PICkit2V2.PICkitFunctions.FamilyIsMCP
                Console.Write("")
            End If
        End If
    End Sub
End Module
So it's not like that anymore "just recompiled" and unfortunately, for the copyright rules, this new library does not have an "about box" if you use it directly.

It would be nice to say we also passed this update of windows with our legs and we also have a new version of GUI at the height of the new OS ..
I do not have time to do it but I'd really like someone to collect "the match".


NB: THIS VERSION IS NOT COMPATIBLE WITH PIC32MX
DEVICES FOR A WELL KNOWN REDUNDANCY IN DEVICE ID
ON THIS DEVICES
Last edited by Coccoliso on Thu Jul 19, 2018 10:45 am, edited 4 times in total.

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: PICkit 2 on Win10 64 Bit?

Post by Jon Chandler » Thu Jul 19, 2018 7:56 am

Yes, time causes us all to forget the little details...and sometimes the big ones too ;)

My point about the about box was that Microchip granted the rights to modify the program, so there is no problem with you making changes to the program. Very nice changes I have to say.

Thanks again. I very much appreciate you sharing this.
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

Post Reply