PICkit3 not working - Page 1
Forum section: electronics / general

author: NDani
author_rank: Contributor
timestamp: August 20, 2016, 04:34:16 pm
content: Dear Forum Members,I'd need your advice with an issue with my PICkit3. For some reason, my PICkit3 cannot program any PIC. For example, when I'm trying to program a PIC18F1320, then from MPLABX, it gives me the following error message:"Connecting to MPLAB PICkit 3...Currently loaded firmware on PICkit 3Firmware Suite Version.....01.43.35Firmware type..............PIC18FTarget voltage detectedTarget Device ID (0xffe0) is an Invalid Device ID. Please check your connections to the Target Device."For any other PIC I have tried so far, it does the same, i.e. reads all 1's for the Device ID and then it fails to program the chip. Here's some additional info:- Connections to the target device are certainly correct- The chips I'm trying to program are not faulty, as I could program them with another programmer (not a PICkit, however, but a cheap ZIF-socket plug-in programmer)- The PICkit seems to work otherwise, i.e its LEDs flash, MPLAB recognizes it and reads its serial number, etc.At this point I'm pretty sure that the issue is with my PICkit3. Do you know any way I could possibly fix this? Could it be some driver/firmware issue I could solve without replacing the unit or do you think I have to buy a new one?One thing that could have casued the problem is that the supply voltage in my target circuit rose to 20 V from the regular 5 V for a couple of seconds while the PICkit was connected. However, I would expect such a programmer to have overvoltage protection on its inputs, so I'm not sure if this could really have killed it.If you have any advice, please share it with me.Thank you,Daniel

author: JPortici
author_rank: Super Contributor
timestamp: August 20, 2016, 04:52:16 pm
content: it may very well be an overvoltage problem, in which case the mosfet drivers for the PGC/PGD lines were kill. there is not much protection in the pickitIs it a genuine microchip pickit3? then open a ticket at microchip support, if it is recognized as an hardware fault you will be sent a replacement for freebut it could also be a software issue.. until recently the funniest things would happen.. you may try and re download the firmware. i don't know the "official" procedure but just select a chip from another family and try to read it. the pickit will have a new firmware in it. then re-select your pic and do the same

author: NDani
author_rank: Contributor
timestamp: August 20, 2016, 05:19:27 pm
content: Dear JPortici,Thank you very much for your answer. If the PICkit really doesn't have onvervoltage protection, then it will most certainly be a hardware problem, unfortunately.Based on what you say, I think I have already done the firmware re-installation, as I have tried to program PICs from different families and I even recall the PICkit downloading the new firmware for them.Yes, it is a genuine PICkit. If nothing works out, I will try the ticket you mentioned, thank you very much!

author: Ian.M
author_rank: Super Contributor
timestamp: August 20, 2016, 06:29:08 pm
content: You've certainly blown the 74LVC1T45 I/O buffers on ICSP_DAT (U8), ICSP_CLK (U9), and ICSP_LVP (U11) as they are powered from Vdd_target. You've also probably blown the Vdd_Target control circuit, specifically Q7 (MMBT3904) and possibly Q6 (MMBT3906). If you are unlucky, its FUBARed due to blowing the pins controlling the I/O buffers on the PIC24FJ256GB106 MCU (U1) that runs everything.The standalonePICkit 3 Programmer App and Scripting Tool v3.10has a logic tool you can use to exercise the individual ICSP lines while you test them with a DMM.Caution: it loads PICkit 2 emulation firmware tht MPLAB doesn't recognise so RTFM to learn how to revert to MPLAB mode afterwards. Dave (EEVblog) was caught out by this . . .If any of the ICSP lines are blown, raise a support ticket with Microchip immediately to get it replaced. Don't screw around trying to repair the hardware unless you are in a country under US export restrictions that Microchip cant ship to!

author: KL27x
author_rank: Super Contributor
timestamp: August 20, 2016, 07:38:11 pm
content: Has it EVER worked?I don't use X, yet. With IPE, I have found I needed to do a manual update of the firmware on every new PICKit3 I have.QuoteEven though it auto-loads the correct device family variant of the firmware, it would do exactly what you are describing. The auto-load seems to not do the same thing as the manual download.In IPE there is an option under setting > manual download firmware. You don't even have to download the correct device family variant. Once manually updated to the latest version, the auto-download works.QuoteIf the impedance (max current) was stiff, I would think this could burn up any number of things. But there's a chance, maybe, it burned out your target circuit/chip before it damaged the PICKIT3.

author: Ian.M
author_rank: Super Contributor
timestamp: August 20, 2016, 08:02:41 pm
content: NXP and Diodes Inc. 74LVC1T45 are rated for an Abs. Max. Vcc of 6.5V. Applying more than three times, even transiently would certainly cause damage. If you are debugging a circuit that can exceed 5.5V Vdd under fault conditions, you should add a high current crowbar circuit set to 5.5V and an ultra-fast fuse to protect the PICkit 3.Quote from: NDani on August 20, 2016, 04:34:16 pmHow did that happen? Was it a regulator chip with a bad connection to Gnd or Adj (e.g. in a solderless breadboard)?

