In one of the requirement, Mega16 INT1 is mapped into a square wave of 20 millisec period. Until now, the project used the negative going edge as the trigger, thus the INT1 triggered at every 20 millisec. In the revised requirement condition, I must get the micro triggered at every 10 millisecond or more accurately when input goes high to low, trigger INT1 and then 10 millisec later when the input goes low to high, trigger again.
So far my line of thought has been, either
1) when the INT1 interrupt arrives, just toggle the edge sense in the ISR
Or 2)to reduce the overhead in ISR, I can start timer 0 with a timeout of 4 millisec. In timer0 compare ISR, just toggle the edge sense.
Am I right in my assumption. So far I have tried both options but I can only see the low going edge being detected