Rev. 1.00
64
March 24, 2020
Rev. 1.00
65
March 24, 2020
BS83A04C
4-Key Enhanced Touch I/O Flash MCU
BS83A04C
4-Key Enhanced Touch I/O Flash MCU
Register
Name
Bit
7
6
5
4
3
2
1
0
TKM0C0
—
—
M0DFEN
—
M0SOFC
M0SOF2
M0SOF1
M0SOF0
TKM0C1
M0TSS
—
M0ROEN
M0KOEN
M0K4EN
M0K3EN
M0K2EN
M0K1EN
TKM0C2
M0SK31
M0SK30
M0SK21
M0SK20
M0SK11
M0SK10
M0SK01
M0SK00
TKM0TH16L
D7
D6
D5
D4
D3
D2
D1
D0
TKM0TH16H
D15
D14
D13
D12
D11
D10
D9
D8
TKM0THS
M0K4THF M0K3THF M0K2THF M0K1THF M0K4THS M0K3THS M0K2THS M0K1THS
Touch Key Function Register List
• TKTMR Register
Bit
7
6
5
4
3
2
1
0
Name
D7
D6
D5
D4
D3
D2
D1
D0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
0
0
0
0
0
0
0
0
Bit 7~0
D7~D0
: Touch key time slot 8-bit counter preload register
The touch key time slot counter preload register is used to determine the touch key
time slot overflow time. The time slot unit period is equal to t
STC
or 32t
STC
. It can
be obtained by a 5-bit counter and equal to 32 time slot clock cycles. It also can be
obtained by bypassing a 5-bit counter and equal to 1 time slot clock cycle. Therefore,
the time slot counter overflow time is equal to the following equation shown.
If M0TSS=0, Time slot counter overflow time=(256-TKTMR[7:0])×32t
TSC
, while if
M0TSS=1, Time slot counter overflow time=(256-TKTMR[7:0])×t
TSC
, where t
TSC
is
the time slot counter clock period.
• TKC0 Register
Bit
7
6
5
4
3
2
1
0
Name
TKRAMC TKRCOV
TKST
TKCFOV TK16OV TKMOD1 TKMOD0 TKBUSY
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R
POR
0
0
0
0
0
0
1
0
Bit 7
TKRAMC
: Touch key data memory access control
0: Accessed by MCU
1: Accessed by touch key module
This bit determines that the touch key data memory is used by the MCU or the touch
key module. However, the touch key module will have the priority to access the touch
key data memory when the touch key module operates in the auto scan mode or the
periodic auto scan mode, i.e., the TKST bit state is changed from 0 to 1 when the
TKMOD1~TKMOD0 bits are set to 00, 10 or 11. After the touch key auto scan or
the periodic auto scan operation is completed, i.e., the TKBUSY bit state is changed
from 1 to 0, the touch key data memory access will be controlled by the TKRAMC
bit. Therefore, it is recommended to set the TKRAMC bit to 1 when the touch key
module operates in the auto scan mode or the periodic auto scan mode. Otherwise, the
contents of the touch key data memory may be modified as this data memory space is
configured by the touch key module followed by the MCU access.
Bit 6
TKRCOV
: Touch key time slot counter overflow flag
0: No overflow occurs
1: Overflow occurs
This bit can be accessed by application program. When this bit is set by touch key
time slot counter overflow, the corresponding touch key TKRCOV interrupt request
flag will be set. However, if this bit is set by application program, the touch key
TKRCOV interrupt request flag will not be affected. Therefore, this bit can not be set
by application program but must be cleared to 0 by application program.