|
I had an old german professor in college, Dr Schmidt. Every few days he would give us one of his golden rules.
Concerning interrupts. First you have to design your system (SW and random input signals) so that your code runs by polling the inputs periodically.
once you have gone through the task of calculating how often each input signal will require attention, and how long it will take to service that signal
THEN you can use interrupts to implement the SW routines.
But if you cant service the interrupts by knowing how often to poll them, then if you blindly give each on an interupt instead, sooner or later they will pile up on you and the system will crash.
In other words: Interrupts should never be necessary to make your system work, use them only as a convienence.
|