port register internal pull up

Robin2:
Post your complete program.

What Arduino are you using?

Because you only need to define the pin names and set the pullup resistors once in the program there is no great advantage in improved performance if it makes the code harder to understand. Consequently I would just set the pins with the usual pinMode(pinName, INPUT_PULLUP);

...R

Agree, except on small memory attinys. IIRC getting rid of pinmode loses a couple hundred bytes, more if you also don't have any digitalWrite()/digitalRead().