To all our customers
Regarding the change of names mentioned in the document, such as Mitsubishi
Electric and Mitsubishi XX, to Renesas Technology Corp.
The semiconductor operations of Hitachi and Mitsubishi Electric were transferred to Renesas
Technology Corporation on April 1st 2003. These operations include microcomputer, logic, analog
and discrete devices, and memory chips other than DRAMs (flash memory, SRAMs etc.)
Accordingly, although Mitsubishi Electric, Mitsubishi Electric Corporation, Mitsubishi
Semiconductors, and other Mitsubishi brand names are mentioned in the document, these names
have in fact all been changed to Renesas Technology Corp. Thank you for your understanding.
Except for our corporate trademark, logo and corporate statement, no changes whatsoever have been
made to the contents of the document, and these changes do not constitute any alteration to the
contents of the document itself.
Note : Mitsubishi Electric will continue the business operations of high frequency & optical devices
and power devices.
Renesas Technology Corp.
Customer Support Dept.
April 1, 2003
MITSUBISHI MICROCOMPUTERS
MITSUBISHI MICROCOMPUTERS
M37221M6-XXXSP
M37221M6-XXXSP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER
with ON-SCREEN DISPLAY CONTROLLER
with ON-SCREEN DISPLAY CONTROLLER
DESCRIPTION
The M37221M6-XXXSP is a single-chip microcomputer designed with
CMOS silicon gate technology. It is housed in a 42-pin shrink plastic
molded DIP.
In addition to their simple instruction sets, the ROM, RAM and I/O
addresses are placed on the same memory map to enable easy pro-
gramming.
The M37221M6-XXXSP has a PWM output function and a OSD dis-
play function, so it is useful for a channel selection system for TV.
PIN CONFIGURATION (TOP VIEW)
H
SYNC
V
SYNC
P0
0
/PWM0
P0
1
/PWM1
P0
2
/PWM2
P0
3
/PWM3
P0
4
/PWM4
P0
5
/PWM5
P0
6
/INT2/A-D4
P0
7
/INT1
P2
3
/TIM3
P2
4
/TIM2
P2
5
P2
6
P2
7
D-A
P3
2
CNV
SS
X
IN
X
OUT
V
SS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
P5
2
/R
P5
3
/G
P5
4
/B
P5
5
/OUT1
P2
0
/S
CLK
P2
1
/S
OUT
P2
2
/S
IN
P1
0
/OUT2
P1
1
/SCL1
P1
2
/SCL2
P1
3
/SDA1
P1
4
/SDA2
P1
5
/A-D1/INT3
P1
6
/A-D2
P1
7
/A-D3
P3
0
/A-D5
P3
1
/A-D6
RESET
OSC1/P3
3
OSC2/P3
4
V
CC
M37221M6-XXXSP
FEATURES
•
Number of basic instructions ..................................................... 71
•
Memory size
ROM ........................................................ 24 K bytes
RAM .......................................................... 384 bytes
ROM for display ......................................... 8 K bytes
RAM for display .......................................... 96 bytes
The minimum instruction execution time
.......................................... 0.5 s (at 8 MHz oscillation frequency)
Power source voltage .................................................. 5 V ± 10 %
Power dissipation............................................................. 165 mW
(at 8 MHz oscillation frequency, V
CC
=5.5V, at CRT display)
Subroutine nesting ....................................... 96 levels (maximum)
Interrupts ....................................................... 14 types, 14 vectors
8-bit timers .................................................................................. 4
Programmable I/O ports (Ports P0, P1, P2, P3
0
–P3
2
) .............. 27
Input ports (Ports P3
3
, P3
4
) ......................................................... 2
Output ports (Ports P5
2
–P5
5
) ...................................................... 4
12 V withstand ports .................................................................... 6
LED drive ports ........................................................................... 4
Serial I/O ............................................................ 8-bit
!
1 channel
Multi-master I
2
C-BUS interface ............................... 1 (2 systems)
A-D comparator (6-bit resolution) ................................ 6 channels
PWM output circuit ......................................... 14-bit
!
1, 8-bit
!
6
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Outline 42P4B
•
CRT display function
Number of display characters ................ 24 characters
!
2 lines
(16 lines maximum)
Kinds of characters ..................................................... 256 kinds
Dot structure .......................................................... 12
!
16 dots
Kinds of character sizes .................................................. 3 kinds
Kinds of character colors (It can be specified by the character)
maximum 7 kinds (R, G, B)
Kinds of character background colors (It can be specified by the character)
maximum 7 kinds (R, G, B)
Kinds of raster colors (maximum 7 kinds)
Display position
Horizontal .................................................................. 64 levels
Vertical .................................................................... 128 levels
Bordering (horizontal and vertical)
APPLICATION
TV
1
SDA
SCL
S
IN
S
CLK
S
OUT
PWM5
PWM4
PWM3
PWM2
PWM1
PWM0
P0 (8)
INT3
P1 (8)
P3 (3)
P2 (8)
INT2
INT1
OUT2
OUT1
B
G
R
17 26 27
39 40 41 42
10 9 8 7 6 5 4 3
28 29 30 31 32 33 34 35
15 14 13 12 11 36 37 38
16
MITSUBISHI MICROCOMPUTERS
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER
with ON-SCREEN DISPLAY CONTROLLER
M37221M6-XXXSP
I/O port P0
I/O port P1
I/O port P2
D-A
I/O ports P3
0
–P3
2
Output ports P5
2
–P5
5
V
SYNC
H
SYNC
2 1
2
V
CC
V
SS
21
18
24
23
FUNCTIONAL BLOCK DIAGRAM of M37221M6-XXXSP
Clock input Clock output
X
IN
X
OUT
( ) Timing output
CNV
SS
25
22
Reset input
RESET
Input ports P3
3,
P3
4
Clock input for display Clock output for display
OSC1 OSC2
19
20
Clock
generating
circuit
TIM2
TIM3
Data bus
Timer count source
selection circuit
Timer 1
T1 (8)
Timer 2
T2 (8)
Timer 3
T3 (8)
Control signal
Instruction
decoder
Instruction
register (8)
CRT circuit
Timer 4
T4 (8)
RAM
384 bytes
Program
counter
Program
counter
ROM
24 K bytes
PC
H
(8)
PC
L
(8)
Address bus
8-bit
arithmetic
and
logical unit
Index
register
Y (8)
Stack
pointer
S (8)
Accumulator
A (8)
Processor
status
register
PS (8)
Index
register
X (8)
A-D
comparator
14-bit
PWM circuit
Multi-master
I
2
C-BUS interface
SI/O(8)
8-bit PWM circuit
P5 (4)
MITSUBISHI MICROCOMPUTERS
M37221M6-XXXSP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER
with ON-SCREEN DISPLAY CONTROLLER
FUNCTIONS
Parameter
Number of basic instructions
Instruction execution time
Clock frequency
Memory size
ROM
RAM
CRT ROM
CRT RAM
Input/Output ports
P0
P1
0
, P1
5
–P1
7
P1
1
–P1
4
P2
0
, P2
1
P2
2
–P2
7
P3
0
, P3
1
P3
2
P3
3
, P3
4
P5
2
–P5
5
Serial I/O
Multi-master I
2
C-BUS interface
A-D comparator
PWM output circuit
Timers
Subroutine nesting
Interrupt
I/O
I/O
I/O
I/O
I/O
I/O
I/O
Input
Output
71
0.5
µs
(the minimum instruction execution time, at 8 MHz oscillation fre-
quency)
8 MHz (maximum)
24 K bytes
384 bytes
8 K bytes
96 bytes
8-bit
!
1 (N-channel open-drain output structure, can be used as PWM
output pins, INT input pins, A-D input pin)
4-bit
!
1 (CMOS input/output structure, can be used as CRT output pin,
A-D input pins, INT input pin)
4-bit
!
1 (CMOS input/output or N-channel open-drain output structure,
can be used as multi-master I
2
C-BUS interface)
2-bit
!
1 (CMOS input/output or N-channel open-drain output structure,
can be used as serial output pins)
6-bit
!
1 (CMOS input/output structure, can be used as serial input pin,
external clock input pins)
2-bit
!
1 (CMOS input/output or N-channel open-drain output structure,
can be used as A-D input pins)
1-bit
!
1 (N-channel open-drain output structure)
2-bit
!
1 (can be used as CRT display clock I/O pins)
4-bit
!
1 (CMOS output structure, can be used as CRT output pins)
8-bit
!
1
1 (2 systems)
6 channels (6-bit resolution)
14-bit
!
1, 8-bit
!
6
8-bit timer
!
4
96 levels (maximum)
External interrupt
!
3, Internal timer interrupt
!
4, Serial I/O interrupt
!
1,
CRT interrupt
!
1, Multi-master I
2
C-BUS interface interrupt
!
1,
f(X
IN
)/4096 interrupt
!
1, V
SYNC
interrupt
!
1, BRK interrupt
!
1
2 built-in circuits (externally connected a ceramic resonator or a quartz-
crystal oscillator)
5 V ± 10 %
CRT ON
CRT OFF
In stop mode
Operating temperature range
Device structure
Package
CRT display function
Number of display characters
Dot structure
Kinds of characters
Kinds of character sizes
Kinds of character colors
Display position (horizontal, vertical)
165 mW typ. (at oscillation frequency f
CPU
= 8 MHz, f
CRT
= 8 MHz)
110 mW typ. (at oscillation frequency f
CPU
= 8 MHz)
1.65 mW (maximum)
–10 °C to 70 °C
CMOS silicon gate process
42-pin shrink plastic molded DIP
24 characters
!
2 lines (maximum 16 lines by software)
12
!
16 dots
256 kinds
3 kinds
Maximum 7 kinds (R, G, B); can be specified by the character
64 levels (horizontal)
!
128 levels (vertical)
Functions
Clock generating circuit
Power source voltage
Power dissipation
3
MITSUBISHI MICROCOMPUTERS
M37221M6-XXXSP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER
with ON-SCREEN DISPLAY CONTROLLER
PIN DESCRIPTION
Pin
V
CC
,
V
SS.
CNV
SS
RESET
Name
Power source
Input/
Output
Functions
Apply voltage of 5 V ± 10 % (typical) to V
CC
, and 0 V to V
SS
.
CNV
SS
Reset input
Input
This is connected to V
SS
.
To enter the reset state, the reset input pin must be kept at a “L” for 2
µs
or more (under
normal V
CC
conditions).
If more time is needed for the quartz-crystal oscillator to stabilize, this “L” condition should
be maintained for the required time.
This chip has an internal clock generating circuit. To control generating frequency, an
external ceramic resonator or a quartz-crystal oscillator is connected between pins X
IN
and
X
OUT
. If an external clock is used, the clock source should be connected to the X
IN
pin and
the X
OUT
pin should be left open.
Port P0 is an 8-bit I/O port with direction register allowing each I/O bit to be individually
programmed as input or output. At reset, this port is set to input mode. The output structure
is N-channel open-drain output. The note out of this Table gives a full of port P0 function.
Pins P0
0
–P0
5
are also used as PWM output pins PWM0–PWM5 respectively. The output
structure is N-channel open-drain output.
Pins P0
6
, P0
7
are also used as external interrupt input pins INT2, INT1 respectively.
P0
6
pin is also used as analog input pin A-D4.
Port P1 is an 8-bit I/O port and has basically the same functions as port P0. The output
structure is CMOS output.
Pins P1
0
is also used as CRT output pin OUT2. The output structure is CMOS output.
Pins P1
1
–P1
4
are used as SCL1, SCL2, SDA1 and SDA2 respectively, when multi-master
I
2
C-BUS interface is used. The output structure is N-channel open-drain output.
Pins P1
5
–P1
7
are also used as analog input pins A-D1 to A-D3 respectively.
P1
5
pin is also used as external interrupt input pin INT3.
Port P2 is an 8-bit I/O port and has basically the same functions as port P0. The output
structure is CMOS output.
Pins P2
3
, P2
4
are also used as external clock input pins TIM3, TIM2 respectively.
P2
0
pin is also used as serial I/O synchronizing clock input/output pin S
CLK
.
X
IN
X
OUT
P0
0
/PWM0–
P0
5
/PWM5,
P0
6
/INT2/
A-D4
,
P0
7
/INT1
Clock input
Clock output
I/O port P0
Input
Output
I/O
PWM output
External interrupt
input
Analog input
Output
Input
Input
I/O
Output
I/O
Input
Input
I/O
Input
I/O
P1
0
/OUT2,
P1
1
/SCL1,
P1
2
/SCL2,
P1
3
/SDA1,
P1
4
/SDA2,
P1
5
/A-D1/
INT3,
P1
6
/A-D2,
P1
7
/A-D3
P2
0
/S
CLK
,
P2
1
/S
OUT
,
P2
2
/S
IN
,
P2
3
/TIM3,
P2
4
/TIM2,
P2
5
–P2
7
I/O port P1
CRT output
Multi-master
I
2
C-BUS interface
Analog input
External interrupt
input
I/O port P2
External clock input
Serial I/O synchro-
nizing clock input/
output
Serial I/O data
input/output
I/O
I/O
Pins P2
1
, P2
2
are also used as serial I/O data input/output pins S
OUT
, S
IN
respectively.
The output structure is N-channel open-drain output.
Ports P3
0
–P3
2
are a 3-bit I/O port and has basically the same functions as port P0. Either
CMOS output or N-channel open-drain output structure can be selected as the port P3
0
and P3
1
. The output structure of port P3
2
is N-channel open-drain output.
Pins P3
0
, P3
1
are also used as analog input pins A-D5, A-D6 respectively.
Ports P3
3
, P3
4
are a 2-bit input port.
P3
3
pin is also used as CRT display clock input pin OSC1.
P3
4
pin is also used as CRT display clock output pin OSC2. The output structure is CMOS
output.
P3
0
/A-D5,
P3
1
/A-D6,
P3
2
I/O port P3
Analog input
P3
3
/OSC1, Input port P3
P3
4
/OSC2 Clock input for
CRT display
Clock output for
CRT display
Input
Input
Input
Output
4