The 7477/7478 group is the single-chip microcomputer designed
with CMOS silicon gate technology.
The single-chip microcomputer is 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.
In addition, built-in PROM type microcomputers with built-in electrically writable PROM, and additional functions equivalent to the
mask ROM version are also available.
7477/7478 group products are shown noted below.
The 7477 and the 7478 differ in the number of I/O ports, package
outline, and clock generating circuit only.
2 : Only P20–P23 (IN0–IN3) 4-bit for the 7477 group.
3 : Only P40 and P41 2-bit for the 7477 group.
4 : This port is not included in the 7477 group.
Power source
Analog power
source
Reset input
Clock input
Clock output
Reference voltage
input
I/O port P0
I/O port P1
Input port P2
Input port P3
I/O port P4
Input port P5
SS for M37478M4/M8/E8-XXXFP.
Input/
Output
Input
Input
Output
Input
I/O
I/O
Input
Input
I/O
Input
Apply voltage of 2.7 to 5.5V to VCC, and 0V 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 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
P14, P15, P16 and P17 are in common with serial I/O pins RXD, TXD, SCLK
____
and SRDY, respectively .
Port P2 is an 8-bit input port.
This port is in common with analog input pins IN0 to 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 and P13 are in common with timer output pins T0 and T1.
IN and XOUT pins. If an external clock is used, the
7
MITSUBISHI MICROCOMPUTERS
7477/7478 GROUP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
FUNCTIONAL DESCRIPTION
Central Processing Unit (CPU)
The 7477/7478 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
CPU Mode Register
The CPU mode register is allocated at address 00FB16.
This register contains the stack page selection bit.
b0
CPU mode register (Address 00FB16)
These bits must always be set to “0”.
Stack page selection bit (Note 1)
0 : In page 0 area
1 : In page 1 area
Notes 1 : In the M37477M4-XXXSP/FP, M37478M4-XXXSP/FP, set this bit to “0”.
2 : In the 7477 group, set this bit to “0”.
Fig. 1 Structure of CPU mode register
0
, P51/X
CIN
, X
COUT
P5
0 : P5
1 : X
X
0 : Low
1 : High
Clock (XIN-X
0 : Oscillates
1 : Stops
Internal system clock selection bit (Note 2)
0 : X
1 : X
0
, P5
1
CIN
, X
COUT
COUT
drive capacity selection bit (Note 2)
OUT
IN-XOUT
CIN-XCOUT
selection bit (Note 2)
) stop bit (Note 2)
selected (normal mode)
selected (low-speed mode)
8
MITSUBISHI MICROCOMPUTERS
7477/7478 GROUP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
MEMORY
• Special Function Register (SFR) Area
The special function register (SFR) area contains the registers
relating to functions such as I/O ports and timers.
• RAM
RAM is used for data storage as well as a stack area.
• ROM
ROM is used for storing user programs as well as the interrupt
vector area.
RAM (192 bytes)
for
M37477M4
M37477M8/E8
M37478M4
M37478M8/E8
RAM (192 bytes)
for
M37477M8/E8
M37478M8/E8
• Interrupt Vector Area
The interrupt vector area is for storing jump destination addresses used at reset or when an interrupt is generated.
• Zero Page
Zero page addressing mode is useful because it enables access
to this area with fewer instruction cycles.
• Special Page
Special page addressing mode is useful because it enables access to this area with fewer instruction cycles.
Notes 1 : This address is not used in the 7477 group.
2 : This address is allocated P1–P4 pull-up control register for the 7477 group.
Fig. 3 SFR (Special Function Register) memory map
10
MITSUBISHI MICROCOMPUTERS
7477/7478 GROUP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
INTERRUPTS
Interrupts can be caused by 13 different sources consisting of five
external, seven 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
INT0 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 INT1 interrupt becomes a key on wake up interrupt. 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 INT1 interrupt is selected. Also, if bit 5
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 INT1 interrupt request is generated.
The CNTR0/CNTR1 interrupts function in the same as INT0 and
INT1. The interrupt input pin can be specified for either CNTR0 or
CNTR1 pin by setting bit 4 in the edge polarity selection register.
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.
Table 1. Interrupt vector address and priority.
______
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 receive interrupt
Serial I/O transmit interrupt
A-D conversion completion interrupt
BRK instruction interrupt
Nothing is allocated (The value is undefined at reading)
Interrupt request register 1
(Address 00FC
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 receive interrupt request bit
Serial I/O transmit interrupt request bit
A-D conversion completion interrupt request bit
16)
0
1
1/INT1
0 – P07 “L” level (for key-on wake-up)
16)
b7b0
Interrupt request register 2
(Address 00FD
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)
16)
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
Serial I/O transmit 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
BRK instruction
Reset
16)
b7
b0
Interrupt control register 2
(Address 00FF
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)
16)
Interrupt request
Fig. 5 Interrupt control
12
MITSUBISHI MICROCOMPUTERS
7477/7478 GROUP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
TIMER
The 7477/7478 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 00F816) is set to “0”.
The count source can be selected from the f(XIN) divided by 16,
f(XCIN) divided by 16, f(XCIN), or event input from P32/CNTR0 pin.
Do not select f(XCIN) as the count source in the 7477 group. When
bit 1 and bit 2 in the timer 12 mode register are “0”, f(XIN) divided
by 16 or f(XCIN) divided by 16 is selected. Selection between
f(XIN) and f(XCIN) is done by bit 7 in the CPU mode register (address 00FB16). When bit 1 in the timer 12 mode register is “0” and
bit 2 is “1”, f(XCIN) is selected. And, when bit 1 in the timer 12
mode register is “1”, an event input from the CNTR0 pin is selected. Event inputs are selected depending on bit 2 in the edge
polarity selection register (address 00D416). When this bit is “0”,
the inverted value of CNTR0 input is selected; when the bit is “1”,
CNTR0 input is selected.
When bit 3 in the timer 12 mode register is set to “1”, the P12 pin
becomes timer output T0. When the direction register of P12 is set
for the output mode at this time, the timer 1 overflow divided by 2
is output from T0.
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(XIN) or f(XCIN),
and timer 1 overflow. Do not select f(XCIN) as the count source in
the 7477 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(XIN) or f(XCIN) is selected. The divide ratio is
selected according to bit 6 and bit 7 in the timer 12 mode register,
and selection between f(XIN) and f(XCIN) is made according to bit
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 00F916) is set to “0”.
The count source can be selected from the f(XIN) divided by 16,
f(XCIN) divided by 16, f(XCIN), timer 1 or timer 2 overflow, or an
event input from P33/CNTR1 pins 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 00FA16) and bit 7 in the CPU mode register. Do
not select f(XCIN) as the count source in the 7477 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 CNTR1 input
is selected; when the bit is “1”, CNTR1 input is selected.
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(XIN) divided by 16, f(XCIN) divided
by 16, f(XCIN), timer 1 or timer 2 overflow, or an event input from
P33/CNTR1 pin according to the statuses of bit 4 and bit 5 in the
timer 34 mode register, bit 6 in the timer mode register 2, and bit 7
in the CPU mode register. Do not select f(XCIN) as the count
source in the 7477 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 CNTR1 input is selected;
when the bit is “1”, CNTR1 input is selected.
When bit 7 in the timer 34 mode register is set to “1”, the P13 pin
becomes timer output T1. When the direction register of P13 is set
for the output mode at this time, the timer 4 overflow divided by 2
is output from T1 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 nn16, the value to be
set to a timer is nn16, which is down counted at the falling edge of
the count source from nn16 to (nn16-1) to (nn16-2) to ...0116 to 0016
to FF16. At the falling edge of the count source immediately after
timer value has reached FF16, value (nn16-1) obtained by 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 FF16, an overflow occurs
and an interrupt request is generated.
(2) Event count mode
Timer operates in the same way as in the timer mode except that
it counts input from the CNTR0 or CNTR1 pin.
(3) Pulse output mode
In this mode, duty 50% pulses are output from the T0 or T1 pin.
When the timer overflows, the polarity of the T0 or T1 pin output
level is inverted.
(4) Pulse width measuring mode
The 7477/7478 group can measure the “H” or “L” width of the
CNTR0 or CNTR1 input waveform by using the pulse width measuring 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 CNTR0 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”
13
MITSUBISHI MICROCOMPUTERS
7477/7478 GROUP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
width or “L” width to be measured can be specified by the status of
bit 2 (CNTR0) and bit 3 (CNTR1) in the edge polarity selection register.
(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 P13
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
P13 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 7477/7478 group can latch the P30/INT0, P31/INT1, P32/
CNTR0, and P33/CNTR1 pin level into the input latch register (address 00D616) when timer 4 overflows. The polarity of each pin
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 P30/INT0 pin level is latched; when the bit is
“1”, the P30/INT0 pin level is latched as it is.
When bit 1 in the edge polarity selection register is “0”, the inverted value of the P31/INT1 pin level is latched; when the bit is
“1”, the P31/INT1 pin level is latched as it is. When bit 2 in the
edge polarity selection register is “0”, the inverted value of the
P32/CNTR0 pin level is latched; when the bit is “1“, the P32/CNTR0
pin level is latched as it is. When bit 3 in the edge polarity selection register is “0”, the inverted value of the P33/CNTR1 pin level is
latched; when the bit is “1”, the P33/CNTR1 pin level is latched as
it is.
14
X
CIN
(Note)
MITSUBISHI MICROCOMPUTERS
7477/7478 GROUP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
Data bus
1/2
P32/CNTR
P12/T
P32/CNTR
T12M
X
1/2
IN
0
Port latch
0
CM
T12M
7
EG
3
1/8
2
T12M
2
T12M
1
TM2
Timer 1 latch (8)
0
0
1/2
Timer 1 (8)
Timer 1
interrupt request
Timer 2 latch (8)
T12M
1/4
1/8
1/16
T12M
6
7
T12M
5
TM2
T12M
6
T34M
T34M
4
Timer 2 (8)
1
2
Timer 2
interrupt request
Timer 3 latch (8)
T34M
0
1
EG
3
T34M
4
T34M
5
Timer 3 (8)
Timer 3
interrupt request
Timer 4 latch (8)
Port latch
P13/T
1
T34M
( Select gate : At reset, shaded side is connected.)
Note : The 7477 group does not have X
Fig. 6 Block diagram of timer 1 through 4
EG
7
P33/CNTR
P32/CNTR
P31/INT
P30/INT
T34M
4
1
0
1
0
6
T34M
Timer 4 (8)
3
F/F
Timer 4
interrupt request
1/2
TM2
7
TM2
EG
EG
3
2
1
C
D3 Q3
EG
1
D2 Q2
D1 Q1
D0 Q0
EG
0
CIN
input.
15
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.