Hello, general hobbyist and messer-abouter here. I'm having some trouble programming a PIC16F87 using my PIckit 3.
I have set up the circuit in the attachment on my breadboard.
The problem I have is although the device programs fine. Unless I completely disconnect the Pickit from the PCs USB port and reset the micro, it will not run correctly. As long as I do those things, the micro runs the code just fine.
I've tried upgrading from the MPLABX3.40 I was on to 3.61 and upgraded the XC8 compiler. I think the Pickit itself does its own automatic firmware but I'm not sure about that.
Any ideas at this point would be greatly appreciated. It would be nice to keep it in circuit and use it for step debugging etc.
Thanks,
p.s. I did have the PGM(LVP) pin connected but it seems its not needed, I've tried it both ways and it doesn 't seem to make a difference.
EDIT: I have tried adding a 0.1uF capacitor between R1 & D1 to ground after re-reading the ICSP application note, it didn't help though.
I am astonished it programs or runs at all if your schematic is a true representation, ever heard of decoupling integrated circuit power lines or did I miss something ?
Also you don't mention if you are using the PK3 in debug or programmer mode ?
Are you powering the circuit with the PICkit or externally. If the pickit is trying to power it at say 3V and you are powering it at 5V there can be a conflict. Check in project properties. Select PICkit3 from the categories then on the right in option categories select power and see what voltage it is using.
Also the diode is not needed if you are using a 10K pull up resistor. It might be keeping the voltage on the MCLR pin to low when connected to PICkit
Also the diode is not needed if you are using a 10K pull up resistor. It might be keeping the voltage on the MCLR pin to low when connected to PICkit
I was going to say that too. Also if you were to use a diode, use a high speed signal diode like a 1N914 or 1N4148. The 1N4004 will introduce weird capacitive and switched time delay effect as it is a slow 1 amp diode.
Also, I typically use 100k pullup, but this shouldn't effect your circuit.
ever heard of decoupling integrated circuit power lines
Errrr, maybe lol. I added a couple of them directly across the micro and it does seem a little *ahem* better.
the diode is not needed
use a high speed signal diode
I'll try removing/changing it and having a play around.
Thanks all, sorry for my noobishness, it does seem as though lack of IC decoupling was my issue.
Matt
Lose the diode
Disable LVP in the CONFIG1
Thanks all, sorry for my noobishness, it does seem as though lack of IC decoupling was my issue.
I mentioned it because I have had the same experience on a programming board when the decoupler cracked!
I always put them under the board directly across the power pins, 100nF is enough there.
Happy PIC development