38.3k views
4 votes
Described how the HCS12 MCU uses a vector to find the correct interrupt service routine after an interrupt occurs.

1 Answer

6 votes

Answer:

In the HC12 MCU, the starting address of interrupts is stored in the vector table as a vector. The ISR or interrupt service routine fetches the vector of the interrupt to be executed.

Step-by-step explanation:

The HC12 or 68HC12 microcontroller was developed by Motorola, its controllers have a clock speed of between 8 to 33MHz.

The MCU stores interrupt events in a vector table where the interrupt service routine fetches enabled interrupt to execute.

When an interrupt is detected, the MCU stores all its registers in a stack to be able to return to the program it was previously running, then it disables the maskability flag register to prevent another maskable interrupt from occurring during the current interrupt execution.

The MCU interrupt service routine fetches the required interrupt from the vector table. After the interrupt is executed, the mask flag is enabled and the MCU retrieves or returns back to the previous program in the stack.

User Stanislav Mayorov
by
5.6k points