Interrupts in Microcontroller | what is an Interrupt | Interrupts in Embedded System

Опубликовано: 06 Май 2026
на канале: Know about Embedded System
1,411
35

An interrupt is a hardware or software signal that temporarily pauses the microcontroller's current task to execute a specialized function called an Interrupt Service Routine (ISR). Once the ISR finishes, the microcontroller resumes its main program exactly where it left off

Core Components
Interrupt Request (IRQ): The incoming signal that triggers the interruption.
Interrupt Service Routine (ISR): Code specifically written to handle a particular event (e.g., stopping a motor if a sensor detects heat).
Interrupt Vector Table (IVT): A fixed memory map containing the addresses of all ISRs.
Priority: A system that determines which event to handle first if multiple interrupts occur simultaneously.

Types of Interrupts
Hardware Interrupts: Triggered by external pins (e.g., button press) or internal peripherals (e.g., timer overflow).
Software Interrupts: Triggered by specific instructions within the program or by errors like "divide by zero".
Maskable vs. Non-Maskable: Maskable interrupts can be ignored or disabled by software; Non-Maskable Interrupts (NMI) are critical and cannot be ignored (e.g., power failure).

Standard Execution Steps
Current Instruction: The CPU finishes its current machine-level instruction.
Context Saving: The current Program Counter (PC) and Status Register are saved to the Stack.
Branching: The CPU jumps to the ISR address found in the Interrupt Vector Table.
Service: The ISR code executes and concludes with a RETI (Return from Interrupt) instruction.
Restore: The saved PC and status are "popped" from the stack, and the main program resumes.

Polling vs. Interrupts
Polling: The CPU constantly checks a status flag in a loop. This is inefficient as it wastes CPU cycles.
Interrupt: The CPU only reacts when an event occurs, allowing it to perform other tasks or stay in a low-power mode until needed

💡 You’ll Learn:
✅ Definition and need of interrupts
✅ Hardware vs Software interrupts
✅ Interrupt vector table
✅ ISR execution process
✅ Interrupt priority

Chapters:-
00:00 Introduction
00:40 What is an Interrupt
02:00 How Interrupt Mechanism works
05:43 ISR Interrupt Service Routine
06:15 Interrupt Controller
06:35 Interrupt Vector Table
07:05 Context Store
07:19 Context restore
07:40 Hardware Interrupts
07:58 Software Interrupts
08:20 External Interrupts
08:45 Internal Interrupts
09:03 Maskable Interrupts
09:20 Non Maskable Interrupts
09:42 Vectored Interrupts
10:12 Non vectored Interrupts
10:50 Fixed Priority
11:22 Dynamic Priority
11:55 Priority Masking
12:26 Round Robin Priority

If you have any questions please write to us
email: [email protected]

Like, Share, and Subscribe for more tutorials on Embedded Systems and Microcontrollers.

-------------------------------------------------------------------------------------------------------------------------------------------------------------
Your Questions:-
Interrupts in PIC Microcontrollers
What is Interrupt
What is an interrupt and how is it handled in embedded C?
What is meant by interrupt service routine?
How To Enable External Interrupt
Interrupt service routine in C
What is ISR in microprocessor
Interrupt service routine example
Interrupt Service routine in embedded system
Interrupt service routine diagram
Interrupt vector table in ARM processor
Interrupts in 8051 microcontroller
What is interrupt service routine in operating system
Microcontroller pin interrupts
Interrupt handler
Interrupts & How do they work?
Interrupts in PIC Microcontrollers
Microcontroller interrupt working
What is a microcontroller Interrupt?
Interrupts in Microcontrollers
Programming serial communication interrupts
Programming external hardware interrupts
Understanding Interrupts in Embedded Systems
All about Interrupts with Examples
What does an interrupt vector table do?
What is a vector table in a microprocessor?
What is ISR and IVT?
Where is interrupt vector table stored
What is a vector table in a microprocessor?
What is a vector interrupt?
Interrupt Vector table Diagram
Interrupt vector table example

-------------------------------------------------------------------------------------------------------------------------------------------------------------
#interrupts #interruptvectortable #nvic #interruptserviceroutine #EmbeddedC #LPC1768#Microcontroller #EmbeddedSystems #32bitMCU