Explore

RPi Pico: Interrupts, GPIO & Computer Architecture

by turhan-ergene

Polling vs interrupts, the IRQ vector, PC/LR/SP, and the buses that move data around a CPU — the theory half of 1DT301's Pico labs, the part that is easy to skip past while your LEDs are blinking.

You're previewing this room. Log in or create a free account to answer the questions and track your progress.
Study material

A polling loop asks "has it happened yet?" over and over, burning cycles on every question that comes back no. An interrupt flips that around: the hardware itself signals the CPU only at the moment something actually happens, so the CPU is free to do anything else in between.

What is the key difference between polling and using an interrupt to detect a button press?

multiple choice

Polling repeatedly checks the input in a loop, spending CPU time even when nothing is happening; an interrupt lets the CPU do other work and only reacts when the button is actually pressed
Interrupts check the input in a loop; polling reacts only when needed
They are two names for the same technique
Polling only works with pushbuttons, interrupts only work with timers
Log in to answer

Ready to test yourself?

Sign up free to answer, score points, and build your streak.