PDA

View Full Version : neebee wants to know pullup or pulldown?



lecoind
- 23rd May 2009, 23:24
I want to put a row of dip switches on inputs to the pic16f877a and can either switch them to low or high to get the same result. Is it better to switch to ground with a pullup or make it go to 5v with a pulldown. What are the pros and cons to this.

tenaja
- 24th May 2009, 01:20
Use portb and you can use the internal pullups.
It really only matters if you are using the pins for multiple functions.

bogdan
- 24th May 2009, 02:14
http://www.piclist.com/techref/logic/xtrapins.htm

lecoind
- 24th May 2009, 02:16
ok Tenaja, I understand the internal pullups but what I realy want to know is if you were designing a circuit with switches controlling inputs, would you use
a 1 to trigger the input or a 0 to trigger the input. I can design it eather way. I have had some people say keep all inputs (pulldown) normaly to ground until you trigger with a +5v and then some say always have a +5v pullup and ground the pin to trigger. Which is the prefered method?

lecoind
- 24th May 2009, 02:28
Bodgan, that was a great link. That relay let me know about pullups and pulldowns. Thanks

mackrackit
- 24th May 2009, 03:36
Which is the prefered method?
It all depends on the external hardware. That is what will determine the method.

Is the switch normally high or low? Is the switch normally closed or open? That is the beauty of it, flexible.

Unused pins can be pulled low with a 10K or higher.