PIC MCLR Pin Question

Thread Starter

airplane100000

Joined Aug 2, 2016
68
I'm employing a PIC 10F200 in a PCB design. I'm only using one pin. Unused pins are set to output and left floating. The GP3/MCLR pin is only input or MCLR, so I've set it to MCLR and attached it to VDD without a resistor. It is vital that I save board space and reduce unneeded components, but is it fine that I'm not using a resistor there? If it's not fine, how else can I leave that pin alone safely without using a resistor?

-Thank you
 

jpanhalt

Joined Jan 18, 2008
11,087
Are you using ICSP? If not, then turn off the MCLR functon. If it is attached to VDD without a resistor and you use ICSO, you may have difficulty programming it, or do you have a resistor in the supply line?

Do you have VCC and VSS well decoupled? If not, you may have problems with glitches and resetting of the PIC.

John
 

Thread Starter

airplane100000

Joined Aug 2, 2016
68
Are you using ICSP? If not, then turn off the MCLR functon. If it is attached to VDD without a resistor and you use ICSO, you may have difficulty programming it, or do you have a resistor in the supply line?

Do you have VCC and VSS well decoupled? If not, you may have problems with glitches and resetting of the PIC.

John
No, I am not using ICSP. This is for a simple circuit just using one pin as a square wave output. Programming is done before installation, all I want is a safe way to take care of that unused pin without using a resistor.... I read on another forum that the pin can be set to MCLR and attached to VDD.
VDD uses a buffer capacitor VSS does not.
 

jpanhalt

Joined Jan 18, 2008
11,087
The pin is always input. The reason to turn off MCLR function if you are not using it for that is to help prevent power supply glitches from causing a reset. As an unused input, it can be set to VCC.

John
 

Thread Starter

airplane100000

Joined Aug 2, 2016
68
The pin is always input. The reason to turn off MCLR function if you are not using it for that is to help prevent power supply glitches from causing a reset. As an unused input, it can be set to VCC.

John
Yes but without a resistor? This is rather important so I must be sure.
 

jpanhalt

Joined Jan 18, 2008
11,087
Regardless of whether you are using it for a reset, the input impedance is >10K . Actually, input leakage current is about 200 nA. Presumably, that won't pull your supply down very much.

upload_2016-11-20_13-19-38.png
(From PIC10F32x datasheet)

Yes, I would use a small SMD resistor so that the reset function remained and ICSP would work. I almost always use ICSP. Trying to impose a programming high voltage to a low impedance power supply probably won't work.

It was your assertion that there was not room even for even a small resistor, and you are not using it for reset or for ICSP. Why do you think 200 nA is too much current?

John
 

AlbertHall

Joined Jun 4, 2014
12,345
The '10F200 has weak pull-ups available. If GP3 is set as /MCLR then the pull-up is enabled (it cannot be disabled). If it is set as an input, then enable the weak pull-up. Leave the pin not connected and either will do. I would choose setting it as a input to avoid unexpected resets.
 

Thread Starter

airplane100000

Joined Aug 2, 2016
68
Regardless of whether you are using it for a reset, the input impedance is >10K . Actually, input leakage current is about 200 nA. Presumably, that won't pull your supply down very much.

View attachment 115668
(From PIC10F32x datasheet)

Yes, I would use a small SMD resistor so that the reset function remained and ICSP would work. I almost always use ICSP. Trying to impose a programming high voltage to a low impedance power supply probably won't work.

It was your assertion that there was not room even for even a small resistor, and you are not using it for reset or for ICSP. Why do you think 200 nA is too much current?

John
Really trying to not over complicate this, I don't know too much about these chips. I don't want to add a resistor to my BOM, I've survived without one.
If I understand you correctly, if I set it as input and wire it to VDD without a resistor, I will be fine only I may "suffer" 200nA of wasted current (which I am of course willing to lose)?
I have no desire to use reset or ICSP ever.
 

jpanhalt

Joined Jan 18, 2008
11,087
I agree with AlbertHall's advice just to use the weak pull-ups available. I neglected to mention that as I was focused on your question about connecting it to VCC.

In sum, you can set it to VCC without a problem, so long as you don't use it as a reset or for programming. It is simpler, however, just to set it to an input and enable a weak pull-up on it. In the alternative, you can set it to MCLR, which automatically enables the weak pull-up on it, but then you may be subject to an unexpected reset if VCC drops too low. That is more of a hypothetical than real problem, because if the voltage drops that low, you will probably get a reset anyway.

If I were programming it for your situation, I would make it an input and enable its WPU. However, there is probably not much practical difference between that and having it enabled as MCLR. Either situation is programmable and neither requires a connection to the pin.

John
 

Thread Starter

airplane100000

Joined Aug 2, 2016
68
I agree with AlbertHall's advice just to use the weak pull-ups available. I neglected to mention that as I was focused on your question about connecting it to VCC.

In sum, you can set it to VCC without a problem, so long as you don't use it as a reset or for programming. It is simpler, however, just to set it to an input and enable a weak pull-up on it. In the alternative, you can set it to MCLR, which automatically enables the weak pull-up on it, but then you may be subject to an unexpected reset if VCC drops too low. That is more of a hypothetical than real problem, because if the voltage drops that low, you will probably get a reset anyway.

If I were programming it for your situation, I would make it an input and enable its WPU. However, there is probably not much practical difference between that and having it enabled as MCLR. Either situation is programmable and neither requires a connection to the pin.

John
So I set it to to MCLR and tied it to VDD without resistor (easiest for my copper traces). I am now going to buy a large order of SOT-23 pieces.
Thank you.
 

AlbertHall

Joined Jun 4, 2014
12,345
It would be better left unconnected - and even easier for the traces.
If it is connected directly to VDD there is a very small chance that a transient could damage the chip if your layout is not too good.
 

Thread Starter

airplane100000

Joined Aug 2, 2016
68
It would be better left unconnected - and even easier for the traces.
If it is connected directly to VDD there is a very small chance that a transient could damage the chip if your layout is not too good.
It's not easier (in my orientation), because the power rail would have to dodge the pin and go under the chip if its not attached.
I read everywhere that an Input pin should not be left floating, and also that MCLR should not float either...
 
The /MCLR pin is also the programming voltage input.
A high voltage glitch will try to put the PIC in programming mode.
So I always connect mine (if not using ICSP) to 5 volts.
If using ICSP I use a 4k7 pull up resistor.
 
Top