Right way to use a pull up resistor

If you're trying to limit current flow in & out of the pin, you want the resistor in series with the pin, not pulling up to 5V.
See "Protection Details" in the middle of the Rugged Circuits design discussion here
http://www.ruggedcircuits.com/html/ruggeduino.html