Timer Mode - Renesas M16C/60 Series Hardware Manual

Hide thumbs Also See for M16C/60 Series:
Table of Contents

Advertisement

Under development
This document is under development and its contents are subject to change.
M16C/6N5 Group

1. Timer Mode

In timer mode, the timer counts a count source generated internally.
Table 1.13.6 lists specifications in timer mode. Figure 1.13.18 shows TBiMR register in timer mode.
Table 1.13.6 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
i = 0 to 5
Note : The TB0S to TB2S bits are assigned to the TABSR register bit 5 to bit 7, and the TB3S to TB5S bits
are assigned to the TBSR register bit 5 to bit 7.
Timer Bi mode register (i = 0 to 5)
b7
b6
b5
b4
b3
b2
Figure 1.13.18 TBiMR Register in Timer Mode
Rev.1.00
2003.05.30
page 117
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 TBiMR register
Set TBiS bit (Note) 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)
b1
b0
Symbol
0
0
TB0MR to TB2MR
TB3MR to TB5MR
Bit symbol
TMOD0
Operation mode select bit 0 0 : Timer mode
TMOD1
MR0
Has no effect in timer mode
Can be set to "0" or "1"
MR1
TB0MR, TB3MR registers
Set to "0" in timer mode
MR2
TB1MR, TB2MR, TB4MR, TB5MR registers
Nothing is assigned. When write, set to "0".
When read, its content is indeterminate.
When write in timer mode, set to "0".
MR3
When read in timer mode, its content is indeterminate.
TCK0
Count source select bit
TCK1
Specification
Address
After reset
039B
to 039D
00XX0000
16
16
01DB
to 01DD
00XX0000
16
16
Bit name
b1 b0
b7 b6
0 0 : f
or f
1
0 1 : f
8
1 0 : f
32
1 1 : f
C32
0000
to FFFF
16
16
2
2
Function
2
Timer B
RW
RW
RW
RW
RW
RW
RO
RW
RW

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/6n5

Table of Contents