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 respective timer function. When this happens
its respective interrupt request flag, TBF, 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, TBE, 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
respective interrupt request flag, TBF, 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 with a fixed time period. Its
clock source originates from the internal clock source f
SYS
or f
LIRC
. This 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.
TBC Register
Bit
7
6
5
4
3
2
1
0
Name
¾
¾
TB1
TB0
¾
¾
¾
¾
R/W
¾
¾
R/W
R/W
¾
¾
¾
¾
POR
¾
¾
0
0
¾
¾
¾
¾
Bit 7~6
unimplemented, read as
²
0
²
Bit 5~4
TB1~TB0
: Select Time Base Time-out Period
00: 1024/f
TP
01: 2048/f
TP
10: 4096/f
TP
11: 8192/f
TP
Bit 3~0
unimplemented, read as
²
0
²
Rev. 1.50
108
April 28, 2020
BS83B08-3/B12-3/B16-3/B16G-3/C24-3
8-Bit Touch Key Flash MCU
D i v i d e b y 2
1 0
~ 2
1 3
T B 1 ~ T B 0
T i m e B a s e I n t e r r u p t
M U X
f
T P
f
L I R C
f
S Y S
0
1
T S
Time Base Structure