Author Options:

Help with programming a PIC16f877A with Pickit2 Answered

I am having a really hard time programming a PIC16f877A with a Pickit2 programmer or a homemade serial programmer. I have tried several ICSP interface circuits but neither programmer can read the microcontroller. 

I have been able to program other PICs with each programmer without any problems. I am beginning to think that I just have a bad chip. Does anyone have experience using Pickit2? A step by step breakdown would be extremely helpful. 

Can anyone suggest a good interface for the PIC16f877A? I have tried connecting the pins directly to the programmer. I have also tried using pullup resistors on MCLR, and used a schematic for ICSP that I found on the Microchip website. 

One thing I have yet to try is powering the chip with an external power supply, Would this method work? 


Make sure that you bend the legs over on a bad chip and discard it so you don't waste time testing it again . Keep in mind as well that a static discharge can also partially damage a chip and cause weird results when testing. I am glad to hear that you have things sorted out.

Make sure that the 5 volt power is checked when writing and reading the chip.
You can program the chip with just the 5 connections that go to the Pickit 2.
I have programmed many chips with the pickit and only ever had one bad chip.
Program and read a known good chip watching each step. Then you can re-try the 16F877a.I usually write and then verify the chip.

So I finally decided to just buy another PIC16f877a to see if that one would work. Surprisingly I was able to program it very easily by just connecting the 5 pins. As it turned out, the chip I was using before was bad :(