The Z80 CPU is driven by two external interrupt. INT/NMI/HLT. 5 ms
The INT ($B1) register controls which interrupts are enabled:
BIT NAME Function
7 KWAIT If set, reading the keyboard will Snooze
6 A19 If set, an active high on A19 will exit Coma
5 FLAP If set, flap interrupts are enabled
4 UART If set, UART interrupts are enabled
3 BTL If set, battery low interrupts are enabled
2 KEY If set, keyboard interrupts (Snooze or Coma) are enabl.
1 TIME If set, RTC interrupts are enabled
0 GINT If clear, no interrupts get out of blink
The ACK ($B6) register is used to acknowledge and thus clear an interrupt:
BIT NAME Function
7 - -
6 A19 Acknowledge A19 interrupt
5 FLAP Acknowledge FLAP interrupt
4 - -
3 BTL Acknowledge battery low interrupt
2 KEY Acknowledge keyboard interrupt
1 - -
0 - -
The STA ($B1) register provides information about which interrupt has actually occurred:
BIT NAME Function
7 FLAPOPEN If set, flap open else flap closed
6 A19 If set, high level on A19 occurred during coma
5 FLAP If set, positive edge has occurred on FLAPOPEN
4 UART If set, an enabled UART interrupt is active
3 BTL If set, battery low pin is active
2 KEY If set, a column has gone low in snooze (or coma)
1 TIME If set, an enabled TIME interrupt is active
0 - -