The 7470/7471 group is a single-chip microcomputer designed
with CMOS silicon gate technology. It is housed in a 32-pin shrink
plastic molded DIP. The M37471M2-XXXSP/FP is a single-chip microcomputer designed with CMOS silicon gate technology. It is
housed in a 42-pin shrink plastic molded DIP or a 56-pin plastic
molded QFP.
These single-chip microcomputer are useful for business equipment and other consumer applications.
In addition to its simple instruction set, the ROM, RAM, and I/O
addresses are placed on the same memory map to enable easy
programming .
The differences between the M37471M2-XXXSP and the
M37471M2-XXXFP are the package outline and the power dissipation ability (absolute maximum ratings).
The differences among M37470M2-XXXSP, M37470M4-XXXSP,
M37470M8-XXXSP, M37471M2-XXXSP/FP, M37471M4-XXXSP/
FP and M37471M8-XXXSP/FP are noted below.
Type name
M37470M2-XXXSP
M37471M2-XXXSP/FP
M37470M4-XXXSP
M37471M4-XXXSP/FP
M37470M8-XXXSP
M37471M8-XXXSP/FP
0.5 µs (the minimum instructions, at 8 MHz oscillation frequency)
8 MHz (max.)
4096 bytes
128 bytes
8192 bytes
192 bytes
16384 bytes
384 bytes
8-bit ✕ 2
8-bit ✕ 1 (4-bit ✕ 1 for 7470 group)
4-bit ✕ 2 (Port P5 is not included in 7470 group)
4-bit ✕ 1 (2-bit ✕ 1 for 7470 group)
8-bit ✕ 1
8-bit timer ✕ 4
8-bit ✕ 1 (8 channels) (8-bit ✕ 1 (4 channels) for M37470M2/M4/M8)
64 level max. (M37470M2, M37471M2)
96
level max. (M37470M4/E4, M37471M4/E4)
192
level max. (M37470M8/E8, M37471M8/E8)
5 external interrupts, 6 internal interrupts, 1 software interrupt
Built-in circuit with internal feedback resistor (a ceramic or a quartz-
crystal oscillator)
2.7 to 4.5 V (at 2.2VCC–2.0 MHz oscillation frequency),
4.5 to 5.5 V (at 8 MHz oscillation frequency)
35 mW (at 8 MHz oscillation frequency)
5 V
–5 to 10 mA (P0, P1, P2, P4 : CMOS tri-states)
–20 to 85°C
CMOS silicon gate
32-pin shrink plastic molded DIP
42-pin shrink plastic molded DIP
56-pin plastic molded QFP
42-pin ceramic DIP
6
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
PIN DESCRIPTION
PinNameFunctions
VCC, VSS
AVSS
(Note 1)
RESET
XIN
XOUT
VREF
P00–P07
P10–P17
P20–P27
(Note 2)
P30–P33
P40–P43
(Note 3)
P50–P53
(Note 4)
Notes 1 : AVSS for M37471M2/M4/M8/E4/E8-XXXFP.
2 : Only P2
3 : Only P4
4 : This port is not included in 7470 group.
Power source voltage
Analog power
source
Reset input
Clock input
Clock output
Reference voltage
input
I/O port P0
I/O port P1
I/O port P2
Input port P3
I/O port P4
Input port P5
0–P23 (IN0–IN3) 4-bit for 7470 group.
0 and P41 2-bit for 7470 group.
Input/
Output
Input
Input
Output
Input
I/O
I/O
I/O
Input
I/O
Input
Apply voltage of 2.7 to 5.5 V to VCC, and 0 V to VSS.
Ground level input pin for A-D converter.
Same voltage as VSS is applied.
To enter the reset state, the reset input pin must be kept at “L” for 2 µs or more
(under normal VCC conditions).
These are I/O pins of internal clock generating circuit for main clock. To control
generating frequency, an external ceramic or a quartz-crystal oscillator is
connected between the X
clock source should be connected the XIN pin and the XOUT pin should be left
open. Feedback resistor is connected between XIN and XOUT.
Reference voltage input pin for the A-D converter.
Port P0 is an 8-bit I/O port. The output structure is CMOS output.
When this port is selected for input, pull-up transistor can be connected in
units of 1-bit and a key on wake up function is provided.
Port P1 is an 8-bit I/O port. The output structure is CMOS output.
When this port is selected for input, pull-up transistor can be connected in
units of 4-bit. P1
P16, P17 are in common with serial I/O pins SIN, SOUT, CLK, SRDY, respectively. The output structure of SOUT and SRDY can be changed to N-channel
open drain output.
Port P2 is an 8-bit I/O port. The output structure is CMOS output.
When this port is selected for input, pull-up transistor can be connected in
units of 4-bit.
This port is in common with analog input pins IN0–IN7.
Port P3 is a 4-bit input port. P30, P31 are in common with external interrupt
input pins INT0, INT1, and P32, P33 are in common with timer input pins
CNTR0, CNTR1.
Port P4 is a 4-bit I/O port. The output structure is CMOS output. When this
port is selected for input, pull-up transistor can be connected in units of 4-bit.
Port P5 is a 4-bit input port and pull-up transistor can be connected in units of
4-bit. P50, P51 are in common with input/output pins of clock for clock function
XCIN, XCOUT. When P50, P51 are used as XCIN, XCOUT, connect a ceramic or a
quartz-crystal oscillator between XCIN and XCOUT.
If an external clock input is used, connect the clock input to the XCIN pin and
open the XCOUT pin. Feedback resistor is connected between XCIN and XCOUT
pins.
2, P13 are in common with timer output pins T0, T1, P14, P15,
IN and XOUT pins. If an external clock is used, the
MITSUBISHI MICROCOMPUTERS
7470/7471 Group
7
MITSUBISHI MICROCOMPUTERS
7470/7471 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
FUNCTIONAL DESCRIPTION
Central Processing Unit (CPU)
The 7470/7471 group uses the standard 740 family instruction set.
Refer to the table of 740 family addressing modes and machine instructions or the SERIES 740 <Software> User’s Manual for
details on the instruction set.
Machine-resident 740 family instructions are as follows:
The FST and SLW instruction cannot be used.
The MUL, DIV, WIT, and STP instruction can be used.
b7
b0
CPU mode register (Address 00FB16)
CPU Mode Register
The CPU mode register is allocated at address 00FB16.
This register contains the stack page selection bit.
These bits must always be set to “0”.
Stack page selection bit (Note 1)
0 : In page 0 area
1 : In page 1 area
P5
0, P51/XCIN, XCOUT selection bit (Note 2)
0, P51
0 : P5
1 : XCIN, XCOUT
XCOUT drive capacity selection bit (Note 2)
0 : Low
1 : High
Notes 1 : This address is not used in the 7470 group.
2 : This address is allocated P1–P4 pull-up control register for the 7470 group.
Fig. 3 SFR (Special Function Register) memory map
10
MITSUBISHI MICROCOMPUTERS
7470/7471 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
INTERRUPTS
Interrupts can be caused by 12 different sources consisting of five
external, six internal, and one software sources.
Interrupts are vectored interrupts with priorities shown in Table 1.
Reset is also included in the table because its operation is similar
to an interrupt.
When an interrupt is accepted, the registers are pushed, interrupt
disable flag I is set, and the program jumps to the address specified in the vector table. The interrupt request bit is cleared
automatically. The reset and BRK instruction interrupt can never
be disabled. Other interrupts are disabled when the interrupt disable flag is set.
All interrupts except the BRK instruction interrupt have an interrupt
request bit and an interrupt enable bit. The interrupt request bits
are in interrupt request registers 1 and 2 and the interrupt enable
bits are in interrupt control registers 1 and 2. External interrupts
INT
0 and INT1 can be asserted on either the falling or rising edge
as set in the edge polarity selection register. When “0” is set to this
register, the interrupt is activated on the falling edge; when “1” is
set to the register, the interrupt is activated on the rising edge.
When the device is put into power-down state by the STP instruction or the WIT instruction, if bit 5 in the edge polarity selection
register is “1”, the INT
rupt. When a key on wake up interrupt is valid, an interrupt request
is generated by applying the “L” level to any pin in port P0. In this
case, the port used for interrupt must have been set for the input
mode.
If bit 5 in the edge polarity selection register is “0” when the device
is in power-down state, the INT
in the edge polarity selection register is set to “1” when the device
is not in a power-down state, neither key on wake up interrupt request nor INT
The CNTR
INT
1. The interrupt input pin can be specified for either CNTR0 or
CNTR
Figure 4 shows the structure of the edge polarity selection register, interrupt request registers 1 and 2, and interrupt control
registers 1 and 2.
Interrupts other than the BRK instruction interrupt and reset are
accepted when the interrupt enable bit is “1”, interrupt request bit
is “1”, and the interrupt disable flag is “0”. The interrupt request bit
can be reset with a program, but not set. The interrupt enable bit
can be set and reset with a program.
Reset is treated as a non-maskable interrupt with the highest priority. Figure 5 shows interrupts control.
1 interrupt request is generated.
0/CNTR1 interrupts function in the same as INT0 and
1 pin by setting bit 4 in the edge polarity selection register.
1 interrupt becomes a key on wake up inter-
1 interrupt is selected. Also, if bit 5
Table 1. Interrupt vector address and priority
Interrupt source
RESET
INT0 interrupt
INT1 interrupt or key on wake up interrupt
CNTR0 interrupt or CNTR1 interrupt
Timer 1 interrupt
Timer 2 interrupt
Timer 3 interrupt
Timer 4 interrupt
Serial I/O interrupt
A-D conversion completion interrupt
BRK instruction interrupt
Nothing is allocated (The value is undefined at reading)
Interrupt request register 1
(Address 00FC
16
)
b7b0
Timer 1 interrupt request bit
Timer 2 interrupt request bit
Timer 3 interrupt request bit
Timer 4 interrupt request bit
Nothing is allocated
(The value is undefined at reading)
Serial I/O transmit interrupt request bit
A-D conversion completion interrupt request bit
Interrupt request register 2
(Address 00FD
16
)
INT0 interrupt request bit
INT
1
interrupt request bit
CNTR0 or CNTR1 interrupt request bit
0 : No interrupt request
1 : Interrupt requested
Nothing is allocated
(The value is undefined at reading)
b7b0
Interrupt control register 1
(Address 00FE
Timer 1 interrupt enable bit
Timer 2 interrupt enable bit
Timer 3 interrupt enable bit
Timer 4 interrupt enable bit
Nothing is allocated
(The value is undefined at reading)
Serial I/O receive interrupt enable bit
A-D conversion completion interrupt enable bit
Fig. 4 Structure of registers related to interrupt
Interrupt request bit
Interrupt enable bit
Interrupt disable flag I
b7
16
)
b0
Interrupt control register 2
(Address 00FF
16
)
INT0 interrupt enable bit
INT
1
interrupt enable bit
CNTR0 or CNTR1 interrupt enable bit
0 : Interrupt disable
1 : Interrupt enabled
Nothing is allocated
(The value is undefined at reading)
BRK instruction
Reset
Interrupt request
Fig. 5 Interrupt control
12
MITSUBISHI MICROCOMPUTERS
7470/7471 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
TIMER
The 7470/7471 group has four timers; timer 1, timer 2, timer 3, and
timer 4.
A block diagram of timer 1 through 4 is shown in Figure 6.
Timer 1 can be operated in the timer mode, event count mode, or
pulse output mode. Timer 1 starts counting when bit 0 in the timer
12 mode register (address 00F8
The count source can be selected from the f(X
f(X
CIN) divided by 16, f(XCIN), or event input from P32/CNTR0 pin.
Do not select f(X
CIN) as the count source in the 7470 group. When
bit 1 and bit 2 in the timer 12 mode register are “0”, f(X
by 16 or f(X
and f(X
00FB
is “1”, f(X
CIN) divided by 16 is selected. Selection between f(XIN)
CIN) is done by bit 7 in the CPU mode register (address
16). When bit 1 in the timer 12 mode register is “0” and bit 2
CIN) is selected. And, when bit 1 in the timer 12 mode
register is “1”, an event input from the CNTR
Event inputs are selected depending on bit 2 in the edge polarity
selection register (address 00D4
verted value of CNTR
CNTR
0 input is selected.
When bit 3 in the timer 12 mode register is set to “1”, the P1
becomes timer output T
for the output mode at this time, the timer 1 overflow divided by 2
is output from T
0.
Please set the initial output value in the following procedure.
➀ Set “1” to bit 0 of the timer 12 mode register.
(Timer 1 count stop.)
➁ Set “1” to bit 0 of the timer mode register 2.
➂ Set the output value to bit 0 of the timer FF register.
➃ Set the count value to the timer 1.
➄ Set “0” to bit 0 of the timer 12 mode register.
(Timer 1 count start.)
Timer 2 can only be operated in the timer mode. Timer 2 starts
counting when bit 4 in the timer 12 mode register is set to “0”.
The count source can be selected from the divide by 16, divide by
64, divide by 128, or divide by 256 frequency of f(X
and timer 1 overflow. Do not select f(X
the 7470 group. When bit 5 in the timer 12 mode register is “0”,
any of the divide by 16, divide by 64, divide by 128, or divide by
256 frequency of f(X
IN) or (XCIN) is selected. The divide ratio is se-
lected according to bit 6 and bit 7 in the timer 12 mode register,
and selection between f(X
7 in the CPU mode register. When bit 5 in the timer 12 mode register is “1”, timer 1 overflow is selected as the count source.
Timer 3 can be operated in the timer mode, event count mode, or
PWM mode. Timer 3 starts counting when bit 0 in the timer 34
mode register (address 00F9
16) is set to “0”.
IN) divided by 16,
IN) divided
0 pin is selected.
16). When this bit is “0”, the in-
0 input is selected; when the bit is “1”,
2 pin
0. When the direction register of P12 is set
IN) or f(XCIN),
CIN) as the count source in
IN) and f(XCIN) is made according to bit
16) is set to “0”.
The count source can be selected from the f(XIN) divided by 16,
f(X
CIN) divided by 16, f(XCIN), timer 1 or timer 2 overflow, or an
event input from P3
3/CNTR1 pin according to the statuses of bit 1
and bit 2 in the timer 34 mode register, bit 6 in the timer mode register 2 (address 00FA
not select f(X
16) and bit 7 in the CPU mode register. Do
CIN) as the count source in the 7470 group. Note,
however, that if timer 1 overflow or timer 2 overflow is selected for
the count source of timer 3 when timer 1 overflow is selected for
the count source of timer 2, timer 1 overflow is always selected regardless of the status of bit 6 in the timer mode register 2. Event
inputs are selected depending on bit 3 in the edge polarity selection register. When this bit is “0”, the inverted value of CNTR
is selected; when the bit is “1”, CNTR
1 input is selected.
1 input
Timer 4 can be operated in the timer mode, event count mode,
pulse output mode, pulse width measuring mode, or PWM mode.
Timer 4 starts counting when bit 3 in the timer 34 mode register is
set to “0” when bit 6 in this register is “0”. When bit 6 is “1”, the
pulse width measuring mode is selected. The count source can be
selected from timer 3 overflow, f(X
by 16, f(X
P3
CIN), timer 1 or timer 2 overflow, or an event input from
3/CNTR1 pin according to the statuses of bit 4 and bit 5 in the
IN) divided by 16, f(XCIN) divided
timer 34 mode register, bit 6 in the timer mode register 2, and bit 7
in the CPU mode register. Do not select f(X
CIN) as the count
source in the 7470 group. Note, however, that if timer 1 overflow or
timer 2 overflow is selected for the count source of timer 4 when
timer 1 overflow is selected for the count source of timer 2, timer 1
overflow is always selected regardless of the status of bit 6 in the
timer mode register 2. Event inputs are selected depending on bit
3 in the edge polarity selection register.
When this bit is “0”, the inverted value of CNTR
when the bit is “1”, CNTR
1 input is selected.
When bit 7 in the timer 34 mode register is set to “1”, the P1
becomes timer output T
1. When the direction register of P13 is set
1 input is selected;
3 pin
for the output mode at this time, the timer 4 overflow divided by 2
is output from T
1 when bit 7 in the timer mode register 2 is “0”.
Please set the initial output value in the following procedure.
➀ Set “1” to bit 3 of the timer 34 mode register.
(Timer 4 count stop.)
➁ Set “1” to bit 1 of the timer mode register 2.
➂ Set the output value to bit 1 of the timer FF register.
➃ Set the count value to the timer 4.
➄ Set “0” to bit 3 of the timer 34 mode register.
(Timer 4 count start.)
(1) Timer mode
Timer performs down count operations with the dividing ratio being
1/(n+1). Writing a value to the timer latch sets a value to the timer.
When the value to be set to the timer latch is nn
set to a timer is nn
the count source from nn
00
16 to FF16. At the falling edge of the count source immediately
after timer value has reached FF
16, which is down counted at the falling edge of
16 to (nn16-1) to (nn16-2) to ...0116 to
16, value (nn16-1) obtained by
16, the value to be
subtracting one from the timer latch value is set (reloaded) to the
timer to continue counting. At the rising edge of the count source
immediately after the timer value has reached FF
16, an overflow
occurs and an interrupt request is generated.
13
MITSUBISHI MICROCOMPUTERS
7470/7471 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
(2) Event count mode
Timer operates in the same way as in the timer mode except that
it counts input from the CNTR
0 or CNTR1 pin.
(3) Pulse output mode
In this mode, duty 50% pulses are output from the T
When the timer overflows, the polarity of the T
0 or T1 pin.
0 or T1 pin output
level is inverted.
(4) Pulse width measuring mode
The 7470/7471 group can measure the “H” or “L” width of the
CNTR
0 or CNTR1 input waveform by using the pulse width mea-
suring mode of timer 4. The pulse width measuring mode is
selected by writing “1” to bit 6 in the timer 34 mode register. In the
pulse width measuring mode, the timer counts the count source
while the CNTR
0 or CNTR1 input is “H” or “L”. Whether the CNTR0
input or CNTR1 input to be measured can be specified by the status of bit 4 in the edge polarity selection register; whether the “H”
width or “L” width to be measured can be specified by the status of
bit 2 (CNTR
0) and bit 3 (CNTR1) in the edge polarity selection reg-
ister.
(5) PWM mode
The PWM mode can be entered for timer 3 and timer 4 by setting
bit 7 in the timer mode register 2 to “1”. In the PWM mode, the P1
pin is set for timer output T1 to output PWM waveforms by setting
bit 7 in the timer 34 mode register to “1”. The direction register of
P1
3 must be set for the output mode before this can be done.
In the PWM mode, timer 3 is counting and timer 4 is idle while the
PWM waveform is “L”. When timer 3 overflows, the PWM waveform
goes “H”. At this time, timer 3 stops counting simultaneously and
timer 4 starts counting. When timer 4 overflows, the PWM waveform goes “L”, and timer 4 stops and timer 3 starts counting again.
Consequently, the “L” duration of the PWM waveform is determined by the value of timer 3; the “H” duration of the PWM
waveform is determined by the value of timer 4.
When a value is written to the timer in operation during the PWM
mode, the value is only written to the timer latch, and not written to
the timer. In this case, if the timer overflows, a value one less the
value in the timer latch is written to the timer. When any value is
written to an idle timer, the value is written to both the timer latch
and the timer.
In this mode, do not select timer 3 overflow as the count source for
timer 4.
INPUT LATCH FUNCTION
The 7470/7471 group can latch the P30/INT0, P31/INT1, P32/
CNTR
0, and P33/CNTR1 pin level into the input latch register (ad-
dress 00D6
latched to the input latch register can be selected by using the
edge polarity selection register. When bit 0 in the edge polarity selection register is “0”, the inverted value of the P3
latched; when the bit is “1”, the P3
is. When bit 1 in the edge polarity selection register is “0”, the inverted value of the P3
“1”, the P3
polarity selection register is “0”, the inverted value of the P3
CNTR
level is latched as it is. When bit 3 in the edge polarity selection
register is “0”, the inverted value of the P3
latched; when the bit is “1”, the P3
it is.
3
16) when timer 4 overflows. The polarity of each pin
0/INT0 pin level is
0/INT0 pin level is latched as it
1/INT1 pin level is latched; when the bit is
1/INT1 pin level is latched as it is. When bit 2 in the edge
0 pin level is latched; when the bit is “1”, the P32/CNTR0 pin
3/CNTR1 pin level is
3/CNTR1 pin level is latched as
2/
14
Loading...
+ 32 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.