View previous topic :: View next topic |
Author |
Message |
Michael V
Joined: 10 Feb 2011 Posts: 3
|
General PIC micro i/o pin question. |
Posted: Thu Feb 10, 2011 11:52 am |
|
|
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: 9246 Location: Greensville,Ontario
|
|
Posted: Thu Feb 10, 2011 12:03 pm |
|
|
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
|
|
Posted: Thu Feb 10, 2011 12:56 pm |
|
|
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
|
|
Posted: Sat Feb 12, 2011 9:19 am |
|
|
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: 1635 Location: Perth, Australia
|
|
Posted: Sat Feb 12, 2011 10:21 am |
|
|
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: 9246 Location: Greensville,Ontario
|
|
Posted: Sat Feb 12, 2011 11:39 am |
|
|
I've used 10Megs as pullups for decades on 4000 series CMOS in very harsh enviroments so, why would a PIC not like it ? |
|
|
|