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

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
BS85B12-3/BS85C20-3
Touch Key Flash MCU with LCD/LED Driver
Rev. 1.00
EEPROM Interrupt
Touch Key Interrupts
SIM Interrupt
Interrupt Wake-up Function
The EEPROM Interrupt, is contained within the Multi-function Interrupt. An EEPROM Interrupt
request will take place when the EEPROM Interrupt request flag, DEF, is set, which occurs when an
EEPROM Write cycle ends. To allow the program to branch to its respective interrupt vector address,
the global interrupt enable bit, EMI, EEPROM Interrupt enable bit, DEE, and associated
Multi-function interrupt enable bit, must first be set. When the interrupt is enabled, the stack is not full
and an EEPROM Write cycle ends, a subroutine call to the respective Multi-function Interrupt vector,
will take place. When the EEPROM Interrupt is serviced, the EMI bit will be automatically cleared to
disable other interrupts, however only the Multi-function interrupt request flag will be also
automatically cleared. As the DEF flag will not be automatically cleared, it has to be cleared by the
application program.
For a Touch Key interrupt to occur, the global interrupt enable bit, EMI, and the corresponding Touch
Key interrupt enable TKMnE must be first set. An actual Touch Key interrupt will take place when the
Touch Key request flag. TKMnF, is set, a situation that will occur when the 13-bit time slot counter in
the relevant Touch Key module 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 Touch Key interrupt
vector, will take place. When the interrupt is serviced, the Touch Key interrupt request flag, TKMnF,
will be automatically reset and the EMI bit will be automatically cleared to disable other interrupts.
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, SIF, will be automatically cleared and the EMI bit will be automatically cleared
to disable other interrupts.
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.
139
February 1, 2011

Related parts for BS85B12-3