When we Unlock NXP P87LPC767 Internal Memory Heximal, there is a lot of chances to use the Keyboard Interrupt (KBI) when any key is pressed on a keyboard or keypad connected to specific pins of the P87LPC767. This interrupt may be used to wake up the CPU from Idle or Power Down modes. This feature is particularly useful in handheld, battery powered systems that need to carefully manage power consumption yet also need to be convenient to use.
The P87LPC767 allows any pin of port 0 to be enabled to cause this interrupt. Port pins are enabled by the setting of bits in the KBI register, as shown in 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 when Unlock NXP P87LPC767 Internal Memory Heximal. An interrupt will generated if it has been enabled. Note that the KBF bit must be cleared by software.
Due to human time scales and the mechanical delay associated with keyswitch closures, the KBI feature will typically allow the interrupt service routine to poll port 0 in order to determine which key was pressed, even if the processor has to wake up from Power Down mode. Refer to the section on Power Reduction Modes for details.