Resetting a PIC with MCLR

Thread Starter

jj_alukkas

Joined Jan 8, 2009
753
I have my PIC16F628 on a breadboard connected to pickit2 on USB.. Sometimes I need to quick reset the PIC without going to pc and holding it in reset. I know this can be done with MCLR pin to ground, but is it safe to short MCLR to Gnd when PICKIT itself is holding it high, like when running a code?? I would like add a micro switch so that it can be quick reset when needed. Help please?
 

t06afre

Joined May 11, 2009
5,934
You can control this from MPLAB. It is on the programmer toolbar. They are named "hold in reset" and "release from reset" I think. Then developing I use this method works fine.
 

debjit625

Joined Apr 17, 2010
790
If your mcu is connected to PICKIT don't do it.
In your own circuit you can do it to reset the mcu,but microchip suggest using a small resistor like 100 ohms from MCLR to Vss for reset.

Good Luck
 

ErnieM

Joined Apr 24, 2011
8,377
AFAIK MCLR from a PicKit is an open collector drive, so yes it is safe to ground at your device for reset.

This is based on my excellent yet occasionally quite fallible memory, I will be in the office in an hour or so the double check off the PicKit 2 users guide (it has a full schematic in the back ya know).

Edit: Yep, it is just a pull down transistor thru a 100 ohm resistor. Obviously don't short for a reset when programming or you will blow some stuff inside the PicKit.
 
Last edited:

t06afre

Joined May 11, 2009
5,934
Also note that Microchip have some design guidelines regarding reset circuits connected to the MCLR pin. If not done correctly the PICKIT programmer may not work. You will find this in the PICKIT manual.
 

Thread Starter

jj_alukkas

Joined Jan 8, 2009
753
You can control this from MPLAB. It is on the programmer toolbar. They are named "hold in reset" and "release from reset" I think. Then developing I use this method works fine.
At present I am using this but sometimes while triggering input switches sitting at the test board, I feel it would be easier for a hardware micro switch in hand.

AFAIK MCLR from a PicKit is an open collector drive, so yes it is safe to ground at your device for reset.
Yes, its wired to the collectors of a 2N3904 and 2N3906, so it must be safe.

If your mcu is connected to PICKIT don't do it.
Since its a collector drive as ErnieM said, I think its safe on the PICKIT side, and most PIC projects I have seen have a reset using MCLR pin, so I hope it wont be a problem. And yes, I plan to do it through a 100-330ohms resistor.

EDIT : I just tried a reset by MCLR to Vss through a 100 and 330 ohm resistor, it didnt get reset. without the resistor it worked well!!

Thank you all!!
 

debjit625

Joined Apr 17, 2010
790
I just tried a reset by MCLR to Vss through a 100 and 330 ohm resistor, it didnt get reset. without the resistor it worked well!!
May be their is already a pull up resistor so with the 100 ohms pull down resistor you are creating a voltage divider circuit and as a result at the MCLR pin you are not providing a logic low...

Good Luck
 

THE_RB

Joined Feb 11, 2008
5,438
Put a 1k resistor between MCLR and the output of the PICkit programmer.

Then use your pushbutton from MCLR directly to ground.
 
Top