Ameba-D User Manual
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
314
16
Key-Scan
16.1
Overall Description
16.1.1
Application Scenario
As a keypad scan device, Key-Scan can be applied to simple key, remote control or even game pad. It needs to scan the operations of key press
and release accurately and timely.
The major benefit of this device is to free up the CPU from scanning the keypad all the time. It triggers the corresponding interrupts to inform
CPU in time. In addition, chip can enter low-power state in most of time, and take little time to wake up and handle the key events.
16.1.2
Features
Up to 6 *6 (36) keypad array with use of 12 GPIOs
Configurable rows and columns of keypad array
Hardware debounce with configurable time at each scan
Configurable Scan Clock, Scan Interval, and Release Time
Interrupts, interrupts mask, interrupts clear, interrupts status
Multi-key detect
FIFO with width of 12 bits and depth of 16 to store Key Press and Release Events
Two work modes: Event (Press and Release) Trigger Mode and Regular Scan Mode (high priority)
Low power mode: Key press event can wakeup CPU from sleep
16.2
Functional Description
16.2.1
Block Diagram
The block diagram of Key-Scan is shown in Fig 16-1.
Ameba-D
Keyscan Control
Wake-up
Control
Input/Output
Control
Keypad control
32K clock
Control
Register and
FIFO
Interrupt
Control
CM0/CM4
Keypad
pclk
Fig 16-1 Key-Scan block diagram
The typical application setup is shown in Fig 16-2 (take 6*6 keypad array for example), external keypad is needed.
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03