
Rev. 1.10
102
March 02, 2020
Rev. 1.10
103
March 02, 2020
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
In the periodic auto scan mode the touch key scan operation will be implemented automatically on
a periodic basis, which can be determined by the ASMP1~ASMP0 bits in the TKC2 register. The
number of touch key scan times depends upon the WDT time-out period and the periodic auto scan
mode period. Each auto scan operation will sequentially be carried out in a specific way from time
slot 0 to time slot 3 like the auto scan mode. The reference oscillator internal capacitor value for each
time slot selected key will be read from the touch key data memory and loaded into the TKM0ROH/
TKM0ROL registers. However, only at the end of the last scan operation in the WDT time-out cycle,
the 16-bit C/F counter value for all scanned keys will be written into the corresponding touch key
data memory.
In addition, the 16 bit upper/lower threshold value for the selected key to be scanned in the time slot
0 will be read from a specific location of the dedicated touch key data memory and loaded into the
corresponding TKM0TH16H/TKM0TH16L registers before the selected key will start to be scanned
in time slot 0. The TKM0TH16H/TKM0TH16L register pair will be loaded with the corresponding
next time slot 16-bit upper/lower threshold value from the dedicated touch key data memory
automatically by the hardware at the end of the current time slot when the periodic auto scan mode
is selected. each touch key has its own independent upper/lower threshold comparator. The upper/
lower threshold comparison function will automatically be enabled in the periodic auto scan mode.
When any key C/F counter value is less than the lower threshold if M0KnTHS=0, or larger than the
upper threshold if M0KnTHS=1, this indicates that the touch key state changes, then the M0KnTHF
flag will be set high by the hardware, and an interrupt signal will be generated. Note that if the
touch key threshold TKTH interrupt occurs, 1-byte data will be written to the TKM0ROL register
because the TKM0ROH/TKM0ROL register pair will be loaded with the corresponding next time
slot capacitor value from the dedicated touch key data memory and the 16-bit C/F counter content,
TKM016DH/TKM016DL, and the TKM0TH16H/TKM0TH16L value are compared at the same
time.
As the periodic auto scan operation is implemented using the WDT counter clock to reduce power
consumption, when the WDT is cleared the WDT counter will be reset, the periodic auto scan
operation time will be affected but the number of touch key times will not be affected.
Touch Key Data Memory
The device provides three dedicated Data Memory area. The first area is used to store the 16-bit C/
F counter values of the touch key module and located in Data Memory Bank 5, The second area is
used to store the reference oscillator internal capacitor values of the touch key module and located
in Data Memory Bank 6. The last area is used to store the 16-bit upper/lower threshold value of the
touch key module and located in Data Memory Bank 7.
10-bit Ref. OSC capacitor
16-bit C/F counter
Comparetor
Upper/Low side
threshold Register
TKTH
M0KnTHS
TKM0ROH/TKM0ROL
TKM016DH/TKM016DL
TKM0TH16H/TKM0TH16L
16-bit C/F counter value
(Bank 5)
Ref. OSC Capacitor value
(Bank 6)
00H
01H
02H
TKM016DL_K1
TKM016DH_K1
TKM016DL_K2
TKM016DH_K2
TKM016DL_K3
TKM016DH_K3
TKM016DL_K4
TKM016DH_K4
Module 0
TKM0ROL_K1
TKM0ROH_K1
TKM0ROL_K2
TKM0ROH_K2
TKM0ROL_K4
TKM0ROH_K4
TKM0ROL_K3
TKM0ROH_K3
Upper/Low Side Threshold Value
(Bank 7)
TKM0TH16L
_
K1
TKM0TH16H_K1
TKM0TH16L_K2
TKM0TH16H_K2
TKM0TH16L_K4
TKM0TH16H_K4
TKM0TH16L_K3
TKM0TH16H_K3
07H
Touch Key Register Memory Map