
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
3825 Group
24
TIMERS
The 3825 group has five timers: timer X, timer Y, timer 1, timer 2,
and timer 3. Timer X and timer Y are 16-bit timers, and timer 1,
timer 2, and timer 3 are 8-bit timers.
All timers are down count timers. When the timer reaches “0016”,
an underflow occurs at the next count pulse and the correspond-
ing timer latch is reloaded into the timer and the count is contin-
ued. When a timer underflows, the interrupt request bit corre-
sponding to that timer is set to “1”.
Read and write operation on 16-bit timer must be performed for
both high- and low-order bytes. When reading a 16-bit timer, read
the high-order byte first. When writing to a 16-bit timer, write the
low-order byte first. The 16-bit timer cannot perform the correct op-
eration when reading during the write operation, or when writing
during the read operation.
Fig. 19 Timer block diagram
0
act
ve
edge switch bit
m
e
r
1
c
o
u
n
t
s
o
u
r
c
e
s
e
l
e
c
t
i
o
n
b
i
t
ea
t
me port
control bit “0”
“
1
”
5
5
/
1
“0”
IN
/16
f
X
CIN
/16 in low-s
eed mode
]
1
a
c
t
v
e
e
d
g
e
s
w
i
t
c
h
b
i
t
“10”
mer
stop
control bit
Falling edge detection
er
o
measurement mode
mer
interrupt
request
Pulse width HL continuously measurement mode
Rising edge detection
“
0
0
”
,
“
0
1
”
,
“
1
1
”
m
e
r
o
p
e
r
a
t
n
g
m
o
d
e
b
i
t
s
mer
interrupt
request
mer
mo
e reg
ster
write signal
5
4
/
0
Q
5
4
r
e
c
t
o
n
r
e
g
s
t
e
r
u
se output mo
e
5
4
atc
m
e
r
s
t
o
p
c
o
n
t
r
o
l
b
i
t
“0”
“1”
m
e
r
w
r
t
e
c
o
n
t
r
o
l
b
i
t
a
t
c
a
t
c
“1”
“0”
“
1
”
“
1
0
”
Timer X operat-
ing mode bits
“00”,“01”,“11”
I
N
/
1
6
f
X
C
I
N
/
1
6
i
n
l
o
w
-
s
e
e
d
m
o
d
e
✽
u
se w
t
measurement
mode
0
a
c
t
v
e
e
d
g
e
s
w
i
t
c
h
b
i
t
u
se output mo
e
Q
“0”
5
6
rect
on reg
ster
5
6
a
t
c
“
1
”
O
U
T
o
u
t
p
u
t
a
c
t
i
v
e
e
d
g
e
s
w
i
t
c
h
b
i
t
“
0
”
m
e
r
2
w
r
t
e
c
o
n
t
r
o
l
b
i
t
“0”
“1”
OUT
output
control bit
“
1
”
5
6
/
O
U
T
CIN
m
e
r
3
c
o
u
n
t
s
o
u
r
c
e
s
e
l
e
c
t
i
o
n
b
i
t
“0”
“
1
”
mer 2
interrupt
request
mer 3
interrupt
request
O
U
T
o
u
t
p
u
t
c
o
n
t
r
o
t
mer 2 count source
selection bit
mer 1
interrupt
request
a
t
a
u
s
I
N
/
1
6
f
X
C
I
N
/
1
6
i
n
l
o
w
-
s
e
e
d
m
o
d
e
]
f(X
IN
)/16
f
X
CIN
/16 in low-s
eed mode
]
f
X
IN
/16
f
X
CIN
/16 in low-s
eed mode
]
✽
Internal clock
= X
CIN
/2.
0
interrupt
request
1
i
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
mer
operat
ng mo
e
t
“00”,“01”,“10
“11”
5
2
rect
on reg
ster “0”
e
a
t
m
e
p
o
r
t
c
o
n
t
r
o
l
b
i
t
“
1
”
5
2
5
2
a
t
c
5
3
r
e
c
t
o
n
r
e
g
s
t
e
r
“
0
”
ea
t
me port
control bit “1”
5
3
5
3
a
t
c
5
2
a
t
a
o
r
r
e
a
t
m
e
p
o
r
t
5
3
ata
or rea
t
me port
Timer Y (low) (8) Timer Y (high) (8)
mer 3
atc
8
mer 3
8
m
e
r
1
a
t
c
8
mer 1
8
m
e
r
2
a
t
c
8
mer 2
8
T
i
m
e
r
X
(
l
o
w
)
(
8
)
T
i
m
e
r
X
(
h
i
g
h
)
(
8
)
T
i
m
e
r
X
(
l
o
w
)
l
a
t
c
h
(
8
)T
i
m
e
r
X
(
h
i
g
h
)
l
a
t
c
h
(
8
)
Timer Y (low) latch (8) Timer Y (high) latch (8)
Comentarios a estos manuales