Introduction To Microcontrollers
Introduction To Microcontrollers
•An interrupt is a signal that temporarily halts the execution of the main program.
•It allows the microcontroller to respond to external or internal events without continuous polling.
•After handling the interrupt, the MCU resumes normal operation.
WHY ARE INTERRUPTS NEEDED?
•External Interrupts:
•Triggered by external events (button press, sensor input).
•Internal Interrupts:
•Generated by internal peripherals (timer overflow, ADC
conversion complete).
•Software Interrupts:
•Manually triggered by software instructions
INTERRUPT VS. POLLING
Power Consumption Low (sleeps when idle) High (active all the time)