Links


Arduino port registers

arduino.cc

Each port is controlled by three registers, which are also defined variables in the Arduino language. The DDR register determines whether the pin is an INPUT or OUTPUT. The PORT register controls whether the pin is HIGH or LOW, and the PIN register reads the state of INPUT pins set to input with pinMode().

Only recently finally dug into this to grok how it works. Very handy, especially for size constraints or simultaneous pin actions.