
Rev. 1.40
128
March 29, 2019
Rev. 1.40
129
March 29, 2019
HT45F23A/HT45F24A
TinyPower
TM
Flash MCU with OPA & Comparators
HT45F23A/HT45F24A
TinyPower
TM
Flash MCU with OPA & Comparators
SIM Interface Interrupt
For an SIM interrupt to occur, the global interrupt enable bit, EMI, and the corresponding interrupt
enable bit, ESIM must be first set. An actual SIM interrupt will take place when the SIM
interface
request flag, SIMF, is set, a situation that will occur when a byte of data has been transmitted
or
received by the SIM interface 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 SIM interrupt vector
at location 14H, will take place. When the interrupt is serviced, the SIM request flag, SIMF
will be
automatically reset and the EMI bit will be automatically cleared to disable other interrupts.
Multi-function Interrupt
An additional interrupt known as the Multi-function interrupt is provided. Unlike the other
interrupts, this interrupt has no independent source, but rather is formed from four other existing
interrupt sources, namely the A/D Converter interrupt, Time Base interrupts, the External Peripheral
interrupt, Comparator interrupt, EEPROM interrupt and LVD interrupt.
For a Multi-function interrupt to occur, the global interrupt enable bit, EMI, and the Multi-function
interrupt enable bit, EMFI, must first be set. An actual Multi-function interrupt will take place when
the Multi-function interrupt request flag, MFF, is set. This will occur when either a Time Base
overflow, an A/D conversion completion, an External Peripheral Interrupt, a Comparator output
interrupt, an EEPROM Write or Read cycle ends interrupt, or a LVD interrupt is generated. When
the interrupt is enabled and the stack is not full, and either one of the interrupts contained within the
Multi-function interrupt occurs, a subroutine call to the Multi-function interrupt vector at location
018H will take place. When the interrupt is serviced, the Multi-Function request flag, MFF, will
be automatically reset and the EMI bit will be automatically cleared to disable other interrupts.
However, it must be noted that the request flags from the original source of the Multi-function
interrupt, namely the Time-Base interrupt, A/D Converter interrupt, Comparator interrupt,EEPROM
interrupt,LVD interrupt or External Peripheral interrupt will not be automatically reset and must be
manually reset by the application program.
A/D Interrupt
The A/D Interrupt is contained within the Multi-function Interrupt.
For an A/D Interrupt to be generated, the global interrupt enable bit, EMI, A/D Interrupt enable
bit, EADI, and Multi-function interrupt enable bit, EMFI, must first be set. An actual A/D Interrupt
will take place when the A/D Interrupt request flag, ADF, is set, a situation that will occur when
the A/D conversion process has finished. When the interrupt is enabled, the stack is not full and
the A/D conversion process has ended, a subroutine call to the Multi-function interrupt vector at
location18H, will take place. When the A/D Interrupt is serviced, the EMI bit will be cleared to
disable other interrupts, however only the MFF interrupt request flag will be reset. As the ADF flag
will not be automatically reset, it has to be cleared by the application program.