JTK – Notes and Ramblings Things we have found …


PICkit3, Acer Switch 5, Windows 10

Filed under: General — taing @ 2:13 pm

This is why having the source code and a bit of Google is awesome. I was unable to get my Microchip PICkit3 to work on an Acer Switch 5 with Windows 10 when using the Microchip standalone PICkit3 application. The PICkit3 worked on my Windows 7 HP laptop or on the Acer with MPLAB X 5.10 but refused to connect in the standalone application. After a bit of googling about for the issue and many false leads I found https://www.microchip.com/forums/m908976.aspx.

The issue seems to be a a loop in the USB.Find_This_Device () function that is too short. After reading the thread I attempted to connect the PICkit3 with the Acer keyboard disconnected and was successful each time. This supported the theory.

Fortunately the source for the standalone application is included in the package. After downloading and installing Visual Studio Express 17 I was able to follow along with the steps in the discussion.

I opened PICkit2V2.sln from PICkit3 Programmer Application Source v3.10/PICkit2V2 in Visual Studio. After finding the file USB.cs and changing line 203 to read:

for (int l_loop = 0; l_loop < 64; l_loop++)

I was able to rebuild, resulting in a new PICkit3.exe. For more context the surrounding code is:

MyDeviceInterfaceData.cbSize = Marshal.SizeOf(MyDeviceInterfaceData);
for (int l_loop = 0; l_loop < 64; l_loop++)
Result = SetupDiEnumDeviceInterfaces(
ref HidGuid,
ref MyDeviceInterfaceData);
if (Result != 0)

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress