Polling vs. interrupts
Software must repeatedly check for the brake pedal port
Use automatic detection capability of processor
Connect brake pedal to interrupt port or input capture port
- register interrupt handler
- poke (InterruptVector, brakePedalHandler)
- interrupt handler
- brakePressed = true
- poke (InterruptReg, ClearInterruptFlag)