Interrupts, how big does a rising edge need to be?


I'm currently playing with interrupts on a Due, Its triggering more often than expected.

I think it may be possibly due to noise on the interrupt line, can someone tell me how high the signal needs to be to trigger a RISING edge? DOes it need to go al the way to logical high (i.e. above 2v)



Read the datasheet.

Yes, a digital input must reach the digital HIGH threshold. Otherwise it is not high.

Are you using a mechanical switch or relay? Those bounce. You can get 5-20 interrupts for a single button push if you're not careful. Look up debouncing. You can debounce interrupts. Or do it on the analog side - use a resistor and capacitor to limit the rate of change of the signal.

OK thanks,

The rising edge is coming from a comparator is 3.3v and looking on a scope is pretty clean.

The edge triggers an ISR and it's happening at least 10x the frequency of the comparator output. I'll keep digging!


I had to deal with a similar problem. I learned from a colleague that in hardware you would use a Schmitt trigger, I did implement that in software and it resolved my digital sensor problem. Find the details in this posting: