← Mechatronics Studio
Concept Explainer · Mechatronics

Interrupts vs. Polling

Two ways an embedded system notices something happened. One keeps asking. The other gets tapped on the shoulder.

Every microcontroller eventually has to answer the same question: how do I know when a pin changes state, a timer expires, or a byte arrives on a UART line? There are exactly two strategies. Polling has the main loop actively check, over and over, whether anything happened. Interruptsflip that around — the hardware itself taps the CPU on the shoulder the instant the event occurs. They sound like a minor implementation detail. In practice, the choice changes what your firmware can and can't reliably detect.