avr external interrupt false trigger -
I was programming for external interrupts using the ATmega 128. I divided the outer interval between 0 and 1, which triggered the rising edge. Calculate the number of times the switch is pressed in between. But when the key is pressed once, the interval is called 2 or 3 times and therefore it means more. What's the problem here? My interrupt code is here ISR (INT1_vect) {cli (); ++ push_cntr1; Printf ("p1:% d", push_cntr1); Sei (); } ISR (INT0_vect) {cli (); ++ push_cntr0; Printf ("p0:% d", push_cntr0); Sei (); } Zero interrupt_init (zero) // enabled between 0 and 1 enabled. {EICRA | = (1 & lt; iSC01) | (0 & lt; ISC00). (1 & lt; ISC11) | (0 > ISC10); EIFR = 0x FF; EIMSC | = (1 & lt; INT1) | (1 & lt; & lt; INT0); DDRD = 0x00; } Int main (zero) // main program {dev_init (); While (1) {process (); } Return 0; } I need to clean and set up a little bit inside the handler is . It will be kept in mind by the compiler. For ma...