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.
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.
Use portb and you can use the internal pullups.
It really only matters if you are using the pins for multiple functions.
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?
Bodgan, that was a great link. That relay let me know about pullups and pulldowns. Thanks
Dave
Always wear safety glasses while programming.
Bookmarks