Touch Key Interrupts; Programming Considerations - Holtek BS83A02L Manual

Ultra-low power touch key flash mcu
Table of Contents

Advertisement

Touch Key Interrupts

The touch key has two independent interrupts, known as touch key TKRCOV interrupt and touch
key threshold TKTH interrupt. In the manual scan mode, when the touch key module 0 time slot
counter overflows, an actual touch key TKRCOV interrupt will take place. In the auto scan mode,
when the touch key auto scan operation is completed, the Touch Key TKRCOV Interrupt request
flag, TKRCOVF, will be set. In the periodic auto scan mode, after the last scan operation in the
WDT time-out cycle completes the 16-bit C/F counter content is written into the TKM0KnCNTH/
TKM0KnCNTL registers, then the Touch Key TKRCOV Interrupt request flag, TKRCOVF, will
be set. The touch keys mentioned here are the keys which are enabled. The 16-bit C/F counter,
16-bit counter, 5-bit time slot unit period counter and 8-bit time slot counter in the module will
be automatically cleared. When any key C/F counter value is less than the lower threshold if
M0KnTHS=0, or larger than the upper threshold if M0KnTHS=1, a touch key threshold interrupt
will take place. More details regarding the touch key interrupt is located in the interrupt section of
the datasheet.

Programming Considerations

After the relevant registers are setup, the touch key detection process is initiated when changing the
TKST Bit from low to high. This will enable and synchronise all relevant oscillators. The TKRCOV
flag which is the time slot counter flag will go high when the counter overflows in the manual scan
mode. When this happens an interrupt signal will be generated. 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. When the touch key auto scan operation is completed, the TKRCOV bit and the
Touch Key TKRCOV Interrupt request flag, TKRCOVF, will be set. 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 TKM0KnCNTH/TKM0KnCNTL registers, and then the TKRCOV bit will be set high by the
hardware circuit. The TKTH signal which is the threshold comparison indication signal will go high
when a certain threshold comparison condition occurs. When this happens an interrupt signal will
also be generated. As TKRCOV flag will not be automatically cleared, it has to be cleared by the
application program.
The TKCFOV flag which is the 16-bit C/F counter overflow flag will go high when any of the Touch
Key Module 0 16-bit C/F counter overflows. As this flag will not be automatically cleared, it has to
be cleared by the application program.
The TK16OV flag which is the 16-bit counter overflow flag will go high when the 16-bit counter
overflows. As this flag will not be automatically cleared, it has to be cleared by the application
program.
When the external touch key size and layout are defined, their related capacitances will then
determine the sensor oscillator frequency.
Rev. 1.10
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
90
March 02, 2020

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Bs83b04lBs83a02l sot23-6Bs83a02l 6dfnBs83a02l sot23Bs83a02l 8sopBs83b04l 8sop ... Show all

Table of Contents