Timer Mode - Renesas M16C/62P Hardware Manual

Renesas 16-bit single-chip microcomputer
Hide thumbs Also See for M16C/62P:
Table of Contents

Advertisement

M16C/62P Group (M16C/62P, M16C/62PT)

15.2.1 Timer Mode

In timer mode, the timer counts a count source generated internally (see Table 15.6). Figure 15.18
shows TBiMR register in timer mode.
Table 15.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
NOTES:
1. The TB0S to TB2S bits are assigned to the bit 5 to bit 7 in the TABSR register, and the TB3S to TB5S
bits are assigned to the bit 5 to bit 7 in the TBSR register.
Timer Bi Mode Register (i= 0 to 5)
b7
b6
b5
b4
b3
b2
Figure 15.18 TBiMR Register in Timer Mode
R
e
. v
2
3 .
0
S
e
p
0
, 1
2
0
0
4
R
E
J
0
9
B
0
1
8
5
0 -
2
3
0
Z
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 5)
(1)
Set TBiS bit
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)
Symbol
b1
b0
TB0MR to TB2MR
0
0
TB3MR to TB5MR
Bit Symbol
TMOD0
Operation Mode Select Bit
TMOD1
MR0
Has no effect in timer mode
Can be set to "0" or "1"
MR1
TB0MR, TB3MR registers
MR2
Set to "0" in timer mode
TB1MR, TB2MR, TB4MR, TB5MR registers
Nothing is assigned. When write, set to "0". When read, its
content is indeterminate
MR3
When write in timer mode, set to "0". When read in timer mode, its
content is indeterminate.
Count Source Select Bit
TCK0
TCK1
page 140
f o
3
6
4
Specification
to "1" (= start counting)
Address
After Reset
039Bh to 039Dh
00XX0000b
035Bh to 035Dh
00XX0000b
Bit Name
b1 b0
0 0 : Timer mode
b7 b6
0 0 : f1 or f2
0 1 : f8
1 0 : f32
1 1 : fC32
0000h to FFFFh
Function
15. Timers
RW
RW
RW
RW
RW
RW
RO
RW
RW

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/62pt

Table of Contents