View previous topic :: View next topic |
Author |
Message |
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
MCLR and weak pull-up resistor |
Posted: Thu Feb 20, 2020 11:24 pm |
|
|
Hi
Until now, I used always 10K for the MCLR pin.
Almost all new PIC's today have internal weak pull-up.
PIC12F1840 data sheet page 312.
Typical current 140uA at VDD=5.0V, so the resistor is approximately 36K.
It is OK for MCLR?
Bothering also that minimum current is 25uA, so the resistor is 200K.
It is 200K at -40 degree C? I didn't find a graph of the resistor current vs temperature in the data sheet.
Opinions in the subject will be much appreciated.
Best wishes |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19540
|
|
Posted: Fri Feb 21, 2020 1:46 am |
|
|
Depends on how electrically noisy the environment is.
You can use in excess of 1MR as a 'pull up', and the signal will still
merrily go high. However the chances of it accidentally getting spiked
'low' increase as the resistor increases.
Provided the pin is not connected to anything likely to pick up signals,
and is in a reasonably RF 'free' environment, the internal pullups are fine. |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
|
Posted: Fri Feb 21, 2020 2:33 am |
|
|
Thank you for the prompt answer Ttelmah.
I will act according to your advice.
Best wishes
Joe |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9244 Location: Greensville,Ontario
|
|
Posted: Fri Feb 21, 2020 6:10 am |
|
|
If you're worried about power consumption aka 'battery mode', use the 'L' version of that PIC. Most L versions use far less power but you need to read the datasheet and do some 'on the bench - side by side' testing.
Also, assuming battery powered, use a higher capacity battery ! These days the 'watt per cubic inch' is tremendous compared to 3 decades ago.
You can also save power by clever programming techniques. Microchip has several appnotes about this, one of the best was written 3 decades ago, wish I could find my hard copy book of appnotes as that one is bookmarked.
Jay |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
|
Posted: Fri Feb 21, 2020 4:33 pm |
|
|
Hi Temtronic
Thank you for the post.
I am not concerned by power consumption of the PIC because it is a negligible fraction from the total power consumption in the system.
All my systems works on 5V and can't change it.
My concern was as in Ttelmah explanation regarding EMI/RFI environment with larger resistors.
I have some small projects that I can eliminate the external 10K resistor for the MCLR pin. Not the cost, just the size.
I am not using SMD to be able to solder my boards alone even with my shaking hands
Best wishes
Joe |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9244 Location: Greensville,Ontario
|
|
Posted: Fri Feb 21, 2020 7:49 pm |
|
|
Well, my hands are still steady at 66, it's the eyeballs that make life challenging ! Only using 18F46K22 in DIP saves me TRYING to read the PIC type info !
I used 1 meg pullups on 4000 series CMOS for years in very 'noisy' industrial environments, 5 VDD without problems....lots of bypass caps though. Big (thick) PCB traces for power and ground, as well as cross hatched ground planes.
As power consumption isn't the reason, stick with what YOU know WORKS. While PICs and parts are cheap, it's the R&D labour that costs real money ! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19540
|
|
Posted: Sat Feb 22, 2020 1:20 am |
|
|
It is very dependant on what is actually 'attached' to the pin. Have anything
that can act as an antenna, or tracks passing nearby carrying large signals,
and the tendency for pick-up shoots up.... |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
|
Posted: Sat Feb 22, 2020 6:30 am |
|
|
So my decision is:
Noisy environment, will use 10K like before.
Otherwise, internal weak pull-up.
Best wishes
Joe |
|
|
|