We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all,
The C167 has edge based external interrupts (programmable to rising/falling/both). Does anybody have a reference to info on how to interface it with a level based interrupt device (e.g. an external multi-port UART)? When you OR several interrupt sources together, you miss interrupts. What's the "industry standard" way of handling this?
I just checked the datasheet of an XC167 and it also has edge based external interrupts only. Could somebody explain, to a simple software engineer :-), what the advantage of edge based interrupts is? Level based seems to make alot more sense to me; it's plain and simple.
Regards, Joost Leeuwesteijn
Whether it's level based or edge based, if you are sharing an interrupt through wired-OR lines, your interrupt service routine must loop through every interrupt source. It must test and clear every source, and the loop termination condition must be that all sources have been cleared.
The C167 should not miss any interrupt edges unless they occur before the interrupt is enabled. If this is important, the best solution is to test the level of the pin just after you enable the interrupt, and assert the interrupt request bit in your program.