SN8P2604A
8-Bit Micro-Controller
8.3.3 TC1C COUNTING REGISTER
TC1C is an 8-bit counter register for TC1 interval time control.
0DDH
TC1C
Read/Write
After reset
Bit 7
TC1C7
R/W
0
Bit 6
TC1C6
R/W
0
Bit 5
TC1C5
R/W
0
Bit 4
TC1C4
R/W
0
Bit 3
TC1C3
R/W
0
Bit 2
TC1C2
R/W
0
Bit 1
Bit 0
TC1C0
R/W
0
TC1C1
R/W
0
The equation of TC1C initial value is as following.
TC1C initial value = 256 - (TC1 interrupt interval time * input clock)
¾
Example: To set 10ms interval time for TC1 interrupt. TC1 clock source is Fcpu (TC1KS=0). High clock is
external 4MHz. Fcpu=Fosc/4. Select TC1RATE=010 (Fcpu/64).
TC1C initial value = 256 - (TC1 interrupt interval time * input clock)
= 256 - (10ms * 4MHz / 4 / 64)
= 256 - (10-2 * 4 * 106 / 4 / 64)
= 100
= 64H
The basic timer table interval time of TC1.
High speed mode (Fcpu = 4MHz / 4)
Low speed mode (Fcpu = 32768Hz / 4)
TC1RATE TC1CLOCK
Max overflow interval One step = max/256 Max overflow interval One step = max/256
000
001
010
011
100
101
110
111
Fcpu/256
Fcpu/128
Fcpu/64
Fcpu/32
Fcpu/16
Fcpu/8
65.536 ms
32.768 ms
16.384 ms
8.192 ms
4.096 ms
2.048 ms
1.024 ms
0.512 ms
256 us
128 us
64 us
32 us
16 us
8 us
8000 ms
4000 ms
2000 ms
1000 ms
500 ms
250 ms
125 ms
62.5 ms
31250 us
15625 us
7812.5 us
3906.25 us
1953.125 us
976.563 us
488.281 us
244.141 us
Fcpu/4
Fcpu/2
4 us
2 us
SONiX TECHNOLOGY CO., LTD
Page 79
Version 0.3