R8C/13 Group
12.4 Timer (Timer C)
Timer C register
(b15)
b7
(b8)
b0 b7
Symbol
TC
Address
009116-009016
After reset
000016
b0
Function
Internal count source is counted
"000016 can be read out by reading when TCC00 bit = 0 (stops counting)
Count value can be read out by reading when TCC00 bit = 1 (start counting)
RW
RO
"
Capture and compare 0 register
(b15)
b7
(b8)
b0 b7
b0
Symbol
TM0
Address
009D16-009C16
After reset
000016
2
Function
Mode
RW
Input capture
mode
When active edge of measurement pulse is input,
the value of the TC register is stored
RO
RW
RW
Mode
Function
Setting range
Output compare The value compared
with Timer C is stored
000016 to FFFF16
mode(1)
NOTES:
1. When setting a value in the TM0 register, set the TCC13 bit in the TCC1 register to “1”(compare 0 output selected)
When the TCC13 bit is set to “0”(capture selected), the value cannot be written.
2. When the TCC13 bit in the TCC1 register is set to “1”, the value is set to FFFF16
.
Compare 1 register
(b8)
(b15)
b7
b0
b7
b0
Symbol
TM1
Address
009F16-009E16
After reset
FFFF16
Function
Setting range
000016 to FFFF16
Mode
RW
RW
The value compared
with Timer C is stored
Output compare
mode
Timer C control register 0
b7 b6 b5 b4 b3 b2 b1 b0
Symbol
TCC0
Address
009A16
After reset
0016
0
0
RW
Bit symbol
TCC00
Function
Bit name
0 : Count stop
1 : Count start
Timer C control start bit
RW
b2 b1
Timer C count source select
bit(1)
TCC01
TCC02
TCC03
RW
RW
0 0 : f1
0 1 : f
8
1 0 : f32
1 1 : fRING-fast
b4 b3
INT3 interrupt and capture
polarity select bit(1, 2)
RW
RW
0 0 : Rising edge
0 1 : Falling edge
1 0 : Both edges
1 1 : Avoid this setting
TCC04
Reserved bit
Must set to "0"
RW
RW
(b6-b5)
TCC07
INT3 interrupt and
capture input switching bit(1, 2)
0 : INT3
1 : fRING128
NOTES:
1. Change this bit when TCC00 bit is set to “0” (count stop).
2. The IR bit in the INT3IC may be set to “1” (interrupt requested) when the TCC03, TCC04, or TCC07 bit is rewritten.
Refer to the paragraph 19.2.5 “Changing Interrupt Factor” in the Usage Notes Reference Book.
Figure 12.31 TC Register, TM0 Register, TM1 Register, TCC0 Register
Rev.1.20 Jan 27, 2006 page 103 of 205
REJ09B0111-0120