Author Topic: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes  (Read 39122 times)

0 Members and 1 Guest are viewing this topic.

Online EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37664
  • Country: au
    • EEVblog
EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« on: January 18, 2016, 10:00:28 pm »
Dave and David2 battle to get an old Microchip PICkit 3 working with MPLAB X talking to Dave's new product.
A tale of misery, rabbit holes, Murphy, facepalms, and ultimately success. You get a warts and all journey.
A good example of how a tool that should have just worked, turned into a nightmare due to some bad luck and poor tool protocol and mode compatibility.

 

Offline DarkStar

  • Contributor
  • Posts: 20
  • Country: us
    • KU7PDX: Amateur Radio Station
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #1 on: January 18, 2016, 10:41:10 pm »
Can't wait to hear about this "new product!"
--Chris ^_^
 

Offline hamdi.tn

  • Frequent Contributor
  • **
  • Posts: 623
  • Country: tn
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #2 on: January 18, 2016, 10:48:41 pm »
Typical struggle to make things work  :-DD
At the same time i was trying to use pickit 2 after a year not used with 16F1824 and i couldn't cause not supported by Pk2.
i used both pk2 and pk3 i didn't like the pk3 at all.
for the problem you had , i had that too and i used the standalone application with pk3 (the one you used at the end of your the video) and not the API it was more reliable, sadly it crash for you, it could be an other version of the standalone app i didn't used pk3 for 2 years now. and if i remember correctly the one i used is a beta version i found in the microchip forum and not in the official product page.
 

Offline Herrbert

  • Newbie
  • Posts: 1
  • Country: de
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #3 on: January 18, 2016, 11:03:51 pm »
Avira prevented me from programming my cronusmax joypad adapter, it got recognized like yours. The programming just failed. Get rid of it for a second, reinstall it later if you need.
The guy who made the device was confused about this, too.
It worked month before with an older updater.
« Last Edit: January 18, 2016, 11:10:06 pm by Herrbert »
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #4 on: January 18, 2016, 11:08:48 pm »
Impressive that you have to use a separate tool to put it in the right "mode" so your other tool can talk to it. How could they afford bloody Atmel if they can't even afford developers who can figure out how to put that functionality directly into MPLAB? :-//
No longer active here - try the IRC channel if you just can't be without me :)
 

Online EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37664
  • Country: au
    • EEVblog
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #5 on: January 18, 2016, 11:09:48 pm »
Impressive that you have to use a separate tool to put it in the right "mode" so your other tool can talk to it. How could they afford bloody Atmel if they can't even afford developers who can figure out how to put that functionality directly into MPLAB? :-//

Yup, it's pretty retarded.
 

Offline jaromir

  • Supporter
  • ****
  • Posts: 337
  • Country: sk
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #6 on: January 18, 2016, 11:18:19 pm »
I assume the standalone PK3 application (used revert deaf PK3 into MPLAB mode) has to be used to put it into "non-MPLAB mode". AFAIK MPLABX IDE/IPE has no means to put the PK3 out of MPLAB mode.
No idea how Dave's PK3 got into non-MPLAB mode (=has different firmware than MPLABX expects).
 

Offline hamdi.tn

  • Frequent Contributor
  • **
  • Posts: 623
  • Country: tn
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #7 on: January 18, 2016, 11:35:16 pm »
I assume the standalone PK3 application (used revert deaf PK3 into MPLAB mode) has to be used to put it into "non-MPLAB mode". AFAIK MPLABX IDE/IPE has no means to put the PK3 out of MPLAB mode.
No idea how Dave's PK3 got into non-MPLAB mode (=has different firmware than MPLABX expects).

since i don't own pk3 anymore i can't test that, but i vaguely remember that it does. since it have to update its firmware everytime you change target family , it must have a way to change mode too.

check out this link, they talk about a "reset" option in the project property pane.
http://www.microchip.com/forums/m762080.aspx

 

