deveopmen
Rev.B2 for proof reading
Timer A
Mitsubishi Microcomputers
M32C/83 group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
140
Item
Specification
Count source
Count operation
Two-phase pulse signals input to TAi
IN
or TAi
OUT
pin
Up count or down count can be selected by two-phase pulse signal
When the timer overflows or underflows, the reload register content is
reloaded and the timer starts over again
(Note 1)
1/ (FFFF
16
- n + 1) for up count
1/ (n + 1) for down count
n : Set value
Count start flag is set (= 1)
Count start flag is reset (= 0)
Timer overflows or underflows
Two-phase pulse input
Two-phase pulse input (Set corresponding function select register A for I/O port)
Count value can be read out by reading timer A2, A3, or A4 register
When counting stopped
When a value is written to timer A2, A3, or A4 register, it is written to both reload
register and counter
When counting in progress
When a value is written to timer A2, A3, or A4 register, it is written to only reload
register. (Transferred to counter at next reload time.)
Normal processing operation (TimerA2 and timer A3)
The timer counts up rising edges or counts down falling edges on the TAi
IN
pin when
input signal on the TAi
OUT
pin is
“
H
”
Divide ratio
Count start condition
Count stop condition
Interrupt request generation timing
TAi
IN
pin function
TAi
OUT
pin function
Read from timer
Write to timer
Select function
(Note 2)
Multiply-by-4 processing operation (TimerA3 and timer A4)
If the phase relationship is such that the TAi
IN
pin goes
“
H
”
when the input signal on
the TAi
OUT
pin is
“
H
”
, the timer counts up rising and falling edges on the TAi
OUT
and
TAi
IN
pins. If the phase relationship is such that the TAi
IN
pin goes
“
L
”
when the input
signal on the TAi
OUT
pin is
“
H
”
, the timer counts down rising and falling edges on the
TAi
OUT
and TAi
IN
pins.
TAi
OUT
Up
count
Up
count
Up
count
Down
count
Down
count
Down
count
TAi
IN
(i=2,3)
TAi
OUT
TAi
IN
(i=3,4)
Count up all edges
Count up all edges
Count down all edges
Count down all edges
(when processing two-phase pulse signal with timers A2, A3, and A4)
Note 1: This does not apply when the free-run function is selected.
Note 2: Timer A3 is selectable. Timer A2 is fixed to normal processing operation and timer A4 is fixed to
multiply-by-4 operation.
Table 1.14.3. Timer specifications in event counter mode