Skip to content
Tactiverge

Olympiad · Practice · public practice problem

Polling or interrupts for a doorbell button?

Difficulty 3 of 511 points in 4 partsSuggested time ~20 min (never timed here)

The problem

A 3.3 V microcontroller draws 4 mA when awake and 2 µA asleep. Design A polls a button: it wakes every 10 ms for 0.2 ms. Design B sleeps until a button interrupt, which happens about 20 times per hour, each time awake for 5 ms.

  1. Part (a) · 3 points

    Average current of design A?

    mATolerance: ±1 %

  2. Part (b) · 3 points

    Average current of design B?

    mATolerance: ±1 %

  3. Part (c) · 2 points

    Energy design A uses per day (24 h)?

    JTolerance: ±1 %

  4. Part (d) · 3 points · rubric with 2 criteria

    Give one reason an engineer might still choose polling, and explain what it costs in latency or energy.

    Written parts stay in your browser. Reveal the worked solution to mark yourself against the rubric.

Checked so far: 0 of 8 automatically marked points, plus 3 for written parts you mark yourself against the rubric. Nothing is saved.

Stuck? Hints, then the worked solution

Written with AI assistance. Review status: technically-checked (answers recomputed independently with units verified by automated tests); not yet reviewed by an educator or judge.