PDA

View Full Version : pullup and pulldown resistor help



studysession
- 28th January 2009, 14:32
Hi -

How do you know when to use a pullup or a pulldown resistor?
Know when to use what resistor and then what value is not straight forward to me and trying to figure out a simple way to remember to know which to use.

Thanks -

sayzer
- 28th January 2009, 15:45
Hi -

How do you know when to use a pullup or a pulldown resistor?
Know when to use what resistor and then what value is not straight forward to me and trying to figure out a simple way to remember to know which to use.

Thanks -

If there is a "memory save" button in the system, then I use pull down resistors instead of pull ups. => Button press pulls up.
Reason: If power is removed, then there is a possibility that pin goes down before PIC goes off. The program then acts as if the button was pressed.

Archangel
- 29th January 2009, 01:25
Hi -

How do you know when to use a pullup or a pulldown resistor?
Know when to use what resistor and then what value is not straight forward to me and trying to figure out a simple way to remember to know which to use.

Thanks -The logic of true determines which to use, if true = 1 then use pulldown, as the pulldown makes it default to false. If true = 0 then use a pullup, pullup makes 1 default to false.

studysession
- 29th January 2009, 01:28
The logic of true determines which to use, if true = 1 then use pulldown, as the pulldown makes it default to false. If true = 0 then use a pullup, pullup makes 1 default to false.


I think I am following you but want to make sure. Could you expand with an example? THanks

Archangel
- 29th January 2009, 02:36
I think I am following you but want to make sure. Could you expand with an example? THanks
ok


If PortA.1 = 1 THEN ' if logic high = true use pulldown to
'make untrue
Do something here !
else ' false this is where the pulldown does it's work.




If PortA.1 = 0 THEN ' If logic low is true use a pullup to
' make false
Do something here !Light an LED . . .
else ' False, again this is where pullup does it's job
Your code here . . . Say, turn off the LED

studysession
- 29th January 2009, 02:46
Thanks - That's what I was thinking you were saying before but wanted to be sure. Greatly appreciate it.

Keith