BS85B12-3 HOLTEK [Holtek Semiconductor Inc], BS85B12-3 Datasheet - Page 142

no-image

BS85B12-3

Manufacturer Part Number
BS85B12-3
Description
Touch Key Flash Type 8-Bit MCU with LCD/LED Driver
Manufacturer
HOLTEK [Holtek Semiconductor Inc]
Datasheet
Rev. 1.00
External Interrupt
Multi-function Interrupt
Time Base Interrupts
The external interrupt is controlled by signal transitions on the INT0 and INT1 pins. An external
interrupt request will take place when the external interrupt request flag, INT0F or INT1F, 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, INT0E or INT1E, 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, it can only be configured as external interrupt pin if the 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.
Within these devices there are four or six Multi-function interrupts. Unlike the other independent
interrupts, these interrupts have no independent source, but rather are formed from the Touch Key
Module, Timer Module, Low Voltage Detector, EEPROM, External Peripheral and Time Base
interrupt sources.
A Multi-function interrupt request will take place when any of the Multi-function interrupt request
flags, MFnF are set. The Multi-function interrupt flags will be set when any of their included functions
generate an interrupt request flag. To allow the program to branch to its respective interrupt vector
address, when the Multi-function interrupt is enabled and the stack is not full, and either one of the
interrupts contained within each of Multi-function interrupt occurs, a subroutine call to one of the
Multi-function interrupt vectors will take place. When the interrupt is serviced, the related
Multi-Function request flag, will be automatically reset and the EMI bit will be automatically cleared
to disable other interrupts.
However, it must be noted that, although the Multi-function Interrupt flags will be automatically reset
when the interrupt is serviced, the request flags from the original source of the Multi-function
interrupts, namely the Touch Key module timer interrupts, will not be automatically reset and must be
manually reset by the application program.
The function of the Time Base Interrupts is to provide regular time signal in the form of an internal
interrupt. They are controlled by the overflow signals from their respective timer functions. When
these happens their respective interrupt request flags, TB0F or TB1F will be set. To allow the program
to branch to their respective interrupt vector addresses, the global interrupt enable bit, EMI and Time
Base enable bits, TB0E or TB1E, must first be set.
When the interrupt is enabled, the stack is not full and the Time Base overflows, a subroutine call to
their respective vector locations will take place. When the interrupt is serviced, the respective interrupt
request flag, TB0F or TB1F, will be automatically reset and the EMI bit will be cleared to disable other
interrupts.
Touch Key Flash MCU with LCD/LED Driver
136
BS85B12-3/BS85C20-3
February 1, 2011

Related parts for BS85B12-3