English
Language : 

BS84B08A-3 Datasheet, PDF (97/123 Pages) Holtek Semiconductor Inc – A/D Type Touch Key MCU
BS84B08A-3/BS84C12A-3
A/D Type Touch Key MCU
External Interrupt
The external interrupt is controlled by signal transitions on the pin INT. An external interrupt
request will take place when the external interrupt request flag, INTF, is set, which will occur
when a transition, whose type is chosen by the edge select bits, appears on the external interrupt
pin. To allow the program to branch to its respective interrupt vector address, the global interrupt
enable bit, EMI, and respective external interrupt enable bit, INTE, must first be set. Additionally
the correct interrupt edge type must be selected using the INTEG register to enable the external
interrupt function and to choose the trigger edge type. As the external interrupt pin is pin-shared
with I/O pin, its can only be configured as external interrupt pin if its external interrupt enable bit in
the corresponding interrupt register has been set. The pin must also be setup as an input by setting
the corresponding bit in the port control register. When the interrupt is enabled, the stack is not full
and the correct transition type appears on the external interrupt pin, a subroutine call to the external
interrupt vector, will take place. When the interrupt is serviced, the external interrupt request flag,
INTF, will be automatically reset and the EMI bit will be automatically cleared to disable other
interrupts. Note that any pull-high resistor selections on the external interrupt pin will remain valid
even if the pin is used as an external interrupt input.
The INTEG register is used to select the type of active edge that will trigger the external interrupt.
A choice of either rising or falling or both edge types can be chosen to trigger an external interrupt.
Note that the INTEG register can also be used to disable the external interrupt function.
Time Base Interrupt
The function of the Time Base Interrupt is to provide regular time signal in the form of an internal
interrupt. It is controlled by the overflow signal from its timer function. When this happens its
interrupt request flags TBF will be set. To allow the program to branch to its interrupt vector
address, the global interrupt enable bit, EMI and Time Base enable bit, TBE, must first be set. When
the interrupt is enabled, the stack is not full and the Time Base overflows, a subroutine call to its
vector location will take place. When the interrupt is serviced, the interrupt request flag, TBF, will
be automatically reset and the EMI bit will be cleared to disable other interrupts.
The purpose of the Time Base Interrupt is to provide an interrupt signal at fixed time periods. Its
clock source originate from the internal clock source fSYS or fSUB. This fTP input clock passes through
a divider, the division ratio of which is selected by programming the appropriate bits in the TBC
register to obtain longer interrupt periods whose value ranges. The clock source that generates fTP,
which in turn controls the Time Base interrupt period, can originate from several different sources,
as shown in the System Operating Mode section.
Rev. 1.00
97
May 02, 2013