External Interrupt - Holtek HT45F23A Manual

Tinypower flash mcu with opa & comparators
Table of Contents

Advertisement

HT45F23A/HT45F24A
TinyPower
Flash MCU with OPA & Comparators
TM
MFIC1 Register
Bit
Name
R/W
POR
Bit 7
unimplemented, read as "0"
LVDF: LVD interrupt request flag
Bit 6
0: inactive
1: active
Bit 5
E2F: EEPROM interrupt request flag
0: inactive
1: active
Bit 4
CF: Comparator interrupt request flag
0: inactive
1: active
Bit 3
unimplemented, read as "0"
Bit 2
ELVDI: LVD interrupt enable
0: disable
1: enable
Bit 1
EE2I: EEPROM interrupt enable
0: disable
1: enable
Bit 0
ECI: Comparator interrupt enable
0: disable
1: enable

External Interrupt

The external interrupts are controlled by signal transitions on the pins INT0~INT1. An external
interrupt request will take place when the external interrupt request flags, EIF0~EIF1, are set, which
will occur when a transition, whose type is chosen by the edge select bits, appears on the external
interrupt pins. To allow the program to branch to its respective interrupt vector address, the global
interrupt enable bit, EMI, and respective external interrupt enable bit, EEI0~EEI1, must first be
set. Additionally the correct interrupt edge type must be selected using the INTEDGE register to
enable the external interrupt function and to choose the trigger edge type. As the external interrupt
pins are pin-shared with I/O pins, they can only be configured as external interrupt pins if their
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 flags, EIF0~EIF1, 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 pins will remain valid even if the pin is used as an external interrupt input.
The INTEDGE 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 INTEDGE register can also be used to disable the external interrupt function.
Rev. 1.40
7
6
5
LVDF
E2F
R/W
R/W
0
0
125
4
3
2
CF
ELVDI
R/W
R/W
0
0
1
0
EE2I
ECI
R/W
R/W
0
0
March 29, 2019

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the HT45F23A and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Ht45f24a

Table of Contents