Offline robertbaruch

  • Regular Contributor
  • *
  • Posts: 120
  • Country: us
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #8 on: January 18, 2016, 11:45:20 pm »
About your sucky downloads, I had the exact same symptoms downloading other large programs (in my case, Mathematica). It would download a bit, then slow, then stop. Over and over. And I'm in Silicon Valley! Eventually I found out it was Kaspersky Antivirus that was causing this to happen, in addition to a bunch of other symptoms like just opening a folder and nothing happening for a few minutes until suddenly it pops up.

I switched to Avast and suddenly all my downloads work fine, no weird nonresponsive folders.

So maybe (cross fingers) turn off your antivirus to see what happens?
 

Offline TheCharels

  • Contributor
  • Posts: 12
  • Country: us
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #9 on: January 18, 2016, 11:59:23 pm »
Dave,

You ain't done yet.

When the PICkit3 GUI tells you the device ID reads as (0)  then the ICD connections to the target are not working correctly.

You have still got some hardware debugging to do.

But then you know that as I just re-watched the last 8 minutes of your video and now I see a big red over-text  at about 35:02 that says your found a hardware issue.
« Last Edit: January 19, 2016, 12:38:18 am by TheCharels »
 

Offline piranha32

  • Supporter
  • ****
  • Posts: 151
  • Country: us
    • random ramblings of an engineer
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #10 on: January 19, 2016, 12:37:35 am »
Most of the problems must be some kind of Windows fuckery. I downloaded Mac version of MPLABX v3.15, set target to pic32, and... IPE did not work. Eventually MPLABX v1.95 recognized my PICKit3, but only after I switched target device to smaller device (dsPIC32). Uploaded firmware to the programmer, and worked fine. At this point I installed MPLAPX 3.15 again, and it worked with dsPIC32 (PIC32 requires connection to target device). Unfortunately I did not check with smaller devices before downgrading to v1.95, but I have a strong feeling that it was mostly PEBKAC error. I have no PIC processor to connect to, so I can't test communication with the device, but firmware uploads fine, and IPE connects to the programmer without problems.

EDIT: MPLABX installers for Mac are not as big as for Windows, but still, 250-350MB took only 2-3 minutes to download from Microchip's website.
« Last Edit: January 19, 2016, 12:40:44 am by piranha32 »
 

Offline TheCharels

  • Contributor
  • Posts: 12
  • Country: us
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #11 on: January 19, 2016, 12:57:04 am »
In my experience MPLABX v3.20 does not play well with previous version of PICkit3 firmware.

The PICkit3 has three kinds of firmware in it.
1 - The bootloader. Seems solid, Works with all the GUIs I've needed.

2 - OS firmware. This is the problem.
The version loaded by MPLABX v3.20 does not play well with some of the previous MPLABX versions or MPLAB v8.92, but none of the IDE show a warning that the "new" OS firmware is not reliable.

3 - Target specific programming firmware.
This one does not play well when the OS firmware is not the same "vintage" as the target specific firmware.

This issue is likely unique to my situation. I have projects that for legacy reasons must be built with MPLAB v8.92 and new projects that build with MPLABX. When I fail to force an OS firmware and target specific programming firmware to update to the "current" version that the MPLAB IDE I am building with then the PICkit3 fails in strange an mysterious ways.

A good thing about the PICkit3 is that you do not need the MPLABX driver switcher to use it with MPLABX or MPLAB v8.92. The bad things is that as a debug tool it has problems that Microchip never seems able to fix.
« Last Edit: January 19, 2016, 01:14:06 am by TheCharels »
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #12 on: January 19, 2016, 01:07:58 am »
Congratulation, a day of work what needs a second with an Arduino IDE. Now the Microchip CEO has to make another funny answer video :-DD Would be better if they would fix the thing.

I like PICs, but PICkit 3 is terrible. PICkit 2 was fine, no problems with MPLAB. The new MPLABX is bloated and slow (it is based on Netbeans, written in Java, which itself is not that slow, but maybe all the custom Microchip plugins slow it down), and all these PICkit 3 target specific firmware is silly. The programmer itself should be dumb, they should put all the logic into the PC side. Recently I tested a new project I'm developing with a Lattice FPGA chip, which can be programmed with JTAG, and their programmer just uses a FT2232 chip, so you can build your own programmer easily. Yeah, I don't like the FTDI business practice, bricking fake devices, but they are the market leader and they do all the stuff for you like driver development, which is integrated in the Windows update etc. and you get an easy to use interface for low-level GPIO control, including some interesting high speed FIFO and JTAG modes, and UART.

