Timer A - Renesas M16C FAMILY series Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C FAMILY series:
Table of Contents

Advertisement

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

12.1 Timer A

Figure 12.3 shows a block diagram of the timer A. Figures 12.4 to 12.6 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
other timers.
• One-shot timer mode: The timer outputs a pulse only once before it reaches the minimum count "0000
• 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. however, j = 4 when i = 0)
TAk overflow
(k = i + 1. however, k = 0 when i = 4)
Pulse output
TAi
OUT
(i = 0 to 4)
NOTES:
1. Overflow or underflow
Figure 12.3 Timer A Block Diagram
Timer Ai Mode Register (i=0 to 4)
b7
b6
b5
b4
b3
Figure 12.4 TA0MR to TA4MR Registers
R
e
. v
2
0 .
0
J
a
. n
3
, 1
2
0
0
7
R
E
J
0
9
B
0
0
4
7
0 -
2
0
0
2 /
, 8
M
1
6
C
2 /
8
) B
• Timer
• One shot
• PWM
• Timer
(gate function)
• Event counter
Clock selection
To external
trigger circuit
b2
b1
b0
Symbol
TA0MR to TA4MR
Bit Symbol
TMOD0
Operation mode select bit
TMOD1
MR0
MR1
MR2
MR3
TCK0
Count source select bit
TCK1
page 100
f o
3
8
5
Data bus high-order bits
Data bus low-order bits
Low-order
8 bits
Reload register
Clock selection
Counter
TABSR register
Timer A0 0387
Timer A1 0389
Timer A2 038B
Decrement
Timer A3 038D
Timer A4 038F
UDF register
Toggle flip-flop
Address
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
(PWM) mode
Function varies with each
operation mode
Function varies with each
operation mode
High-order
8 bits
Increment/decrement
Always counts down except
in event counter mode
TAi
Addresses
TAj
- 0386
Timer A4
Timer A1
16
16
- 0388
Timer A0
Timer A2
16
16
- 038A
Timer A1
Timer A3
16
16
- 038C
Timer A2
Timer A4
16
16
- 038E
Timer A3
Timer A0
16
16
After Reset
00
16
Function
RW
RW
RW
RW
RW
RW
RW
RW
RW
12. Timer
".
16
TAk

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tiny seriesM16c series

Table of Contents