Key-Scan
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
319
KEYSCAN
KeyValue
file1
SCAN_FSM
KeyValue
file2
Column
Output
Generator
&
Index
counter
Register file1
Register file2
M
U
X
row_input
scan_finish
sync_FIFO
CONTROL_FSM
APB (10M)
Clock&reset
Low power clock (32K/131K)
async_interrupt
Sync
interrupt
Row input
EVENT_LOGIC
COLUMN
PINMUX
ROW
PINMUX
APB
PMC
interrupt
Release timer
Interval timer
Debounce timer
Event Register file
keyscan_reg
clk_rst
Bus clock domain
Low power clock domain
Fig 16-7 Clock domain diagram
The Key-Scan trigger signal is generated by lower frequency (32K/131K). When low power clock detected a key press, hardware starts scan by
scan clock to confirm the key values.
16.2.5
Shadow Key Problem
Ameba-D supports multiple key presses detect accurately. Applications requiring three-key combinations (such as <Ctrl><Alt><Del>, or any
other combinations) must ensure that the three keys are wired in appropriate key positions to avoid shadow key (or appearing like a 4th key
has been pressed).
To avoid shadow key, it is best to keep 3-button combinations that are pressed on separate rows and columns. Consider the situation with the
keypad described in Fig 16-8.
In the keypad setup in Fig 16-8, there is a 4*3 keypad matrix, connected to Row0 ~ Row3, and Column0 ~ Column2. All of the rows are
configured as inputs with pull up resistors. The columns are configured as outputs, driving low. When a key press is made, one of the row
inputs is pulled low, letting the RTL8721D know that a key has been pressed, and the RTL8721D then starts the key scanning algorithm. During
this algorithm, it sweeps the output low across the columns, such that only 1 column is driven low at a time. While this is done to each column,
the RTL8721D reads the row inputs, to determine which keys on a column are being pressed.
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03