CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

MCLR and weak pull-up resistor

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

MCLR and weak pull-up resistor
PostPosted: Thu Feb 20, 2020 11:24 pm     Reply with quote

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: 19451

View user's profile Send private message

PostPosted: Fri Feb 21, 2020 1:46 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Fri Feb 21, 2020 2:33 am     Reply with quote

Thank you for the prompt answer Ttelmah.

I will act according to your advice.

Best wishes
Joe
temtronic



Joined: 01 Jul 2010
Posts: 9205
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Feb 21, 2020 6:10 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Fri Feb 21, 2020 4:33 pm     Reply with quote

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 Smile

Best wishes
Joe
temtronic



Joined: 01 Jul 2010
Posts: 9205
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Feb 21, 2020 7:49 pm     Reply with quote

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: 19451

View user's profile Send private message

PostPosted: Sat Feb 22, 2020 1:20 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Sat Feb 22, 2020 6:30 am     Reply with quote

So my decision is:
Noisy environment, will use 10K like before.
Otherwise, internal weak pull-up.


Best wishes
Joe
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group