For projects where I don't need the smallest, cheapest microcontroller, these days I just use a modern ARM microcontroller, like the nice LPC family microcontrollers from NXP. It has a USB port with a special boot mode. Just plug it into your PC, it is enumerated as a thumb drive, copy the new firmware to it (which the special boot loader will flash then very fast) and you are done.

Everything should be as easy as possible, like with the Arduino or the USB thumb drive firmware update process. Now the question is: Will this get more difficult with Atmel chips and more bug-ridden when Microchip buys Atmel? :popcorn:
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 
The following users thanked this post: xavier60

Online EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37664
  • Country: au
    • EEVblog
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #13 on: January 19, 2016, 01:16:11 am »
But then you know that as I just re-watched the last 8 minutes of your video and now I see a big red over-text  at about 35:02 that says your found a hardware issue.

It was more of a hardware PEBKAC  :palm:
 

Offline tindel

  • Newbie
  • Posts: 7
  • Country: us
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #14 on: January 19, 2016, 02:06:07 am »
Jesus Christ!  Nearly 45 fucking minutes of dogging on Microchip.  How fucking boring.   :--

I certainly don't care for microchip - most practicing engineers agree, I think.  I always joke around saying "Microchip parts always work... sorta" or "Microchip parts always work... once you figure out how they work."

Microchip has published over and over again that the pickit3 isn't recommended for production programming.  Pony up and spend a couple more bucks for the ICD3 - and quit your bitching.

New drinking game. Take a drink every time Dave says  "Unbelievable"   :-+
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #15 on: January 19, 2016, 02:27:10 am »
Microchip has published over and over again that the pickit3 isn't recommended for production programming.  Pony up and spend a couple more bucks for the ICD3 - and quit your bitching.
But it should at least work out of the box, other manufacturers can do it better and even PICkit 2 was better. Lots of people are complaining about it. Imagine a student, trying to work with PICs. She'll give up and use instead an Arduino. Later as a CTO of big$ corp when she decides the next microcontroller for the million parts product: "I'll use Atmel, the software just works, I don't trust Microchip, even if it is a little bit cheaper".
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline rrinker

  • Super Contributor
  • ***
  • Posts: 2046
  • Country: us
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #16 on: January 19, 2016, 03:26:42 am »
 True - years ago I bought a PICkit 2 starter kit that had the programmer and a small board with a 16F690, and I never had any issues with it, it all just worked out of the box, with multiple compilers - I tried a bunch besides the supplied stuff. Haven't messed with micros much since then - good thing it uses a standard micro-USB, I just pulled it out of the drawer and the cable's gone missing. Recently picked up some Arduino stuff, seem to be heading in that direction now - although I have a huge stash of 16F873 and 16F876 variations - 19 in all, acquired through Dave's most hated method, free samples. A model railroad control board I had been planning to use uses the 873 and with the chip being discontinued, I wanted to have enough to handle my future needs. Now, they just sit in my drawer gathering dust (on the outside of the box - they are in a box, all in anti-stat tubes)

 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #17 on: January 19, 2016, 03:30:19 am »
Microchip has published over and over again that the pickit3 isn't recommended for production programming.  Pony up and spend a couple more bucks for the ICD3 - and quit your bitching.

"Not recommended for production programming" is an excuse for not working now? Every product should work, you don't sell broken things, period.
No longer active here - try the IRC channel if you just can't be without me :)
 

Online EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37664
  • Country: au
    • EEVblog
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #18 on: January 19, 2016, 05:02:23 am »
Jesus Christ!  Nearly 45 fucking minutes of dogging on Microchip.  How fucking boring.   :--

It was a blow-by-blow account of me solving a real problem with the tool I encountered.
If you find it boring, that's fine.

Quote
Microchip has published over and over again that the pickit3 isn't recommended for production programming.  Pony up and spend a couple more bucks for the ICD3 - and quit your bitching.

