Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Describe the interrupt vector and interrupt service routine of a microcontrol

ID: 3845926 • Letter: 1

Question

1. Describe the interrupt vector and interrupt service routine of a microcontroller.

2. What is the difference between a subroutine and an interrupt service routine?

3. What are differences between software and hardware interrupts?

4. What is the difference between maskable and nonmaskable interrupts?

5. What are interrupt priority?

6. Describe the basic procedures for programming output compare using interrupt method.

7. Describe the basic procedures for programming input capture using interrupt method.

Explanation / Answer

Answer:

1)interrupt vector:

An interrupt vector is the memory location of an interrupt handler, which prioritizes interrupts and saves them in a queue if more than one interrupt is waiting to be handled.

->An interrupt vector is an important part of interrupt service mechanism, which associates a processor. Processor first saves program counter and/or other registers of CPU on interrupt and then loads a vector address into the program counter.

->Vector address provides either the ISR or ISR address to the processor for the interrupt source or group of sources or given interrupt type.

interrupt service routine:

an interrupt handler, also known as an interrupt service routine or ISR, is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, software interrupt instructions, or software exceptions, and are used for implementing device drivers or transitions between protected modes of operation, such as system calls.

-> an interrupt service routine (ISR), is a callback subroutine in an operating system or device driver whose execution is triggered by the reception of an interrupt.

Step in executing an Interrupt:

1) It finish the instruction it is executing and saves the address of the next instruction (PC) on the stack.

2) It also saves the current status of all the interrupt internally.

3) It Jumps to a fixed location in memory called the interrupt vector table that holds the address of the interrupt service routine.

4) The microcontroller gets the address of the ISR from the interrupt vector and jumps to it. It starts to execute the interrupt service subroutine until it reaches the last instruction of the subroutine.

5) Upon executing the RETI instruction ,the microcontroller returns to the Place where it was interrupt