FEDL9092-01
OKI Semiconductor
ML9092-01/02/03/04
Key Scan
The key scanning starts when a key switch is pressed on and ends after all key switches are detected to be off.
After the key switch is turned on, when the same key is pressed for two cycles or more, the level of the KREQ
signal changes from a “L” to “H” level. In the same manner, the level of the KREQ signal changes from “H” to
“L” two cycles after all key switches are turned off.
This signal can be used as a flag. To use it as a flag, start key-scan reading when the KREQ signal has changed
from “L” to “H.”
While the KREQ signal is at a “H” level, carry out key-scan reading periodically. Carry out key scan reading also
when the KREQ signal has changed from “H” to “L”.
The KREQ signal (the KREQ signal that is sent when the key switch is turned on) is reset when all key switches are
detected to be off or when a “L” level is applied to the RESET pin.
Key switch
R0/C0
R1/C1
R2/C2
R3/C3
R4/C4
Key switch ON.
Scanning starts.
Scanning stops
Key data reading
starts
Key switch OFF
KREQ
Notes:
1. Even when the KREQ signal changes from “L” to “H”, chattering for more than one key scan cycle is
not absorbed. This should be handled by multiple data reads by software.
2. How simultaneous depression of two keys is processed should be handled by software.
3. When three or more key switches are pressed at the same time, the device may recognize that
key(s) that has not been actually pressed has been pressed. Therefore, to recognize simultaneous
depression of three or more key switches, add a diode in series to each key (see Figures 1 and 2).
To ignore simultaneous depression of three or more key switches, a program may be required to
ignore all key data which contains three or more consecutive “1” values.
43/66