Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PicKit3 programming intermittently

Status
Not open for further replies.

qtommer

Member
i've been on a PIC hiatus for about close to 3 years now and recently started getting in the game again.
i used to use MPLAB v8.3 and am recently downloaded v8.92. Have always been programming my chip with a Pickit3

using a midrange 16f877a, i am now (on the same hardware as i used to play with millions of times albeit years ago) seeing my Pickit3 able to program the chip but this happens intermittently (i am just flashing in a simple program to turn on an LED)

everything is setup and i just do a
bsf PORTC,1

there are times i get this

Programming...
Programming/Verify complete


and the LED lights up as it should and sometimes i get this


Programming...
The following memory regions failed to program correctly:
Program Memory
Address: 00000009 Expected Value: 00002808 Received Value: 00001808
Programming failed


I know that the 2nd occurrence could be due to the fact that there is no proper communication between the programmer and the target device due to several reasons (higher power supply required, no crystal etc.)

i am powering the device from the PickKit with internal 5.5V. I am suspecting that i have my crystal faulty. I have swapped a few crystals (old ones) but i still see the same thing. I will be on my way out to purchase a new one but in the mean time, id like to know if anyone here has faced this before? anything im missing out?

would surely appreciate some advice. Cheers :)
 
My Pickit3 doesn't see the chip at all unless I have the circuit powered by a battery etc.
 
I don't think the crystal has any part of your problem.
(I have just programmed a 16F876A using a Pickit-2 in circuit but with the crystal removed, no problem)
How are you programming? I.E. in circuit, on a breadboard or in a socket directly connected to the Pickit-3?
 
Theres a current limit within the pickit 3, your circuit could be exceeding this and dropping the voltage.
MPlab tells you the supply voltage if you go tot the right screen.
If you can try programming the chip in a socket with nothing else connected, make up a little programming adaptor, I have had to do this the odd time.
 
I've had the same problem many times with PICKIT3 (genuine). Never really figured it out. Sometimes multiple programming tries does it. Sometimes closing everything down and rebooting does it. Sometimes just disconnecting the programmer from board (ICSP) and from USB cable and then replugging helps. Aaron
 
Hi All, thanks for your replies.

1) I am programming directly to the target circuit through a self-made PCB (with an adaptor) which I have used for years with the Pickit3. Never had this problem till now.
2) The current draw is only powering up the PIC + 1 LED with a current limiting resistor drawing about 20mA or so. I used to power up more stuff with the Pickit3 so i believe there is no issue here. Also, I am powering up at 5.5V internally. I have tried externally powering up the circuit too but the same happens.
3) Tried replugging too but I would really wanna get to the root of this intermittency than live with it..Who knows down the road what other deficits might come along the way :)


Could it be the Pickit becoming faulty over time? Doesn't the Pickit have a clock of its own which supplies to PGC which would probably drift over time no?
 
Last edited:
Yes, but even if the clock drifted because it drives the pic being programmed directly it will stay in sync with it, it'd have to drift a real long way to stop it programming.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top