Interrupts don't work

telemoquina0:
So, to have an external interrupt is it mandatory to have something connected to pin 2? Can´t it be simulated?

Hang on a bit. Let's start from the beginning. Have you ever used external interrupts before?

Also.... 'simulated' .... yes ....... if the software/hardware is purposefully configured so that the interrupt is triggered by a condition where the voltage at the pin goes from low-to-high (or vice versa), then you could get the interrupt to trigger ----- by doing just that. Know where your external interrupt pin (whatever that pin is) is ... configured as an external input interrupt pin. Maybe connect a 1K resistor or something to that pin. So resistor terminal A will be connected to either GND or to 5V, while terminal B of the resistor is connected directly to the interrupt pin. Then use whatever means you can to change the voltage at terminal "A" (of the resistor).... like have it connected to gnd for one moment, then connect it to say 5V (or 3.3V) the next moment.