
Rev. 1.10
106
March 02, 2020
Rev. 1.10
107
March 02, 2020
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
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
corresponding touch key data memory, 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 the 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.
I
2
C Interface – BS83B04L
The I
2
C interface is used to communicate with external peripheral devices such as sensors,
EEPROM memory etc. Originally developed by Philips, it is a two-line low speed serial interface
for synchronous serial data transfer. The advantage of only two lines for communication, relatively
simple communication protocol and the ability to accommodate multiple devices on the same bus
has made it an extremely popular interface type for many applications.
Device
Slave
Device
Master
Device
Slave
VDD
SDA
SCL
I
2
C Master Slave Bus Connection
I
2
C Interface Operation
The I
2
C serial interface is a two-line interface, a serial data line, SDA, and serial clock line, SCL. As
many devices may be connected together on the same bus, their outputs are both open drain types.
For this reason, it is necessary that external pull-high resistors are connected to these outputs. Note