Rev. 1.00
66
March 24, 2020
Rev. 1.00
67
March 24, 2020
BS83A04C
4-Key Enhanced Touch I/O Flash MCU
BS83A04C
4-Key Enhanced Touch I/O Flash MCU
In the auto scan mode, if the time slot counter overflows but the touch key auto scan
operation is not completed, the TKRCOV bit will not be set. At this time, the 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 TKRCOV Interrupt
request flag, TKRCOVF, will be set and all module keys and reference oscillators
will automatically stop. The touch key module 16-bit C/F counter, touch key function
16-bit counter, 5-bit time slot unit period counter and 8-bit time slot counter will be
automatically switched off.
In the periodic auto scan mode, the TKRCOV bit is cleared to zero during the auto
scan operation period. Only at the end of the last scan operation in the WDT time-
out cycle, the 16-bit C/F counter content will be written into the corresponding touch
key data memory, and then the TKRCOV bit will be set high by the hardware circuit.
The other actions in this mode are the same as those in the auto scan mode except the
above mentioned.
In the manual scan mode, if the time slot counter overflows, the TKRCOV bit and the
Touch Key TKRCOV Interrupt request flag, TKRCOVF, will be set and all module
keys and reference oscillators will automatically stop. The touch key module 16-bit C/
F counter, touch key function 16-bit counter, 5-bit time slot unit period counter and
8-bit time slot counter will be automatically switched off.
Bit 5
TKST
: Touch key detection start control
0: Stopped or no operation
0
→
1: Start detection
The touch key module 0 16-bit C/F counter, touch key function 16-bit counter and 5-bit
time slot unit period counter will automatically be cleared when this bit is cleared to
zero. However, the 8-bit programmable time slot counter will not be cleared. When
this bit is changed from low to high, the touch key module 0 16-bit C/F counter, touch
key function 16-bit counter, 5-bit time slot unit period counter and 8-bit time slot
counter will be switched on together with the key and reference oscillators to drive the
corresponding counters.
Bit 4
TKCFOV
: Touch key module 0 16-bit C/F counter overflow flag
0: No overflow occurs
1: Overflow occurs
This bit is set by touch key module 0 16-bit C/F counter overflow and must be cleared
to 0 by application program.
Bit 3
TK16OV
: Touch key function 16-bit counter overflow flag
0: No overflow occurs
1: Overflow occurs
This bit is set by touch key function 16-bit counter overflow and must be cleared to 0
by application program.
Bit 2~1
TKMOD1~TKMOD0
: Touch key scan mode selection
00: Auto scan mode
01: Manual scan mode
10/11: Periodic auto scan mode
In the manual scan mode, the reference oscillator capacitor value should be properly
configured before the scan operation begins and the touch key module 0 16-bit C/F
counter value should be read after the scan operation finishes by application program.
In the auto scan mode, the data movement which is described above is implemented by
hardware. The individual reference oscillator capacitor value and 16-bit C/F counter
content for all scanned keys will be read from a dedicated Touch Key Data Memory
area. In the auto scan mode, the keys to be scanned can be arranged in a specific
sequence which is determined by the M0SK3[1:0]~M0SK0[1:0] bits in the TKM0C2
register. The scan operation will not be stopped until all arranged keys are scanned.