M16C/64A Group
17. Timer A
17.1
Introduction
Timers A consists of timers A0 to A4. Each timer operates independently of the others. Table 17.1 lists
Timer A Specifications, Table 17.2 lists Differences in Timer A Mode, Figure 17.1 shows Timer A and B
Count Sources, Figure 17.2 shows Timer A Configuration, Figure 17.3 shows Timer A Block Diagram, and
Table 17.3 lists I/O Ports.
Table 17.1
Timer A Specifications
Item
Configuration
16-bit timer × 5
Operating modes
Interrupt sources
Overflow/underflow × 5
Table 17.2
Differences in Timer A Mode
Event counter mode (two-phase pulse signal processing)
Programmable output mode
Clock Generator
Main clock
oscillator
or PLL frequency
synthesizer
125 kHz
fOCO-S
on-chip
oscillator
fC
Sub clock
oscillator
Figure 17.1
Timer A and B Count Sources
R01UH0136EJ0210 Rev.2.10
Jul 31, 2012
•
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 single pulse before it reaches the count 0000h.
•
Pulse width modulation mode (PWM mode)
The timer outputs pulses of given width and cycle successively.
•
Programmable output mode
The timer outputs a given pulse width of a high/low level signal (timers A1, A2, and A4).
Item
CM21
0
1
1/32
Reset
Set the CPSR bit in the CPSRF
register to 1 (prescaler reset).
Specification
A0
No
No
f1TIMAB
f2TIMAB
1/2
1/8
f1
0
Timer AB divider
fOCO-S
fC32
CM21
PCLK0
Timer
A1
A2
A3
No
Yes
Yes
Yes
Yes
No
PCLK0
1
0
1/4
1/2
: Bit in the CM2 register
: Bit in the PCLKR register
Page 252 of 800
17. Timer A
A4
Yes
Yes
f1TIMAB
or
f2TIMAB
f8TIMAB
f32TIMAB
f64TIMAB
fOCO-S
fC32