ML51/ML54/ML56
Sep. 01, 2020
Page
672
of 719
Rev 2.00
ML
51
/ML
54
/ML
5
6 S
E
RI
E
S
TECHNI
CA
L
RE
F
E
R
E
NC
E
M
A
NU
A
L
ML51/M
L54
/M
L56
Series
Tec
hnical Reference
Manual
Touch Key Scan Mode
6.19.5.2
Single Scan Mode
In this mode, user must set TK_EN (TKCON0[2]) and SCAN (TKCON0[0]) to high and other bits of
TKSENx~TKRENx must be set according to application requirements for sensitivity setting. Those
channels enabled by corresponding bits of TKSENx register will be scanned successively when scan
initiate. Once channel scanning starts, TKBUSY (TKSTA0[0]) will be set until the scanning is
complete. The TKSCIF (TKSTA0[1]) register will be set when channel scanning completed and the
sensed data in TKDATx registers is valid for reading, according to those channels enabled in
TKSENx, x denotes number 0 to 14. TKSCIF (TKSTA0[1]) can generate interrupt by setting TKSCIE
(TKINTEN[1]) register to high.
Periodic Scan Mode
This mode supports automatic scanning periodically. User can set TK_EN (TKCON0[2]) and
TMRTRG_EN (TKCON0[1]) to high. In addition to set other bits of TKSENx~TKRENx according to
application requirements, user must set RTC Time Stick properly for determining period between
scanning. Besides, user can apply wake-up function to key scanning in a low power system. By setting
threshold control properly, periodic scanning keeps even system is in sleep state, and until the system
waked-up by interrupt which means whether a finger-touch is met the threshold or not. Key scanning
stops until the interrupt flags reset.
Reference Channel for Touch Key Scanning
6.19.5.3
There must be one channel at least as reference channel which PCB layout has special concern.
TK14 is assigned as default reference channel automatically if there is no reference channel internl
source assigned by user. Touch Key controller malfunctions without assigning physical reference
channel(s) to pin(s) in the application.
Idle State and Polarity Control
6.19.5.4
Those keys-pads are not being sensed always keep in Idle-State, their output level can be pre-
determined in IDLSx(TKIDLPOLx[1:0]). For another sensing configuration, their output level is
separated to two states: Idle-state and Polarity-State if their polarity control is activated in
POLENx(TKIDLPOLx[4]). Their output level is pre-determined in POLx(TKIDLPOLCx[3:2]).
Sensing Time
6.19.5.5
Sensing Time is the time needed for each key-pad sensing, it is composed of PULSET (TKCON1[6:4])
and SENSET (TKCON1[2:0]). Shorter Sensing Time comes with poor sensitivity and less power-
consumption, vice versa.
Sensing Time = SENSET x PULSET
Sensitivity Configuration
6.19.5.6
Sensitivity can be adjusted by setting Sensing Time properly. Besides, select capacitor bank polarity
source properly which pre-determined in POL_CAP (TKCON2[1:0]) also affects sensitivity. User can
choose AV
DD
H as capacitor bank polarity source to have more sensitivity choice by programming
AV
DD
H to proper level, which is pre-determined in AV
DD
H_S (TKCON0[7:4]).
Scan Interrupt Type
6.19.5.7
Scan Complete without Threshold Control Interrupt
TKSCIF (TKSTA0[1]) is always set when key-scan is complete. An interrupt is generated if TKSCIE
(TKINTEN[1]) is set.
Scan Complete with Threshold Control Interrupt
Differ to TKSCIF (TKSTA0[1]), TKIFx (TKSTA1[7:0], TKSTA2[6:0]) is set if and only if corresponding
scan result met its threshold control requirement. Besides, set TKSCTHIE (TKINTEN[0]) rather than
TKSCIE (TKINTEN[1]) to generate interrupt when a potential key touch/release is detected. The high