English
Language : 

7480 Datasheet, PDF (21/98 Pages) Bi technologies – 7/8 Diameter 5-Turn Wirewound Precision Potentiometer
PRELIMINARY NSootimcee: pTahriasmisentroict alimfinitsalasrpeescuifbicjeactitotno. change.
MITSUBISHI MICROCOMPUTERS
7480/7481 GROUP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
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
“FF16” or “000016”, 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.
q 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 00F816)
• Port P4 direction register (P4D: address 00C916)
• Timer X low-order (TXL: address 00F016)
• Timer X high-order (TXH: address 00F116)
• Timer Y low-order (TYL: address 00F216)
• Timer Y high-order (TYH: address 00F316)
• Timer X mode register (TXM: address 00F616)
• Timer Y mode register (TYM: address 00F716)
• Edge polarity selection register (EG: address 00D416)
• Interrupt request register 1 (IREQ1: address 00FC16)
• Interrupt request register 2 (IREQ2: address 00FD16)
• Interrupt control register 1 (ICON1: address 00FE16)
• Interrupt control register 2 (ICON2: address 00FF16)
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
q 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.
q Count Source Selection
The count source is f(XIN)/2, f(XIN)/8 or f(XIN)/16.
q 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”.
q 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 “000016”, 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
q Mode Selection
Select the timer event count mode. This mode is selected by in-
putting from the CNTR0 pin for timer X or from the CNTR1 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 CNTR0 edge selection bit (b2) or the CNTR1 edge selec-
tion bit (b3) of EG. At “0”, the rising edge is counted.
At “1”, the falling edge is counted.
q Interrupt
The underflow interrupt is the same as the timer mode.
q Explanation of Operation
This operation is the same as that of the timer mode. In this
mode, set the port in common with the CNTR0/CNTR1 pin as an
input port.
Figure 19 shows a timing diagram in the timer event count
mode.
(2) Pulse Output Mode
q Mode Selection
This mode is selected by setting b2, b1 and b0 of TXM or TYM
to “001”.
q Count Source Selection
The count source is f(XIN)/2, f(XIN)/8 or f(XIN)/16.
20