English
Language : 

MG69L331 Datasheet, PDF (23/28 Pages) Megawin Technology Co., Ltd – Single Chip 8-bit CPU
MG69L331 Datasheet
Version 2.0
14 TK-SCAN
TK-scan Register
Address
Name
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 R W
00FBH TKSCAN CI3 CI2 CI1 CI0 SO3 SO2 SO1 SO0  -
MG69L331 built in low speed T type key-scan hardware. It can be used to scan keypad by hardware with less I/O
pin counts than matrix type key-scan. This function only will be active automatically when this chip is setting into
stop mode.
In stop mode, the P0.0~P0.7 and P1.0~P1.2 will output a low scan pulse in order. When a key is pressed, the
MG69L331 will be woken up. The encoded scan key output code is stored in SO3~SO0, encoded scan key
capture code is stored in CI3~CI0. Reading the SO3~SO0 and CI3~CI0 can decide which key is pressed. The
TKSCAN SFR will be cleared by hardware reset.
The scan output mapping table is shown as below:
SO3~SO0 Output Code
Output Low I/O Pin
0000
P0.0
0001
P0.1
0010
P0.2
…
…
1001
P1.1
1010
P1.2
The capture input mapping table is shown as below:
CI3~CI0 Capture Code
Input Low I/O Pin
0000
P0.0
0001
P0.1
0010
P0.2
…
…
1001
P1.1
1010
P1.2
This document information is the intellectual property of Megawin Technology.
 Megawin Technology Co., Ltd. 2011 All right reserved.
QP-7300-03D
23/28