[Icc-avr] Software Delay

John Baraclough j_baraclough at zetnet.co.uk
Tue Jan 8 09:25:15 PST 2008


Debouncing inside an interrupt is a very bad idea. You should either use 
edge triggering on INT1 or a software debounce that isn't in an ISR. 
There's a lot of good stuff about debouncing in Jack Ganssle's article 
which you can find here <http://www.ganssle.com/debouncing.pdf>.

All the best for now,
John
<www.ganssle.com/debouncing.pdf>

Andrew wrote:
> Hi,
>  
> I need a good software time delay that sit's in an interrupt handler. 
> Basically i need it to de-bounce a pin (INT1). and i cannot use a 
> timer as the timer interrupts are disabled at this point in the code.
>  
> I was thinking of using : -
>  
> <code snipped>
>
>  
>
> Does anydy have a better software delay function.
>
>  
>
> Andy
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Icc-avr mailing list
> Icc-avr at imagecraft.com
> http://dragonsgate.net/mailman/listinfo/icc-avr
>   



More information about the Icc-avr mailing list