15. Timers - Renesas M16C/62P Series Hardware Manual

6-bit single-chip microcomputer
Table of Contents

Advertisement

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

15. Timers

Note
The M16C/62P (80-pin version) and M16C/62PT (80-pin version) do not include TA1IN, TA1OUT,
TA2IN, TA2OUT and TB pins. Do not use the function which needs these pins.
Eleven 16-bit timers, each capable of operating independently of the others, can be classified by function as either
Timer A (five) and Timer B (six). The count source for each timer acts as a clock, to control such timer operations as
counting, reloading, etc. Figures 15.1 and 15.2 show block diagrams of Timer A and Timer B configuration,
respectively.
· Main clock
· PLL clock
· On-chip oscillator
clock
f1 or f2
f8 f32 fC32
TA0IN
TA1IN
TA2IN
TA3IN
TA4IN
NOTES :
1. Be aware that TA0IN shares the pin with RXD2 and TB5IN.
Figure 15.1
Timer A Configuration
Rev.2.41
Jan 10, 2006
REJ09B0185-0241
http://www.xinpian.net
PCLK0 bit = 0
f2
1/2
f1 or f2
f1
PCLK0 bit = 1
1/8
f8
1/4
f32
TCK1 to TCK0
00: Timer mode
00
10: One-shot timer mode
01
11: PWM mode
10
11
10
01
Noise
00
filter
11
TA0TGH to TA0TGL
TCK1 to TCK0
00: Timer mode
00
10: One-shot tiemr mode
01
11: PWM mode
10
11
10
Noise
01
01: Event counter mode
filter
00
11
TA1TGH to TA1TGL
TCK1 to TCK0
00: Timer mode
00
10: One-shot timer mode
01
11: PWM mode
10
10
11
01
Noise
01: Event counter mode
filter
00
11
TA2TGH to TA2TGL
TCK1 to TCK0
00: Timer mode
00
10: One-shot timer mode
01
11: PWM mode
10
11
10
Noise
01
filter
01: Event counter mode
00
TA3TGH to TA3TGL
11
TCK1 to TCK0
00: Timer mode
00
10: One-shot timer mode
01
11: PWM mode
10
11
10
01
Noise
01: Event counter mode
filter
00
11
TA4TGH to TA4TGL
Timer B2 overflow
TCK1 to TCK0, TMOD1 to TMOD0 : Bits in TAiMR register (i=0 to 4)
TAiGH to TAiGL: Bits in ONSF register and TRGSR register
or underflow
Page 137 of 390
提供单片机解密、IC解密、芯片解密业务
Clock prescaler
XCIN
Set the CPSR bit in the
CPSRF register to "1"
(= prescaler reset)
TMOD1 to TMOD0
Timer A0
01: Event counter mode
TMOD1 to TMOD0
Timer A1
TMOD1 to TMOD0
Timer A2
TMOD1 to TMOD0
Timer A3
TMOD1 to TMOD0
Timer A4
fC32
1/32
Reset
Timer A0 interrupt
Timer A1 interrupt
Timer A2 interrupt
Timer A3 interrupt
Timer A4 interrupt
010-62245566 13810019655

15. Timers

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/62pM16c/62pt

Table of Contents