Timers (Timer A)
115
Mitsubishi microcomputers
M16C / 62P Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
development
Preliminary Specifications Rev.1.0
Specifications in this manual are tentative and subject to change.
Item
Specification
Count source
Count operation
Two-phase pulse signals input to TAi
IN
or TAi
OUT
pins (i = 2 to 4)
Up-count or down-count can be selected by two-phase pulse signal
When the timer overflows or underflows, it reloads the reload register con-
tents and continues counting. When operating in free-running mode, the
timer continues counting without reloading.
1/ (FFFF
16
-
n + 1) for up-count
1/ (n + 1) for down-count
n : set value of TAi register 0000
16
to FFFF
16
Set TAiS bit of TABSR register to “1” (= start counting)
Set TAiS bit to “0” (= stop counting)
Interrupt request generation timing
Timer overflow or underflow
TAi
IN
pin function
Two-phase pulse input
TAi
OUT
pin function
Two-phase pulse input
Read from timer
Count value can be read by reading timer A2, A3 or A4 register
Write to timer
When not counting and until the 1st count source is input after counting start
Value written to TAi register is written to both reload register and counter
When counting (after 1st count source input)
Value written to TAi register is written to reload register
(Transferred to counter when reloaded next)
Select function (Note)
Normal processing operation (timer A2 and timer A3)
The timer counts up rising edges or counts down falling edges on TAj
IN
pin
when input signals on TAj
OUT
pin is “H”.
Divide ratio
Count start condition
Count stop condition
Multiply-by-4 processing operation (timer A3 and timer A4)
If the phase relationship is such that TAk
IN
(k=3, 4) pin goes “H” when the
input signal on TAk
OUT
pin is “H”, the timer counts up rising and falling
edges on TAk
OUT
and TAk
IN
pins. If the phase relationship is such that
TAk
IN
pin goes “L” when the input signal on TAk
OUT
pin is “H”, the timer
counts down rising and falling edges on TAk
OUT
and TAk
IN
pins.
Table 1.14.3. Specifications in Event Counter Mode (when processing two-phase pulse signal with timers A2, A3 and A4)
TAj
OUT
Up-
count
Up-
count
Up-
count
Down-
count
Down-
count
Down-
count
TAj
IN
(j=2,3)
TAk
OUT
TAk
IN
(k=3,4)
Count up all edges
Count up all edges
Count down all edges
Count down all edges
Counter initialization by Z-phase input (timer A3)
The timer count value is initialized to 0 by Z-phase input.
Notes:
1. Only timer A3 is selectable. Timer A2 is fixed to normal processing operation, and timer A4 is fixed to
multiply-by-4 processing operation.