Download Print this page

Holtek BS66F340C Manual page 201

Touch a/d flash mcu

Advertisement

BS66F340C/BS66F350C/BS66F360C
Touch A/D Flash MCU
Register
Name
TKMnC0
TKMnC1
MnTSS
TKMnC2
MnSK31
• TKTMR Register
Bit
7
Name
D7
R/W
R/W
POR
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 obtained by a 5-bit counter and
equal to 32 time slot clock cycles. Therefore, the time slot counter overflow time is
equal to the following equation shown.
Time slot counter overflow time=(256-TKTMR[7:0])×32t
counter clock period.
• TKC0 Register
Bit
7
Name
TKRAMC TKRCOV
R/W
R/W
POR
0
TKRAMC: Touch key data memory access control
Bit 7
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, i.e., the
TKST bit state is changed from 0 to 1 when the TKMOD bit is cleared to 0. After the
touch key 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. 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.
TKRCOV: Touch key time slot counter overflow flag
Bit 6
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 interrupt request flag will be set.
However, if this bit is set by application program, the touch key interrupt request flag
will not be affected.This bit must be cleared to zero by application program.
In the auto scan mode, if module 0 or all module time slot counter, selected by TSCS
bit, overflows but the touch key auto scan operation is not completed, the TKRCOV
bit will not be set. At this time, all module touch key module 16-bit C/F counter, touch
key function 16-bit counter and 5-bit time slot unit period counter will be automatically
cleared but the 8-bit time slot counter will be reloaded from the 8-bit time slot counter
preload register. When the touch key auto scan operation is completed, the TKRCOV
bit and the Touch Key Module Interrupt request flag, TKMF, will be set and all module
Rev. 1.11
7
6
5
MnDFEN MnFILEN MnSOFC MnSOF2 MnSOF1 MnSOF0
MnROEN MnKOEN MnK4EN MnK3EN MnK2EN MnK1EN
MnSK30
MnSK21
MnSK20
Touch Key Function Register List
6
5
D6
D5
R/W
R/W
R/W
0
0
6
5
TKST
TKCFOV
R/W
R/W
R/W
0
0
201
Bit
4
3
2
MnSK11
MnSK10
4
3
2
D4
D3
D2
R/W
R/W
0
0
0
, where t
TSC
4
3
2
TK16OV
R/W
0
0
1
0
MnSK01
MnSK00
1
0
D1
D0
R/W
R/W
0
0
is the time slot
TSC
1
0
TKMOD
TKBUSY
R/W
R
0
0
November 09, 2023

Advertisement

loading
Need help?

Need help?

Do you have a question about the BS66F340C and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Bs66f350cBs66f360c