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.1 lists specifications in
timer mode. Figure 1.13.7 shows TAiMR register in timer mode.
Table 1.13.1. Specifications in Timer Mode
Item
Count source
Count operation
Divide ratio
Count start condition
Count stop condition
Interrupt request generation timing
TAi
pin function
IN
TAi
pin function
OUT
Read from timer
Write to timer
Select function
i = 0 to 4
Timer Ai mode register (i = 0 to 4)
b7
b6
b5
b4
b3
0
Note: The port direction bit for the TAi
Figure 1.13.7 Timer Ai Mode Register in Timer Mode
Rev.1.00
2003.05.30
page 103
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 TAiMR register
Set TAiS bit of TABSR register to "1" (start counting)
Set TAiS bit to "0" (stop counting)
Timer underflow
I/O port or gate input
I/O port or pulse output
Count value can be read by reading TAi register
• When not counting and until the 1st count source is input after counting start
Value written to TAi register is written to both reload register and counter
• When counting (after 1st count source input)
Value written to TAi register is written to only reload register
(Transferred to counter when reloaded next)
• Gate function
Counting can be started and stopped by an input signal to TAi
• Pulse output function
Whenever the timer underflows, the output polarity of TAi
When not counting, the pin outputs a low.
b2
b1
b0
Symbol
0 0
TA0MR to TA4MR
Bit symbol
TMOD0
Operation mode
select bit
TMOD1
Pulse output function
MR0
select bit
MR1
Gate function select bit
MR2
MR3
Set to "0" in timer mode
TCK0
Count source select bit
TCK1
pin must be set to "0" (input mode).
IN
Specification
0000
Address
After reset
0396
to 039A
00
16
16
16
Bit name
b1 b0
0 0 : Timer mode
0 : Pulse is not output
(TA
pin is a normal port pin)
iOUT
1 : Pulse is output
(TA
pin is a pulse output pin)
iOUT
b4 b3
0 0 :
Gate function not available
}
0 1 :
(TAi
1 0 : Counts while input on the TAi
is low (Note)
1 1 : Counts while input on the TAi
is high (Note)
b7 b6
0 0 : f
or f
1
2
0 1 : f
8
1 0 : f
32
1 1 : f
C32
to FFFF
16
16
pin
IN
pin is inverted.
OUT
Function
RW
RW
RW
RW
RW
pin functions as I/O port)
IN
pin
IN
pin
IN
RW
RW
RW
RW
Timer A

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/6n5

Table of Contents