On the Arduino Uno R3 it is easy to setup an external interrupt by setting appropriate bits in the appropriate registers, for example like this:
void setup(){
EIMSK |= (1 << INT0); //Enable interrupt on pin 2
EICRA |= ( (1 << ISC01) | (1 << ISC00)) ; // Set trigger event to rising edge
}
void loop(){
}
ISR(INT0_vect){
//Do something
}
Is it possible to setup an external interrupt on the Arduino Uno R4 without using the 'attachInterrupt()' function, i.e. by setting bits just like on the R3? If so, I'm very interested in seeing the code for setting up the interrupt and how to write the interrupt service routine itself. Also, I don't want to use the interrupt request manager class or any other native functions to setup the interrupt.