News:

;) This forum is the property of Proton software developers

Main Menu

Weak Pull-up

Started by joesaliba, Apr 13, 2025, 05:33 AM

Previous topic - Next topic

joesaliba

Hi,

Using 18F05Q41, I have this PCB manufactured and forgot to do a pull-up resistor on the Rx line.

I enabled an internal pullup to this pin, and it seems to be working. My question? How reliable is this internal pull-up? Shall I try to find ways to do a physical external pull-up?

Same for the MCLR pin. Config fuses suggest only internal or external MCLR, however, it looks that internal pullup is enabled if set one way or the other.

I would have liked to disable the MCLR altogether, but I couldn't find nothing in the datasheet.

Regards

Joe

trastikata

Hello Joe,

The pull-up is as any other resistor, question is whether the resistance/current is sufficient for your application. It is probably something between 10 and 50 kOhm you will have to check the datasheet for the correct values.

MCLR is not a problem - just disable the MCLR function and make it an Input port.

top204

#2
With the newer PIC18F devices, I have found the internal pull-up resistors quite effective, even in noisy environments.

I've looked through the datasheets of the Q devices and cannot find what resistance they mean by "weak pull-ups", but in earlier devices, it used to be around 47K Ohms.

But if you are placing the device in sleep mode, they will effect the current.


trastikata

Quote from: top204 on Apr 13, 2025, 07:31 AMI've looked through the datasheets of the Q devices and cannot find what resistance they mean by "weak pull-ups", but in earlier devices, it used to be around 47K Ohms.

Hello Les,

I've just checked the datasheet, it is parameter D350. At 3v VDD, the weak pull-up current is 80 to 200 uA thus 15 to 37 kOhm.

joesaliba

Many thanks for your replies.

Left the circuit working and till now it working as it should.

Only thing to be sure is the MCLR. I cannot find in the datasheet how to disable it.

Using Fuse Configurator, it only shows Internal MCLR ir External MCLR.

Other devices I used in past they specifically say, Disable MCLR.

With this device, if MCLR is input, pull-up is always enabled, which is what I need for rest of mind.

trastikata

Quote from: joesaliba on Apr 13, 2025, 09:37 AMOnly thing to be sure is the MCLR. I cannot find in the datasheet how to disable it.

In CONFIG3 MCLRE = 0

MCLR.jpg

Stephen Moss

Quote from: trastikata on Apr 13, 2025, 07:37 AM
Quote from: top204 on Apr 13, 2025, 07:31 AMI've looked through the datasheets of the Q devices and cannot find what resistance they mean by "weak pull-ups", but in earlier devices, it used to be around 47K Ohms.

Hello Les,

I've just checked the datasheet, it is parameter D350. At 3v VDD, the weak pull-up current is 80 to 200 uA thus 15 to 37 kOhm.

Isn't that in implied rather than an actual resistance?

Although it is possible they created an actual resistance on the die, it is generally more common that a week pull-up (many people erronously append "resistor" to it, thus expect it to have an ohmic value) is actaully a MOSFET where the semiconductor doping is such that is has low current capacity. As a result, when a small amount of current (typicall 100-200uA) is drawn through the transistor the supply voltage is effectively dropped across it equivalent junction resistance.
Hence, "weak pull up" because they cannot supply enough current to drive anything, unlike when the IO pin is set to an output and transistors with higher current capacity (strong pull up) are used.

Quote from: joesaliba on Apr 13, 2025, 09:37 AMMany thanks for your replies.

Left the circuit working and till now it working as it should.

Only thing to be sure is the MCLR. I cannot find in the datasheet how to disable it.

Using Fuse Configurator, it only shows Internal MCLR ir External MCLR.

Other devices I used in past they specifically say, Disable MCLR.
To add to the data sheet extract @trastikata posted, I think a change is terminology that may be slightly misleading you.
It is not possible to disable the MCLR, in that it serves no function, as without the MCRL pin being pulled high the PIC would just be held in its reset condition and do nothing.

Where the MCLR pin has dual functionality...
  • Diabled/Internal are the same, in that the MCLR pin in internally pulled high by a weak pull up to allow the PIC to run and the MCLR pin to then function as and extra IO pin (usually input only as it would be if when controlled by an external voltage).
  • Enabled/External means it is controlled by a voltage source external to the PIC, such as a switch and/or CR timing circuit which allows the supply voltage to stablise before the voltage on the MCLR pin become high enough for the PIC to start executing its code, and  so cannot function as in IO pin.


trastikata

Quote from: Stephen Moss on Apr 14, 2025, 09:51 AMIsn't that in implied rather than an actual resistance? ....

Excellent explanation.

joesaliba

Thank you so much for your replies.

I will set MCLR to input so I have the internal pull-up enabled.

thank you
Kind regards

trastikata

Quote from: joesaliba on Apr 14, 2025, 11:10 AMI will set MCLR to input so I have the internal pull-up enabled.

It will do what you need, but just to clarify what actually happens ...

The MCLR pin has multiple functions (as many other pins) - serves as MCLR or as RA3 GPI pin.

When you set MCLRE = 0 in CONFIG3, the MCLR function is disconnected and the RA3 path is connected i.e. this pin is acting as PORTA.3 input, effectively "disabling" the MCLR function. So, any High or Low voltage on this pin will appear as input High or Low state on PORTA.3. 

joesaliba

Thanks trastikata,

That should be no problem. The pin is being used only for programming purposes. With internall pullup it should keep the PIC from resetting.

Joe