Hardware Interupts

Thread Starter

enjoykilian

Joined May 15, 2021
95
Hello

Iam back on my journey of learning digital electronics by building a homebrew computer.

I have an issue: i can't find any information how hardware interupts are implemented in a cpu or uC.

Could anybody help me figuring it out?
 

DickCappels

Joined Aug 21, 2008
10,175
In a simple typical case, a logic signal is received by the control circuitry in a controller, after completion of the current instruction, causes the address of the next instruction to be saved in some kind of memory (it varies), and the execution to switched to the address of an interrupt routine.

Sometimes the contents of registers other than address registers are also saved, such as status and data registers. Often status bit(s) are also set in case the interrupt routine needs to know what part of code invoked it.

After execution of the interrupt routine an instruction is usually executed to return to the code that was interrupted and if appropriate restore the values of other registers.

The signal to initiate the interrupt may come from timers, devices such as keyboards that require software to service them.

Some central processing units are able to execute software controlled interrupts, and in some cases in which that instruction is not available an I/O pin can be used by the CPU to signal a hardware interrupt.
 
Top