pull-up vs pull-down resistor

Is there a hard-and-fast rule whether to use pull-up resistors or pull-down resistors on input pins?

The reason I ask, is that most examples I see use pull-up resistors. This is fine, except it makes the programming logic seem backwards (to me anyways).. I'd prefer to use a pull-down resistor on my inputs so that I can see if a button is being pressed by seing if the pin is HIGH.

Is this purely just a matter of style, or are there other reasons to choose one over the other?

thanks!

In addition the level between low and high is usually not 2.5V but significantly below. Hence pulling up gives slightly better protection against noise.

Udo

Well any simple switch will require some kind of pull-up or pull-down resistor or else the digital input pin will read wrong due to noise when the switch contacts are open, resulting in invalid digital read values.

The thing is all the Arduino digital input pins have a free internal pull-up resistor avalible if enabled, thus allowing a simple switch to just wire between the input pin and ground, no external resistor is required so less components on the board. There is no internal pull-down option avalible so one has to use negative logic convention, switch pressed = low, switch inactive = high. This should not be a problem for your software to deal with, just don't let your mind to hampered with a high must be on concept. :wink:

Lefty

ok, thanks for the advice

Looks like my best bet is to get used to the pull-up idea. If it bothers me too much, I'll just create some new constants to use in the programming that makes more sense to me - but I'll give it some time first to see if I can adjust the different thinking!

Because it is an important but in the hobby scene underestimated design consideration, I should draw your attention to Richard Crowly's item #3!

re: item #3
would a small load such as a 100 ohm resistor in line protect against such shorts?

Is this purely just a matter of style, or are there other reasons to choose one over the other?

Historically logic inputs needed more current to pull them to a logic zero than to pull them to a logic one (TTL logic). Therefore they put more load on the driver there by reducing the fan out (the number of inputs you could connect an output to). Therefore pull downs were to be avoided.
TTL is still around and so pull ups are generically the preferred way. The fact that you might just think is the wrong way up is something you will get used to in time. You can always use push to break switches.