Rev. 1.20
1�8
�an�a�� 2�� 201�
Rev. 1.20
1�9
�an�a�� 2�� 201�
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
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 timer function. When this happens its
interrupt request flags TB
n
F will be set. To allow the program to branch to its interrupt vector
address, the global interrupt enable bit, EMI and Time Base enable bit, TB
n
E, must first be set.
When the interrupt is enabled, the stack is not full and the Time Base overflows, a subroutine call to
its vector location will take place. When the interrupt is serviced, the interrupt request flag, TB
n
F,
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. Each
Time Base clock source originates from
an
independent internal prescaler.
Each 15-bit prescaler can source from f
SYS
, f
SYS
/4, f
SUB
or f
H
, selected by CLKSELn1~CLKSELn0
bits in the PSCR register.
PSCR Register
Bit
7
6
5
4
3
2
1
0
Name
—
—
CLKSEL11 CLKSEL10
—
—
CLKSEL01 CLKSEL00
R/W
—
—
R/W
R/W
—
—
R/W
R/W
POR
—
—
0
0
—
—
0
0
Bit 7~6
Unimplemented, read as
"
0
"
Bit
5~4
CLKSEL11 ~ CLKSEL10
: Time Base 1 prescaler clock source selection
00: f
SYS
01: f
SYS
/4
10: f
SUB
11: f
H
Bit 3~2
Unimplemented, read as
"
0
"
Bit 1~0
CLKSEL01 ~ CLKSEL00
: Time Base 0 prescaler clock source selection
00: f
SYS
01: f
SYS
/4
10: f
SUB
11: f
H
TBC Register
Bit
7
6
5
4
3
2
1
0
Name
TB1ON
TB12
TB11
TB10
TB0ON
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
TB1ON
: Time Base 1 enable/disable control
0: Disable
1: Enable
Bit
6~4
TB12 ~ TB10
: Select Time Base 1 Time-out Period
000:
2
8
/f
PSC
001:
2
9
/f
PSC
010:
2
10
/f
PSC
011:
2
11
/f
PSC
100: 2
12
/f
PSC
101: 2
13
/f
PSC
110: 2
14
/f
PSC
111: 2
15
/f
PSC
Содержание BS82B12A-3
Страница 33: ...Rev 1 20 33 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...
Страница 34: ...Rev 1 20 34 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...
Страница 35: ...Rev 1 20 35 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...