Rev. 1.10
100
November 26, 2019
Rev. 1.10
101
November 26, 2019
HT68FB240
USB Low Speed Flash MCU
MFI0 Register
Bit
7
6
5
4
3
2
1
0
Name
T1AF
T1PF
T0AF
T0PF
T1AE
T1PE
T0AE
T0PE
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
0
0
0
0
0
0
0
0
Bit 7
T1AF:
TM1 Comparator A match interrupt request flag
0: No request
1: Interrupt request
Bit 6
T1PF:
TM1 Comparator P match interrupt request flag
0: No request
1: Interrupt request
Bit 5
T0AF:
TM0 Comparator A match interrupt request flag
0: No request
1: Interrupt request
Bit 4
T0PF:
TM0 Comparator P match interrupt request flag
0: No request
1: Interrupt request
Bit 3
T1AE:
TM1 Comparator A match interrupt control
0: Disable
1: Enable
Bit 2
T1PE:
TM1 Comparator P match interrupt control
0: Disable
1: Enable
Bit 1
T0AE:
TM0 Comparator A match interrupt control
0: Disable
1: Enable
Bit 0
T0PE:
TM0 Comparator P match interrupt control
0: Disable
1: Enable
Interrupt Operation
When the conditions for an interrupt event occur, such as a TM Comparator P or Comparator A
match etc, the relevant interrupt request flag will be set. Whether the request flag actually generates
a program jump to the relevant interrupt vector is determined by the condition of the interrupt enable
bit. If the enable bit is set high then the program will jump to its relevant vector, if the enable bit is
zero then although the interrupt request flag is set an actual interrupt will not be generated and the
program will not jump to the relevant interrupt vector. The global interrupt enable bit, if cleared to
zero, will disable all interrupts.
When an interrupt is generated, the Program Counter, which stores the address of the next instruction
to be executed, will be transferred onto the stack. The Program Counter will then be loaded with a
new address which will be the value of the corresponding interrupt vector. The microcontroller will
then fetch its next instruction from this interrupt vector. The instruction at this vector will usually
be a "JMP" which will jump to another section of program which is known as the interrupt service
routine. Here is located the code to control the appropriate interrupt. The interrupt service routine
must be terminated with a "RETI", which retrieves the original Program Counter address from
the stack and allows the microcontroller to continue with normal execution at the point where the
interrupt occurred.