I made this circuit: [url removed, login to view]
And this code: [url removed, login to view]
There's a led in PB1 and a button in PB3. When the button is pressed, PB3 pin change its state from high level to low level, this produces an external interrupt. The code of this interrupt, makes the led turn on for 100ms.
But this code, turn ON the led everytime the button is pressed/released, that means everytime PB3 change its state.
I want the led to be turned ON, just when the button is released. (Make this by using interruptions)
25 freelance ont fait une offre moyenne de 25 $ pour ce travail
hi, solution change this line MCUCR &= ~(1<<ISC01) | ~(1<<ISC00); // Trigger INT0 on rising edge to MCUCR &= ~(1<<ISC01) | ~(0<<ISC00); // Trigger INT0 on rising edge let me know