Trust Your Tools (Well, Sometimes)
One of my rules of thumb is 'Trust Your Tools'. If your multimeter says it's 4V then it probably is. If your debugger says that a variable is a certain value, then assume it is. Don't assume your tool is faulty. Most of the time it isn't.
So, when I needed to program a PIC16F84A for my Microtan, I immediately went for my newest programmer, a PICKit4 from Microchip. After installing MPLAB, which I didn't have on my laptop for some reason, I built a small circuit on perfboard which has the required bits and bobs needed to program a PIC.
I popped a 16F84A into the adapter, attached the PICKit4 and, oh dear, the bank check has failed. OK, try another chip. Same thing. OK, check wiring, all OK.
OK, get the PICKIT3 out as well. I tried programming the two initial chips and had no luck. Not good.
I had bought three chips from China, so decided to try the third chip with the PICKit3 and no luck. I decided that the chips had to be bad, so after trying them with the PICKit4 again, just to make sure, I bought some more chips from a reputable supplier and waited for them to arrive.
When they turned up I had another go with one and the PICKit4. No luck, exactly the same as the Chinese chips. Maybe they weren't bad after all. I checked the programming circuit for the PIC16F54 and found that I'd left out the capacitor from MCLR to ground and the Schottky diode from the RC circuit to the MCLR line. I added these and tried again with the PICKit4 and still no luck.
I then decided to go back to the PICKit3 with the new circuit and a fresh chip. It worked. Finally I had a programmed chip. A quick test in the Microtan keyboard PCB confirmed that it was working fine.
So, what happened? Looking on the internet it seems that the PICKit4 destroys PIC16F54A chips (unless, maybe you have a series resistor in line with the MCLR line, I haven't tried that). It is also reported that you may destroy the PICKit4 as well.
I'm not happy about that. The PICKit4 has the device in it's list of supported chips and lets you program it. Destroying them is not an acceptable outcome. I'd prefer it if they dropped the device from the supported device list.
Here's a picture of the 5 destroyed chips I ended up with, they seem to be permanently damaged as I can't program them even with the full circuit and the PICKit3.
In the 'olden days' the PICs were excellent little things and they worked. As well as the PICKit4 problem, I've had trouble with a PIC16F707 that simply seemed to not work, and a problem with MPLAB a couple of years ago where it just did not work on my Linux laptop, that appears to have been fixed now, but that's quite a lot of problems, especially as I don't use the PICs that much.
Oh well. I'll have to check on the interweb before I use the PICKit4 in future...
No comments:
Post a Comment