Re: DT-Interrupts - Is there a clash between ExtInt and IntOnChange?
generally the best solution is to absolute minimum processing in the isr like set a flag to indicate to main code that a task must be performed
ie
your triac isr can hold processing up for over 6mS
you could instead use zero cross to start another timer for "speed delay" that timer can then cause an interrupt to fire triac
both of these isr's could be very simple and done as asm type for absolute minimum overhead.
the "ir" isr could similarly start a timer and reset for another edge trigger set state 1. with the timer set for a period greater than the ir start pulse time
if the timer int goes off then its a false trigger if the timer value is to low when the edge triggers then its a false trigger otherwise
for a good trigger set a state so the foreground processing can decode the ir stream.
this would be a state managed process
state 0 ir idle
state 1 ir active
state 2 ir start pulse detected ,manage in foreground
it can all be done in uS no bogging down with delays
Last edited by richard; - 9th May 2020 at 05:59.
Warning I'm not a teacher
Bookmarks