
W79E804A/803A/802A
Publication Release Date: July 16, 2007
- 83 -
Revision A2
18. KEYBOARD INTERRUPT (KBI)
The W79E804 series are provided with 8 keyboard interrupt function to detect keypad status which
key is acted, and allow a single interrupt to be generated when any key is pressed on a keyboard or
keypad connected to specific pins of the W79E804 series, as shown below Figure. This interrupt may
be used to wake up the CPU from Idle or Power Down modes, after chip is in Power Down or Idle
Mode.
Keyboard function is supported through Port 0. It can allow any or all pins of Port 0 to be enabled to
cause this interrupt. Port pins are enabled by the setting of bits of KBI0 ~ KBI7 in the KBI register, as
shown below Figure. The Keyboard Interrupt Flag (KBF) in the AUXR1 register is set when any
enabled pin is pulled low while the KBI interrupt function is active, and the low pulse must more than 1
machine cycle, an interrupt will be generated if it has been enabled. The KBF bit set by hardware and
must be cleared by software. In order to determine which key was pressed, the KBI will allow the
interrupt service routine to poll port 0.
P0.7
P0.6
P0.5
P0.4
P0.3
P0.2
P0.0
KBI.0
KBI.1
P0.1
KBI.2
KBI.3
KBI.4
KBI.5
KBI.6
KBI.7
EKB
(From EIE Register)
KBF (KBI Interrupt)
Figure
18-1: Keyboard Interrupt