How many clock cycles does reading digital input on an AVR microcontrollers take?
Reading from a PINx in the basic 64 I/O registers takes 1 cycle. Reading from outside of that takes between 1 and 3 cycles depending on the specific architecture, with 2 cycles being the most common. Note that this does not include the cycles taken up by the synchronizer reading the external value; see the device datasheet for more information about this.