English
Language : 

W79E825A Datasheet, PDF (89/127 Pages) Winbond – 8-BIT MICROCONTROLLER
W79E825A/824A/823B/822B Data Sheet
18 KEYBOARD INTERRUPT (KBI)
The W79E825 series are provided 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 W79E825 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 by 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 be 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
KBI.7
P0.6
KBI.6
P0.5
KBI.5
P0.4
KBI.4
P0.3
KBI.3
P0.2
KBI.2
P0.1
KBI.1
P0.0
KBI.0
EKB
(From EIE Register)
KBF (KBI Interrupt)
Figure 18-1: Keyboard Interrupt
- 89 -
Publication Release Date: February 21, 2008
Revision A9