News:

Let's find out together what makes a PIC Tick!

Main Menu

Weak Pull-Up

Started by joesaliba, Oct 10, 2021, 09:59 AM

Previous topic - Next topic

joesaliba

Hi,

I am using a 16F1827 and was wondering what is the value of a weak pull-up.

Is it safe to use these weak pull-ups than adding an external 10K resistor as a pull-up?

Thank you

Joe

JimDrew

You can check the datasheet for the value of the pull-up.  It depends on the exact part.  Most of the PIC parts I have used with the weak pull-up have 100K pull-ups.  You also need to make sure that the reference voltage for the pull-up is what you think it is.  A lot of the parts (especially those with a VCAP pin) will only pull up to the VCAP voltage though the internal weak pull-up.  That is not a problem for things like switches, but if you have some type of peripheral and it is expecting 3.3v (like for an enable line) it may not work at all.  VCAP is typically around 2.1v (again, depending on the exact PIC part).

Giuseppe

I once got the precise value of the internal pullup by enabling the pullup and putting a resistor of night value towards ground.
In this way with the voltage divider formula you can get the pullup value.
Normally I use the internal pullup and I am not a problem it is also available on the mclr

joesaliba

Quote from: Giuseppe on Oct 11, 2021, 06:37 AMI once got the precise value of the internal pullup by enabling the pullup and putting a resistor of night value towards ground.
In this way with the voltage divider formula you can get the pullup value.
Normally I use the internal pullup and I am not a problem it is also available on the mclr

On a small board that measures just 35mm x 35mm and have three pushes on it, I think for the push is enough the weak pull-up, However as John said, I have another external switch that need pull-up and for this I think it is better to use an additional pull-up.

Having said that, for this board I added external pull-ups and I populated the board, but maybe other project will get rid of these external pull-ups for on-board push.

Regards

Joe

Stephen Moss

Quote from: joesaliba on Oct 10, 2021, 09:59 AMHi,

I am using a 16F1827 and was wondering what is the value of a weak pull-up.

Is it safe to use these weak pull-ups than adding an external 10K resistor as a pull-up?

Thank you

Joe
It depends on what you are using it for, if for pulling up the Data and Clock lines of an I2C bus or to ensure the known input state of an input is high if the connected signal goes open circuit it should be fine, otherwise you have to watch the loading as the resulting input voltage of the pull up will vary with the amount of current drawn.

As it is a pull up the term "Resistor" is often incorrectly appended to it as it performs a similar function to an external physical pull-up resistor, but in reality it is more likely to be an open collector P channel transistor rather than a true resistor that acts a low value current source usually around 100uA and so as transistors have junction capacitance it should perhaps be thought of more as an impedance than a resistance.
Hence the term "weak" pull up, as being slow low current its high state is easily overridden by a output of a standard logic device which, when low can sink at least 10 times as much current as can be sourced by the pull up, pulling the input voltage down to 0.

Yes, you could do use a resistor to ground and infer an equivalent resistance when Vout(with resistor) = half Vout(no resistor) if you have a deep need to know, but personally I would only use them when connected to logic signals. Otherwise you risk pulling the input voltage down to the forbidden voltage range and could end up with random readings, particularly on inputs that are not Schmitt triggered. 
 

david

Hi,
I was about to post something very similar to Stephen's post regarding the pull-ups being current sources.
The attached is very typical and as you can see it has a very wide tolerance.  Can't say I've ever had an issue with them for switches.

Cheers,
David


joesaliba

Thanks for the detailed explanation.

I will use it only for on-board switches on small boards.

Regards

Joe