author: stj
author_rank: Super Contributor
timestamp: August 20, 2016, 08:05:51 pm
content: wouldnt a 20v spike also trash the target?

author: Ian.M
author_rank: Super Contributor
timestamp: August 20, 2016, 08:08:56 pm
content: Probably. but some older 5V PICs are (unofficially) known to have >50% survivability after 12V Vdd transients, so it isn't certain. I would expect it to blow the s--t out more recent devices.The logic tool in the v3.10 app will answer the question of whether or not the PICkit 3 is blown. If it cant enable and control target Vdd, or if the inputs are stuck or if it cant output the correct levels for logic '1' and '0' its borked.The I/O lines are protected by a ON SEMI 1SMA5918BT3G 5.1V 1.5W Zener clamo to Vss and a series TYCO/RAYCHEM MICROSMD005F 50mA (30V) Polyfuse. They also have a 4.7K pulldown resistor so you cant simply check they are all Hi-Z in input mode.

author: NDani
author_rank: Contributor
timestamp: August 20, 2016, 08:21:46 pm
content: Thanks to all of you!Quote from: KL27x on August 20, 2016, 07:38:11 pmYes, the PICkit worked fine until the "accident".Quote from: stj on August 20, 2016, 08:05:51 pmIt probably did - I can't really verify without a working programmer. But my PICkit doesn't program chips that surely work fine, either.Quote from: Ian.M on August 20, 2016, 08:02:41 pmA 7805 regulator chip powered both a PIC16F1825 and an LMC6482 op-amp. For a short time, the op-amp got 20 V on its non-inverting input due to an unintended short-circuit (the op-amp isn't supposed to get more on its inputs than supply voltage + 0.3 V). At the same time, I measured the supply voltage rail to rise to 20 V as well. Maybe that voltage somehow 'got through' to the positive supply voltage pin of the op-amp.So I think every trace suggests that I have blown the PICkit, sadly.I will try out the logic tool you mentioned, though.

author: Ian.M
author_rank: Super Contributor
timestamp: August 20, 2016, 08:34:08 pm
content: Quote from: NDani on August 20, 2016, 08:21:46 pmThe LMC6482 op-amp uses CMOS technology. The Vdd + 0.3V input voltage limitation indicates the inputs have ESD protection diodes that will dump current from the input onto the Vdd rail if you exceed that limit.

author: NDani
author_rank: Contributor
timestamp: August 20, 2016, 09:51:07 pm
content: Thank you, that explains it pretty well.

author: dannyf
author_rank: Super Contributor
timestamp: August 20, 2016, 10:19:01 pm
content: QuoteOnly in the form of some small value resistors (<100R).You should try to figure out if the programmer is gone: use a standalone programming utility and see if it can identify a known good chip correctly (not in your current set-up).Once that's confirmed, you can move forward.Assuming that the connection is good, my bet is that your programmer is gone.

author: Ian.M
author_rank: Super Contributor
timestamp: August 20, 2016, 10:36:19 pm
content: Quote from: dannyf on August 20, 2016, 10:19:01 pmNot so. The PICkit 2 had series resistors, but the PICkit 3 uses MICROSMD005F 50mA polyfuses. Both have clamps, but they don't protect the Vdd_target ICSP pin.

author: stj
author_rank: Super Contributor
timestamp: August 21, 2016, 01:55:01 am
content: Quote from: Ian.M on August 20, 2016, 10:36:19 pmpickit3 has resistors.

author: Ian.M
author_rank: Super Contributor
timestamp: August 21, 2016, 02:23:30 am
content: Those resistors were only effective against input overvoltage in the range Vdd_target + 0.5V to 5.1V, and only if target Vdd can sink the current through them. Above that the polyfuse and Zener clamp provide all the protection.Current production has zero ohm jumpers fitted for R26, R43 and R45, so my no protection resistors statement stands.

author: NDani
author_rank: Contributor
timestamp: August 21, 2016, 11:17:09 am
content: Quote from: dannyf on August 20, 2016, 10:19:01 pmYes, already done that and another programmer can - so not too many questions left, I guess.

author: dannyf
author_rank: Super Contributor
timestamp: August 21, 2016, 11:31:41 am
content: QuoteNot really sure what that means.

author: Ian.M
author_rank: Super Contributor
timestamp: August 21, 2016, 11:59:19 am
content: I'd read that as: The O.P. has tried a different chip, that he's checked on a different programmer so its known good..Presumably its still got the same problem ==> The Pickit 3 is probably blown.

author: NDani
author_rank: Contributor
timestamp: August 21, 2016, 12:31:46 pm
content: Yes, I meant: another programmer can identify known good chips.

author: dannyf
author_rank: Super Contributor
timestamp: August 21, 2016, 01:11:20 pm
content: QuoteBasically, for your particular set-up, you have three possible explanations:1) bad programmer;2) bad connection;3) bad target;For you to trouble shoot, you have to isolate each possible to figure out which is at fault.since you have a good programmer, seems to be programming the existing target with the existing connection would be the best approach to see if the programmer is at fault.

