Right now I have a project that uses some swiches for controlling the microcontroller. (pic 12C508A) I supply the switch with +5 volts and a 10K resistor, and connect the other pin to the input of the microcontroller. To keep the input from floating while the switch is open, I put a 1M pull down resistor to ground. When the switch is open, the input is low, when the switch is closed the input is high. Works great.
Now, would it be better to use the weak pull-ups feature for the inputs? that way I could remove the pull-down resistors and instead of supplying the other end of the switch with +5 volts, I could tie it to ground.
What is the resistance of the weak pull up?
Do you see any problem with my logic? If I can connect my switches this way, I can save myself 1 wire (+5v).
Thanks!
Now, would it be better to use the weak pull-ups feature for the inputs? that way I could remove the pull-down resistors and instead of supplying the other end of the switch with +5 volts, I could tie it to ground.
What is the resistance of the weak pull up?
Do you see any problem with my logic? If I can connect my switches this way, I can save myself 1 wire (+5v).
Thanks!