kef wrote:
I wonder what is the mechanism or resetting edge-sensitive IRQ latch. It must be not just "falling" or "rising edge" of CCR I-bit, it must be well more complicated...
Lets wake this thread up as it most closely resembles my problem today.
Am using the external IRQ through a buffer to synchronize with AC power. Sometimes with a little bit of noise on the power lines I get an extra pulse before the next clean falling edge.
What I have attempted was to set timer 7 for 1.5 milliseconds from within my IRQ service routine, disable external IRQ, enable timer 7 IRQ. Then when timer 7 fires disable timer 7 IRQ and enable external IRQ. Problem is that if there was a falling edge on external IRQ during that 1.5 MS the external IRQ service routine executes on exit from the timer 7 routine.
So, "How does one clear a pending external IRQ without actually vectoring through the service routine?" Isn't the toggle of the CCR I bit as that happens on exit from my timer 7 routine where external IRQ is enabled, then promptly vectors to the external IRQ routine on RTI from timer 7.
Would really rather not have to compare elapsed time in my external IRQ in order to discard false inputs altho am already doing that to ensure we're seeing good clean power.