English
Language : 

BS85B12-3 Datasheet, PDF (144/182 Pages) Holtek Semiconductor Inc – Touch Key Flash Type 8-Bit MCU with LCD/LED Driver
BS85B12-3/BS85C20-3
Touch Key Flash MCU with LCD/LED Driver
External Peripheral Interrupt
The External Peripheral Interrupt operates in a similar way to the external interrupt and is contained
within the Multi-function Interrupt. A Peripheral Interrupt request will take place when the External
Peripheral Interrupt request flag, XPF, is set, which occurs when a negative edge transition appears on
the PINT pin. To allow the program to branch to its respective interrupt vector address, the global
interrupt enable bit, EMI, external peripheral interrupt enable bit, XPE, and associated Multi-function
interrupt enable bit, must first be set. When the interrupt is enabled, the stack is not full and a negative
transition appears on the External Peripheral Interrupt pin, a subroutine call to the respective
Multi-function Interrupt, will take place. When the External Peripheral 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 XPF flag will not be automatically cleared, it has to be cleared by the application program. The
external peripheral interrupt pin is pin-shared with several other pins with different functions. It must
therefore be properly configured to enable it to operate as an External Peripheral Interrupt pin.
LVD Interrupt
The Low Voltage Detector Interrupt is contained within the Multi-function Interrupt. An LVD
Interrupt request will take place when the LVD Interrupt request flag, LVF, is set, which occurs when
the Low Voltage Detector function detects a low power supply voltage. To allow the program to branch
to its respective interrupt vector address, the global interrupt enable bit, EMI, Low Voltage Interrupt
enable bit, LVE, and associated Multi-function interrupt enable bit, must first be set. When the
interrupt is enabled, the stack is not full and a low voltage condition occurs, a subroutine call to the
Multi-function Interrupt vector, will take place. When the Low Voltage 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 LVF flag will not be automatically cleared, it has
to be cleared by the application program.
TM Interrupts
The Compact and Standard Type TMs have two interrupts each, while the Enhanced Type TM has
three interrupts. All of the TM interrupts are contained within the Multi-function Interrupts. For each
of the Compact and Standard Type TMs there are two interrupt request flags TnPF and TnAF and two
enable bits TnPE and TnAE. For the Enhanced Type TM there are three interrupt request flags TnPF,
TnAF and TnBF and three enable bits TnPE, TnAE and TnBE. A TM interrupt request will take place
when any of the TM request flags are set, a situation which occurs when a TM comparator P, A or B
match situation happens.
To allow the program to branch to its respective interrupt vector address, the global interrupt enable
bit, EMI, respective TM Interrupt enable bit, and relevant Multi-function Interrupt enable bit, MFnE,
must first be set. When the interrupt is enabled, the stack is not full and a TM comparator match
situation occurs, a subroutine call to the relevant Multi-function Interrupt vector locations, will take
place. When the TM interrupt is serviced, the EMI bit will be automatically cleared to disable other
interrupts, however only the related MFnF flag will be automatically cleared. As the TM interrupt
request flags will not be automatically cleared, they have to be cleared by the application program.
Rev. 1.00
138
February 1, 2011