English
Language : 

BS84B08A-3 Datasheet, PDF (99/123 Pages) Holtek Semiconductor Inc – A/D Type Touch Key MCU
BS84B08A-3/BS84C12A-3
A/D Type Touch Key MCU
Touch Key Interrupt
For a Touch Key interrupt to occur, the global interrupt enable bit, EMI, and the corresponding
Touch Key interrupt enable TKME must be first set. An actual Touch Key interrupt will take place
when the Touch Key request flag. TKMF, is set, a situation that will occur when the time slot counter
overflows. When the interrupt is enabled, the stack is not full and the Touch Key time slot counter
overflow occurs, a subroutine call to the relevant timer interrupt vector, will take place. When the
interrupt is serviced, the Touch Key interrupt request flag, TKMF, will be automatically reset and the
EMI bit will be automatically cleared to disable other interrupts.
The TKCFOV flag, which is the 16-bit C/F counter overflow flag will go high when any of the
Touch Key Module 16-bit C/F counter overflows. As this flag will not be automatically cleared, it
has to be cleared by the application program.
Module 0 only contains one 16-bit counter. 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.
SIM Interrupt
A SIM Interrupt request will take place when the SIM Interrupt request flag, SIMF, is set, which
occurs when a byte of data has been received or transmitted by the SIM interface. To allow the
program to branch to its respective interrupt vector address, the global interrupt enable bit, EMI,
and the Serial Interface Interrupt enable bit, SIME, must first be set. When the interrupt is enabled,
the stack is not full and a byte of data has been transmitted or received by the SIM interface, a
subroutine call to the respective interrupt vector, will take place. When the Serial Interface Interrupt
is serviced, the SIM interrupt request flag, SIMF, will be automatically cleared and the EMI bit will
be automatically cleared to disable other interrupts.
A/D Converter Interrupt
The A/D Converter Interrupt is controlled by the termination of an A/D conversion process. An A/
D Converter Interrupt request will take place when the A/D Converter Interrupt request flag, ADF,
is set, which occurs when the A/D conversion process finishes. To allow the program to branch to its
respective interrupt vector address, the global interrupt enable bit, EMI, and A/D Interrupt enable bit,
ADE, must first be set. When the interrupt is enabled, the stack is not full and the A/D conversion
process has ended, a subroutine call to the A/D Converter Interrupt vector, will take place. When the
interrupt is serviced, the A/D Converter Interrupt flag, ADF, will be automatically cleared. The EMI
bit will also be automatically cleared to disable other interrupts.
Interrupt Wake-up Function
Each of the interrupt functions has the capability of waking up the microcontroller when in the
SLEEP or IDLE Mode. A wake-up is generated when an interrupt request flag changes from low to
high and is independent of whether the interrupt is enabled or not. Therefore, even though the device
is in the SLEEP or IDLE Mode and its system oscillator stopped, situations such as external edge
transitions on the external interrupt pins, a low power supply voltage or comparator input change
may cause their respective interrupt flag to be set high and consequently generate an interrupt. Care
must therefore be taken if spurious wake-up situations are to be avoided. If an interrupt wake-up
function is to be disabled then the corresponding interrupt request flag should be set high before the
device enters the SLEEP or IDLE Mode. The interrupt enable bits have no effect on the interrupt
wake-up function.
Rev. 1.00
99
May 02, 2013