Senin, 18 Maret 2013



DEFINITIONS DEFINITIONS Interrupt
The process is performed by the microcontroller Interrupt Service Routine

Interrupt is an event or events that led to the microcontroller interrupt pause to serve them. Programs that run at interrupt minister called Interrupt Service Routine. The analogy is as follows, someone is typing reports, telephone suddenly rang and menginterrupsi person so stop typing jobs and lift the telephone. After the telephone conversation which in this case is an analogy of the Interrupt Service Routine is completed then that person went back to his job typing. Similarly, in the microcontroller system that is running the program, when the interrupt occurs, the program will stop for a moment, serving interrupt by running a program that is at the address designated by the vector of interrupt that occurred to finish and return to continue the program was halted by an interrupt. As seen in Figure below, a program that is supposed to continue straight, suddenly interrupt occurs and must serve the first interrupt to complete before returning to continue his work.


The process is done by the microcontroller when serving an interrupt is as follows:

Last instruction being executed resolved first

Program Counter (address of the instruction in progress) is saved to the stack

Interrupt Status stored internally

Interrupt served corresponding ratings from interrupt (see Interrupt Priority)

Program Counter is loaded with the address of the interrupt vector (see Interrupt Vector) so that the microcontroller directly run programs located on the interrupt vector

The interrupt vector program usually ends with a RETI instruction at which this process occurs when the microcontroller is as follows:

Program Counter is filled with the address stored in the stack when the interrupt occurs so that the microcontroller back forward

program at the current interrupt occurs

Interrupt status is returned to the state before the interrupt


0 komentar:

Posting Komentar