author: Ian.M
author_rank: Super Contributor
timestamp: August 21, 2016, 01:21:55 pm
content: No. a better approach would be to test it with the v3.10 app's logic tool as that lets you exercise Vdd, and also exercise ICSPCLK, ICSPDAT and PGM/AUX individually so you can determine what's blown.Also, it doesn't use any part of MPLAB X which eliminates most software or configuration issues.

author: NDani
author_rank: Contributor
timestamp: August 21, 2016, 05:51:53 pm
content: Quote from: dannyf on August 21, 2016, 01:11:20 pmThank you for the advice. The good programmer I have is not an in-circuit programmer, but one with ZIF socket, in which you have to plug a DIP chip into - so I cannot directly replace the PICkit with it. But I could test with it, that the PIC I was trying to program is working.Anyway, I have excercised the PICkit pins with the logic tool and I could determine that pin 4 (PGD) is faulty: it always reads a 1 regardless to the voltage applied to it. The other pins work fine. So it is pretty certain now that pin 4 on the programmer is blown.

author: dannyf
author_rank: Super Contributor
timestamp: August 21, 2016, 06:32:34 pm
content: QuoteThat's almost an impossibility: that means that pin is shorted to Vdd and have the ability to conduct unlimited amount of current.QuoteI think it is likely that the programmer is a bust but i don't think you have proven that to be the case. If I were you, I would put a scope (or led + resistor) on the icsp data + clock pin (on the programmer side, not on the target side), and see what you see.If that's confirmed to work, put it on the target side and see if you see a difference.

author: stj
author_rank: Super Contributor
timestamp: August 21, 2016, 06:51:40 pm
content: does pin4 on your icsp header connect to anything other than the pic? is it a shared pin?just wondering if your pcb did the damage!

author: KL27x
author_rank: Super Contributor
timestamp: August 21, 2016, 08:03:48 pm
content: QuoteI would think you can easily solder a new pin header or cable to your ZIF socket programmer for doing ICSP. If you are not comfortable with doing a permanent modification, you could make small adapter that sticks into the ZIF socket. Your programmer might be just as good as a PK3 for ICSP, who knows? I suppose Vdd is not adjustable on this programmer, though? That would be one gotcha. Or miserably low drive current.

author: Ian.M
author_rank: Super Contributor
timestamp: August 21, 2016, 08:51:18 pm
content: An ICSP adapter is the easy option if your programmer doesn't auto-configure its ZIF socket.If you want to build one, take an 8 pin turned pin socket and use it as a header. Carefully strip, lightly twist, tin and trim one end of a 6 conductor 9" length of ribbon cable EXCEPT for the fifth wire which you should leave untinned and untrimmed. Look up the ICSP pinout in the PICkit 3 manual and the pinout of any PIC12, and insert and solder the first four wires of the cable into the 8 pin socket accordingly. The LPC (8 pin) PICs don't have a PGM/AUX pin + the cable needs a ground between ICSPCLK/PGC and ICSPDAT/PGD so carefully wrap the fifth wire round the Vss wire where it goes into the 8 pin socket and solder it. Use the sixth wire for ICSPCLK/PGC.On the far end fit a 6 way 0.1" pitch female connector, swapping wires 5 and 6 to get ICSPCLK/PGC back to the right place and ground the PGM/AUX pin. Reinforce the header end with hotglue after everything is soldered and tested.Be aware that your programmer probably wont be happy doing ICSP to any target that has other circuits connected to the ICSP pins, and if the rest of the board puts a significant load on Vdd or cant stand 5V, you'll probably need to isolate the Vdd to the rest of the board during programming. Don't attempt to program with the target already powered.Back to your faulty PICkit 3: It sounds like U8 is blown.Quote from: PICkit 3 BOMRaise a support ticket and Microchip should replace it quickly. They may even send an advance replacement.Technically, the user replacing parts voids any warranty, but Microchip support normally don't bother enforcing that if any repairs are done competently and neatly with the correct parts so if you run into long delays or problems getting it exchanged, you may wish to repair it yourself.Replacing U8 is highly likely to restore normal operation as long as the MCU I/O driving its DIR pin still toggles correctly when you swap the pin from input to output in the logic tool. U8 is near the board edge 1/2" back from the pin 1 end of the ICSP connector J4. 74LVC1T45 is second sourced by NXP and Diodes Inc.As a hack, you could get it going by stealing the 74LVC1T45 from the U11 position (near the other edge of the board about the same distance from J4) leaving U11 unpopulated. This will disable LVP programming for any PIC with a PGM pin but it should otherwise operate normally. You *MAY* need to link pads 2 and 3 of the U11 footprint to ground the LVP/AUX data line on the PICkit 3 MCU side to fool the firmware.

author: NDani
author_rank: Contributor
timestamp: August 26, 2016, 08:24:46 pm
content: Hi to all,Thank you for everybody for their valuable advice. In the meantime, Microchip recognized the case as a hardware fault and sent me a replacement programmer, which works fine. Actually, I'm quite amazed by the quality of service. The replacement unit arrived very quickly and I didn't even have to pay for shipping. So thanks to Microchip as well.