
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
Time Base Interrupt
The function of the Time Base Interrupts is to provide regular time signal in the form of an internal
interrupt. They are controlled by the overflow signals from their respective timer functions. When
these happens their respective interrupt request flags, TB0F or TB1F will be set. To allow the
program to branch to their respective interrupt vector addresses, the global interrupt enable bit, EMI,
Multi-function interrupt enable bit, EMFI and Time Base enable bits, TB0E or TB1E, must first be
set. When the interrupt is enabled, the stack is not full and the Time Base overflows, a subroutine
call to their respective vector locations will take place. When the interrupt is serviced, the respective
interrupt request flag, TB0F or TB1F, will be automatically reset and the EMI bit will be cleared to
disable other interrupts.
The purpose of the Time Base Interrupt is to provide an interrupt signal at fixed time periods. Their
clock sources originate from the internal clock source f
TB
. This f
TB
input clock passes through a
divider, the division ratio of which is selected by programming the appropriate bits in the TBC
register to obtain longer interrupt periods whose value ranges. The clock source that generates f
TB
,
which in turn controls the Time Base interrupt period, can originate from several different sources,
as shown in the System Operating Mode section.
Time Base Interrupt
TBC Register
Bit
7
6
5
4
3
2
1
0
Name
TBON
TBCK
TB11
TB10
LXTLP
TB02
TB01
TB00
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
TBON
: TB0 and TB1 Control
0: disable
1: enable
Bit 6
TBCK
: Select f
TB
Clock
0: f
TBC
1: f
SYS
/4
Bit 5~4
TB11~TB10
: Select Time Base 1 Time-out Period
00: 4096/f
TB
01: 8192/f
TB
10: 16384/f
TB
11: 32768/f
TB
Bit 3
LXTLP
: LXT Low Power Control
0: disable
1: enable
Bit 2~0
TB02~TB00
: Select Time Base 0 Time-out Period
000: 256/f
TB
001: 512/f
TB
010: 1024/f
TB
011: 2048/f
TB
100: 4096/f
TB
101: 8192/f
TB
110: 16384/f
TB
111: 32768/f
TB