r
de n t
Un p m e
lo
ve
de
Specifications in this manual are tentative and subject to change
MITSUBISHI MICROCOMPUTERS
Rev. G
Description
M30222 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Description
The M30222 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 100-pin plastic molded QFP. These single-chip
microcomputers operate using sophisticated instructions featuring a high-level of instruction efficiency and
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 pro-
cessing applications.
The M30222 group includes a range of products with various package types.
Features
• Memory capacity ......................................... Flash ROM 260 Kbytes
...................................................................... RAM 20 Kbytes
• Shortest instruction execution time ............. 62.5ns (f(X
IN
)=16MH
Z
)
• Supply voltage ............................................ 2.7 to 5.5V
• Low power consumption ............................. TBD
• Interrupts ..................................................... 25 internal and 8 external interrupt sources
4 software interrupt sources
7 levels (including key input interrupt)
• Multifunction 16-bit timer ............................. 5 output timers, 6 input timers, three phase motor control, real-time port
• Serial I/O ..................................................... 5 channel
3 for UART or clock synchronous (1 channel for I
2
C or SPI)
2 for clock synchronous
• DMAC ........................................................... 2 channels (trigger: 24 sources)
• A-D converter ............................................... 10 bits X 8 channels (expandable up to 10 channels)
• D-A converter ............................................... 8 bits X 2 channels
• CRC calculation circuit ................................. 1 circuit
• Watchdog timer ............................................ 1 timer
• Key-on Wake up ........................................... 8 inputs
• Programmable I/O ........................................ 54 lines
• Input port ...................................................... 1 line (P8
3
shared with NMI pin)
• Clock generating circuit ............................... 2 built-in clock generation circuits
(built-in feedback resistor, and external ceramic or quartz oscillator)
•LCD Drive ...................................................... 1/2, 1/3 bias
4 common outputs
40 segment outputs
Built-in charge pump
1/2, 1/3, 1/4 duty
Expansion CLK output
Static/direct drive mode
Specifications written in this manual
are believed to be accurate but are
not guaranteed to be entirely error
free. They may be changed for func-
tional or performance improvements.
Please make sure your manual is the
latest version.
Applications
Audio, cameras, office, industrial, communications and, portable equipment
1-2
er t
nd m e n
U p
elo
ev
d
Specifications in this manual are tentative and subject to change
MITSUBISHI MICROCOMPUTERS
Rev. G
Description
M30222 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Table of Contents
Description ............................................................ 1-2
Operation of Functional Blocks ............................ 1-10
Memory ............................................................... 1-10
Central Processing Unit (CPU) ............................ 1-11
Reset ................................................................... 1-14
Special function registers ..................................... 1-15
Software Reset .................................................... 1-20
Clock generating Circuit ...................................... 1-21
Clock Output ........................................................ 1-25
Wait Mode ........................................................... 1-26
Stop Mode ........................................................... 1-27
Status Transition Of BCLK ................................... 1-28
Voltage Down Converter ...................................... 1-30
Power control....................................................... 1-32
Protection ............................................................ 1-34
Software wait ....................................................... 1-35
Overview of Interrupts .......................................... 1-36
Watchdog Timer .................................................. 1-57
DMAC .................................................................. 1-59
Timers ................................................................. 1-69
Timer A ................................................................ 1-71
Timer B ................................................................ 1-85
Timer functions for three-phase motor control ..... 1-93
Serial Communications ...................................... 1-105
(1) Clock synchronous serial I/O mode .............. 1-114
(2) Clock Asynchronous Serial I/O (UART) Mode1-120
UART2 in I2C Mode .......................................... 1-130
UART2 in SPI mode .......................................... 1-138
S I/O 3, 4 ........................................................... 1-143
LCD Drive Control Circuit .................................. 1-147
A-D Converter ................................................... 1-157
D-A Converter .................................................... 1-168
CRC Calculation Circuit ..................................... 1-170
Programmable I/O Ports .................................... 1-172
Electrical Characteristics ................................... 1-179
Flash Memory .................................................... 1-186
CPU Rewrite Mode ............................................ 1-188
Parallel I/O Mode ............................................... 1-202
Standard serial I/O mode 1 ................................ 1-206
Standard serial I/O mode 2 ................................ 1-226
1-3
r
de n t
Un p m e
lo
ve
de
Specifications in this manual are tentative and subject to change
MITSUBISHI MICROCOMPUTERS
Rev. G
Description
M30222 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Pin Configuration
Figure 1.1 shows the pin configurations for M30222 group.
P97/ADtrg/LED7/Sin4/INT3
100
P106/AN6/INT6
P107/AN7/INT7
P100/AN0
P103/AN3
P102/AN2
P104/AN4
P105/AN5
P101/AN1
COM2
COM0
COM1
AVcc
99
AVss
Vref
98
VL2
VL1
VL3
C2
C1
92
97
96
95
94
93
91
90
89
88
87
86
85
84
83
82
81
80
79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51
P96/ANEX1/Sout4
P95/ANEX0/CLK4
P94/DA1/TB4in
P93/DA0/TB3in
P92/TB2in/Sout3
P91/TB1in/Sin3
P90/TB0in/INT2/CLK3
P86/INT1
CNVss
P85/Xcin
P84/Xcout
RESET
Xout
Vss
Xin
V
cc
P83/NMI
P82/INT0
P81/TA4IN/INT5/U
P80/TA4OUT/INT5/U
P77/TA3IN/INT4
P76/TA3OUT/INT4
P75/TA2IN/W
P74/TA2OUT/W
P73/CTS2/RTS2/TA1IN/V
P72/CLK2/TA1OUT/V
P71/RxD2/SCL/TA0IN/TB5IN
P70/TxD2/SDA/TA0OUT
P67/TxD1/KI7
P66/RxD1/KI6
COM3
SEG00
SEG01
SEG02
SEG03
SEG04
SEG05
SEG06
SEG07
SEG08
SEG09
SEG10
SEG11
SEG12
SEG13
SEG14
Vss
SEG15
VDC
Vcc
SEG16
SEG17
SEG18
SEG19
SEG20
SEG21
SEG22
SEG23
SEG24/P30
SEG25/P31
Fig. 1.1. Pin configuration (top view)
1
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
33
34
35
31
P65/CLK1/KI5
32
P64/CTS1/RTS1/CTS0/CLKS1/KI4
P63/TxD0/KI3
P61/CLK0/KI1
P62/RxD0/KI2
M30222FG
43
45
42
44
36
P60/CTS0/RTS0/KI0
37
SEG39/P47/RTP1
38
SEG38/P46/RTP0
40
SEG36/P44
46
48
49
47
41
50
1-4
39
SEG37/P45
SEG35/P43
SEG33/P41
SEG31/P37
SEG30/P36
SEG29/P35
SEG34/P42
SEG32/P40
SEG28/P34
SEG27/P33
SEG26/P32
er t
nd m e n
U p
elo
ev
d
Specifications in this manual are tentative and subject to change
MITSUBISHI MICROCOMPUTERS
Rev. G
Description
M30222 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Block Diagram
Figure 1.2 is a block diagram of the M30222 group.
4
24
8
8
8
I/O ports
Internal peripheral functions
Timer
COM 0-3
SEG 0-23
Port P3
SEG 24-31
Port P4
SEG 32-39
Port P6
Port P7
A-D converter
(10 bits
X
8 channels
Expandable up to 10 channels)
Timer TA0 (16 bits)
Timer TA1 (16 bits)
Timer TA2 (16 bits)
Timer TA3 (16 bits)
Timer TA4 (16 bits)
Timer TB0 (16 bits)
Timer TB1 (16 bits)
Timer TB2 (16 bits)
Timer TB3 (16 bits)
Timer TB4 (16 bits)
Timer TB5 (16 bits)
Watchdog timer
(15 bits)
System clock generator
X
IN
-X
OUT
X
CIN
-X
COUT
Clock synchronous SI/O
8
Port P8
UART/clock synchronous SI/O
(8 bits
X
3 channels)
CRC arithmetic circuit (CCITT )
5
(Polynomial :X
16
+X
12
+X +1)
(8 bits
X
2 channels)
LCD Controller
VDC
6
Port P8
3
M16C/60 series16-bit CPU core
Registers
R0H
R0L
R0H
R0L
R1H
R1L
R1H
R1L
R2
R2
R3
R3
A0
A0
A1
A1
FB
FB
SB
Program counter
PC
Vector table
INTB
Stack pointer
ISP
USP
FLG
Memory
ROM
(Note 1)
1
Port P9
RAM
(Note 2)
DMAC
(2 channels)
8
Port P10
D-A converter
(8 bits X 2 channels)
Multiplier
8
Note 1: ROM size depends on MCU type.
Note 2: RAM size depends on MCU type.
Fig. 1.2. Block diagram of M30222 group
Memory Expansion
Figure 1.3 shows the Memory expansion for the M30222 group.
ROM size
(Bytes)
260K
128K
96K
64K
32K
20K SRAM
Flash Memory Version
M30222FC/FP/GP
Fig. 1.3. Memory Expansion
1-5
r
de n t
Un p m e
lo
ve
de
Specifications in this manual are tentative and subject to change
MITSUBISHI MICROCOMPUTERS
Rev. G
Description
M30222 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Performance Outline
Table 1.1. Performance outline of the M30222 group
Parameters
Number of basic instructions
Shortest instruction execution time
ROM
Memory size
RAM
P3-P4, P6-P10
except P83
P83
Multifunctional
timer
Serial I/O
I/O
I
91
62.5ns f(Xin) = 16MHz
260K bytes
20K bytes
8 bits x 6, 7 bits x 1
1 bit x 1
16 bits x 5
Functions
Input/Output
TA0, TA1, TA2, TA3, TA4
TB0, TB1, TB2, TB3, TB4, TB5
UART0, UART1, UART2
SIO3, SIO4
16 bits x 6, three-phase motor control
(UART or clock synchronous) x 3, or I
2
C x 1
(Clock synchronous) x 2
10 bits x (8 + 2) channels
8 bits x 2
CRC-CCITT
15 bits x 1 (with prescaler)
25 external, 8 internal sources, 4 software, 7 levels
2 built-in clock generation circuits
2.7 to 5.5V f(Xin) = 16 MHz, without software wait
TBD
A-D converter
D-A converter
CRC calculation circuit
Watchdog timer
Interrupts
Clock generating circuit
Supply voltage
Power consumption
I/O characteristics
I/O withstand voltage
P3, P4
Output current
Device configuration
Package
COM0 to COM3
LCD
SEG0 to SEG39
P6-P10
5.5V
0.1 mA (high output), 2.5 mA (low output)
5 mA at 5V (excluding pins P7
0
, P7
1
, P8
3
)
CMOS high performance silicon gate
100-pin plastic mold QFP
4 lines
40 lines (16 lines shared with I/O ports)
1-6