PDA

View Full Version : Blowing up PICs left right and center



George
- 4th April 2011, 10:20
I've always found PICs to be rather hardy creatures until last week anyrate. In that time I've managed to blow up eight PIC16f628A chips and I have no idea what the problem is.

I have a PICKit 3 and have wired up for ICSP, if I put a brand new chip in, it reads and recognizes it fine, I can program it without a problem, and it seems to do what it was programmed to do without much hassle, however - when I reprogram it that's where the problem starts, it will not recognize the chip "unexpected value returned" although it says it has cleared the chip, when I click on erase chip it it doesnt, and it fails when it tries to reprogram. Was getting really expensive over the weekend where the only store open was Jaycar and they are $15.90 each!!!

The basics of the board are as follows PORTB.3 is being used as a PWM port at 20kHz and I'm driving directly (not through a resistor) to an AND gate HEF4081BP,
PORTB.5 is toggling on and off and driving both to the AND gate, and also directly to the gate of an inverting buffer HEF4049BP.
PORTA.0-A.3 are wired to a DIP switch which are each pulled low with a 10K resistor and switched high to VDD. (should I be switching via a 1k resistor??)
The OSC pins are hooked upto a 20MHz crystal with two 15pF load caps to ground.

The supply has a 0.1uF ceramic across the PIC, with another 0.1 on another part with a 4.7uF and a 47uF further down, it also has a 5.1V zener across the supply rail to protect against over voltage.

The supply for running the circuit at this stage is solely coming from the PICKit3.

I've set the PICKit supply voltage to 5.000V

Has anyone had similar experiences? Any thoughts would be appreciated as I think I'm going to have to reprogram several more times and want to keep chip waste to a minimum - plus, its really bad form!

Thanks guys - and girl

George
- 4th April 2011, 21:49
It appears it's my PICKit 3??? I've built another board up that basically just has a crystal, LED and ICSP port does exactly the same thing on there too - so at this stage I'm 11 PICs down and growing fast! It's not something silly like code protect off not being specified in the config is it? Here is my config line:

@ __config _HS_OSC & _MCLRE_OFF & _BODEN_OFF & _WDT_ON & _PWRTE_ON & _LVP_OFF

Thanks

Dave
- 4th April 2011, 22:16
George , Have you scanned the forum yet? I seem to remember about 2 years or so ago there was a thread about just such a problem. That's all I can remenber.....

Dave Purola,
N8NTA

George
- 4th April 2011, 23:08
Thanks Dave,

I've had a good hunt, it seems that perhaps they are not blowing up and just code protected and my programmer just cant deal with or erase them. I was going to try at 5.5V and see if that helped, however I've tried to upload new firmware into my PICkit3 but that seems to have stuffed me up completely, the MPASM program is just hanging on 'connecting' and now my PICkit is unusable, I've just downloaded the latest MPASM suite but it still wont work - this project is getting more expensive than I'd ever hoped!

George
- 4th April 2011, 23:35
Managed to get my PICkit 3 reprogrammed with new firmware - my USB port didnt have enough supply to power the unit while upgrading firmware - used another port and worked a treat.

However I've tried now programming with out code protect so specified _CP_OFF, same deal - identified device fine, programmed it, device works as programmed however I still cannot erase it etc - i just get this:

Erasing...
Erase device complete

Blank Checking...
The following memory regions failed blank check:
Program Memory
Address: 00000000 Expected Value: 00003fff Received Value: 00000000
Blank check failed

then if I try to reprogram it, I get this:

Programming...
The following memory regions failed to program correctly:
Program Memory
Address: 00000000 Expected Value: 00002860 Received Value: 00000000
Programming failed

If I shut the MPASM down then restart and plug in my micro I'll get:

Target Device ID (00000000) does not match expected Device ID (00001060)

George
- 5th April 2011, 01:28
Ok, I've had a good look around the internet and have found many people have had experiences similar to mine when using PIC16F628A, some people have found a cure that works for them but nothing at this stage seems to work for me. Neither my PICkit 3 nor ETT programmer will recognize the PICs after they've been programmed, neither will they do anything to them - ie erase. I've tested the VPP while erasing and it runs up to 13.4 volts four times for a period of about 20ms.

I've turned code protect off, i've turned MCLR on, have tried different programming voltages but now I just have 15 PIC16F628 chips that I cannot write to.

It's getting so frustrating, if not for the cost of the components, but I've spent four whole days on it so far and gotten no where. I think it's likely to all go in the bin soon.

Jerson
- 5th April 2011, 02:00
George,

I'm not sure if I can be of any help since I've never faced such a problem. However, have you tried calibrating your pickit3? I do not have a pk3 but, in the pk2 there is a calibrate function where you can set up the voltages accurately. It is under Tools->Calibrate VDD and set unit id on the pickit2 software.

Maybe the VIHH needed for programming the part is off?

Best

George
- 5th April 2011, 03:04
Thanks for that, just this very minute got it sussed, so hopefully this will help someone else out facing the same problem. BTW is appears PICkit 3 does not have the same calibration function as #2 - but will fairly accurately provide feedback of the voltage.

The issue resolves itself on both of my programmers if I force the programmer to hold the device in reset.

I did a conversion to a PIC16F88 to see if it was just the 628 playing up, however the 16F88 did the same thing so it must be something to do with my CONFIG system setup or hardware that's a bit quirky. Looking over the net there are many folks that have had the same problem, but none of the solutions I saw suggested to hold the pic into reset.

Hallelujah!!!

kellyseye
- 5th April 2011, 21:12
Happy to hear of your solution to the problem.

Have you retried the 'dud' PICs to see if they are resurrected using this technique?

George
- 6th April 2011, 00:24
yes, have managed to erase the 'dud' chips, there is a technique - like plug them in, activate hold on reset, unplug then plug in again and erase twice - but it works at least!