The 7630 group is a single chip 8-bit microcomputer designed with
CMOS silicon
equipped with a CAN (Controller Area Network) module cir-
Bein
cuit, the microcomputer is suited to drive automotive equipments.
The CAN module complies with CAN specification version 2.0, part
B and allows priority-based messa
In addition to the microcomputers simple instruction set, the ROM,
RAM and I/O addresses are placed in the same memory map to
enable easy pro
The built-in ROM is available as mask ROM or One Time PROM.
For development purposes, emulator- and EPROM-type microcomputers are available as well.
I/O port P0I/OCMOS I/O ports or analog input ports
7
0
1
I/O port P1I /O
0
InputReference volta
Input
Power supplypins; apply 4.0 to 5.5 V to V
Ground pin for A-D converter. Connect to V
and 0 V to V
CC
SS
SS
Reset pin. This pin must be kept at “L” level for more than 2 µs, to enter the reset
state. If the crystal or ceramic resonator requires more time to stabilize, extend the
“L” level period.
Input and output pins of the internal clock
quartz–crystal resonator between the X
source is used, connect it to X
and leave X
IN
enerating circuit. Connect a ceramic or
and X
IN
pins. When an external clock
OUT
open.
OUT
e input pin for A-D converter
CMOS input port or external interrupt input port. The active ed
external interrupts can be selected. This pin will be used as V
ramming of One Time PROM Versions.
pro
e (rising or falling) of
pin during PROM
PP
CMOS I/O port or external interrupt input port. The active edge (rising or falling) of
external interrupts can be selected.
CMOS I/O port or input pin used in the bi-phase counter mode
CMOS I/O port or timer X input pin used for the event counter, pulse width measure-
ment and bi-phase counter mode
/CNTR
P1
5
/PWM
P1
6
P1
7
P2
0/SIN
P21/S
P22/S
P23/S
/URXD
P2
4
/UTXD
P2
5
P2
6/URTS
P27/U
P3
0
P3
/CTX
1
/CRX
P3
2
P3
—P3
3
P4
/KW0—
0
/KW
P4
7
OUT
CLK
RDY
CTS
1
I/O port P2
I/O port P3
4
I/O port P4I /O
7
I/O
I/O
CMOS I/O port or timer Y input pin used for the event counter, pulse width and pulse
period measurement mode
CMOS I/O port or PWM output pin used in the PWM mode of timers 2 and 3
CMOS I/O port
CMOS I/O ports or clock synchronous serial I/O pins
CMOS I/O ports or asynchronous serial I/O pins
CMOS I/O port
CMOS I/O port or CAN transmit data pin
CMOS I/O port or CAN receive data pin
CMOS I/O port
CMOS I/O ports. These ports can be used for key-on wake-up when confi
ured as
inputs.
MITSUBISHI
ELECTRIC
3
PART NUMBERING
g
g
g
Product M37630M 4 T– XXX FP
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
e type
Packa
FP: 44P6N-A packa
FS: 80D0 packa
ROM number
Omitted in One Time PROM version (blank) and EPROM version
T: Automotive use
ROM/PROM size
4: 16384 bytes
The first 128 bytes and the last 4 bytes of ROM are reserved areas.
They cannot be used.
e
e
Fig. 3Part numbering
Memory type
M: Mask ROM version
E: EPROM or One Time PROM version
4
MITSUBISHI
ELECTRIC
GROUP EXPANSION
g
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
Mitsubishi plans to expand the 7630 group as follows:
Memory Type
Support mask ROM, One Time PROM and EPROM versions.
M37630M4T-XXXFPMask ROM version
M37630E4T-XXXFP1638451244P6N-AOne Time PROM version
M37630E4FP(16252)One Time PROM version (blank)
M37630E4FS80D0EPROM version
(P)ROM size (bytes)
ROM size for User ( )
RAM size (bytes)Packa
eRemarks
As of March 1998
MITSUBISHI
ELECTRIC
5
FUNCTIONAL DESCRIPTION
g
g
g
g
g
g
g
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
Central Processing Unit (CPU)
The core of 7630 group microcomputers is the 7600 series CPU.
This core is based on the standard instruction set of 740 series;
however the performance is improved by allowin
same instructions as that of the 740 series in less cycles. Refer to
the 7600 Series Software Manual for details of the instruction set.
70
to execute the
CPU mode re
CPUM
Processor mode bits (set these bits to “00”)
b1 b0
0 0: Sin
0 1: Not used
1 0: Not used
1 1: Not used
Stack pa
Not used (“0” when read, do not write “1”)
Internal system clock selection bit
Not used (“0” when read, do not write “1”)
e selection bit
0 : 0 pa
1 : 1 pa
0 : φ=f(X
1 : φ=f(X
CPU Mode Register CPUM
The CPU mode register contains the stack page selection bit and
internal system clock selection bit. The CPU mode re
cated to address 0000
ister (address 000016)
le–chip mode
e
e
) divided by 2 (high–speed mode)
IN
) divided by 8 (middle–speed mode)
IN
.
16
ister is allo-
Fig. 5Structure of CPU mode register
6
MITSUBISHI
ELECTRIC
MEMORY
g
g
g
g
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
Special Function Register (SFR) Area
The special function register (SFR) area contains the registers
to functions such as I/O ports and timers.
relatin
RAM
RAM is used for data storage and for stack area of subroutine calls
and interrupts.
ROM
ROM is used for storing user’s program code as well as the interrupt vector area.
RAM area
RAM size
(byte)
192
256
384
512
640
768
896
1024
1536
2048
Address
XXXX
011F
015F
01DF
025F
02DF
035F
03DF
045F
06DF
085F
16
16
16
16
16
16
16
16
16
16
16
User RAM
Interrupt Vector Area
The interrupt vector area is for storing jump destination addresses
used at reset or when an interrupt is
enerated.
Zero Page
This area can be accessed most efficiently by means of the zero
e addressing mode.
pa
Special Page
This area can be accessed most efficiently by means of the s pecial
The 7630 group has 35 programmable I/O pins and one input pin
ed in five I/O ports (ports P0 to P4). The I/O ports are con-
arran
trolled by the correspondin
ters; each I/O pin can be controlled separately.
When data is read from a port confi
latch’s contents are read instead of the port level. A port confi
port registers and port direction regis-
ured as an output port, the port
ured
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
as an input port becomes floatin
written to this port will affect the port latch only; the port remains
.
floatin
Refer to Structure of port- and port direction re
port I/Os (1) and Structure of port I/Os (2).
and its level can be read. Data
isters, Structure of
70
Port Pi re
Pi
Port Pij control bit (j = 0 to 7)
0 : “L” level
1 : “H” level
Note : The control bits corresponding to P10, P35, P36 and P37 are not used
70
Port Pi direction re
PiD
Port Pij direction control bit (j = 0 to 7)
0 : Port confi
1 : Port confi
Note : The direction control bits corresponding to P10, P11, P35, P36 and
Fig. 8Structure of port- and port direction registers
ister (i = 0 to 4) (address 000816 + 2 · i)
(“0” when read, do not write “1”).
ister (i = 0 to 4) (address 000916 + 2 · i)
ured as input
ured as output
P3
are not used (“0” when read, do not write “1”). Port direction re-
7
gisters are undefined when read (write only).
MITSUBISHI
ELECTRIC
9
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
(1) Ports P0
Data bus
/AN0 to P07/AN
0
Analog input selection
ADC input
(2) Port P11/INT
Interrupt input
Data bus
(3) Port P12/INT
Data bus
Direction
register
Port latch
0
1
Pull-up control bit
Direction
register
Port latch
7
Pull-up control bit
Analog input selection
(4) Port P13/TX
Timer bi-phase mode input
Data bus
0
Pull-up control bit
Port latch
direction
register
(5) Ports P14/CNTR0, P15/CNTR
Pull-up control bit
Direction
register
Data bus
Timer bi-phase mode input
Port latch
(6) Port P16/PWM
Pull-up control bit
PWM output enable
Direction
register
Data bus
Port latch
1
Interrupt input
Fig. 9Structure of port I/Os (1)
PWM output
10
MITSUBISHI
ELECTRIC
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
(7) Ports P17, P30, P33, P3
Pull-up control bit
Direction
register
IN
Direction
register
Port latch
OUT
Port latch
Pull-up control bit
Direction
register
Port latch
Data bus
(8) Port P20/S
SIO Port Select
Data bus
SIO1 input
(9) Port P21/S
SIO port selection bit
Transmit complete signal
Data bus
4
Pull-up control bit
(12) Ports P24/URXD, P27/U
Transmission or reception* in
Transmit or receive* enable bit
Data bus
progress
Direction
register
Port latch
(13) Ports P25/UTXD, P26/U
Transmission or reception** in
Transmit or receive** enable bit
Data bus
(*) for U
CTS
(**) for U
RTS
progress
Direction
register
Port latch
U
or U
output
TXD
RTS
(14) Port P31/CTX
CAN port selection bit
Direction
register
Data bus
Port latch
CTS
Pull-up control bit
U
RTS
Pull-up control bit
Pull-up control bit
RXD
or U
CTS
input
SIO output
(10) Port P22/S
(11) Port P23/S
CLK
Clock selection bit
Port selection bit
direction
Data bus
SRDY output selection bit
Data bus
Port latch
SIO clock output
RDY
Direction
Port latch
SRDY output
Pull-up control bit
register
Pull-up control bit
register
Fig. 10Structure of port I/Os (2)
External clock input
CTX output
(15) Port P3
/CRX
2
CAN dominant level control bit
Pull-up
/down control bit
Direction
register
Data bus
Port latch
CAN interrupt
CRX input
(16) Ports P40/KW0 to P47/KW
Key-on wake-up control bit
Pull-up
/down control bit
Direction
register
Data bus
Key-on wake-up interrupt
Port latch
7
MITSUBISHI
ELECTRIC
11
MITSUBISHI MICROCOMPUTERS
g
g
g
g
g
g
g
g
g
g
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
Port Pull-up/pull-down Function
Each pin of ports P0 to P4 except P11 is equipped with a programmable pull-up transistor. P3
equipped with pro
pull-up function of P0 to P3 can be controlled by the correspondin
Fig. 11Structure of port pull-up/down control regist ers
70
Polarity control register (address 002F16)
PCON
Key-on wake-up polarity control bit
0 : Low level active
1 : Hi
CAN module dominant level control bit
0 : Low level dominant
1 : Hi
Not used (undefined when read)
Fig. 12Structure of polarity control register
h level active
h level dominant
12
MITSUBISHI
ELECTRIC
MITSUBISHI MICROCOMPUTERS
g
g
g
g
g
g
g
g
g
g
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
Port Overvoltage Application
When configured as input ports, P1 to P4 may be subjected to over-
e (VI>VCC) if the input current to the applicable port is limited
volta
to the specified values (see “Table 8:”). Use a serial resistor of
appropriate size to limit the input current. To estimate the resistor
value, assume the port volta
Notes:
• Subjectin
Assure to keep V
ports to overvoltage may effect the supply voltage.
CC
e to be VCC at overvoltage condition.
and VSS within the target limits.
• Avoid to subject ports to overvolta
5.5 V.
• The overvolta
the internal port protection circuits has a ne
ports noise immunity. Therefore, careful and intense testin
the tar
“countermeasures a
manual.
• Port P0 must not be subjected to overvolta
e condition causing input current flowing through
et system’s noise immunity is required. Refer to the
ainst noise” of the corresponding users
e causing VCC to rise above
ative effect on the
e conditions.
of
MITSUBISHI
ELECTRIC
13
INTERRUPTS
g
g
g
g
g
g
g
g
g
g
g
g
There are 24 interrupts: 6 external, 17 internal, and 1 software.
Interrupt Control
Each interrupt except the BRK instruction interrupt has both an
interrupt request bit and an interrupt enable bit, and is controlled by
the interrupt disable fla
interrupt request and enable bits are “1” and the interrupt dis-
in
able fla
software. Interrupt request bits can be cleared by software but cannot be set by software. The BRK instruction interrupt and reset cannot be disabled with any fla
except the BRK instruction interrupt and reset. If several interrupt
requests occur at the same time, the interrupt with the hi
ity is accepted first.
is “0”. Interrupt enable bits can be cleared or set by
Interrupt Operation
Upon acceptance of an interrupt, the following operations are automatically performed.
1. The processin
. An interrupt occurs when the correspond-
or bit. The I flag disables all interrupts
hest prior-
being executed is stopped.
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
2. The contents of the pro
ister are automatically pushed onto the stack.
re
3. Concurrently with the push operation, the interrupt jump
destination address is read from the vector table into the
ram counter.
pro
4. The interrupt disable fla
request bit is cleared.
Notes on use
When the active edge of an external interrupt (INT0, INT1, CNTR0,
, CWKU or KOI) is changed, the corresponding interrupt
CNTR
1
request bit may also be set. Therefore, take the followin
(1) Disable the external interrupt which is selected.
(2) Chan
(3) Clear the interrupt request bit to “0”.
(4) Enable the external interrupt which is selected.
e the active edge in interrupt edge selection register.
(in the case of CNTR
: Timer Y mode register)
CNTR
1
ram counter and processor status
is set and the corresponding interrupt
sequence.
: Timer X mode register; in the case of
0
14
MITSUBISHI
ELECTRIC
.
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
Table 3: Interrupt vector addresses and priority
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
Interrupt sourcePriority
Reset (Note 2)
Watchdo
INT
INT
CAN
transmit
timer2
0
1
successful
CAN successful
receive
CAN overrun7
CAN error
passive
CAN error bus off9
CAN wake up10
Timer X11
Timer Y12
Timer 113
Timer 214
Timer 315
0
CNTR
CNTR
1
16
17
UART receive18
UART transmit19
UART transmit
buffer empty
UART receive
error
20
21
Vector Address (Note 1)
h Low
Hi
1
3
4
5
6
8
FFFB
FFF9
FFF7
FFF5
FFF3
FFF1
FFEF
FFED
FFEB
FFE9
FFE7
FFE5
FFE3
FFE1
FFDF
FFDD
FFDB
FFD9
FFD7
FFD5
FFD3
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
FFFA
FFF8
FFF6
FFF4
FFF2
FFF0
FFEE
FFEC
FFEA
FFE8
FFE6
FFE4
FFE2
FFE0
FFDE
FFDC
FFDA
FFD8
FFD6
FFD4
FFD2
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
Interrupt Request Generatin
Conditions
At ResetNon-maskable
At Watchdog timer underflowNon-maskable
At detection of either rising or falling
e of INT0 interrupt
ed
At detection of either rising or falling
e of INT1 interrupt
ed
At CAN module successful
transmission of messa
e
At CAN module successful reception
of messa
e
If CAN module receives message
when receive buffers are full.
When CAN module enters into error
passive state
When CAN module enters into bus
off state
When CAN module wakes up via
CAN bus
At Timer X underflow or overflow
At Timer Y underflow
At Timer 1 underflow
At Timer 2 underflow
At Timer 3 underflow
At detection of either rising or falling
e in CNTR0 input
ed
At detection of either rising or falling
e in CNTR1 input
ed
At completion of UART receiveValid when UART is selected
At completion of UART transmitValid when UART is selected
At UART transmit buffer emptyValid when UART is selected
When UART reception error occurs.Valid when UART is selected
Remarks
External Interrupt
(active ed
e selectable)
External Interrupt
(active ed
e selectable)
Valid when CAN module is
activated and request transmit
2 : Reset function in the same way as an interrupt with the hi
hest priority
MITSUBISHI
ELECTRIC
15
Interrupt request bit
g
g
g
g
g
g
Interrupt enable bit
Interrupt disable flag I
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
BRK instruction
Reset
Fig. 13Interrupt control
For the external interrupts INT0 and INT1, the active edge causin
the interrupt request can be selected by the INT0 and INT1 interrupt
e selection bits of the interrupt polarity selection register (IPOL);
ed
please refer to Fi
. 14below.
70
Interrupt polarity selection re
IPOL
Not used (returns to “0” when read, do not write “1” in this bit)
interrupt edge selection bit
INT
0
interrupt edge selection bit
INT
1
Not used (returns to “0” when read, do not write “1” in these bits)
0 : Fallin
1 : Risin
Fig. 14Structure of interrupt polarity selection register
Interrupt request
ister (Address 002D16)
edge active
edge active
16
MITSUBISHI
ELECTRIC
MITSUBISHI MICROCOMPUTERS
g
g
g
g
g
g
g
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
7
7
7
0 : No interrupt request
1 : Interrupt requested
Interrupt request re
0
(address 0002
ister A
IREQA
Not used
(returns to ”0” when read)
External interrupt INT
External interrupt INT
CAN successful transmission
request bit
0
request bit
1
interrupt request bit
CAN successful receive
interrupt request bit
CAN overrun interrupt request bit
CAN error passive
interrupt request bit
CAN bus off interrupt request bit
0
Interrupt request register B
(address 0003
16
IREQB
CAN wake up
interrupt request bit
Timer X interrupt request bit
Timer Y interrupt request bit
Timer 1 interrupt request bit
Timer 2 interrupt request bit
Timer 3 interrupt request bit
interrupt request bit
CNTR
0
interrupt request bit
CNTR
1
Interrupt request re
0
(address 0004
ister C
16
IREQC
UART receive complete
(receive buffer full)
interrupt request bit
UART transmit complete
(transmit re
ister empty)
interrupt request bit
UART transmit buffer empty
interrupt request bit
UART receive error interrupt
request bit
Serial I/O interrupt request bit
AD conversion complete
interrupt request bit
Key-on wake-up interrupt request bit
Not used (returns to ”0” when read)
)
16
7
Interrupt control re
0
(address 0005
ister A
16
)
ICONA
Not used (returns to ”0” when read)
External interrupt INT
External interrupt INT
enable bit
0
enable bit
1
CAN successful transmission
interrupt enable bit
CAN successful receive
interrupt enable bit
CAN overrun interrupt enable bit
CAN error passive
interrupt enable bit
CAN bus off interrupt enable bit
7 0
)
Interrupt control re
(address 0006
ICONB
ister B
16
)
CAN wake–up interrupt enable bit
Timer X interrupt enable bit
Timer Y interrupt enable bit
Timer 1 interrupt enable bit
Timer 2 interrupt enable bit
Timer 3 interrupt enable bit
interrupt enable bit
CNTR
0
CNTR1 interrupt enable bit
)
7 0
Interrupt control re
(address 0007
ister C
16
)
ICONC
UART receive complete
(receive buffer full)
interrupt enable bit
UART transmit complete
(transmit re
ister empt y)
interrupt enable bit
UART transmit buffer empty
interrupt enable bit
UART receive error interrupt
enable bit
Serial I/O interrupt enable bit
AD conversion complete
interrupt enable bit
Key-on wake-up interrupt enable bit
Not used (returns to ”0” when read)
0: Interrupt disabled
1: Interrupt enabled
Fig. 15Structure of interrupt request and control registers A, B and C
MITSUBISHI
ELECTRIC
17
KEY-ON WAKE-UP
g
g
g
“Key-on wake-up” is one way of returning from a power-down state
caused by the STP or WIT instruction. Any terminal of port P4 can
be used to
active polarity can be selected by the key-on wake-up polarity con-
Fig. 16Block diagram of key-on wake-up circuit
enerate the key-on wake-up interrupt request. The
key-on wake-up control bit
P4D
j
PUP4
j
port P4j/KW
j
j = 0 to 7
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
trol bit of PCON (see Fi
active level applied, the key-on wake-up interrupt request will be set
to “1”. Please refer to Fi
…
port P4j I/O circuit
. 12). If any pin of port P4 has the selected
. 16.
key-on wake-up interrupt
18
MITSUBISHI
ELECTRIC
TIMERS
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
The 7630 group has five timers: two 16-bit timers and three 8-bit
timers . All these timers will be described in detail below.
TYM
1,0
edge detector
sign generator
edge detector
“1”
“0”
TXM
TXM
5,4
“00”, “11”
“01”
“10”
direction
control
down
“00”, “10”,
“01”
TXM
5, 4
6
P13/TX
P14/CNTR
φ
0
0
1/4
1/16
1/64
1/128
“00”
“01”
“10”
“11 ”
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
16-bit Timers
Timers X and Y are 16-bit timers with multiple operating modes.
. 17.
TX
H
counter (8)
TX
H
latch (8)
TX interrupt request
CNTR0 interrupt request
TXM
count
“11”
7
Please refer to Fi
TXL latch (8)
TXL counter (8)
TXM
=“11”
TYM
3, 2
“1”
5, 4
TYM
“0x”, “11”
“0”
6
TYM
5, 4
“10”
rising edge detector
falling edge detector
P1
/CNTR
5
“00”
1/2
“01”
1/8
“10”
1/32
“11”
1/64
1
Fig. 17Block diagram of timers X and Y (φ is internal system clock)
Timer X
Timer X is a 16-bit timer with a 16-bit reload latch supporting the fol-
operating modes:
lowin
(1) Timer mode
(2) Bi-phase counter mode
(3) Event counter mode
(4) Pulse width measurement mode
These modes can be selected by the timer X mode re
In the timer- and pulse width measurement mode, the timer’s count
source can be selected by the timer X count source selection bits of
the timer Y mode re
for the TXM and TYM bit assi
ister (TYM). Please refer to the Figures below
nment.
On read or write access to timer X, note that the hi
order bytes must be accessed in the specific order.
Write method
When writing to the timer X, write the low-order byte first. The data
written is stored in a temporary re
ister which is assigned to the
ister (TXM).
h-order and low-
latch (8)
TY
TYM
L
7
TYL counter (8)
TYM
TYM
5, 4
5, 4
=“11”
=“01”
same address as TX
finished, the data is placed in the timer X hi
and the low-order byte is transferred from its temporary re
the timer X low-order reload latch. Dependin
latch (8)
TY
H
TY
counter (8)
H
“0x”,
“10”
TYM
. Next, write the high-order byte. When this is
L
TY interrupt request
“11 ”
CNTR1 interrupt request
5, 4
h-order reload latch
ister to
on the timer X write
control bit, the latch contents are reloaded to the timer immediately
(write control bit = “0”) or on the next timer underflow ( write control
bit = “1”).
Read method
When readin
causes the timer X hi
temporary re
the timer X, read the high-order byte first. This
h- and low-order bytes to be transferred to
isters being assigned to the same addresses as TX
and TXL. Next, read the low-order byte which is read from the temporary re
read durin
ister. This method assures the correct timer value can be
the timer count operation.
Timer X count stop control
Re
ardless of the actual operating mode, timer X can be stopped
by settin
the timer X count stop bit (bit 7 of the timer X mode regis-
ter) to “1”.
H
MITSUBISHI
ELECTRIC
19
MITSUBISHI MICROCOMPUTERS
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
70
Fig. 18Structure of Timer X mode register
Timer X mode re
TXM
Timer X data write control bit
0 : Data is written to latch and timer
1 : Data is written to latch only
Not used (“0” when read, do not write “1”)
Timer X mode bits
For interrupt request, fallin
For pulse width measurement mode, measure “H” period
1 : For event counter mode, fallin
For interrupt request, risin
For pulse width measurement mode, measure “L” period
Timer X stop control bit
0 : Timer countin
1 : Timer stopped
Timer Y
Timer Y is a 16 bit timer with a 16-bit reload latch supporting the fol-
operating modes:
lowin
(1) Timer mode
(3) Event counter mode
(5) Pulse period measurement mode
(6) H/L pulse width measurement mode
These modes can be selected by the timer Y mode re
In the timer, pulse period- and pulse width measurement modes’
the timer’s count source can be selected by the timer Y count
source selection bits. Please refer to Fi
On read or write access to timer Y, note that the hi
order bytes must be accessed in a specific order.
Write method
When writin
ten is stored in a temporary re
to timer Y, write the low-order byte first. The data writ-
. 19.
ister wh ich is a ssigned to the same
ister (TYM).
h-order and low-
ister (address 001E16)
edge active
edge active
edge active
address as TY
ished, the data is placed in the timer Y hi
the low-order byte is transferred from its temporary re
timer Y low-order reload latch.
Read method
When readin
causes the timer Y hi
temporary re
and TYL. Next, read the low-order byte which is read from the temporary re
read durin
Timer Y count stop control
Re
ardless of the actual operating mode, timer Y can be stopped
by settin
ter) to “1”.
. Next, write the high-order byte. When this is fin-
L
the timer Y, read the high-order byte first. This
h- and low-order bytes to be transferred to
isters being assigned to the same addresses as TY
ister. This method assures the correct timer value can be
timer count operation.
the timer Y count stop bit (bit 7 of the timer Y mode regis-
h-order reload latch and
ister to the
H
20
MITSUBISHI
ELECTRIC
MITSUBISHI MICROCOMPUTERS
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
70
Timer Y mode re
TYM
Timer X count source selection bits
b1 b0
0 0: φ divided by 4
0 1: φ divided by 16
1 0: φ divided by 64
1 1: φ divided by 128
Timer Y count source selection bits
b3 b2
0 0: φ divided by 2
0 1: φ divided by 8
1 0: φ divided by 32
1 1: φ divided by 64
For interrupt request, fallin
For pulse period measurement mode, refer to fallin
For interrupt request, risin
For pulse period measurement mode, refer to risin
edge active
edges
edge active
edge active
edges
Fig. 19Structure of timer Y mode register (φ is internal system clock)
Operating Modes
(1) Timer mode
This mode is available with timer X and timer Y.
• Count source
The count source for timer X and Y is the output of the correspondin
timer Y mode re
• Operation
Both timers X and Y are down counters. On a timer underflow,
the correspondin
contents of the correspondin
the counters and countin
clock divider. The division ratio can be selected by the
ister.
timer interrupt request bit will be set to “1”, the
timer latches will be reloaded to
continues.
(2) Bi-phase counter mode (quadruplicate)
This mode is available with timer X only.
• Count source
The count sources are P1
• Operation
Timer X will count both risin
(see above). Refer to Timer X bi-phase counter mode operation
for the timin
chart of the bi-phase counter mode.
/CNTR0 and the P13/TX0 pins.
4
and falling edges on both input pins
Table 4: Timer X count direction in Bi-phase counter mode
The count direction is determined by the ed
of count source inputs and may chan
tion. Refer to the table below.
P1
/TX
3
0
↑ Ed
e
↓ Ed
e
L
HUp
L
HDown
On a timer over- or underflow, the correspondin
request bit will be set to “1” and countin
P14/CNTR
LUp
HDown
LDown
HUp
e
↑ Ed
e
↓ Ed
0
Count direction
e polarity and level
e during the count opera-
Down
Up
interrupt
continues.
MITSUBISHI
ELECTRIC
21
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
P13/TX0 input signal
P1
/CNTR0 input signal
4
TX counter
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
count direction
downup
Fig. 20Timer X bi-phase counter mode operation
(3) Event counter mode
This mode is available with timer X and timer Y.
• Count source
The count source for timer X is the input si
nal to the P14/CNTR
pin and for timer Y the input signal to P15/CNTR1 pin.
• Operation
The timer counts down. On a timer underflow, the correspondin
timer interrupt request bit will be set to “1”, the contents of the
correspondin
countin
timer latches will be reloaded to the counters and
continues. The active edge used for counting can be
selected by the polarity selection bit of the correspondin
/CNTR0 or P15/CNTR1. These bits are part of TXM (Structure
P1
4
of Timer X mode re
ister (f is internal system clock)) registers.
re
ister) and TYM (Structure of timer Y mode
(4) Pulse width measurement mode
This mode is available with timer X only.
• Count source
The count source is the output of timer X clock divider. The division ratio can be selected by the timer Y mode re
ister.
• Operation
The timer counts down while the input si
/CNTR0 matches the active polarity selected by the CNTR
P1
4
nal level on
polarity selection bit of TXM (Structure of Timer X mode register). On a timer underflow, the timer X interrupt request bit will be
set to “1”, the contents of the timer latches are reloaded to the
counters and countin
from active polarity (as selected), the CNTR
continues. When the input level changes
interrupt request bit
0
will be set to “1.” The measurement result may be obtained by
timer X during interrupt service.
readin
(5) Pulse period measurement mode
This mode is available with timer Y only.
• Count source
The count source is the output of timer Y clock divider.
pin
• Operation
The active ed
by CNTR
e of input signal to be measured can be selected
polarity selection bit (Fig. 18). When this bit is set to
1
“0”, the time between two consecutive fallin
0
input to P1
/CNTR1 pin will be measured, when the polarity bit is
5
set to “1”, the time between two consecutive risin
measured.
The timer counts down. On detection of an active ed
nal, the contents of the TY counters will be transferred to tem-
si
porary re
isters assigned to the same addresses as TY. At the
same time, the contents of TY latches will be reloaded to the
counters and countin
also causes the CNTR
continues. The active edge of input signal
interrupt request bit to be set to “1”. The
1
measurement result may be obtained by readin
interrupt service.
(6) H/L pulse width measurement mode
This mode is available with timer Y only.
• Count source
The count source is the output of the timer Y’s clock divider.
• Operation
0
This mode measures both the “H” and “L” periods of a si
input to P1
(risin
/CNTR1 pin continuously. On detection of any edge
5
or falling) of input signal to P15/CNTR1 pin, the contents of
timer Y counters are stored to temporary re
ned to the same addresses as timer Y. At the same time,
assi
the contents of timer Y latches are reloaded to the counters and
countin
continues. The detection of an edge causes the
CNTR1 interrupt request bit to be set to “1” as well. The result of
measurement may be obtained by readin
rupt service. This read access will address the temporary re
ters. On a timer underflow, the timer Y interrupt request bit will
be set to “1”, the contents of timer Y latches will be transferred to
the counters and countin
continues.
edges of the signal
edges will be
e of input
timer Y durin
nal
isters which are
timer Y during inter-
is-
22
MITSUBISHI
ELECTRIC
TIMER 1, TIMER 2, TIMER 3
g
g
g
g
g
g
g
g
Timers 1 to 3 are 8-bit timers with 8-bit reload latches and one common pre-divider. Timer 1 can operate in the timer mode only,
T123M
φ
1
1/8
1/32
1/128
“00
“01”
“10”
“11”
67
”
“1” “0”
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
whereas timers 2 and 3 can be used to generate a PWM output signal timin
as well. Timers 1 to 3 are down count timers. See Fig. 21.
T1 latch (8)
T1 counter (8)
T2 latch (8)
T1 interrupt
T123M
3
“0” “1”
T123M
1
“1” “0”
T123M
4
“0” “1”
T123M
1
P16/PWM
P1D
T123M
6
1
P16 latch
Fig. 21Block diagram of timers 1 to 3 (φ is internal system clock)
Timer 1
The count source of timer 1 is the output of timer 123 pre-divider.
The division ratio of the pre-divider can be selected by the predivider division ratio bits of timer 123 mode re
to Timer 123 mode re
ister configuration (f is internal system clock).
ister (T123M). Refer
On a timer 1 underflow, the timer 1 interrupt request bit will be set to
“1”.
to timer 1 initializes the latch and counter.
Writin
Timers 2 and 3
The count source of timers 2 and 3 can be either the output of the
timer 123 pre-divider or the timer 1 underflow. The count source can
T2 counter (8)
T3 latch (8)
T3 counter (8)
S
Q
R
S
Q
R
T123M
S
TQ
0
T2 interrupt
T3 interrupt
be selected by the timer count source selection bits of timer 123
mode re
Writin
reload latch and counter dependin
ister (T123M).
to timer 2 register affects the reload latch only or both of the
on the timer 2 write control bit
of T123M. When the timer write control bit is set to “0”, both latch
and counter will be initialized simultaneously; when set to “1” only
the reload latch will be initialized, on an underflow, the counter will
be set to the modified reload value. Writin
to timer 3 initializes
latch and counter both.
Timer 2 or 3 underflow causes the timer 2 or 3 interrupt request bit
to be set to “1”.
MITSUBISHI
ELECTRIC
23
MITSUBISHI MICROCOMPUTERS
g
g
g
g
g
g
g
g
g
g
g
g
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
70
Timer 123 mode re
T123M
PWM polarity selection bit
0 : Start on “H” level output
1 : Start on “L” level output
PWM output enable bit
0 : PWM output disabled
1 : PWM output enabled
Timer 2 write control bit
0 : Latch and counter
1 : Latch only
Timer 2 count source selection bit
0 : Timer 1 underflow
1 : Pre-divider output
Timer 3 count source selection bit
0 : Timer 1 underflow
1 : Pre-divider output
Not used (“0” when read, do not write “1”)
Pre-divider division ratio bits
b7 b6
0 0: φ divided by 1
0 1: φ divided by 8
1 0: φ divided by 32
1 1: φ divided by 128
ister (address 001916)
Fig. 22Timer 123 mode register configuration (φ is internal system clock)
Operating Modes
(1) Timer Mode
This mode is available with timers 1 to 3.
• Count source
For timer 1, the count source is the output of the correspondin
pre-divider. For timers 2 and 3, the count source can be separately selected to be either the pre-divider output or timer 1
underflow.
• Operation
The timer counts down. On a timer underflow, the correspondin
timer interrupt request bit will be set to “1”, the contents of the
correspondin
countin
timer latch will be reloaded to the counter and
continues.
(2) PWM Mode
This mode is available with timer 2 and 3.
• Count source
The count source can be separately selected to be either the
pre-divider output or timer 1 underflow.
• Operation
When the PWM-mode is enabled, timer 2 starts countin
soon as timer 2 underflows, timer 2 stops and timer 3 starts
countin
the initial output level is low. Timer 3 determines the hi
tion. If bit 0 is zero timer 2 determines the hi
initial output level is hi
duration.
Note: Be sure to confi
before usin
. As
. If bit 0 is set, timer 2 determines the low duration and
h dura-
h duration and the
h. In this case timer 3 determines the low
ure the P16/PWM pin as an output port
PWM mode.
24
MITSUBISHI
ELECTRIC
SERIAL I/Os
g
g
g
g
g
g
gg
g
g
The serial I/O section of 7630 group consists of one clock synchronous and one asynchronous (UART) interface.
Clock Synchronous Serial I/O (SI/O)
The clock synchronous interface allows full duplex communication
based on 8 bit word len
an internal or external clock. When an internal clock is selected, a
rammable clock divider allows eight different transmission
pro
φ
th. The transfer clock can be selected from
SIOCON
Clock divider
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
speeds. Refer to Block dia
nal system clock). The operation of the clock synchronous serial I/O
ured by the serial I/O control register SIOCON; refer to
2, 1, 0
can be confi
. 25.
Fi
ram of clock synchronous I/O (f is inter-
P23/S
P22/S
P21/S
P20/S
RDY
CLK
OUT
IN
SIOCON
P23 latch
SIOCON
“0”
P22 latch
SIOCON
“0”
P21 latch
SIOCON
“0”
P20 latch
“0”
“1”
“1”
“1”
4
3
3
“1”
3
Sync. circuit
SIO counter (3)
SIO shift register (8)
Fig. 23Block diagram of clock synchronous I/O (φ is internal system clock)
0012
(1) Clock synchronous serial I/O operation
Either an internal or external transfer clock can be selected by bit 6
of SIOCON. The internal clock divider can be pro
to 2 of SIOCON. Bit 3 of SIOCON determines whether the double
function pins P2
to P22 will act as I/O ports or serve as SIO pins.
0
Bit 4 of SIOCON allows the same selection for pin P2
When an internal transfer clock is selected, transmission can be
ered by writing data to the SI/O shift register (SIO, address
tri
rammed by bits 0
.
3
). After an 8–bit transmission has been completed, the S
16
pin will change to high impedance and the SIO interrupt request bit
will be set to “1”.
When an external transfer clock is selected, the SIO interrupt
request bit will be set to “1” after 8 cycles but the contents of the
SI/O shift re
input. Therefore, the clock needs to be controlled externally;
bein
the S
OUT
SIOCON
6
“1”
“0”
SIO interrupt
ister continue to be shifted while the transfer clock is
pin will not change to high impedance automatically.
OUT
MITSUBISHI
ELECTRIC
25
g
g
g
gg
g
g
synchronous clock
g
transfer clock
write signal to SIO
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
receive enable signal S
Serial Output SOUT
Serial input SIN
Note: When an internal clock is selected, S
RDY
D
0
D
0
pin will change to high impedance after 8 bits of data have been transmitted.
OUT
D
1
D
1
D
2
D
2
Fig. 24Timing of clock synchronous SI/O function (LSB first selected)
0 0 1: φ divided by 8
0 1 0: φ divided by 16
0 1 1: φ divided by 32
1 0 0: φ divided by 64
1 0 1: φ divided by 128
1 1 0: φ divided by 256
1 1 1: φ divided by 512
P2
0/SIN
, P21/S
and P22/S
OUT
0 : I/O port function
1 : SI/O function
P2
function selection bit
3/SRDY
0 : I/O port function
1 : SI/O function
Transmission order selection bit
0 : LSB first
1 : MSB first
Synchronization clock selection bit
0 : use external clock
1 : use internal clock
Not used (“0” when read)
D
3
D
3
D
4
D
4
function selection bit
CLK
D
5
D
5
D
6
D
6
SIO interrupt request bit = “1”
D
7
D
7
Fig. 25Structure of serial I/O control register (φ is internal system clock)
Clock Asynchronous Serial I/O (UART)
The UART is a full duplex asynchronous transmit/receive unit. The
built-in clock divider and baud rate
of transmission speeds. Please refer to Block dia
enerator enable a broad range
ram of UART.
(1) Description
The transmit and receive shift registers have a buffer (consisting of
h and low order byte) each. Since the shift registers cannot be
hi
26
written to or read from directly, transmit data is written to the transmit buffer and receive data is read from the receive buffer. A transmit or receive operation will be tri
and receive enable bit of the UART control re
Structure of UART control re
/UTXD, P26/URTS and P24/URXD, P27/UCTS will be switched to
P2
5
ered by the transmit enable bit
ister UCON (see
ister). The double function terminals
serve as UART pins automatically.
MITSUBISHI
ELECTRIC
MITSUBISHI MICROCOMPUTERS
g
g
g
g
g
g
g
g
g
g
g
g
g
g
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
(2) Baud rate selection
The baud rate of transmission and reception is determined by the
of the prescaler and the contents of the UART baud rate
settin
enerator register. It is calculated by: where p is the division ratio of
φ
-----------------------------------
b
=
16 pn1+()⋅⋅
the prescaler and
n
is the content of UART baud rate generator register. The prescalers division ration can be selected by the UART
mode re
ister (see below).
UART mode register (UMOD, Structure of UART
mode register)
The UART mode register allows to select the transmission and
reception format with the followin
• word len
th: 7, 8 or 9 bits
options:
• parity: none, odd or even
• stop bits: 1 or 2
It allows to select the prescalers division ratio as well.
UART baud rate generator (UBRG)
This 8 bit register allows to select the baud rate of the UART (see
above). Set this re
tion or transmission.
ister to the desired value before enabling recep-
UART control register (UCON, Structure of UART
control register)
The UART control register consists of four control bits (bit 0 to bit 3)
which allow to control reception and transmission.
UART status register (USTS, Structure of UART
status register)
The read-only UART status register consists of 7 bits (bit 0 to bit 6)
which indicate the operatin
status of the UART function and vari-
ous errors.
(3) Handshaking signals
When used as transmitter the UART will recognize the clear-to-
nal via P27/UCTS terminal for handshaking. When used as
send si
receiver it will issue a request-to-send si
pin.
Clear-to-send input
When used as a transmitter (transmit enable bit set to “1”), the
UART starts transmission after reco
After started the UART will continue to transmit re
actual level of P2
/UCTS or status of the transmit enable bit.
7
Request-to-send output
The UART controls the P2
/URTS output according to the followin
6
conditions.
Table 5: Output control conditions
Condition
Receive enable bit is set to “1”
Reception completed durin
receive enable
bit set to “1”
Start bit (fallin
edge) detected
Receive enable bit is set to “0” before reception started
Hardware reset
Receive initialization bit is set to “1”
nal through P26/URTS
nizing “L” level on P27/UCTS.
ardless of the
/URTS
P2
6
“L”
“H”
UART control register
φ
1/8
1/32
1/256
UMOD
“00”
1
“01”
“10”
“11”
Fig. 26Block diagram of UART
2, 1
UBRG (8)
UART status register
UMOD
7, 6
bit counter
UMOD
7, 6
bit counter
data bus
data bus
transmit buffer (9)
transmit shift register (9)
control circuit
reception control
receive shift register (9)
receive buffer (9)
UMOD
4,3,2
transmission
circuit
transmit buffer empty interrupt request
transmit buffer empty flag
transmit register empty interrupt request
P25/UTXD
transmit register empty flag
receive error interrupt request
receive error flags
receive buffer full interrupt request
receive buffer full flag
P2
/UCTS
7
P26/URTS
P2
/URXD
4
MITSUBISHI
ELECTRIC
27
MITSUBISHI MICROCOMPUTERS
g
g
g
g
g
g
g
g
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
70
UART mode re
UMOD (address 0020
Not used (“0” when read, do not write “1”)
clock divider selection bits
b2 b1
0 0 : φ divided by 1
0 1 : φ divided by 8
1 0 : φ divided by 32
1 1 : φ divided by 256
Stop bits selection bit
0 : One stop bit
1 : Two stop bits
Parity selection bit
0 : Even parity
1 : Odd parity
Parity enable bit
0 : Parity disabled
1 : Parity enabled
UART word len
b7 b6
0 0 : 7 bits
0 1 : 8 bits
1 0 : 9 bits
1 1 : Not used
1 : Error detected
Not used (“0” when read)
Note: this re
ister (address 002316)
ister empty
error fla
error detected
ister is read only; writing does not affect its contents.
Fig. 29Structure of UART status register
MITSUBISHI
ELECTRIC
29
CAN MODULE
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
f
SS
PTS
PBS1
PBS2
Sample point
Bit-time
The CAN (Controller Area Network) interface of the 7630 group
complies with the 2.0B specification, enablin
mission of frames with either 11- or 29- bit identifier len
. 31 for a block diagram of the CAN interface.
Fi
The pro
status/control re
rammer’s interface to the CAN module is formed by three
isters (Fig. 32, Fig. 33, Fig. 34), two bus timin
control registers (Fig. 35 Fig. 36), several registers for acceptance
(Fig. 37), the transmit and receive buffer registers (Fig. 38)
filterin
and one dominant level control bit (Fi
Baud Rate Selection
A programmable clock prescaler is used to derive the CAN module’s basic clock from the internal system clock frequency (φ). Bit 0
to bit 3 of the CAN bus timin
caler allowin
a division ratio from 1 to 1/16 to be selected. So the
CAN module basic clock frequency f
lows:
p
is the value of the prescaler (selectable from 1 to 15). The
where
effective baud rate of the CAN bus communication depends on the
CAN bus timin
control parameters and will be explained below.
control register represent the pres-
CANB
----------- -
=
CANB
p 1+
reception and trans-
th. Refer to
. 22).
can be calculated as fol-
φ
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
CAN Bus Timing Control
Each bit-time consists of four different segments (see Fig. 30):
• Synchronization se
• Propa
ation time segment (PTS),
• Phase buffer se
• Phase buffer se
Fig. 30Bit time of CAN module
The first of these se
and the latter three can be pro
by the CAN bus timin
36). The whole bit-time has to consist of minimum 8 and maximum
25 Time Quanta. The duration of one Time Quantum is the cycle
time of f
. For example, assuming φ = 5 M Hz, p = 0, one Time
CANB
Quantum will be 200 ns lon
sion rate of 625 kb/s to be reached (assumin
bit-time).
ment (SS),
ment 1 (PBS1) and
ment 2 (PBS2).
ments is of fixed length (one Time Quantum)
rammed to be 1 to 8 Time Quanta
control register 1 and 2 (see Fig. 35 and Fig.
. This allows the maximum transmis-
8 Time Quanta per
polarity control
register
P31/CTX
P3
/CRX
2
wake-up logic
Fig. 31Block diagram of CAN module
CAN status/control
registers
protocol controller
data bus
bus timing control
register
CAN wake-up
data bus
acceptance filter
transmit buffer
acceptance mask
register
acceptance code
register
receive buffer 1
receive buffer 2
30
MITSUBISHI
ELECTRIC
MITSUBISHI MICROCOMPUTERS
g
g
g
g
g
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
70
CAN transmit control re
CTRM
Sleep control bit
0 : CAN module in normal mode
1 : CAN module in sleep mode
Reset/confi
Port double function control bit
Transmit request bit
Not used (no operation, “0” when read)
Transmit buffer control bit
uration control bit
0 : CAN module in normal mode
1 : CAN module in confi
/CTX serves as I/O port
0 : P3
1
/CTX serves as CTX output port
1 : P3
1
0 : No transmission requested
1 : Transmission requested
(write “0” has no effect)
0 : CPU access possible
1 : No CPU access
(write “0” has no effect, while CTRM(3) = 1)
ister (address 003016)
uration mode (plus reset at write)
Not used (no operation, “0” when read)
Transmit status bit (read only)
Fig. 32Structure of CAN transmit control register
0 : CAN module idle or receivin
1 : CAN module transmittin
MITSUBISHI
ELECTRIC
31
MITSUBISHI MICROCOMPUTERS
g
g
g
g
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
70
CAN receive control re
CREC
Receive buffer control bit
0 : Receive buffer empty
1 : Receive buffer full
Receive status bit (read only)
0 : CAN module idle or transmittin
1 : CAN module receivin
Fig. 38Structure of CAN transmission and reception buffer registers
Note 1:All CAN related SFRs must not be written in “CAN sleep” mode.
34
MITSUBISHI
ELECTRIC
A-D CONVERTER
g
g
g
g
g
g
g
g
The A-D converter uses the successive approximation method with
8 bit resolution. The functional blocks of the A-D converter are
described below. Refer to Block dia
Comparison Voltage Generator
The comparison voltage generator divides the voltage between
AV
and V
SS
by 256, and outputs the divided voltage.
REF
ram of A-D converter.
b7b0
A-D control register
3
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
Channel Selector
The channel selector selects one of ports P00/AN0 to P07/AN7, and
inputs its volta
A-D conversion register AD
The A-D conversion register is a read-only register that stores the
result of an A-D conversion. This re
an A-D conversion.
Data bus
e to the comparator.
ister must not be read durin
P00/AN
0
Comparator
channel selector
P07/AN
7
V
/Input switch bit
REF
Fig. 39Block diagram of A-D converter
A-D control register (Structure of A-D control register)
The A-D control register controls the A-D conversion process. Bits 0
to 2 select a specific analo
of an A-D conversion. The value of this bit remains “0” durin
input pin. Bit 3 signals the completion
an A-
A-D control circuit
A-D conversion register
comparison voltage
generator
V
REF
AV
D conversion, and chan
“0” to this bit starts the A-D conversion. Bit 4 is the V
Writi n
Input switch bit.
A-D interrupt request
SS
es to “1” when an A-D conversion ends.
/
REF
MITSUBISHI
ELECTRIC
35
MITSUBISHI MICROCOMPUTERS
g
g
g
g
g
g
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
70
A-D control re
ADCON
Analog input pin selection bits
The comparator and control circuit reference an analog input volt-
e with the reference voltage, then stores the result in the A-D
a
conversion re
trol circuit sets the A-D conversion completion bit and the A-D inter-
ister. When an A-D conversion is complete, the con-
ister (address 001516)
0
1
2
3
4
5
6
7
ress
rupt request bit to “1”. The result of A-D conversion can be obtained
from the A-D conversion re
ister, AD (address 001416).
Note that the comparator is linked to a capacitor, so set f(X
kHz or hi
her during A-D conversion.
) to 500
IN
36
MITSUBISHI
ELECTRIC
WATCHDOG TIMER
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
g
The watchdog timer consists of two separate counters: one 7-bit
counter (WD
counters or usin
time-out from either 524288 or 32768 cycles of the internal clock φ.
Refer to Fi
same watchdo
both counters will be set to the followin
•the hi
• the low-order counter will be set to address F
regardless of the data written to the WDT register. Reading the
watchdo
tus, not the counter contents.
) and one 4-bit counter (WDL). Cascading both
H
the high-order counter allows only to select the
. 41 and Fig. 42. Both counters are addressed by the
timer register (WDT). When writing to this register,
default values:
h-order counter will be set to address 7F
16
16
timer register will return the corresponding control bit sta-
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
Once the WDT re
countin
is runnin
down and the watchdog timer interrupt is enabled. Once it
, the watchdog timer cannot be disabled or stopped
except by reset. On a watchdo
watchdo
timer interrupt will be requested.
To prevent the system bein
instruction can be disabled by the STP instruction disable bit of
WDT re
enabled a
ister. Once the STP instruction is disabled, it cannot be
ain except by RESET.
ister is written to, the watchdog timer starts
timer underflow, a non-maskable
stopped by STP instruction, this
φ
1/256
WDL counter (4)WDH counter (7)
“F16”“7F
“1”
“0”
WDT
7
WDT register (8)
”
16
Fig. 41Block diagram of watchdog timer
70
Watchdo
timer register (address 002E16)
WDT
Not used (undefined when read)
Stop instruction disable bit
0 : Stop instruction enabled
1 : Execute two NOP instructions instead (once this bit is set to
“1” it can not be cleared to “0” a
Upper byte count source selection bit
0 : Underflow of the low order counter
1 : φ divided by 256
Fig. 42Structure of watchdog timer register (φ is internal clock system)
WDT interrupt
ain, except on RESET.)
MITSUBISHI
ELECTRIC
37
RESET CIRCUIT
g
g
g
g
The 7630 group is reset according to the sequence shown in Fig.
44. It starts pro
tents of the addresses FFFB
held at “L” level for more than 2 µs while the power supply volta
power source voltage
reset input voltage
ram execution from the address formed by the con-
and FFFA16, when the RESET pin is
16
power on
4.0V
0V
0V
1
0.8V
V
CC
e is
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
in the recommended operatin
level.
Refer to Fi
. 43 for an example of the reset circuit.
MITSUBISHI MICROCOMPUTERS
7630 Group
condition and then returned to “H”
5
M51953AL
3
0.1µF
4
Fig. 43Example of reset circuit
X
IN
RESET
internal reset
Address
Data?????
8192 cycles of
X
IN
RESET
V
SS
7630 group
(T1, T2)
?????
28 to 34
cycles of X
IN
24 cycles of X
IN
FFFA16FFFB16ADL, AD
AD
L
20 cycles of X
AD
IN
H
H
1st op code
…
Fig. 44Reset sequence
38
MITSUBISHI
ELECTRIC
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
RegisterAddressRegister contents
CPU mode reg.
Interrupt request reg. A
Interrupt request reg. B
Interrupt request reg. C
Interrupt control reg. A
Interrupt control reg. B
Interrupt control reg. C
Port P0 reg.
Port P0 direction reg.
Port P1 reg.
Port P1 direction reg.
Port P2 reg.
Port P2 direction reg.
Port P3 reg.
Port P3 direction reg.
Port P4 reg.
Port P4 direction reg.
Serial I/O control reg.
A-D control reg.
Timer 1
Timer 2
Timer 3
Timer 123 mode reg.
Timer XL
Timer YL
Timer YH
Timer X mode reg.
Timer Y mode reg.
UART mode reg.
UART control reg.
UART status reg.
Port P0 pull-up control reg.
Port P1 pull-up control reg.
Port P2 pull-up control reg.
Port P3 pull-up control reg.
Port P4 pull-up/down control reg.
Interrupt polarity selection reg.
Watchdog timer reg.
Polarity control reg.
CAN transmit control reg.
CAN bus timing control reg. 1
CAN bus timing control reg. 2
CAN receive control reg.
CAN transmit abort reg.
003E
Processor status reg.(PS)
Program counter (high-order byte)(PCH)
Program counter (low-order byte)(PCL)
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
FF
16
FF
16
FF
16
00
16
00
16
00
10
00
16
07
10
00
16
00
16
00
16
00
16
00
16
00
16
3F
16
00
16
02
16
00
16
00
16
00
16
00
16
04
16
contents of FFFB
contents of FFFA
16
16
Note: The contents of RAM and registers other than the above registers are undefined after reset; thus software initialization is required.
Fig. 45Internal status of microcomputer after reset
MITSUBISHI
ELECTRIC
39
CLOCK GENERATING CIRCUIT
g
g
g
g
g
g
g
g
g
g
INCOUTXINXOUT
The 7630 group is equipped with an internal clock generating circuit.
Please refer to Fi
tor or quartz crystal oscillator. For the capacitor values, refer to the
manufacturers recommended parameters which depend on each
oscillators characteristics. When usin
pin and leave X
the X
IN
Oscillation Control
The 7630 group has two low power modes: the stop and the wait
mode.
Stop mode
The microcomputer enters the stop mode by executin
instruction. The oscillator stops with the internal clock φ at “H” level.
Timers 1 and 2 will be cascaded and initialized by their reload
latches contents. The count source for timer 1 will be set to
)/16.
f(X
IN
Oscillation is restarted if an external interrupt is accepted or at
reset. When usin
at “H” level until timer 2 underflows allowin
. 46 for a circuit example using a ceramic resona-
an external clock, input it to
open.
OUT
the STP
an external interrupt, the internal clock φ remains
a time-out until the
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
C
Fig. 46Ceramic resonator circuit .
clock oscillation becomes stable. When usin
enerated allowing oscillation to stabilize.
will be
Wait mode
The microcomputer enters the wait mode by executin
instruction. The internal clock ø stops at “H” level while the oscillator
keeps runnin
.
Recovery from wait mode can be done in the same way as from
stop mode. However, the time-out period mentioned above is not
required to return from wait-mode, thus no such time-ou t mechanism has been implemented.
Note: Set the interrupt enable bit of the interrupt source to be used
to return from stop or wait mode to “1” before executin
instruction.
reset, a fixed time-out
the WIT
STP or WIT
X
OUT
X
IN
interrupt request
interrupt disable flag
RESET
delaySTP
oscillator countdown
(timer 1 and 2)
SRQ
Fig. 47Block diagram of clock generating circuit
STP
WIT
RSQ
RSQ
1/2
STP
“0”
1/4
P2
CPUM
DTQRSQ
DTQ
“1”
6
2
internal clock
φ
for
peripherals
internal clock
φ
for CPU
40
MITSUBISHI
ELECTRIC
MITSUBISHI MICROCOMPUTERS
g
g
g
g
g
g
g
g
g
g
Programming with PROM programmer
Screening *(Note)
(150°C for 40 hou rs)
Verification with PROM programmer
Functional test in target unit
Note on screening:
The screening temperature is far higher than the storage temper-
ature. Never subject the device to 150
°
C exceeding 100 hours.
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
DATA REQUIRED FOR MASK ORDERS
The following are necessary when ordering a mask ROM production:
1 Mask ROM Order Confirmation Form
2 Mark Specification Form
3 Contents of Mask ROM, in EPROM form (three identical
copies)
PROM PROGRAMMING METHOD
The built-in PROM of the blank One Time PROM version and builtin EPROM version can be read or pro
pose PROM pro
the address of PROM pro
For the pro
table:
in
Table 6: Programming adapter name
MCU typePacka
One Time
PROM
EPROM80D0PCA7431
rammer using a special programming adapter. Set
rammer to the user ROM area.
ramming adapter type name, please refer to the follow-
ePro
44P6N-APCA7430
rammed with a general pur-
ramming adapter type
The PROM of the blank One Time PROM version is not tested or
screened in the assembly process and followin
ensure proper operation after pro
. 48 is recommended to verify programming.
in Fi
ramming, the procedure shown
processes. To
Fig. 48 Programming and testing of One Time PROM version
MITSUBISHI
ELECTRIC
41
Table 7: ABSOLUTE MAXIMUM RATINGS
g
g
g
g
g
g
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
SymbolParameterConditionsRatin
V
CC
V
I
V
O
P
d
T
opr
T
stg
Table 8: RECOMMENDED OPERATING CONDITIONS
Power source voltage
Input voltageP0
Output voltageP0
—P07, P11—P17,
0
—P27, P30—P34,
P2
0
—P47, RESET, X
P4
0
—P07, P12—P17,
0
—P27, P30—P34,
P2
0
—P47, X
P4
0
OUT
All volta
IN
and output transistors are “off”.
es with respect to VSS
–0.3 to 7.0V
–0.3 to VCC + 0.3
–0.3 to VCC + 0.3
Power dissipationTa = 25 °C500mW
Operating temperature–40 to 85°C
Storage temperature–60 to 150°C
(V
SymbolParameter
= 4.0 to 5.5 V, V
CC
= AV
SS
= 0 V, Ta = – 40 to 85 °C unless otherwise noted)
SS
Limits
min.typ.max.
V
CC
V
SS
V
IH
V
IL
IOH (peak)
∑
IOH (avg)
∑
IOL (peak)
∑
IOL (avg)
∑
(peak)
I
OH
(avg)
I
OH
(peak)
I
OL
I
(avg)
OL
Power source voltage
“H” Input voltage
“L” Input voltage
“H” sum peak output current
“H” sum avera
“L” sum peak output current80mA
“L” sum avera
“H” peak output current–10m A
“H” avera
“L” peak output current10mA
“L” avera
input current at overvoltage condi-
I
IO
tion
(V
> VCC)
I
total input current at overvoltage
I
∑
IO
f(CNTR)
condition
> VCC)
(V
I
Timer input frequency
(based on 50 % duty)
—P07, P11—P17, P20—P27,
P0
0
—P34, P40—P47, RESET, X
P3
0
—P07, P11—P17, P20—P27,
P0
0
—P34, P40—P47, RESET, X
P3
0
—P07, P12—P17, P20—P27,
P0
0
—P34, P40—P4
P3
0
7
IN
IN
e output current–40mA
e output current40mA
e output current–5mA
e output current5mA
P1
—P17, P20—P27,
1
—P34, P40—P4
P3
0
—P17, P20—P27,
P1
1
—P34, P40—P4
P3
0
P14/CNTR0, P15/CNTR
7
7
1
(except bi-phase counter mode)
/TX0, P14/CNTR
P1
3
0
4.05.05.5V
0V
0.8 · V
CC
0
(bi-phase counter mode)
)
f(X
IN
Clock input oscillation frequency10M Hz
sUnit
V
V
Unit
V
CC
0.2 · V
CC
V
V
–80mA
1mA
16mA
)/16
f(X
f(X
IN
IN
)/32
MHz
MHz
42
MITSUBISHI
ELECTRIC
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
Table 9: ELECTRICAL CHARACTERISTICS
(V
= 4.0 to 5.5 V, V
CC
SymbolParameterTest conditions
—P07, P12—P17,
P0
0
V
OH
V
OL
V
– V
T+
T–
“H” output voltage
“L” output voltage
Hysteresis
—P27, P30—P34,
P2
0
—P4
P4
0
7
—P07, P12—P17,
P0
0
—P27, P30—P34,
P2
0
—P4
P4
0
7
/INT0, P12/INT1,
P1
1
/TX0, P14/CNTR0,
P1
3
/CNTR1,P20/SIN,
P1
5
2/SCLK
7/UCTS
, P26/U
, P32/CRX,
P2
P2
RTS
IOH = –5 mA0.8 · V
IOL = 5 mA
,
RESET
—P07, P11—P17,
P0
I
IH
I
IH
I
IL
“H” input current
“H” input current
“L” input current
0
—P27, P30—P34,
P2
0
—P47, RESET
P4
0
X
IN
—P07, P11—P17,
P0
0
—P27, P30—P34,
P2
0
—P47, RESET
P4
0
VI = V
VI = V
VI = V
CC
CC
SS
= AV
SS
= 0 V, Ta = – 40 to 85 °C unless otherwise noted)
SS
Limits
Unit
min.typ.max.
CC
V
2.0V
0.5V
5µA
4µA
–5µA
I
IL
I
IH
I
IL
V
RAM
“L” input current
“H” input current
“L” input current
RAM hold voltage
X
IN
,
P3
2
—P4
P4
0
7
P0
—P07, P11—P17,
0
—P27, P30—P34,
P2
0
—P47, RESET
P4
0
VI = V
SS
VI = V
CC
Pull-Down = ’On’
VI = V
SS
Pull-Up = ’On’
20200µA
-200-20µA
–4µA
When clock stopped2.0V
MITSUBISHI
ELECTRIC
43
SymbolParameterTest conditions
high speed mode,
f(X
)=8MHz, VCC=5V,
IN
output transistors off,
CAN module running,
ADC running
high speed mode,
f(X
)=8MHz, VCC=5V,
IN
output transistors off,
CAN module stopped,
ADC running
middle speed mode,
f(X
)=8MHz, VCC=5V,
IN
I
CC
Power source current
output transistors off,
CAN module running,
ADC running
middle speed mode, wait
mode, f(X
V
tors off, CAN module
stopped, ADC stopped
stop mode, f(XIN)=0MHz,
V
stop mode, f(XIN)=0MHz,
V
)=8MHz,
IN
= 5V, output transis-
CC
=5V, Ta=25°C
CC
=5V, Ta=85°C
CC
MITSUBISHI MICROCOMPUTERS
7630 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
Limits
Unit
min.typ.max.
11.018.0mA
9.016.0mA
6.011.0mA
2.0mA
0.11.0
10.0
A
µ
A
µ
Table 10: A-D converter characteristics
(VCC = 4.0 to 5.5 V, VSS = AVSS = 0 V, Ta = –40 to 85 °C, unless otherwise noted)
Limits
SymbolParameterTest conditions
Unit
min.typ.max.
—Resolution8Bit
—Absolute accuracy
t
CONV
V
REF
I
REF
R
LADDER
I
IAN
Conversion time
Reference input voltage2.0
Reference input current
Ladder resistor value35k
Analog input current