Rev. 1.60 188 August 20, 2019 Rev. 1.60 189 August 20, 2019
BS66F340/BS66F350/BS66F360/BS66F370
Touch A/D Flash MCU with LED Driver
BS66F340/BS66F350/BS66F360/BS66F370
Touch A/D Flash MCU with LED Driver
Register
Name
Bit
7 6 5 4 3 2 1 0
TKTMR D7 D6 D5 D4 D3 D2 D1 D0
TKC0 TKRAMC TKRCOV TKST TKCFOV TK16OV — TKMOD TKBUSY
TKC1 D7 D6 D5 TSCS TK16S1 TK16S0 TKFS1 TKFS0
TK16DL D7 D6 D5 D4 D3 D2 D1 D0
TK16DH D15 D14 D13 D12 D11 D10 D9 D8
TKMn16DL D7 D6 D5 D4 D3 D2 D1 D0
TKMn16DH D15 D14 D13 D12 D11 D10 D9 D8
TKMnROL D7 D6 D5 D4 D3 D2 D1 D0
TKMnROH — — — — — — D9 D8
TKMnC0 — — MnDFEN D4 MnSOFC MnSOF2 MnSOF1 MnSOF0
TKMnC1 MnTSS — MnROEN MnKOEN MnK4EN MnK3EN MnK2EN MnK1EN
TKMnC2 MnSK31 MnSK30 MnSK21 MnSK20 MnSK11 MnSK10 MnSK01 MnSK00
Touch Key Function Registers 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 proload register
The touch key time slot counter proload register is used to determine the touch key
time slot overow time. The time slot unit period is obtained by a 5-bit counter and
equal to 32 time slot clock cycles. Therefore, the time slot counter overow time is
equal to the following equation shown.
Time slot counter overow time= (256 - TKTMR[7:0])
×
32 t
TSC
, where t
TSC
is the time
slot counter clock.
• TKC0 Register
Bit 7 6 5 4 3 2 1 0
Name TKRAMC TKRCOV TKST TKCFOV TK16OV — TKMOD TKBUSY
R/W R/W R/W R/W R/W R/W — R/W R/W
POR 0 0 0 0 0 — 0 0
Bit 7 TKRAMC: Touch key Data RAM access control
0: Accessed by MCU
1: Accessed by Touch key module
This bit determines that the touch key RAM is used by the MCU or touch key
module. However, the touch key module will have the priority to access the touch
key RAM when the touch key module operates in the auto scan mode, i.e., the TKST
bit state is changed from 0 to 1 when the TKMOD bit is set low. After the touch key
auto scan operation is completed, i.e., the TKBUSY bit state is changed from 1 to 0,
the touch key RAM 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. Otherwise, the contents of the touch key RAM may be modied as
this RAM space is congured by the touch key module followed by the MCU access.
Bit 6 TKRCOV: Touch key time slot counter overow ag
0: No overow occurs
1: Overow occurs