Pins output high when MCLR is on. How to avoid this?(pic18f2525)

Thread Starter


Joined Feb 4, 2009
Hi, I am working on a project. Using PIC18F2525.

I always thought that when the MCLR/VPP pin is activated or 0V, the program counter is reset to the beginning of the code, and all the pins output a logic 0 or 0V. In my case, when the MCLR is on, pins C3, C4, C5 are high or 5V. When MCLR is off or at 5V, these pins behave exactly as they should according to my code.

This would be no big deal, but for my project I need to hit reset or activate MCLR every once in a while, and I do not want pins C4 and C5 to be high at the same time. This happens when I hit reset and MCLR is activated.

Now whats the deal with pullup resistors? Does every input and output pin need to have a pullup resistor? I usually don't use them. Could this be the problem?

Thanks guys.


Joined Feb 11, 2008
When the PIC is in reset or programming mode, all the pins are in "high impedance" state.

That means they do not pull up or down but instead float around out of control. Normally this does not really matter.

If you have a PIC pin that must remain LO or HI when in reset mode, you need to physically tie it LO or HI as needed with a resistor. This is common on (say) an output pin that drives a FET or transistor. You need to ensure the pin is LO during reset so the FET remains off (in its safe condition).

Generally you use a high resistor like 10k, although you may need to lower the value to ensure the LO or HI condition, as it depends what is attached to that pin.

I hope that explains it. :) If you need more specific help please post a schematic, as thta helps A LOT.


Joined May 11, 2009
Remember that logic circuits input may take or see high level then floating(not connected to anything). Since your PIC go to 3-state during reset. It may be that this is your problem. And not that the PIC pins are high during reset. However the fix is using a pull-down resistor as RB mentioned