Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/20/02 08:12
Read: times


 
#29420 - RE: My first attempt at using interupts
Whats an interupt vector? :-)
Interrupt vector is the address of first instruction of the interrupt service routine.
ISR must end with RETI to indicate to the ucontroller that ISR has finished and returns control to the previous program that got interrupted.
interrupt service routine is like any other function you write in your program, the only difference is that your functions are called by software from your program or other functions, while interrupt gets called by hardware, ie INTx pin goes low, serial port received a char, timer overflowed etc. You see the beauty of interrupts is that when they occur the normal program execution gets interrupted, ISR gets executed till RETI instruction, then program continues where it stopped. the address of of next instruction of normal program is pushed on the stack once the interrupt service routine is executed, at its exit the address of normal program is poped from the stack and it continues normal execution.
As in your IR example, you don't know when the IR pulse is detecte, this way interrupt is most useful because once the start bit is detected, the interrupt takes over almost immediatly and deals with it (ie starts measuring )
Mahmood



List of 13 messages in thread
TopicAuthorDate
My first attempt at using interupts :-(            01/01/70 00:00      
RE: My first attempt at using interupts            01/01/70 00:00      
RE: My first attempt at using interupts            01/01/70 00:00      
RE: My first attempt at using interupts            01/01/70 00:00      
RE: My first attempt at using interupts            01/01/70 00:00      
RE: My first attempt at using interupts            01/01/70 00:00      
RE: My first attempt at using interupts :-(            01/01/70 00:00      
RE: My first attempt at using interupts            01/01/70 00:00      
RE: My first attempt at using interrupts            01/01/70 00:00      
RE: My first attempt at using interupts            01/01/70 00:00      
RE: more            01/01/70 00:00      
RE: My first attempt at using interupts            01/01/70 00:00      
RE: My first attempt at using interupts            01/01/70 00:00      

Back to Subject List