Pickit3 programming issues - Page 1
Forum section: electronics / general

author: GreyArea
author_rank: Contributor
timestamp: June 01, 2017, 06:22:20 pm
content: 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.

author: fourtytwo42
author_rank: Super Contributor
timestamp: June 01, 2017, 07:21:01 pm
content: 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 ?

author: SebG
author_rank: Regular Contributor
timestamp: June 01, 2017, 07:47:17 pm
content: 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.

author: SebG
author_rank: Regular Contributor
timestamp: June 01, 2017, 07:49:57 pm
content: 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

author: BrianHG
author_rank: Super Contributor
timestamp: June 01, 2017, 07:54:37 pm
content: Quote from: SebG on June 01, 2017, 07:49:57 pmI 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.

author: GreyArea
author_rank: Contributor
timestamp: June 01, 2017, 08:21:09 pm
content: QuoteErrrr, maybe lol. I added a couple of them directly across the micro and it does seem a little *ahem* better.QuoteQuoteI'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

author: NivagSwerdna
author_rank: Super Contributor
timestamp: June 01, 2017, 09:23:34 pm
content: Lose the diodeDisable LVP in the CONFIG1

author: fourtytwo42
author_rank: Super Contributor
timestamp: June 02, 2017, 06:37:26 am
content: Quote from: GreyArea on June 01, 2017, 08:21:09 pmI 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