
Rev. 1.10
86
March 02, 2020
Rev. 1.10
87
March 02, 2020
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
The touch key module 0 contains two touch key inputs, namely KEY1~KEY2, which are shared
with logical I/O pins, and the desired function is selected using register bits. The touch key has its
own independent sense oscillator. There are therefore two sense oscillators within the touch key
module 0.
During this reference clock fixed interval, the number of clock cycles generated by the sense
oscillator is measured, and it is this value that is used to determine if a touch action has been made
or not. At the end of the fixed reference clock time interval a Touch Key TKRCOV interrupt signal
will be generated in the manual scan mode.
The touch key module 0 16-bit C/F counter, 16-bit counter, 5-bit time slot unit period counter
in the module will be automatically cleared when the TKST bit is cleared to zero, but the 8-bit
programmable time slot counter will not be cleared. The overflow time is setup by user. When the
TKST bit changes from low to high, the 16-bit C/F counter, 16-bit counter, 5-bit time slot unit period
counter and 8-bit time slot timer counter will be automatically switched on.
The key oscillator and reference oscillator in the module 0 will be automatically stopped and the 16-
bit C/F counter, 16-bit counter, 5-bit time slot unit period counter and 8-bit time slot timer counter
will be automatically switched off when the time slot counter overflows. The clock source for the
time slot counter is sourced from the reference oscillator or f
LIRC
which is selected using the M0TSS
bit in the TKM0C1 register. The reference oscillator and key oscillator will be enabled by setting the
M0ROEN bit and M0KOEN bits in the TKM0C1 register.
When the time slot counter in the touch key module 0 overflows, an actual touch key TKRCOV
interrupt will take place. The touch keys mentioned here are the keys which are enabled.
Auto Scan Mode
There are three scan modes contained for the touch key function. The auto scan mode, the periodic
auto scan mode and the manual scan mode are selected using the TKMOD1~TKMOD0 bits in the
TKC0 register. The auto scan mode can minisize the load of the application program and improve
the touch key scan operation performance. When the TKMOD1~TKMOD0 bits are set to 00,
the auto scan mode is selected to scan the module keys in a specific sequence determined by the
M0SK10 and M0SK00 bits in the TKM0C2 register.
TKST
Touch Key
Module 0
Time slot 0
Time slot 1
TKBUSY
TKRCOV
Cleared by software
Time slot 1
Touch Key
Register Access
: Set Touch Key TKRCOV interrupt request flag
: Read 2 bytes from TKM0KnROCH/TKM0KnROCL registers
: Write 2 bytes from TKM016DH/TKM016DL registers to TKM0KnCNTH/TKM0KnCNTL registers
Key Auto Scan
Cycle
Time slot 0
Touch Key Auto Scan Mode Timing Diagram