Timer A - 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
6

12.1 Timer A

Figure 12.1.1 shows a block diagram of the timer A. Figures 12.1.2 to 12.1.4 show registers related to the
timer A.
The timer A supports the following four modes. Except in event counter mode, timers A0 to A4 all have the
same function. Use the TMOD1 to TMOD0 bits in the TAiMR register (i = 0 to 4) to select the desired mode.
• Timer mode: The timer counts an internal count source.
• Event counter mode: The timer counts pulses from an external device or overflows and underflows of
• One-shot timer mode: The timer outputs a pulse only once before it reaches the minimum count
• Pulse width modulation (PWM) mode: The timer outputs pulses in a given width successively.
Clock source
selection
f
or f
1
2
f
8
f
32
f
C32
Polarity
selection
TAi
IN
(i = 0 to 4)
(1)
TB2 overflow
(1)
TAj overflow
(j = i – 1. Note, however, that j = 4 when i = 0)
TAk overflow
(k = i + 1. Note, however, that k = 0 when i = 4)
TAi
OUT
(i = 0 to 4)
NOTE:
1. Overflow or underflow
Figure 12.1.1. Timer A Block Diagram
Timer Ai mode register (i=0 to 4)
b7
b6
b5
b4
b3
Figure 12.1.2. TA0MR to TA4MR Registers
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
C
2 /
6
, A
M
1
6
C
2 /
6
, B
M
1
6
other timers.
"0000
."
16
• Timer
• One shot
• PWM
• Timer
(gate function)
• Event counter
Clock selection
To external
trigger circuit
Pulse output
Symbol
b2
b1
b0
TA0MR to TA4MR
Bit symbol
TMOD0
Operation mode select bit
TMOD1
MR0
MR1
MR2
MR3
TCK0
Count source select bit
TCK1
page 94
f o
3
2
9
C
2 /
6
) T
Data bus high-order bits
Data bus low-order bits
Low-order
8 bits
Reload register
Clock selection
Counter
TABSR register
Down count
UDF register
Toggle flip-flop
Address
After reset
0396
to 039A
16
16
Bit name
b1 b0
0 0 : Timer mode
0 1 : Event counter mode
1 0 : One-shot timer mode
1 1 : Pulse width modulation
Function varies with each
operation mode
Function varies with each
operation mode
High-order
8 bits
Up-count/down-count
Always counts down except
in event counter mode
TAi
Addresses
TAj
Timer A0 0387
- 0386
Timer A4
16
16
Timer A1 0389
- 0388
Timer A0
16
16
Timer A2 038B
- 038A
Timer A1
16
16
Timer A3 038D
- 038C
Timer A2
16
16
Timer A4 038F
- 038E
Timer A3
16
16
00
16
Function
(PWM) mode
12. Timer
TAk
Timer A1
Timer A2
Timer A3
Timer A4
Timer A0
RW
RW
RW
RW
RW
RW
RW
RW
RW

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/26aM16c/26bM16c/26t

Table of Contents