You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
PCMSK0 &= 0b00000000; //Clear all bits
- wouldn'tPCMSK0 = 0;
be a lot clearer? Meanwhile I agree with Gerben's answer. Try "guarding" your access to multi-byte variables set by interrupts. See Interrupts.PCMSK0 = _BV(PCINT3) | _BV(PCINT4);
, which looks clearer thanPCMSK0 &= 0b00000000; PCMSK0 |= 0b00011000;
, at least to those familiar with AVR programming.