MITSUBISHI MICROCOMPUTERS
7480/7481 GROUP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
20
PRELIMINARY
Notice: This is not a final specification.
Some parametric limits are subject to change.
Timers
The 7480/7481 group has two 16-bit timers (timer X and timer Y),
and two 8-bit timers (timer 1 and timer 2).
All the timers are of a count-down type. When the timer reaches
“FF
16
” or “0000
16
”, an underflow occurs at the next count pulse
and the corresponding timer latch is reloaded into the timer and
the count is continued. When a timer underflows, the interrupt re-
quest bit corresponding to this timer is set to “1”.
At reading and setting the timer value to a 16-bit timer, be sure to
read and set both high-order byte and low-order byte.
At reading the count value from a 16-bit timer, read the high-order
byte and the low-order byte in this order. At setting the count value
in a 16-bit timer, set the low-order byte and the high-order byte in
this order.
The 16-bit timer cannot operate normally at reading during set op-
eration or at setting during read operation.
G
Timer X, Timer Y
Both timer X and timer Y are 16-bit timers independent from
each other. They can select 7 operating modes by setting the
mode registers. The registers related to timer X and timer Y are
shown below. In the following, abbreviations will be used as
register names.
Timer XY control register (TXYCON: address 00F8
16
)
Port P4 direction register (P4D: address 00C9
16
)
Timer X low-order (TXL: address 00F0
16
)
Timer X high-order (TXH: address 00F1
16
)
Timer Y low-order (TYL: address 00F2
16
)
Timer Y high-order (TYH: address 00F3
16
)
Timer X mode register (TXM: address 00F6
16
)
Timer Y mode register (TYM: address 00F7
16
)
Edge polarity selection register (EG: address 00D4
16
)
Interrupt request register 1 (IREQ1: address 00FC
16
)
Interrupt request register 2 (IREQ2: address 00FD
16
)
Interrupt control register 1 (ICON1: address 00FE
16
)
Interrupt control register 2 (ICON2: address 00FF
16
)
For register structures, refer to each register structural diagram.
In the following, each mode will be described.
(1) Timer Mode/Event Count Mode
Timer Mode
G
Mode Selection
This mode is selected by setting “000” in the timer X operating
mode bits (b2b1b0) of TXM and the timer Y operating mode bits
(b2b1b0) of TYM.
G
Count Source Selection
The count source is f(X
IN
)/2, f(X
IN
)/8 or f(X
IN
)/16.
G
Interrupt
When a timer underflows, the timer X interrupt request bit (b0)
or timer Y interrupt request bit (b1) of IREQ1 is set to “1”.
G
Explanation of Operation
After reset release, the timer X stop control bit (b0) or timer Y
stop control bit (b1) of TXYCON is “1”, and the timer stops.
In the timer stop status, usually the timer value is set by writing
the latch and timer at the same time. Timer operation is started
by setting “0” in b0 or b1 of TXYCON.
When the timer reaches “0000
16
”, an underflow occurs at the
next count pulse, the corresponding timer latch is reloaded into
the timer, and the count is continued. To change the timer value
during count operation, the latch value is changed by writing to
the latch only. At the next underflow reloading, the timer value is
changed.
Event Count Mode
G
Mode Selection
Select the timer event count mode. This mode is selected by in-
putting from the CNTR
0
pin for timer X or from the CNTR
1
pin
for timer Y (setting “11” in b7 and b6 of TXM or “11” in b7 and b6
of TYM). The count operation active edge is selected by setting
in the CNTR
0
edge selection bit (b2) or the CNTR
1
edge selec-
tion bit (b3) of EG. At “0”, the rising edge is counted.
At “1”, the falling edge is counted.
G
Interrupt
The underflow interrupt is the same as the timer mode.
G
Explanation of Operation
This operation is the same as that of the timer mode. In this
mode, set the port in common with the CNTR
0
/CNTR
1
pin as an
input port.
Figure 19 shows a timing diagram in the timer event count
mode.
(2) Pulse Output Mode
G
Mode Selection
This mode is selected by setting b2, b1 and b0 of TXM or TYM
to “001”.
G
Count Source Selection
The count source is f(X
IN
)/2, f(X
IN
)/8 or f(X
IN
)/16.