Timer Mode - Renesas M16C/29 Series Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C/29 Series:
Table of Contents

Advertisement

M16C/29 Group

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 : The TB0S to TB2S bits are assigned to the TABSR register bit 5 to bit 7.
Timer Bi mode register (i= 0 to 2)
b7
b6
b5
b4
b3
b2
Figure 12.2.1.1 TBiMR Register in Timer Mode
Rev.1.00 Nov 01,2004
REJ09B0101-0100Z
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)
(Note)
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)
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 of 402
Specification
to "1" (= start counting)
Address
After reset
039B
to 039D
00XX0000
16
16
Bit name
b1 b0
0 0 : Timer mode or A/D trigger mode
b7 b6
0 0 : f
or f
1
0 1 : f
8
1 0 : f
32
1 1 : f
C32
0000
to FFFF
16
2
Function
2
12.2 Timer B
16
RW
RW
RW
RW
RW
RW
RO
RW
RW

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c seriesM16c/tiny series

Table of Contents