According to the datasheet:
we could think that, if we want to have a pin change interrupt for 3 pins, we have to create multiple instances:
ISR(PCINT0_vect){
...
}
ISR(PCINT1_vect){
...
}
ISR(PCINT2_vect){
...
}
void setup(){
GIMSK = 0b00100000;
PCMSK = 0b00000111;
}
However, this does not work, and I read here and here that we have to define just one interrupt function:
ISR(PCINT0_vect){
if (digitalRead(0) == LOW)
...
if (digitalRead(1) == LOW)
...
if (digitalRead(2) == LOW)
...
}
Why is that so? What is PCINT1, 2, 3, ... made for then in this pinout schematics, if we don't have to use it?
