To make sure that the interrupt will work, the global interrupt (I-bit in SREG) must be used: sei();