Are you serious?
I'm not doing production programming, I simply want to use the tool as intended to talk to a single device in my product.
It didn't work, I had every right to bitch.
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12288
  • Country: au
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #19 on: January 19, 2016, 05:06:37 am »
I don't decry Dave for having presented his tortured exercise - as it is very relevant for the state of this segment of the industry AT THIS POINT OF ITS DEVELOPMENT.

Having to muck around with prior versions of software as he did is something I would expect from 10 years ago or more.
 

Offline forrestc

  • Supporter
  • ****
  • Posts: 646
  • Country: us
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #20 on: January 19, 2016, 06:04:48 am »
I don't decry Dave for having presented his tortured exercise - as it is very relevant for the state of this segment of the industry AT THIS POINT OF ITS DEVELOPMENT.

Having to muck around with prior versions of software as he did is something I would expect from 10 years ago or more.

I think a big part of this has to do with the fact that when microchip went to MPLABX they switched a lot of stuff from a proprietary USB driver/interface to a more standard one.   This required a change in the drivers in windows, and also changes to the firmware on the device itself.  Until you get the newer MPLABX drivers running on windows AND the firmware updated in the devices to be compatible with the newer drivers, things just act wonky.

BUT... once that is done, and you switch to using MPLABX exclusively these problems seem to go away and things work pretty consistently.

I would, however, recommend a ICD3 instead of the PICKit hardware.   The ICD3 just seems more stable.  I do multi-target work and I have had up to 3 of them attached to a single machine running 3 copies of MPLABX without any major issues.

 

Offline Dinsdale

  • Regular Contributor
  • *
  • Posts: 77
  • Country: us
    • pretzelogic
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #21 on: January 19, 2016, 07:16:28 am »
   Boy, was this timely for me. Just today I've played with my first bare metal AVR.
Getting SPI up. Hours to figure out I need to config all the SPI functionality first,
THEN set the SPE enable bit. Then everything was stupidity: "!" NOT, instead of "|" OR
in a few places, and the wrong SCK edge selected. Somehow it took most of the day.

   I took a break and your video reminded me that I'm not alone and made me laugh at myself.

   I've used older versions of MPLABX - mostly OK but I've had my share of weird behaviour.
It's really nice just to use vim, gcc, and avrdude. I know exactly what's going on, it
always works and I don't have to deal with any ones vision of an "environment".
This can't be happening.
 

Offline Alexei.Polkhanov

  • Frequent Contributor
  • **
  • Posts: 684
  • Country: ca
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #22 on: January 19, 2016, 07:48:09 am »
ICD3, MSP430 programmer, USB Blaster ... every time I need to connect to another bloody chip I need to spend $75 to $299 on programmer and they all essentially same - USB-to-serial or USB-to-JTAG interface with few tweeks! So much waste, why can't they use same hardware !? I know it never going to happen  ;D

Just now I have uninstalled all old Microchip software (ver 1...something) from my PC (Win 10) using Windows Control Panel, I downloaded latest version of MPLAB-X, I plugged in PickIt-3 from 2 years ago without pressing any buttons on it and voila, it just worked. Whole procedure took about 12-15 minutes including time to update firmware on PickIt after I have selected the target device (PIC16). I guess it was fast because I expected that it would not work, so it is like Murphy in reverse?
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #23 on: January 19, 2016, 07:55:15 am »
Just heard it a lot :)


The larger the government, the smaller the citizen.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4208
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: EEVblog #841 - Microchip MPLAB X PICkit 3 Woes
« Reply #24 on: January 19, 2016, 08:06:53 am »
I feel compelled to ask what it is I'm doing 'wrong'.

I use a PICKIT3 regularly, and it just works. For development, for production, in programmer-to-go mode which my customers love. It just works, every time, no problems at all. It works for me, and it works for the customers I have using boards with PICs in them.

I know it's a major PITA when equipment doesn't "just work", and long-term readers will know I have no tolerance for quirky lab gear. If you've found issues with the PICKIT3, I totally sympathise. But it does seem that the only time this particular device gets mentioned is when it goes wrong, and I think that's misleading. It's not that bad!


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf