Timer A - 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.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 of 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)
(Note)
TB2 overflow
(Note)
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)
Pulse output
TAi
OUT
(i = 0 to 4)
Note: Overflow or underflow
Figure 12.1.1. Timer A Block Diagram
Timer Ai mode register (i=0 to 4)
b7
b6
b5
Figure 12.1.2. TA0MR to TA4MR Registers
Rev.1.00 Nov 01,2004
REJ09B0101-0100Z
other timers.
"0000
."
16
• Timer
• One shot
• PWM
• Timer
(gate function)
• Event counter
Clock selection
To external
trigger circuit
Symbol
b4
b3
b2
b1
b0
TA0MR to TA4MR
Bit symbol
TMOD0
TMOD1
MR0
MR1
MR2
MR3
TCK0
TCK1
page 95 of 402
Data bus high-order bits
Data bus low-order bits
Low-order
8 bits
Reload register
Clock selection
TABSR register
Down count
UDF register
Toggle flip-flop
Address
0396
to 039A
16
16
Bit name
b1 b0
Operation mode select bit
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
Count source select bit
Function varies with each
operation mode
High-order
8 bits
Counter
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
After reset
00
16
Function
(PWM) mode
12.1 Timer A
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 seriesM16c/tiny series

Table of Contents