//INTEGRAS/ELS/PAGINATION/ELSEVIER UK/PLC/3B2/FINALS-7-6-04/ 0750656794-CH031.3D – 315 – [315–323/9]
19.6.2004 9:22PM
31
Interrupts
Aninterruptisaninputsignal,whichhaltstheexecutionofthemainprogramandthen
immediatelyjumpstoaninterruptserviceroutine(ISR).
TheISRcarriesoutaspecifictaskandthenreturnsbacktothemainprogram.
However,themaindifferencebetweenaninterruptandasub-routineCALListhat
aninterruptcanoccuratanytimeduringtheexecutionofthemainprogram,whereasa
sub-routineCALLcanonlybecarriedoutwhen,duringthescantimeofthemain
program,theCALLInstructionisexecuted.
Ifitisnecessarytotakeimmediateactionintheeventofaparticularinputsignal
beingoperated,thentheuseofaninterruptshouldbeconsidered.
However,ifimmediateactionwererequiredintheeventofanemergencystop
situati ...