English
Language : 

M16C30P_07 Datasheet, PDF (129/317 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/30 SERIES
M16C/30P Group
14. Timers
14.2.1 Timer Mode
In timer mode, the timer counts a count source generated internally (see Table 14.6). Figure 14.18 shows
TBiMR Register in Timer Mode.
Table 14.6 Specifications in Timer Mode
Item
Count Source
Count Operation
Divide Ratio
Count Start Condition
Count Stop Condition
Interrupt Request
Generation Timing
TBiIN Pin Function
Read from Timer
Write to Timer
Specification
f1, f2, f8, f32, fC32
• Down-count
• When the timer underflows, it reloads the reload register contents and
continues counting
1/(n+1) n: set value of TBi register (i= 0 to 2) 0000h to FFFFh
Set TBiS bit(1) to “1” (= start counting)
Set TBiS bit to “0” (= stop counting)
Timer underflow
I/O port
Count value can be read by reading TBi register
• When not counting and until the 1st count source is input after counting start
Value written to TBi register is written to both reload register and counter
• When counting (after 1st count source input)
Value written to TBi register is written to only reload register
(Transferred to counter when reloaded next)
NOTES:
1. The TB0S to TB2S bits are assigned to the bit 5 to bit 7 in the TABSR register.
Timer Bi Mode Register (i= 0 to 2)
b7 b6 b5 b4 b3 b2 b1 b0
00
Symbol
Address
After Reset
TB0MR to TB2MR
039Bh to 039Dh
00XX0000b
Bit Symbol
Bit Name
Function
RW
TMOD0 Operation Mode Select Bit
b1 b0
RW
TMOD1
0 0 : Timer mode
RW
MR0 Has no effect in timer mode
RW
MR1 Can be set to “0” or “1”
RW
TB0MR register
Set to “0” in timer mode
RW
MR2
TB1MR, TB2MR registers
Nothing is assigned. When w rite, set to “0”.
—
When read, its content is indeterminate
When w rite in timer mode, set to “0”.
MR3 When read in timer mode, its content is indeterminate.
RO
Count Source Select Bit
b7 b6
TCK0
0 0 : f 1 or f 2 (1)
RW
0 1 : f8
TCK1
1 0 : f32
RW
1 1 : fC32
NOTES :
1. Selected by PCLK0 bit in the PCLKR register.
Figure 14.18 TBiMR Register in Timer Mode
Rev.1.22 Mar 29, 2007 Page 113 of 291
REJ09B0179-0122