Pins 2 and 3 on arduino uno R3 can use "fancy interrupts" ("INT"). You can configure the interrupt t
Pins 2 and 3 on arduino uno R3 can use "fancy interrupts" ("INT"). You can configure the interrupt to occur if the pin goes high, goes low, is high, is low (or I think on any change is possible as well). And the interrupt immediately knows if it was pin 3 or 2 that cause the interrupt.
All other pins (or at least most other pins) can do PCINT, Pin Change INTerrupt.
Always 8 pins are in one PCINT group. The interrupt gets triggered whenever any one of the pins in the group has any change. Your code needs to figure out which pin it was and if it was rising or falling.
For more information check the ATmega328P datasheet. I'm very much simplifying here. And maybe I'm misremembering something.
But basically there are ways to get "real interrupts" on pins other than 2 and 3 but there are some caveats and it's more difficult @Maderdash @Lombre
All other pins (or at least most other pins) can do PCINT, Pin Change INTerrupt.
Always 8 pins are in one PCINT group. The interrupt gets triggered whenever any one of the pins in the group has any change. Your code needs to figure out which pin it was and if it was rising or falling.
For more information check the ATmega328P datasheet. I'm very much simplifying here. And maybe I'm misremembering something.
But basically there are ways to get "real interrupts" on pins other than 2 and 3 but there are some caveats and it's more difficult @Maderdash @Lombre
