Caffeinated Coder
Book an appointment
Lesson 34 · Build a processor

Interrupts and I/O: how devices get the CPU's attention

A CPU has to deal with devices that need attention at moments it cannot predict: a keyboard, a timer, a network card. Watch TINY-8 poll its keyboard port over and over, then see the better way: the keyboard raises an interrupt line, the CPU finishes its instruction, saves the PC, runs a two-line handler and returns. Finish with timer interrupts and DMA, which copies data into memory without the CPU.

12 min11 steps5 questionsIntermediate
Fig 34 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.