SN8P2714X_2715
8-bit micro-controller build-in 12-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 70
V1.4
8.3.3 TC1C COUNTING REGISTER
TC1C is an 8-bit counter register for the timer counter (TC1). TC1C must be reset whenever the TC1ENB is set “1” to
start the timer. TC1C is incremented by one with a clock pulse which the frequency is determined by TC1RATE0 ~
TC1RATE2. When TC1C has incremented to “0FFH”, it is will be cleared to “00H” in next clock and an overflow is
generated. Under TC1 interrupt service request (TC1IEN) enable condition, the TC1 interrupt request flag will be set
“1” and the system executes the interrupt service routine.
TC1C initial value = xxxx xxxx
0DDH
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
TC1C
TC1C7 TC1C6 TC1C5 TC1C4 TC1C3 TC1C2 TC1C1 TC1C0
R/W R/W R/W R/W R/W R/W R/W R/W
The interval time of TC1 basic timer table.
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 at 3.58MHz high-speed mode. TC1C value (74H) = 256 -
(10ms * fcpu/256)
TC1C initial value = 256 - (TC1 interrupt interval time * input clock)
= 256 - (10ms * 3.58 * 10
6
/ 256)
= 256 - (10
-2
* 3.58 * 10
6
/ 256)
= 116
= 74H