Timer A - Renesas M16C/62P Series Hardware Manual

6-bit single-chip microcomputer
Table of Contents

Advertisement

M16C/62P Group (M16C/62P, M16C/62PT)
15.1

Timer A

Note
The M16C/62P (80-pin version) and M16C/62PT (80-pin version) do not include TA1IN and TA1OUT pins
of Timer A1, and TA2IN and TA2OUT pins of Timer A2 .
[Precautions when using Timer A1 and Timer A2]
• Timer Mode
• Event Counter Mode
• One-shot Timer Mode The Pulse Output Function cannot be used and count start by the external trigger cannot
• Pulse Width
Modulation Mode
Figure 15.3 shows a Timer A Block Diagram. Figures 15.4 to 15.7 show registers related to Timer A. 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:
Event Counter Mode:
One-shot Timer Mode:
Pulse Width Modulation (PWM) Mode: The timer outputs pulses in a given width successively.
Select Count Source
00
f1 or f2
01
f8
10
f32
11
fC32
TCK1 to TCK0
Polarity
Selector
TAiIN
(1)
TB2 Overflow
(1)
TAj Overflow
(1)
TAk Overflow
TAiOUT
i=0 to 4
j=i-1, however, j=4 if i=0
k=i+1, however, k=0 if i=4
NOTES:
1. Overflow or underflow
TCK1 to TCK0, TMOD1 to TMOC0, MR2 to MR1 : Bits in TAiMR register
TAiTGH to TAiTGL : Bits in ONSF register if i=0 or bits in TRGSR register if i=1 to 4
TAiS : Bits in the TABSR register
TAiUD : Bits in the UDF register
Figure 15.3
Timer A Block Diagram
Rev.2.41
Jan 10, 2006
REJ09B0185-0241
http://www.xinpian.net
The Gate Function and the Pulse Output Function cannot be used.
MR0 bits in the TA1MR and TA2MR registers to "000b" when using Timer
Mode.
The Pulse Output Function cannot be used and external input signals cannot be counted.
Two-phase Pulse Signal of Timer A2 cannot be used. Set the MR2 to MR0 bits in the
TA1MR and TA2MR registers to "000b" when using the Event Counter Mode.
be counted. Set the MR1 to MR0 bits in the TA1MR and TA2MR registers to "00b"
when using the One-shot Timer Mode.
PWM pulse cannot be outputted.
Select clock
· Timer
:TMOD1 to TMOD0=00, MR2=0
· One-Shot Timer
:TMOD1 to TMOD0=10
· Pulse Width Modulation :TMOD1 to TMOD0=11
· Timer (gate function): TMOD1 to TMOD0=00,
MR2=1
· Event counter :TMOD1 to TMOD0=01
00
01
10
11
TAiTGH to TAiTGL
Pulse Output
Page 139 of 390
提供单片机解密、IC解密、芯片解密业务
The timer counts an internal count source.
The timer counts pulses from an external device or overflows and
underflows of other timers.
The timer outputs a pulse only once before it reaches the minimum
count "0000h".
TMOD1 to TMOD0,
MR2
TAiS
Decrement
To external
trigger circuit
0
TAiUD
1
MR2
Toggle Flip Flop
Timer A0 0387h - 0386h
Timer A1 0389h - 0388h
Timer A2 038Bh - 038Ah
Timer A3 038Dh - 038Ch
Timer A4 038Fh - 038Eh
Set the MR2 to
High-Order Bits of Data Bus
Low-Order Bits of Data Bus
8 low-order
bits
Reload Register
Counter
Increment / decrement
Always decrement except
in event counter mode
00
01
11
01
TMOD1 to TMOD0
TAi
Addresses
TAj
Timer A4 Timer A1
Timer A0 Timer A2
Timer A1 Timer A3
Timer A2 Timer A4
Timer A3 Timer A0
010-62245566 13810019655
15. Timers
8 high-
order bits
TAk

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/62pM16c/62pt

Table of Contents