TTP258
TonTouchTM
Preliminary
P-2: Time Base Counter
The time base counter has 2 interrupt sources and both of them come from
the peripheral internal RC oscillator. The time base 1st overflow output (TB1OV)
can cause interrupt and the period is selected by TB1S2~TB1S0 in TBC register.
The time base 2nd overflow output (TB2OV) also offers two sample frequency
options by TB2S bit in the TBC register.
TBCK
16 KHz
TBCK/2
8 KHz
TBCK/16
TB1OV
TB2OV
1 KHz
256Hz
64Hz
8Hz
TBCK/64
TBCK/256
TBCK/2048
TBCK/8192
TBCK/16384
TBCK
14 bit Binary
Counter
2Hz
(if OSCL=16KHz)
1Hz
MUX
Write TBRB &
CLEAR counter
TB2S
TB1S2~TB1S0
TBC[20DH]: Time base control register[R/W], default value [1111]
Register
Bit Name
Read/Write
Bit3
Bit2
TB1S2
R/W
Bit1
TB1S1
R/W
Bit0
TB2S
TB1S0
R/W
R/W
TB1S2 ~ TB1S0: Base timer1 overflow frequency selection bits.
TB2S: Base timer2 overflow frequency selection (0: 32Hz; 1:16Hz)
(Every time writing the TBRB will clear the time base counter)
TB2S
Base timer overflow
frequency (TB1OV)
TBCK/512
TB2OV
(if OSCL=16KHz)
0
1
32Hz
16Hz
TBCK/1024
TB1S2 TB1S1 TB1S0
Base timer overflow
frequency (TB1OV)
TBCK
TB1OV
(if OSCL=16KHz)
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
16KHZ
8KHZ
1KHZ
256HZ
64 HZ
8HZ
TBCK/2
TBCK/16
TBCK/64
TBCK/256
TBCK/2048
TBCK/8192
TBCK/16384
2HZ
1HZ
16’/04/06
Page 20 of 44
Ver.: 1.2