English
Language : 

M16C62_M Datasheet, PDF (323/615 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/60 SERIES
Timer A
Mitsubishi microcomputers
M16C / 62A Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
2.2 Timer A Usage
2.2.1 Overview of the timer A usage
Timer A is a 16-bit timer. The following is an overview of the timer A usage.
(1) Mode
Timer A operates in one of the four modes:
(a) Timer mode
In this mode, the internal count source is counted. Two functions can be selected: the pulse output
function that reverses output from a port every time an overflow occurs, or the gate function which
controls the count start/stop according to the input signal from a port.
• Timer mode operation ............................................................................................................. P2-12
• Timer mode, gate function operation ....................................................................................... P2-14
• Timer mode, pulse output function operation .......................................................................... P2-16
(b) Event counter mode
This mode counts the pulses from the outside and the number of overflows in other timers. The free-
run type, in which nothing is reloaded from the reload register, can be selected when an underflow
occurs. The pulse output function can also be selected. Please refer to the timer mode explanation
for details, as the operation is identical.
• Event counter mode operation ................................................................................................ P2-18
• Event counter mode, free run type operation .......................................................................... P2-20
Furthermore, Timer A has a 2-phase pulse signal processing function which generates an up count
or down count in the event counter mode, depending on the phase of the two input signals.
• Operation of the 2-phase pulse signal processing function in normal event counter mode .... P2-22
• Operation of the 2-phase pulse signal processing function in 4-multiplication mode .............. P2-24
(c) One-shot timer mode
In this mode, the timer is started by the trigger and stops when the timer goes to “0”. The trigger can
be selected from the following 3 types: an external input signal, an overflow of the timer, or a software
trigger. The pulse output function can also be selected. Please refer to the timer mode explanation
for details, as the operation is identical.
• Operation in one-shot timer mode effected by software .......................................................... P2-26
• Operation in one-shot timer mode effected by an external trigger .......................................... P2-28
(d) Pulse width modulation (PWM) mode
In this mode, the arbitrary pulses are successively output. Either a 16-bit fixed-period PWM mode or
8-bit variable-period mode can be selected. The trigger for initiating output can also be selected.
Please refer to the one-shot timer mode explanation for details, as the operation is identical.
• 16-bit PWM mode operation .................................................................................................... P2-30
• 8-bit PWM mode operation ...................................................................................................... P2-32
2-6