Timer Mode - Renesas M16C/26A Series Hardware Manual

16-bit single-chip microcomputer m16c family / m16c/tiny series
Hide thumbs Also See for M16C/26A Series:
Table of Contents

Advertisement

M
1
6
C
2 /
6
A
G
o r
u
p
(
M
1

12.2.1 Timer Mode

In timer mode, the timer counts a count source generated internally (see Table 12.2.1.1). Figure 12.2.1.1
shows TBiMR register in timer mode.
Table 12.2.1.1 Specifications in Timer Mode
Item
Count source
Count operation
Divide ratio
Count start condition
Count stop condition
Interrupt request generation timing
TBi
pin function
IN
Read from timer
Write to timer
NOTE:
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
Figure 12.2.1.1 TBiMR Register in Timer Mode
R
e
. v
2
0 .
0
F
e
b
1 .
, 5
2
0
0
7
R
E
J
0
9
B
0
2
0
2
0 -
2
0
0
6
C
2 /
6
, A
M
1
6
C
2 /
6
, B
M
f
, f
, f
, f
, f
1
2
8
32
C32
• 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)
(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)
b2
b1
b0
Symbol
TB0MR to TB2MR
0
0
Bit symbol
TMOD0
Operation mode select bit
TMOD1
MR0
Has no effect in timer mode
Can be set to "0" or "1"
MR1
TB0MR register
MR2
Must be set to "0" in timer mode
TB1MR, TB2MR 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 111
f o
3
2
9
1
6
C
2 /
6
) T
Specification
to "1" (= start counting)
Address
039B
to 039D
16
16
Bit name
b1 b0
0 0 : Timer mode or A/D trigger mode
b7 b6
0 0 : f
0 1 : f
1 0 : f
1 1 : f
0000
to FFFF
16
After reset
00XX0000
2
Function
or f
1
2
8
32
C32
12. Timer
16
RW
RW
RW
RW
RW
RW
RO
RW
RW

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/26aM16c/26bM16c/26t

Table of Contents