I would like to be clear about IOC routines and would be grateful for confirmation or correction of my understanding. AN566 helps but leaves me with a question...
Firstly for a pulse that is longer than the interrupt routine……
A. The port should be read to a variable to end the mismatch condition
B. The flag is cleared
C. The interrupt routine is completed.
In this case if an interrupt is called by a rising pulse, it will also be called again later when the pulse returns to zero.
If the interrupt routine is lengthy and the pulse is shorter than the routine then that routine will presumably end with another mismatch. In this case I guess the port should be read again to the (port) variable at the end of the routine?
Should the flag again be cleared? If so can the flag just be cleared once in the routine, at the end?
Thank you for yr help
Adrian
Bookmarks