John P
Joined: 17 Sep 2003 Posts: 331
|
|
Posted: Mon Nov 28, 2011 2:57 pm |
|
|
If you could talk face to face with an experienced person I think you'd get the idea of this in just a few minutes.
Interrupts are launched when conditions are met. There are flags in the processor which tell it which interrupts should be responded to and which should be ignored. If the relevant enabling flag allows a response, the triggering condition could be an elapsed time running out, or it could be an external event like a change on an input pin, or it could be the completion of an analog conversion, or a communication event, or a number of others. You have to decide which ones your program needs. And you have to decide what the interrupt will do in terms of changing the program's operation. So the user presses a button, an interrupt occurs, what should happen? Or a timer triggers, and in the interrupt a counter is increased by 1--but what happens then? Answering those questions is how programmers make a living. |
|