Rev. 1.00
198
September 11, 2018
Rev. 1.00
199
September 11, 2018
HT45F4050
A/D NFC Flash MCU
HT45F4050
A/D NFC Flash MCU
Comparator Interrupt
The comparator interrupt is controlled by the internal comparator. A comparator interrupt request
will take place when the comparator interrupt request flag, CPF, is set, a situation that will occur
when the comparator output bit changes state. To allow the program to branch to its respective
interrupt vector address, the global interrupt enable bit, EMI, and comparator interrupt enable bit,
CPE, must first be set. When the interrupt is enabled, the stack is not full and the comparator inputs
generate a comparator output transition, a subroutine call to the comparator interrupt vector, will
take place. When the interrupt is serviced, the comparator interrupt request flag will be automatically
reset and the EMI bit will be automatically cleared to disable other interrupts.
Multi-function Interrupts
Within the device there are three Multi-function interrupts. Unlike the other independent interrupts,
these interrupts have no independent source, but rather are formed from other existing interrupt
sources, namely the TM interrupts, LVD interrupt, and EEPROM write operation interrupt.
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. 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-
f
unction 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 request flags will be
automatically reset when the interrupt is serviced, the request flags from the original source of
the Multi-function interrupts will not be automatically reset and must be manually reset by the
application program.
A/D Converter Interrupt
The device contains an A/D converter which has its own independent interrupt. The A/D Converter
Interrupt is controlled by the termination of an A/D conversion process. An A/D Converter Interrupt
request will take place when the A/D Converter Interrupt request flag, ADF, is set, which occurs
when the A/D conversion process finishes. To allow the program to branch to its respective interrupt
vector address, the global interrupt enable bit, EMI, and A/D converter Interrupt enable bit, ADE,
must first be set. When the interrupt is enabled, the stack is not full and the A/D conversion process
has ended, a subroutine call to the A/D Converter Interrupt vector, will take place. When the
interrupt is serviced, the A/D Converter Interrupt flag, ADF, will be automatically cleared. The EMI
bit will also be automatically cleared to disable other interrupts.
Time Base Interrupts
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 internal timer. When this happens its
interrupt request flag, TBnF, will be set. To allow the program to branch to its respective interrupt
vector addresses, the global interrupt enable bit, EMI and Time Base enable bit, TBnE, must first be
set. When the interrupt is enabled, the stack is not full and the Time Base overflows, a subroutine
call to its respective vector location will take place. When the interrupt is serviced, the interrupt
request flag, TBnF, will be automatically reset and the EMI bit will be cleared to disable other
interrupts.