English
Language : 

N79E845 Datasheet, PDF (84/183 Pages) List of Unclassifed Manufacturers – Microcontroller
N79E845/844/8432 Data Sheet
14 Keyboard Interrupt (KBI)
The N79E845/844/8432 provides the 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
N79E845/844/8432, as shown in the following figure. This interrupt may be used to wake up the CPU from Idle or Power-
down mode, 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 inter-
rupt. Port pins are enabled by the setting of bits of KBI0 ~ KBI7 in the KBI register, as shown in the following figure. The
Keyboard Interrupt Flag, KBIF[7:0] in the KBIF(EAH), is set when any enabled pin is triggered while the KBI interrupt
function is active, an interrupt will be generated if it has been enabled. The KBIF[7:0] bit is set by hardware and should be
cleared by software. To determine which key was pressed, the KBI will allow the interrupt service routine to poll port 0.
KBI supports four triggered conditions - low level, falling edge, rising edge and either rising or falling edge detection.
The triggered condition of each port pin is individually controlled by two bits KBLS1(ECH).x and KBLS0(EBH).x where
x is 0 to 7. After Trigger occurs and two machines pass, KBIF assert.
KBI is generally used to detect an edge transient from peripheral devices like keyboard or keypad. During idle state, the
system prefers to enter Power-Down mode to minimize power consumption and waits for event trigger. The
N79E845/844/8432 supports KBI interrupt waking up MCU from Power down. Note that if KBI is selected as any of edge
trigger mode, restrictions should be followed to make Power down woken up valid. For a falling edge waking up, pin state
should be high at the moment of entering Power-Down mode. Respectively, pin state should be low for a rising edge wak-
ing up.
April 23 2014
Page 84 of 183
Revision A2.6