I have this issue and can't solve it, it in pin change interrupts in AVR?
I have setup pin change interrupt on PB1
DDRB &~(1<<1); //Make PB1 Input
PORTB |=(1<<); //Pullup PB1
PCICR |=(1<<0); // Enable Interrupts on PB0 - PB7
PCMSK0 |=(1<<1); // Enable interrupt PCINT0 - PCINT7
then in my ISR
This will not work.
if(PINB &(1<<1) callback(); //Check to ensure the interrupt from PB1
//This is working perfectly WHY?
callback(); ///Check to ensure the interrupt from PB1