Specifications in this manual are tentative and subject to change.
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi microcomputers
Description
The M16C/80 (144-pin version) group of single-chip microcomputers are built using the high-performance
silicon gate CMOS process using a M16C/60 Series CPU core and are packaged in a 144-pin plastic
molded QFP. These single-chip microcomputers operate using sophisticated instructions featuring a high
level of instruction efficiency. With 16M bytes of address space, they are capable of executing instructions
at high speed. They also feature a built-in multiplier and DMAC, making them ideal for controlling office,
communications, industrial equipment, and other high-speed processing applications.
The M16C/80 (144-pin version) group includes a wide range of products with different internal memory
types and sizes and various package types.
Features
• Memory capacity..................................ROM (See ROM expansion figure.)
Specifications in this manual are tentative and subject to change.
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi microcomputers
Performance Outline
Table 1.1.1 is a performance outline of M16C/80 (144-pin version) group.
Table 1.1.1. Performance outline of M16C/80 (144-pin version) group
ItemPerformance
Number of basic instructions106 instructions
Shortest instruction execution time50ns(f(XIN)=20MHz)
MemorySee ROM expansion figure.
capacity10 to 24 K bytes
I/O port8 bits x 13, 7 bits x 2, 5 bits x 1
Input port1 bit x 1
Multifunction16 bits x 5
timer16 bits x 6
Serial I/O(UART or clock synchronous) x 5
A-D converter10 bits x (8 + 2) channels
D-A converter8 bits x 2
DMAC4 channels
DRAM controllerCAS before RAS refresh, self-refresh, EDO, FP
CRC calculation circuitCRC-CCITT
X-Y converter16 bits X 16 bits
Watchdog timer15 bits x 1 (with prescaler)
Interrupt29 internal and 8 external sources, 5 software sources, 7
(built-in feedback resistance, and external ceramic or
quartz oscillator)
memory version
2.7 to 5.5V (f(XIN)=10MHz) Mask ROM and flash
memory version
Mask ROM 128 Kbytes version
4
Under
development
Description
Specifications in this manual are tentative and subject to change.
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi plans to release the following products in the M16C/80 (144-pin version) group:
(1) Support for mask ROM version, external ROM version and flash memory version
(2) ROM capacity
(3) Package
144P6Q: Plastic molded QFP (mask ROM version and flash memory version)
ROM Size
(Byte)
Preliminary Specifications REV.B
External
ROM
256K
M30805MG-XXXGP
M30805FGGP
M30805SGP
M30802SGP
Mitsubishi microcomputers
128K
96K
80K
64K
32K
M30802MC-XXXGP
Mask ROM version
M30802FCGP
Flash memory
version
External ROM version
Figure 1.1.3. ROM expansion
The M16C/80 (144-pin version) group products currently supported are listed in Table 1.1.2.
Table 1.1.2. M16C/80 (144-pin version) group
RAM capacityROM capacityPackage typeRemarksType No
M30802MC-XXXGP128K byte s
10K bytesMask ROM version
144P6Q-A
20K bytesM30805MG-XXXGP256K bytes
M30802FCGP
**
10K bytes128K byte s
Flash memo ry version
As of June, 2000
M30805FGGP
M30802SGP
M30805SGP
**
:Under development
**
256K byte s
20K bytes
10K bytes
24K bytes
External ROM version
5
Under
development
Description
Type No. M 3 0 8 0 2 M C – X X X G P
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
Package type:
GP : Package144P6Q-A
ROM No.
Omitted for blank external ROM version
and flash memory version
ROM capacity:
C : 128K bytes
G : 256K bytes
Memory type:
M : Mask ROM version
S : External ROM version
F : Flash memory version
Mitsubishi microcomputers
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Figure 1.1.4. Type No., memory size, and package
Shows RAM capacity, pin count, etc
(The value itself has no specific meaning)
M16C/80 Group
M16C Family
6
Under
development
Specifications in this manual are tentative and subject to change.
Pin Description
Pin Description
Preliminary Specifications REV.B
Mitsubishi microcomputers
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Pin name
VCC, V
SS
CNV
SS
RESET
X
IN
X
OUT
BYTE
CC
AV
AV
SS
V
REF
P00 to P0
7
Signal name
Power supply
input
SS
CNV
Reset input
Clock input
Clock output
External data
bus width
select input
Analog power
supply input
Analog power
supply input
Reference
voltage input
I/O port P0
I/O type
Input
Input
Input
Output
Input
Input
Input/output
Function
Supply 4.2 to 5.5 V to the V
This pin switches between processor modes. Connect it to the V
CC
pin. Supply 0 V to the VSS pin.
SS
when operating in single-chip or memory expansion mode after reset.
CC
Connect it to the V
when in microprocessor mode after reset.
A “L” on this input resets the microcomputer.
These pins are provided for the main clock generating circuit. Connect
a ceramic resonator or crystal between the X
use an externally derived clock, input it to the X
OUT
pin open.
X
and the X
IN
pin and leave the
OUT
pins. To
IN
This pin selects the width of an external data bus. A 16-bit width is
selected when this input is “L”; an 8-bit width is selected when this
input is “H”. This input must be fixed to either “H” or “L”. When
SS
not using the external bus,connect this pin to V
.
This pin is a power supply input for the A-D converter. Connect this
CC
pin to V
.
This pin is a power supply input for the A-D converter. Connect this
SS
pin to V
.
This pin is a reference voltage input for the A-D converter.
This is an 8-bit CMOS I/O port. It has an input/output port direction
register that allows the user to set each pin for input or output
individually. When set for input in single chip mode, the user can
specify in units of four bits via software whether or not they are tied to a
pull-up resistance. In memory expansion and microprocessor mode,
an built-in pull-up resistance cannot be used. However, it is possible to
select pull-up resistance presence to the usable port as I/O port by
setting.
D0 to D
7
P10 to P1
D8 to D
P20 to P2
A0 to A
7
15
7
7
A0/D0 to
A
P30 to P3
A8 to A
7/D7
7
15
A8/D8 to
15/D15
A
MA0 to MA7
I/O port P1
I/O port P2
I/O port P3
Input/output
Input/output
Input/output
Input/output
Output
Input/output
Input/output
Output
Input/output
Output
When set as a separate bus, these pins input and output data (D
5
This is an 8-bit I/O port equivalent to P0. P1
to P17 also function as
0–D7
external interrupt pins as selected by software.
When set as a separate bus, these pins input and output data
(D8–D15).
This is an 8-bit I/O port equivalent to P0.
0–A7
These pins output 8 low-order address bits (A
If a multiplexed bus is set, these pins input and output data (D
0–A7
output 8 low-order address bits (A
) separated in time by
).
0–D7
) and
multiplexing.
This is an 8-bit I/O port equivalent to P0.
8–A15
These pins output 8 middle-order address bits (A
).
If the external bus is set as a 16-bit wide multiplexed bus, these pins
8–D15
input and output data (D
8–A15
(A
) separated in time by multiplexing.
) and output 8 middle-order address bits
If accessing to DRAM area, these pins output row address and column
address separated in time by multiplexing.
).
7
Under
development
Specifications in this manual are tentative and subject to change.
Pin Description
Pin Description
Preliminary Specifications REV.B
P40 to P4
A16 to A22,
A
23
CS
MA8 to MA12
P5
0
to CS
0
to P5
7
3
7
Signal nameFunctionPin nameI/O type
I/O port P4This is an 8-bit I/O port equivalent to P0.Input/output
Output
Output
Output
I/O port P5Input/output
Mitsubishi microcomputers
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
These pins output 8 high-order address bits (A
23
address bit (A
) outputs inversely.
These pins output CS0–CS3 signals. CS0–CS3 are chip select signals
used to specify an access space.
If accessing to DRAM area, these pins output data separated in time by
multiplexing.
This is an 8-bit I/O port equivalent to P0. P53 in this port outputs a
divide-by-8 or divide-by-32 clock of X
frequency as X
CIN
as selected by software.
IN
16–A22
, A23). Highest
or a clock of the same
WRL / WR,
WRH / BHE,
RD,
BCLK,
HLDA,
HOLD,
ALE,
RDY
DW,
CASL,
CASH,
RAS
P60 to P6
7
P70 to P77
I/O port P6
I/O port P7
Output
Output
Output
Output
Output
Input
Output
Input
Output
Output
Output
Output
Input/output
Input/output
Output WRL, WRH (WR and BHE), RD, BCLK, HLDA, and ALE
signals. WRL and WRH, and BHE and WR can be switched using
software control.
WRL, WRH, and RD selected
With a 16-bit external data bus, data is written to even addresses
when the WRL signal is “L” and to the odd addresses when the WRH
signal is “L”. Data is read when RD is “L”.
WR, BHE, and RD selected
Data is written when WR is “L”. Data is read when RD is “L”. Odd
addresses are accessed when BHE is “L”. Use this mode when using
an 8-bit external data bus.
While the input level at the HOLD pin is “L”, the microcomputer is
placed in the hold state. While in the hold state, HLDA outputs a “L”
level. ALE is used to latch the address. While the input level of the
RDY pin is “L”, the microcomputer is in the ready state.
When accessing to DRAM area while DW signal is “L”, write to DRAM.
CASL and CASH show timing when latching to line address. When
CASL accesses to even address, and CASH to odd, these two pins
become “L”. RAS signal shows timing when latching to row address.
This is an 8-bit I/O port equivalent to P0. When set for input in single
chip mode, the user can specify in units of four bits via software
whether or not they are tied to a pull-up resistance. In memory
expansion and microprocessor mode, an built-in pull-up resistance
cannot be used. Pins in this port also function as UART0 and UART1 I/
O pins as selected by software.
0
This is an 8-bit I/O port equivalent to P6 (P7
open drain output). Pins in this port also function as timer A
and P71 are N-channel
0–A3
,
timer B5 or UART2 I/O pins as selected by software.
8
0
to P84,
P8
P8
6
,
7
,
P8
5
P8
P90 to P9
7
P100 to P10
I/O port P8
I/O port P8
I/O port P9
7
I/O port P10
5
Input/output
Input/output
Input/output
Input
Input/output
Input/output
P80 to P84, P86, and P87 are I/O ports with the same functions as P6.
Using software, they can be made to function as the I/O pins for timer
6
A4 and the input pins for external interrupts. P8
and P87 can be set
using software to function as the I/O pins for a sub clock generation
6
(X
COUT
circuit. In this case, connect a quartz oscillator between P8
7
(X
CIN
pin) and P8
pin). P85 is an input-only port that also functions
for NMI. The NMI interrupt is generated when the input at this pin
changes from “H” to “L”. The NMI function cannot be canceled using
software. The pull-up cannot be set for this pin.
This is an 8-bit I/O port equivalent to P6. Pins in this port also function
as UART3 and UART4 I/O pins, Timer B0–B4 input pins, D-A converter
output pins, A-D converter extended input pins, or A-D trigger input pins
as selected by software.
This is an 8-bit I/O port equivalent to P6. Pins in this port also function
4
as A-D converter input pins. Furthermore, P10
–P107 also function as
input pins for the key input interrupt function.
Under
development
Specifications in this manual are tentative and subject to change.
Pin Description
Pin Description
Preliminary Specifications REV.B
Mitsubishi microcomputers
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Signal nameFunctionPin nameI/O type
Input/outputI/O port P11P110 to P114 This is an 5-bit I/O port equivalent to P6.
Input/outputI/O port P12P120 to P127 This is an 8-bit I/O port equivalent to P6.
Input/outputI/O port P13P130 to P137 This is an 8-bit I/O port equivalent to P6.
Input/outputI/O port P14P140 to P146 This is an 7-bit I/O port equivalent to P6.
Input/outputI/O port P15P150 to P157 This is an 8-bit I/O port equivalent to P6.
9
Under
A
A
development
Memory
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi microcomputers
Operation of Functional Blocks
The M16C/80 group accommodates certain units in a single chip. These units include ROM and RAM to
store instructions and data and the central processing unit (CPU) to execute arithmetic/logic operations.
Also included are peripheral units such as timers, serial I/O, D-A converter, DMAC, CRC calculation circuit,
A-D converter, DRAM controller and I/O ports.
The following explains each unit.
Memory
Figure 1.2.1 is a memory map of the M16C/80 group. The address space extends the 16 Mbytes from
address 00000016 to FFFFFF16. From FFFFFF16 down is ROM. For example, in the M30802MC-XXXGP,
there is 128K bytes of internal ROM from FE000016 to FFFFFF16. The vector table for fixed interrupts such
as the reset and NMI are mapped to FFFFDC16 to FFFFFF16. The starting address of the interrupt routine
is stored here. The address of the vector table for timer interrupts, etc., can be set as desired using the
internal register (INTB). See the section on interrupts for details.
From 00040016 up is RAM. For example, in the M30802MC-XXXGP, 10 Kbytes of internal RAM is mapped
to the space from 00040016 to 002BFF16. In addition to storing data, the RAM also stores the stack used
when calling subroutines and when interrupts are generated.
The SFR area is mapped to 00000016 to 0003FF16. This area accommodates the control registers for
peripheral devices such as I/O ports, A-D converter, serial I/O, and timers, etc. Figure 1.5.1 to 1.5.4 are
location of peripheral unit control registers. Any part of the SFR area that is not occupied is reserved and
cannot be used for other purposes.
The special page vector table is mapped to FFFE0016 to FFFFDB16. If the starting addresses of subroutines or the destination addresses of jumps are stored here, subroutine call instructions and jump instructions can be used as 2-byte instructions, reducing the number of program steps.
In memory expansion mode and microprocessor mode, a part of the spaces are reserved and cannot be
used. For example, in the M30802MC-XXXGP, the following spaces cannot be used.
• The space between 002C0016 and 00800016 (Memory expansion and microprocessor modes)
• The space between F0000016 and FDFFFF16 (Memory expansion mode)
_______
Type No.
M30802MC/FC
M30805MG/FG
M30802S
M30805S
Address
XXXXX
002BFF
0053FF
002BFF
0063FF
Figure 1.2.1. Memory map
10
000000
16
000400
16
XXXXXX
008000
16
F00000
YYYYYY
FFFFFF
16
16
Address
16
YYYYY
16
FE0000
FC0000
16
16
16
16
16
16
SFR area
For details, see
Figures 1.5.1 to
Internal RAM
16
Internal reserved
area (Note 1)
External area
AAAAAA
Internal reserved
area (Note 2)
16
Internal ROM
1.5.4
area
area
FFFE00
FFFFDC
FFFFFF
16
Special page
vector table
16
Undefined instruction
Overflow
BRK instruction
Address match
Watchdog timer
NMI
16
Reset
Note 1: During memory expansion and microprocessor modes, can not be used.
Note 2: In memory expansion mode, can not be used.
Under
development
CPU
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi microcomputers
Central Processing Unit (CPU)
The CPU has a total of 28 registers shown in Figure 1.3.1. Seven of these registers (R0, R1, R2, R3, A0,
A1, SB and FB) come in two sets; therefore, these have two register banks.
General register
b31
R2
R3
b23
High-speed interrupt register
b23
b15b0
FLG
R0H
R1H
A0
A1
SB
FB
USP
ISP
INTB
PC
b15b0
SVP
R0L
R1L
R2
R3
SVF
Flag register
Data register (Note)
Address register (Note)
Static base register (Note)
Frame base register (Note)
User stack pointer
Interrupt stack pointer
Interrupt table register
Program counter
Flag save register
PC save register
VCT
DMAC related register
b15
b23
DMA0
DMA1
DSA0
DSA1
DRA0
DRA1
Note: These registers have two register banks.
Figure 1.3.1. Central processing unit register
b7b0
DMD0
DMD1
DCT0
DCT1
DRC0
DRC1
Vector register
DMA mode register
DMA transfer count register
DMA transfer count reload register
DMA memory address register
DMA SFR address register
DMA memory address reload register
11
Under
development
CPU
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi microcomputers
(1) Data registers (R0, R0H, R0L, R1, R1H, R1L, R2, R3, R2R0 and R3R1)
Data registers (R0, R1, R2, and R3) are configured with 16 bits, and are used primarily for transfer and
arithmetic/logic operations.
Registers R0 and R1 each can be used as separate 8-bit data registers, high-order bits as (R0H/R1H),
and low-order bits as (R0L/R1L). Registers R2 and R0, as well as R3 and R1 can use as 32-bit data
registers (R2R0/R3R1).
(2) Address registers (A0 and A1)
Address registers (A0 and A1) are configured with 24 bits, and have functions equivalent to those of data
registers. These registers can also be used for address register indirect addressing and address register
relative addressing.
(3) Static base register (SB)
Static base register (SB) is configured with 24 bits, and is used for SB relative addressing.
(4) Frame base register (FB)
Frame base register (FB) is configured with 24 bits, and is used for FB relative addressing.
(5) Program counter (PC)
Program counter (PC) is configured with 24 bits, indicating the address of an instruction to be executed.
(6) Interrupt table register (INTB)
Interrupt table register (INTB) is configured with 24 bits, indicating the start address of an interrupt vector
table.
(7) User stack pointer (USP), interrupt stack pointer (ISP)
Stack pointer comes in two types: user stack pointer (USP) and interrupt stack pointer (ISP), each configured with 24 bits.
Your desired type of stack pointer (USP or ISP) can be selected by a stack pointer select flag (U flag).
This flag is located at the position of bit 7 in the flag register (FLG).
Set USP and ISP to an even number so that execution efficiency is increased.
(8) Save flag register (SVF)
This register consists of 16 bits and is used to save the flag register when a high-speed interrupt is
generated.
12
Under
development
CPU
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi microcomputers
(9) Save PC register (SVP)
This register consists of 24 bits and is used to save the program counter when a high-speed interrupt is
generated.
(10) Vector register (VCT)
This register consists of 24 bits and is used to indicate the jump address when a high-speed interrupt is
generated.
(11) DMA mode registers (DMD0/DMD1)
These registers consist of 8 bits and are used to set the transfer mode, etc. for DMA.
(12) DMA transfer count registers (DCT0/DCT1)
These registers consist of 16 bits and are used to set the number of DMA transfers performed.
(13) DMA transfer count reload registers (DRC0/DRC1)
These registers consist of 16 bits and are used to reload the DMA transfer count registers.
(14) DMA memory address registers (DMA0/DMA1)
These registers consist of 24 bits and are used to set a memory address at the source or destination of
DMA transfer.
(15) DMA SFR address registers (DSA0/DSA1)
These registers consist of 24 bits and are used to set a fixed address at the source or destination of DMA
transfer.
These registers consist of 24 bits and are used to reload the DMA memory address registers.
13
Under
development
CPU
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi microcomputers
(17) Flag register (FLG)
Flag register (FLG) is configured with 11 bits, each bit is used as a flag. Figure 1.3.2 shows the flag
register (FLG). The following explains the function of each flag:
• Bit 0: Carry flag (C flag)
This flag retains a carry, borrow, or shift-out bit that has occurred in the arithmetic/logic unit.
• Bit 1: Debug flag (D flag)
This flag enables a single-step interrupt.
When this flag is “1”, a single-step interrupt is generated after instruction execution. This flag is
cleared to “0” when the interrupt is acknowledged.
• Bit 2: Zero flag (Z flag)
This flag is set to “1” when an arithmetic operation resulted in 0; otherwise, cleared to “0”.
• Bit 3: Sign flag (S flag)
This flag is set to “1” when an arithmetic operation resulted in a negative value; otherwise, cleared
to “0”.
• Bit 4: Register bank select flag (B flag)
This flag chooses a register bank. Register bank 0 is selected when this flag is “0” ; register bank
1 is selected when this flag is “1”.
• Bit 5: Overflow flag (O flag)
This flag is set to “1” when an arithmetic operation resulted in overflow; otherwise, cleared to “0”.
• Bit 6: Interrupt enable flag (I flag)
This flag enables a maskable interrupt.
An interrupt is disabled when this flag is “0”, and is enabled when this flag is “1”. This flag is
cleared to “0” when the interrupt is acknowledged.
• Bit 7: Stack pointer select flag (U flag)
Interrupt stack pointer (ISP) is selected when this flag is “0” ; user stack pointer (USP) is selected
when this flag is “1”.
This flag is cleared to “0” when a hardware interrupt is acknowledged or an INT instruction of
software interrupt Nos. 0 to 31 is executed.
14
• Bits 8 to 11: Reserved area
Under
development
CPU
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi microcomputers
• Bits 12 to 14: Processor interrupt priority level (IPL)
Processor interrupt priority level (IPL) is configured with three bits, for specification of up to eight
processor interrupt priority levels from level 0 to level 7.
If a requested interrupt has priority greater than the processor interrupt priority level (IPL), the interrupt
is enabled.
• Bit 15: Reserved area
b0b15
IPL
Flag register (FLG)
CDZSBOIU
Carry flag
Figure 1.3.2. Flag register (FLG)
Debug flag
Zero flag
Sign flag
Register bank select flag
Overflow flag
Interrupt enable flag
Stack pointer select flag
Reserved area
Processor interrupt priority level
Reserved area
15
Under
development
Reset
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi microcomputers
Reset
There are two kinds of resets; hardware and software. In both cases, operation is the same after the reset.
(See “Software Reset” for details of software resets.) This section explains on hardware resets.
When the supply voltage is in the range where operation is guaranteed, a reset is effected by holding the
reset pin level “L” (0.2VCC max.) for at least 20 cycles. When the reset pin level is then returned to the “H”
level while main clock is stable, the reset status is cancelled and program execution resumes from the
address in the reset vector table.
Figure 1.4.1 shows the example reset circuit. Figure 1.4.2 shows the reset sequence.
RESET
Example when f(XIN) = 10MHz and V
V
Figure 1.4.1. Example reset circuit
X
IN
More than 20 cycles are needed
Microprocessor
mode BYTE = “H”
RESET
BCLK
Address
RD
BCLK 24cycles
CC
5V
V
CC
0V
5V
RESET
0V
FFFFC
CC
= 5V
16
4.2V
0.8V
.
Content of reset vector
FFFFD
16
FFFFE
16
WR
CS0
Microprocessor
mode BYTE = “L”
Address
RD
WR
CS0
Single chip
mode
Address
Figure 1.4.2. Reset sequence
16
FFFFC
FFFFC
16
16
FFFFE
FFFFE
16
Content of reset vector
16
Content of reset vector
Under
development
Reset
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
Mitsubishi microcomputers
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Table 1.4.1 shows the statuses of the other pins while the RESET pin level is “L”. Figures 1.4.3 and 1.4.4
____________
show the internal status of the microcomputer immediately after the reset is cancelled.
Table 1.4.1. Pin status when RESET pin level is “L”
____________
Status
Pin name
P0
P1
P2, P3, P4
0
P5
P5
1
P5
2
P5
3
P5
4
CNVSS = V
Input port (floating)
Input port (floating)
Input port (floating)
Input port (floating)
Input port (floating)
Input port (floating)
Input port (floating)
Input port (floating)
SS
CNVSS = V
BYTE = V
SS
Data input (floating)
Data input (floating)
Address output (undefined)
WR output (“H” level is output)
BHE output (undefined)
RD output (“H” level is output)
BCLK output
HLDA output (The output value
depends on the input to the
HOLD pin)
CC
BYTE = V
CC
Data input (floating)
Input port (floating)
Address output (undefined)
WR output (“H” level is output)
BHE output (undefined)
RD output (“H” level is output)
BCLK output
HLDA output (The output value
depends on the input to the
HOLD pin)
P5
5
P5
6
P5
7
P6, P7, P80 to P84,
6
, P87, P9, P10,
P8
P11, P12, P13,
P14, P15
Input port (floating)
Input port (floating)
Input port (floating)
Input port (floating)
HOLD input (floating)
RAS output
RDY input (floating)
HOLD input (floating)
RAS output
RDY input (floating)
Input port (floating)Input port (floating)
17
Under
development
Reset
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
(The blank area is reserved and cannot be used by user.)
Figure 1.5.3. Location of peripheral unit control registers (3)
22
Under
development
SFR
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
03C0
16
Port P6 (P6)
03C1
16
Port P7 (P7)
03C2
16
Port P6 direction register (PD6)
03C3
16
Port P7 direction register (PD7)
03C4
16
Port P8 (P8)
03C5
16
Port P9 (P9)
03C6
16
Port P8 direction register (PD8)
03C7
16
Port P9 direction register (PD9)
03C8
16
Port P10 (P10)
03C9
16
Port P11 (P11)
03CA
16
Port P10 direction register (PD10)
03CB
16
Port P11 direction register (PD11)
03CC
16
Port P12 (P12)
03CD
16
Port P13 (P13)
03CE
16
Port P12 direction register (PD12)
03CF
16
Port P13 direction register (PD13)
03D0
16
Port P14 (P14)
03D1
16
Port P15 (P15)
03D2
16
Port P14 direction register (PD14)
03D3
16
Port P15 direction register (PD15)
03D4
16
03D5
16
03D6
16
03D7
16
03D8
16
03D9
16
03DA
16
Pull-up control register 2 (PUR2)
03DB
16
Pull-up control register 3 (PUR3)
03DC
16
Pull-up control register 4 (PUR4)
03DD
16
03DE
16
03DF
16
03E0
16
Port P0 (P0)
03E1
16
Port P1 (P1)
03E2
16
Port P0 direction register (PD0)
03E3
16
Port P1 direction register (PD1)
03E4
16
Port P2 (P2)
03E5
16
Port P3 (P3)
03E6
16
Port P2 direction register (PD2)
03E7
16
Port P3 direction register (PD3)
03E8
16
Port P4 (P4)
03E9
16
Port P5 (P5)
03EA
16
Port P4 direction register (PD4)
03EB
16
Port P5 direction register (PD5)
03EC
16
03ED
16
03EE
16
03EF
16
03F0
16
Pull-up control register 0 (PUR0)
03F1
16
Pull-up control register 1 (PUR1)
03F2
16
03F3
16
03F4
16
03F5
16
03F6
16
03F7
16
03F8
16
03F9
16
03FA
16
03FB
16
03FC
16
03FD
16
03FE
16
03FF
16
Port control register (PCR)
Mitsubishi microcomputers
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
(The blank area is reserved and cannot be used by user.)
Figure 1.5.4. Location of peripheral unit control registers (4)
23
Under
development
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
Software Reset
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi microcomputers
Software Reset
Writing “1” to bit 3 of the processor mode register 0 (address 000416) applies a (software) reset to the
microcomputer. A software reset has the same effect as a hardware reset. The contents of internal RAM
are preserved.
Processor Mode
(1) Types of Processor Mode
One of three processor modes can be selected: single-chip mode, memory expansion mode, and microprocessor mode. The functions of some pins, the memory map, and the access space differ according to
the selected processor mode.
• Single-chip mode
In single-chip mode, only internal memory space (SFR, internal RAM, and internal ROM) can be
accessed. Ports P0 to P10 can be used as programmable I/O ports or as I/O ports for the internal
peripheral functions.
• Memory expansion mode
In memory expansion mode, external memory can be accessed in addition to the internal memory
space (SFR, internal RAM, and internal ROM).
In this mode, some of the pins function as the address bus, the data bus, and as control signals. The
number of pins assigned to these functions depends on the bus and register settings. (See “Bus
Settings” for details.)
• Microprocessor mode
In microprocessor mode, the SFR, internal RAM, and external memory space can be accessed. The
internal ROM area cannot be accessed.
In this mode, some of the pins function as the address bus, the data bus, and as control signals. The
number of pins assigned to these functions depends on the bus and register settings. (See “Bus
Settings” for details.)
(2) Setting Processor Modes
24
The processor mode is set using the CNVSS pin and the processor mode bits (bits 1 and 0 at address
000416). Do not set the processor mode bits to “102”.
Regardless of the level of the CNVSS pin, changing the processor mode bits selects the mode. Therefore,
never change the processor mode bits when changing the contents of other bits. Also do not attempt to
shift to or from the microprocessor mode within the program stored in the internal ROM area.
• Applying VSS to CNVSS pin
The microcomputer begins operation in single-chip mode after being reset. Memory expansion mode
is selected by writing “012” to the processor mode is selected bits.
• Applying VCC to CNVSS pin
The microcomputer starts to operate in microprocessor mode after being reset.
Figure 1.6.1 and 1.6.2 show the processor mode register 0 and 1.
Figure 1.6.3 shows the memory maps applicable for each processor modes.
Under
development
Processor Mode
Specifications in this manual are tentative and subject to change.
Processor mode register 0 (Note 1)
b7 b6 b5 b4 b3 b2 b1 b0
0
Preliminary Specifications REV.B
SymbolAddressWhen reset
PM00004
16
80
16
(Note 2)
Mitsubishi microcomputers
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Bit nameFunctionBit symbol
PM00
PM01
PM02
Processor mode bit
R/W mode select bit
(Note 7)
PM03
PM04
Software reset bit
Multiplexed bus space
select bit (Note 3)
PM05
Reserved bit
PM07
BCLK output disable bit
(Note 5)
Note 1: Set bit 1 of the protect register (address 000A
Note 2: If the V
CC
voltage is applied to the CNVSS, the value of this register when reset is 0316. (PM00 is set
The device is reset when this bit is set to “1”.
The value of this bit is “0” when read.
b5 b4
0 0 : Multiplexed bus is not used
0 1 : Allocated to CS2 space
1 0 : Allocated to CS1 space
1 1 : Allocated to entire space (Note4)
Must always be set to “0”
0 : BCLK is output (Note 6)
1 : Function set by bit 0,1 of system
clock control register 0
) to “1” when writing new values to this register.
to “1” and PM07 is set to “0”.)
Note 3: Valid in microprocessor and memory expansion modes 1, 2 and 3. Do not use multiplex bus when
mode 0 is selected. Do not set to allocated to CS2 space when mode 2 is selected.
Note 4: After the reset has been released, the M16C/80 group MCU operates using the separate bus. As a
result, in microprocessor mode, you cannot select the full CS space multiplex bus.
When you select the full CS space multiplex bus in memory expansion mode, the address bus
operates with 64 Kbytes boundaries for each chip select.
Mode 0: Multiplexed bus cannot be used.
Mode 1: CS0 to CS2 when you select full CS space.
Mode 2: CS0 to CS1 when you select full CS space.
Mode 3: CS0 to CS3 when you select full CS space.
Note 5: No BCLK is output in single chip mode even when "0" is set in PM07. When stopping clock output in
microprocessor or memory expansion mode, make the following settings: PM07="1", bit 0 (CM00) and
16
bit 1 (CM01) of system clock control register 0 (address 0006
) = "0". "L" is now output from P53.
Note 6: When selecting BCLK, set bits 0 and 1 of system clock control register 0 (CM00, CM01) to "0".
Note 7: When using 16-bit bus width in DRAM controler, set this bit to "1".
WR
Figure 1.6.1. Processor mode register 0
25
Under
development
Processor Mode
Specifications in this manual are tentative and subject to change.
Processor mode register 1 (Note 1) :Mask ROM version
b7 b6 b5 b4 b3 b2 b1 b0
Preliminary Specifications REV.B
Mitsubishi microcomputers
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
SymbolAddressWhen reset
0
PM10005
16
00
16
Bit nameFunctionBit symbol
PM10
External memory area
mode bit (Note 3)
b1 b0
0 0 : Mode 0 (P4
0 1 : Mode 1 (P4
P4
PM11
1 0 : Mode 2 (P4
P4
1 1 : Mode 3 (Note 2)
4
to P47 : CS3 to CS0)
(P4
PM12
Internal memory wait bit0 : No wait state
1 : Wait state inserted
Reserved bit
PM14
PM15
ALE pin select bit (Note 3)
Must always be set to “0”
b5 b4
0 0 : No ALE
3
0 1 : P5
1 0 : P5
1 1 : P5
/BCLK (Note 4)
6
/RAS
4
/HLDA
Nothing is assinged. When read, the content is indeterminate.
Note 1: Set bit 1 of the protect register (address 000A16) to “1” when writing new values to this register.
Note 2: When mode 3 is selected, DRAMC is not used.
Note 3: Valid in memory expansion mode or in microprocessor mode.
3
Note 4: When selecting P5
/BCLK, set bits 0 and 1 of system clock control register 0 (CM00, CM01) to "0".
Processor mode register 1 (Note 1) :Flash memory version
b7 b6 b5 b4 b3 b2 b1 b0
0
SymbolAddressWhen reset
PM10005
16
00
16
4
to P47 : A20 to A23)
4
: A20,
5
to P47 : CS2 to CS0)
4
, P45 : A20, A21,
6
, P47 : CS1, CS0)
WR
PM10
External memory area
mode bit (Note 3)
PM11
PM12
Internal memory wait bit0 : No wait state
Reserved bit
PM14
PM15
ALE pin select bit (Note 3)
Reserved bit
Note 1: Set bit 1 of the protect register (address 000A16) to “1” when writing new values to this register.
Note 2: When mode 3 is selected, DRAMC is not used.
Note 3: Valid in memory expansion mode or in microprocessor mode.
3
Note 4: When selecting P5
/BCLK, set bits 0 and 1 of system clock control register 0 (CM00, CM01) to "0".
Figure 1.6.2. Processor mode register 1
Bit nameFunctionBit symbol
b1 b0
4
0 0 : Mode 0 (P4
0 1 : Mode 1 (P4
P4
1 0 : Mode 2 (P4
P4
to P47 : A20 to A23)
4
: A20,
5
to P47 : CS2 to CS0)
4
, P45 : A20, A21,
6
, P47 : CS1, CS0)
WR
1 1 : Mode 3 (Note 2)
4
to P47 : CS3 to CS0)
(P4
1 : Wait state inserted
Must always be set to “0”
b5 b4
0 0 : No ALE
3
0 1 : P5
1 0 : P5
1 1 : P5
/BCLK (Note 4)
6
/RAS
4
/HLDA
Must always be set to “1”
26
Under
Singl chip
mode
Memory expanded mode
Microprocesser mode
SFR area
Internal RAM area
Internal reserved area
Internal ROM area
No use
External area
CS2
2Mbytes
CS0
2Mbytes
No use
Internal ROM area
Internal reserved area
Internal ROM area
Internal reserved area
Internal ROM area
Internal reserved area
CS0
3Mbytes
CS1
4Mbytes
(Note2)
CS1
2Mbytes
(Note1)
External area
CS2
2Mbytes
No use
CS0
2Mbytes
CS0
4Mbytes
CS1
4Mbytes
(Note2)
000000
16
000400
16
000800
16
200000
16
400000
16
C00000
16
E00000
16
F00000
16
FFFFFF
16
Each CS0, CS1 and CS can set 0 to 3 WAIT.
Mode 0
Mode 1Mode 2Mode 0
MOde 1Mode 2
SFR area
Internal RAM area
Internal reserved area
SFR area
Internal RAM area
Internal reserved area
SFR area
Internal RAM area
Internal reserved area
SFR area
Internal RAM area
Internal reserved area
SFR area
Internal RAM area
Internal reserved area
SFR area
Internal RAM area
Mode 3
Internal reserved area
SFR area
Internal RAM area
Internal ROM area
Internal reserved area
CS1
1Mbytes
Mode 3
Internal reserved area
SFR area
Internal RAM area
No use
CS2
1Mbytes
No use
Connect with
DRAM
0.05 to 8MB
(When not
connect with
DRAM, use as
external area.)
External area
Connect with
DRAM
0.05 to 8MB
(When open area
is under 8MB,
cannot use the
rest of this area.)
Connect with
DRAM
0.05 to 8MB
(When open area
is under 8MB,
cannot use the
rest of this area.)
Connect with
DRAM
0.05 to 8MB
(When open area
is under 8MB,
cannot use the
rest of this area.)
No use
(Cannot use as
DRAM area or
external area.)
Connect with
DRAM
0.05 to 8MB
(When not
connect with
DRAM, use as
external area.)
Connect with
DRAM
0.05 to 8MB
(When open area
is under 8MB,
cannot use the
rest of this area.)
No use
(Cannot use as
DRAM area or
external area.)
External area
No use
CS3
1Mbytes
CS0
1Mbytes
CS1
1Mbytes
No use
CS2
1Mbytes
No use
CS1
2Mbytes
(Note1)
No use
CS3
1Mbytes
CS0
1Mbytes
development
Processor Mode
Processor Mode
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
Mitsubishi microcomputers
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Figure 1.6.3. Memory maps in each processor mode (without memory area expansion, normal mode)
27
Under
development
Bus Settings
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi microcomputers
Bus Settings
The BYTE pin, bit 0 to 3 of the external data bus width control register (address 000B16), bits 4 and 5 of the
processor mode register 0 (address 000416) and bit 0 and 1 of the processor mode register 1 (address
000516) are used to change the bus settings.
Table 1.7.1 shows the factors used to change the bus settings, figure 1.7.1 shows external data bus width
control register and table 1.7.2 shows external area 0 to 3 and external area mode.
Table 1.7.1. Factors for switching bus settings
Bus settingSwitching factor
Switching external address bus widthExternal data bus width control register
Switching external data bus widthBYTE pin (external area 3 only)
Switching between separate and multiplex busBits 4 and 5 of processor mode register 0
(1) Selecting external address bus width
You can select the width of the address bus output externally from the 16 Mbytes address space, the
number of chip select signals, and the address area of the chip select signals. (Note, however, that when
you select “Full CS space multiplex bus”, addresses A0 to A15 are output.) The combination of bits 0 and
1 of the processor mode register 1 allow you to set the external area mode.
When using DRAM controller, the DRAM area is output by multiplexing of the time splitting of the row and
column addresses.
____
(2) Selecting external data bus width
You can select 8-bit or 16-bit for the width of the external data bus for external areas 0, 1, 2, and 3. When
the data bus width bit of the external data bus width control register is “0”, the data bus width is 8 bits;
when “1”, it is 16 bits. The width can be set for each of the external areas. The default bus width for
external area 3 is 16 bits when the BYTE pin is “L” after a reset, or 8 bits when the BYTE pin is “H” after
a reset. The bus width selection is valid only for the external bus (the internal bus width is always 16 bits).
During operation, fix the level of the BYTE pin to “H” or “L”.
(3) Selecting separate/multiplex bus
The bus format can be set to multiplex or separate bus using bits 4 and 5 of the processor mode register 0.
• Separate bus
In this bus configuration, input and output is performed on separate data and address buses. The data
bus width can be set to 8 bits or 16 bits using the external data bus width control register. For all
programmable external areas, P0 is the data bus when the external data bus is set to 8 bits, and P1 is
a programmable IO port. When the external data bus width is set to 16 bits for any of the external
areas, P0 and P1 (although P1 is undefined for any 8-bit bus areas) are the data bus.
When accessing memory using the separate bus configuration, you can select a software wait using
the wait control register.
• Multiplex bus
In this bus configuration, data and addresses are input and output on a time-sharing basis. For areas
for which 8-bit has been selected using the external data bus width control register, the 8 bits D0 to D7
are multiplexed with the 8 bits A0 to A7. For areas for which 16-bit has been selected using the
external data bus width control register, the 16 bits D0 to D15 are multiplexed with the 16 bits A0 to
A15. When accessing memory using the multiplex bus configuration, two waits are inserted regardless of whether you select “No wait” or “1 wait’ in the appropriate bit of the wait control register.
28
Under
development
Specifications in this manual are tentative and subject to change.
Bus Settings
Preliminary Specifications REV.B
Mitsubishi microcomputers
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
The default after a reset is the separate bus configuration, and the full CS space multiplex bus configu-
____
____
ration cannot be selected in microprocessor mode. If you select “Full CS space multiplex bus”, the 16
bits from A0 to A15 are output for the address
External data bus width control register
b7 b6 b5 b4 b3 b2 b1 b0
SymbolAddressWhen reset
DS000B
16
XXXXX000
2
Bit nameFunctionBit symbol
DS0
DS1
DS2
DS3
Nothing is assigned.
When write, set "0". When read, their contents are indeterminate.
Note: The value after a reset is determined by the input via the BYTE pin.
External area 0 data bus
width bit
External area 1 data bus
width bit
External area 2 data bus
width bit
External area 3 data bus
width bit (Note)
0 : 8 bits data bus width
1 : 16 bits data bus width
0 : 8 bits data bus width
1 : 16 bits data bus width
0 : 8 bits data bus width
1 : 16 bits data bus width
0 : 8 bits data bus width
1 : 16 bits data bus width
WR
Figure 1.7.1. External data bus width control register
Table 1.7.2. External area 0 to 3 and external area mode
External area mode
Memory expansion mode
Microprocessor mode
area 0
External
Memory expansion mode
Microprocessor mode
area 1
External
Memory expansion mode
Microprocessor mode
area 2
External
Memory expansion mode
area 3
External
Microprocessor mode
(Note 2)
Mode 0Mode 1Mode 2Mode 3
,
,
,
00800016 to
1FFFFF
16
20000016 to
3FFFFF
16
40000016 to
BFFFFF
16
(Note 1)
C0000016 to
EFFFFF
16
C0000016 to
FFFFFF
16
<CS1 area>
16
008000
1FFFFF
to
16
<CS2 area>
16
200000
3FFFFF
to
16
<DRAMC area>
16
400000
BFFFFF
to
16
<CS0 area>
16
C00000
EFFFFF
to
16
<CS0 area>
16
E00000
FFFFFF
to
16
<CS1 area>
16
008000
1FFFFF
to
16
No area is
selected.
<DRAMC area>
16
400000
BFFFFF
to
16
<CS0 area>
16
C00000
EFFFFF
to
16
<CS0 area>
16
C00000
FFFFFF
to
16
<CS1 area>
16
100000
1FFFFF
to
16
<CS2 area>
16
200000
2FFFFF
to
16
<CS3 area>
16
C00000
CFFFFF
to
16
<CS0 area>
16
E00000
EFFFFF
to
16
<CS0 area>
16
F00000
FFFFFF
to
16
Note 1: DRAMC area when using DRAMC.
Note 2:Set the external area mode (modes 0, 1, 2, and 3) using bits 0 and 1 of the processor mode register
1 (address 000516).
29
Under
development
Bus Settings
Specifications in this manual are tentative and subject to change.
Table 1.7.3. Each processor mode and port function
Preliminary Specifications REV.B
Processor
mode
Single-chip
mode
Memory expansion mode/microprocessor modes
Mitsubishi microcomputers
M16C/80 (144-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Memory
expansion mode
Multiplexed
bus space
select bit
Data bus width
BYTE pin level
P00 to P0
P10 to P1
7
7
port
P2
0
to P2
7
P30 to P3
P4
P4
P4
P5
0
to P4
4
to P4
7
0
to P5
7
3
6
3
“01”, “10”
CS1 or CS2 : multiplexed
bus, and the other :
separate bus
All external
area is 8 bits
Some external
area is 16 bits
Separate bus
All external
area is 8 bits
“00”
Some external
area is 16 bits
“11” (Note 1)
All space multiplexed
bus
I/O portData busData busData busData busI/O port I/O port
I/O portI/O portData busI/O portData bus I/O port I/O
I/O port
I/O port
Address busAddress bus
/data bus/data bus
(Note 2)
Address busAddress bus
(Note 2)
/data bus
(Note 2)
Address busAddress busAddress busAddress bus
/data bus/data bus
Address busAddress busAddress busAddress bus
/data bus
I/O portAddress busAddress busAddress busAddress busI/O port I/O port
I/O portCS (chip select) or address bus (A23)
(For details, refer to “Bus control”) (Note 5)
I/O port
CS (chip select) or address bus (A23)
(For details, refer to “Bus control”) (Note 5)
I/O port
Outputs RD, WRL, WRH, and BCLK or RD, BHE, WR, and BCLK
Note 1:The default after a reset is the separate bus configuration, and "Full CS space multiplex bus" cannot be selected in
microprocessor mode. When you select "Full CS space multiplex bus" in extended memory mode, the address bus
operates with 64 Kbytes boundaries for each chip select.
Note 2: Address bus in separate bus configuration.
Note 3: The ALE output pin is selected using bits 4 and 5 of the processor mode register 1.
Note 4: When you have selected use of the DRAM controller and you access the DRAM area, these are CASL, CASH, DW, and
BCLK outputs.
Note 5: The CS signal and address bus selection are set by the external area mode.
30
Loading...
+ 285 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.