is there a minimum current for a proper operation of an input pin?
i want to use the largest possible resistor in order to obtain the smallest possible current for a minimum power loss.
i'm using PIC16F84A
this is the circuit:
is there a minimum current for a proper operation of an input pin?
i want to use the largest possible resistor in order to obtain the smallest possible current for a minimum power loss.
i'm using PIC16F84A
this is the circuit:
The datasheet will probably tell you, but if you reverse the positions of the switch and resistor there will be no current flow at all until you press the button!. PortB of the PIC already has built-in high value pull-up resistors, again the datasheet will tell you the sort of values used, but it's something in the 100's of kilo-ohms (600K seems to spring to mind?).
If the port has pull up resistors swapping the switch and resistor will draw current (through the pulup and the external resistor to ground). Your best bet is to just use the internal pull up which is the maximum resistance you will be able to get with pullups present.
The internal pullups are turned off by default, you only turn them on in your code if you need them - so they won't draw any current (unless you want them to?).