NT6881
8. Base Timer (BT)
The Base Timer is an 8-bit counter with a programmable clock source selection. The BT can be enabled/disabled by the
CPU. After reset, the BT is disabled and cleared. The BT can be preset by writing preset value to BT7 ~ BT0 of the BT
register at any time. When the BT is enabled, the BT starts counting from the preset value. When the value reaches FFH, it
generates a timer interrupt if the timer interrupt is enabled. When it reaches the maximum value of FFH, the BT will wrap
around and begin counting at 00H. The BT can be enabled by writing a "0" to "ENBT " bit in the TCON (Timer Control)
register. The ENBT signal is level trigger.
The input clock source of BT is controlled by the TMOD register. The following table shows 8 ranges of BT.
TM2
0
TM1
0
TM0
0
Pre-scalar Ratio
Min. Count
1.33 µs
Max. Count
341.33 µs
682.66 µs
1.36 ms
3
System Clock/2
4
0
0
1
System Clock/2
2.66 µs
5
0
1
0
System Clock/2
5.32 µs
6
0
1
1
System Clock/2
10.64 µs
21.28 µs
42.56 µs
85.12 µs
170.24 µs
2.72 ms
7
1
0
0
System Clock/2
5.44 ms
8
1
0
1
System Clock/2
10.89 ms
21.79 ms
43.58 ms
9
1
1
0
System Clock/2
10
1
1
1
System Clock/2
For counting accuracy, please set the TMOD register first, then preset the BT register, and enable base timer finally.
(TM2, TM1, TM0) = (1, 1, 1) is reserved for USB driver use.
9