I have these two reference images:



PICkit 2

and I'm trying to put a 6-pin header on my circuit so that I can easily reprogram the PIC if needed, without having to resolder. (I'm using the surface mounted version of the PIC, but I assume that makes no difference.)

So far, I have PK-pin1 goes to PIC-pin4, PK-pin2 goes to PIC-pin1, PK-pin3 goes to PIC-pin20, PK-pin4 goes to PIC-pin19, PK-pin5 goes to PIC-pin18, but I'm not sure about PK-6?

First of all, if I do this with the header, I will be able to reprogram the PIC in the circuit, right? Or will I need to put a jumper to isolate the PIC from the rest of the electronic components on the board? I will only have caps, resistors and microswitches. I am otherwise not using the MCLR/PGC/PGD pins at all.

And secondly, do I need to use the PICKit pin6 for anything?



In your case you can leave pin 6 of the PICkit unconnected. You wont need it. Pin 6 is, as far as I can remember, for devices that need a special codeword to get into programming mode.

You dont need to seperate the programming circuit from your rest of the circuit, when you follow some rules (See Section 3 of the PICkit 2 manual):

  • You should take care, that the "VPP voltage slew rate is not slowed down". So dont put big capacitors on the reset pin or you will get in trouble.
  • The signals of the PGD and PGC pins shouldn't be affected. The manual of the PICkit suggest the use of some resistors to isolate your signal (see the figure below, taken from the manual). But this depends heavily on your external circuit.

Typical Application Circuit


The circuit PetPaulsen posted is right. Don't forget to add a decoupling cap on your VDD/VSS pin , directly at the microcontroller. Not in this case, but for some PIC24 and PIC32 devices there is also a core regulator that needs to be enabled and decoupled. This particular device hasn't got it.

Normally you don't need an AUX (of PGM) pin. The device you got here is quite new, so as long there is nog PGM label on the symbol you don't have to connect it.

I would recommended placing the 10k+470+100nF on the MCLR pin. If the device requires 12V VPP during flashing, you want to isolate this from your 5V.

I would personally always leave the ICSP pins dedicated to ICSP and avoid connecting anything else to them. If you would use the pins in your project, see if you can attach non-critical outputs to them. Hooking up like a motor controller or relays is not very good. A status LED is fine, who cares if that blinks during programming? Input signals can be kinda tricky, I would avoid them.

The connections you posted seem to be fine. This will be able to in circuit program and debug.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.