|
| UR5HCSPI-06 |
|
||
|
SEMTECH |
|
6 page
“GHOST” KEYS KEYBOARD SCANNER Copyright Semtech 1997-2001 DOC5-SPI-06-DS-103 www.semtech.com 6 The encoder scans a keyboard organized as an 8 row by 14 column matrix for a maximum of 112 keys. Smaller size matrixes can also be accommodated by simply leaving unused pins open. The UR5HCSPI-06 provides internal pull-ups for the Row input pins. When active, the encoder selects one of the column lines (C0-C13) every 512 µS and then reads the row data lines (R0-R7). A key closure is detected as a zero in the corresponding position of the matrix. A complete scan cycle for the entire keyboard takes approximately 9.2 mS. Each key found pressed is debounced for a period of 20 mS. Once the key is verified, the corresponding key code(s) are loaded into the transmit buffer of the SPI communication channel. N-Key Rollover In this mode, the code(s) corresponding to each key press are transmitted to the host system as soon as that key is debounced, independent of the release of other keys. When a key is released, the corresponding break code is transmitted to the host system. There is no limitation to the number of keys that can be held pressed at the same time. However, two or more key closures, occurring within a time interval of less than 5mS, will set an error flag and will not be processed. This feature is to protect against the effects of accidental key presses. Data Command Buffer The UR5HCSPI-06 implements a data buffer, which contains the key code/command bytes waiting to be transmitted to the host. If the data buffer is full, the whole buffer will be cleared and an "Initialize" command will be sent to the host. At the same time, the keyboard will be disabled until the "Initialize" or "Initialize Complete" command from the host is received. Power Management Unit In most keyboard subsystems, the power consumption is determined by the use of the LEDs. In these situations, USAR has implemeneted two modes of operation to minimize power drain. (For more information, see page 10 on the UR5HCSPI datasheet - doc5-spi-ds-100.pdf.) However, since the SPICoderTM 06 does not provide LED ouput/input, this is not a concern. In any scanned contact switch matrix, whenever three keys defining a rectangle on the switch matrix are pressed at the same time, a fourth key positioned on the fourth corner of the rectangle is sensed as being pressed. This is known as the “ghost” or “phantom” key problem. Figure 1: “Ghost” or “Phantom” Key Problem Although the problem cannot be totally eliminated without using external hardware, there are methods to neutralize its negative effects for most practical applications. Keys that are intended to be used in combinations should be placed in the same row or column of the matrix, whenever possible. Shift Keys (Shift, Alt, Ctrl, Window) should not reside in the same row (or column) as any other keys. The UR5HCSPI-06 has built-in mechanisms to detect the presence of “ghost” keys. Actual key presses “Ghost” Key |