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 CCS Technical Support

General PIC micro i/o pin question.

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



Joined: 10 Feb 2011
Posts: 3

View user's profile Send private message

General PIC micro i/o pin question.
PostPosted: Thu Feb 10, 2011 11:52 am     Reply with quote

If I have a pushbutton that I want to connect to the PIC, one would usually use a 10K pullup resistor, .1uF capacitor to ground, and a 470ohm resistor in series to the PIC I/O pin.

However, for a battery operated application, I want to minimize the current draw when the pushbutton is closed (i.e. 5V / 10000 ohms = 500 uA). What is the maximum value I can use for the pull-up resistor, without messing up the PIC's ability to interpret a logic high or low? Can I even go to 1meg?
temtronic



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

View user's profile Send private message

PostPosted: Thu Feb 10, 2011 12:03 pm     Reply with quote

Why not try it in the real world ? Only takes a couple of minutes and you'll learn more by doing!

OK...yes, even a 10 meg will work, it's all CMOS....
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 10, 2011 12:56 pm     Reply with quote

Always post your PIC on a question like this (or any question).
To answer this question, we need to look at the input leakage current
and the input pin capacitance in the data sheet. Also tell what pin you
are using, and your battery voltage. Usually the battery voltage is not +5v.
Michael V



Joined: 10 Feb 2011
Posts: 3

View user's profile Send private message

PostPosted: Sat Feb 12, 2011 9:19 am     Reply with quote

It is the PIC12F675, and I will run it at 5V, internal oscillator. The table says the input leakage current for the i/o is .1 microamp.

I would like to use 10Meg for my pullup, and I just want the reassurance it won't fail intermittently out in the field.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Sat Feb 12, 2011 10:21 am     Reply with quote

Michael V wrote:
It is the PIC12F675, and I will run it at 5V, internal oscillator. The table says the input leakage current for the i/o is .1 microamp.

I would like to use 10Meg for my pullup, and I just want the reassurance it won't fail intermittently out in the field.


That is easy, use 10M and it WILL fail in the field.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
temtronic



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

View user's profile Send private message

PostPosted: Sat Feb 12, 2011 11:39 am     Reply with quote

I've used 10Megs as pullups for decades on 4000 series CMOS in very harsh enviroments so, why would a PIC not like it ?
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