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
38K2 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
DESCRIPTION
The 38K2 group is the 8-bit microcomputer based on the 740 fam-
ily core technology.
The 38K2 group has the USB function, an 8-bit bus interface, a
Serial I/O, three 8-bit timers, and an 8-channel 10-bit A-D con-
verter, which are available for the PC peripheral I/O device.
The various microcomputers in the 38K2 group include variations
of internal memory size and packaging. For details, refer to the
section on part numbering.
•
LED direct drive port ................................................................... 4
•
Clock generating circuit
•
(connect to external ceramic resonator or quartz-crystal oscillator)
Power source voltage (Standard)
System clock/Internal clock division mode
At 8 MHz/Through mode (φ = 8 MHz) ................... 4.00 to 5.25 V
At 6 MHz/Through mode (φ = 6 MHz) ................... 4.00 to 5.25 V
Power source voltage (L version)
System clock/Internal clock division mode
At 12 MHz/Through mode (φ = 12 MHz) (under planning) ..........
................... 4.50 to 5.25 V
At 12 MHz/2-divide mode(φ = 6 MHz) ................... 4.00 to 5.25 V
At 8 MHz/Through mode (φ = 8 MHz) ................... 4.00 to 5.25 V
At 6 MHz/Through mode (φ = 6 MHz) ................... 3.00 to 5.25 V
•
FEATURES
•
Basic machine-language instructions ....................................... 71
•
The minimum instruction execution time .......................... 0.25 µs
•
•
•
•
•
•
•
•
•
•
•
(at 8 MHz system clock
✻
)
System clock
✻
: Reference frequency to internal circuit except
USB function
Memory size
ROM ................................................................ 16 K to 32 K bytes
RAM ............................................................... 1024 to 2048 bytes
Programmable input/output ports ............................................. 44
Software pull-up resistors
Interrupts .................................................. 16 sources, 16 vectors
USB function (Full-Speed USB2.0 specification) ...... 4 endpoints
USB HUB function (Full-Speed USB2.0 specification) .... 2 down ports
External bus interface ....................................... 8-bit
✕
1 channel
Timers ............................................................................. 8-bit
✕
3
Watchdog timer ............................................................. 16-bit
✕
1
Serial I/O ...................... 8-bit
✕
1 (UART or Clock-synchronized)
A-D converter ................................................ 10-bit
✕
8 channels
(8-bit reading available)
•
Power dissipation
At 5 V power source voltage .................................. 125 mW (typ.)
(at 8 MHz system clock, in through mode)
At 3.3 V power source voltage ................................ 30 mW (typ.)
(at 6 MHz system clock, in through mode)
Operating temperature range .................................... –20 to 85°C
Packages
FP ........................................ 64P6U-A (64-pin 14
✕
14 mm LQFP)
HP ........................................ 64P6Q-A (64-pin 10
✕
10 mm LQFP)
•
•
sNotes
The specifications of this product are subject to change because it
is under development. Inquire the use of Mitsubishi Electric Cor-
poration.
PIN CONFIGURATION (TOP VIEW)
47
46
45
44
43
35
34
48
41
42
P0
6
P0
7
P4
0
/E
X
DREQ/R
X
D
P4
1
/E
X
DACK/T
X
D
P4
2
/E
X
TC/S
CLK
P4
3
/E
X
A1/S
RDY
P3
0
P3
1
P3
2
P3
3
/E
X
INT
P3
4
/E
X
CS
P3
5
/E
X
WR
P3
6
/E
X
RD
P3
7
/E
X
A0
P1
0
/DQ
0
/AN
0
P1
1
/DQ
1
/AN
1
40
39
38
37
36
33
P0
5
P0
4
P0
3
P0
2
P0
1
P0
0
P5
7
P5
6
P5
5
P5
4
P5
3
P5
2
/INT
1
P5
1
/CNTR
0
P5
0
/INT
0
P2
7
P2
6
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
10
11
12
13
14
15
16
2
3
4
5
6
7
8
1
9
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
M38K27M4-XXXFP/HP
M38K29F8FP/HP
M38K27M4L-XXXFP/HP
M38K29F8LFP/HP
P2
5
P2
4
D2+
D2-
D1+
D1-
D0-
D0+
TrON
USBV
REF
DV
CC
PV
CC
PV
SS
P6
3
(LED
3
)
P6
2
(LED
2
)
P6
1
(LED
1
)
P1
2
/DQ
2
/AN
2
P1
3
/DQ
3
/AN
3
P1
4
/DQ
4
/AN
4
P1
5
/DQ
5
/AN
5
P1
6
/DQ
6
/AN
6
P1
7
/DQ
7
/AN
7
CNV
SS
RESET
V
CC
E
V
REF
V
SS
X
IN
Package type : 64P6U-A/64P6Q-A
Fig. 1 Pin configuration of 38K2 group
P6
0
(LED
0
)
V
CC
CNV
SS
2
X
OUT
1
FUNCTIONAL BLOCK DIAGRAM (Package : 64P6U-A/64P6Q-A)
PV
SS
PV
CC
X
IN
X
OUT
V
CC
E
V
SS
V
CC
RESET
CNV
SS
CNV
SS
2
15
7
8
14
11
9
20
21
12
13
Fig. 2 Functional block diagram
Data bus
Clock
generating
circuit
RAM
ROM
CPU
Timer 1 (8)
Timer 2 (8)
Timer X (8)
RAM
I/F
Watchdog timer
CNTR
0
INT
1
INT
0
SI/O
EXTBUS (8)
USB
USB HUB
10-bit A-D
converter (8)
P6 (4)
P3 (8)
P5 (8)
P4 (4)
P2 (4)
P1 (8)
P0(8)
16 17 18 19
51 52 53 54
35 36 37 38 39 4041 42
55 56 57 58 59 60 61 62
22
23
24
25
26
27
28
29
30
31 32 33 34
10
63 64 1 2 3 4 5 6
43 44 45 46 47 4849 50
MITSUBISHI MICROCOMPUTERS
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
38K2 Group
D0-
DV
CC
TrON
USBV
REF
D0+
D1-D1+D2- D2+
V
REF
2
MITSUBISHI MICROCOMPUTERS
38K2 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
PIN DESCRIPTION
Table 1. Pin description
Pin
V
CC
, V
SS
V
CC
E
CNV
SS
CNV
SS
2
V
REF
DV
CC
PV
CC
, PV
SS
RESET
X
IN
X
OUT
USBV
REF
Name
Power source
Analog power
source
CNV
SS
CNV
SS
2
Analog reference
voltage input
Analog power
source
Reset input
Clock input
Clock output
USB reference
power source
Function
Function except a port function
• Apply voltage of 4.0 V – 5.25V (Standard) or 3.0 V – 5.25 V (L version) to V
CC
, and 0 V to V
SS
.
• Power source pin for ports P1, P3, P4 and analog circuit. Connect this pin to V
CC
.
• This pin controls the operation mode of the chip. Connect this pin to V
SS
. In the flash memory
mode, this pin becoems V
PP
power source input pin.
• This pin controls the operation mode of the chip. Connect this pin to V
SS
.
• Reference voltage input pin for A-D converter.
• Power source pin for analog circuit.
• Connect the DV
CC
and PV
CC
pins to V
CC
, and the PV
SS
pin to V
SS
.
• Reset input pin for active “L”
• Input and output pins for the main clock generating circuit.
• Connect a ceramic resonator or a quartz-crystal oscillator between the X
IN
and X
OUT
pins to set
the oscillation frequency.
•If an external clock is used, connect the clock source to the X
IN
pin and leave the X
OUT
pin open.
• Power source pin for USB port circuit.
In Vcc = 4.00 to 5.25 V use the built-in USB reference voltage circuit. In Vcc = 3.60 to 4.00 V apply
3.3 V power supply from the external because use of the built-in USB reference voltage circuit is
prohibited in this voltage range. In Vcc = 3.00 to 3.60 V connect this pin to V
CC
because use of the
built-in USB reference voltage circuit is prohibited in this voltage range.
• Output pin to pull-up D0+ by 1.5 kΩ external resistor.
• USB upstream I/O port
• USB input level
• USB output level output structure
• USB downstream I/O port
• USB input level
• USB output level output structure
• 8-bit I/O port
• I/O direction register allows each pin to be individually
programmed as either input or output.
• CMOS compatible input level
• CMOS 3-state output structure
• Pull-up control is enabled.
• 8-bit I/O port
• I/O direction register allows each pin to be individually
programmed as either input or output.
• CMOS compatible input level
• CMOS 3-state output structure
TrON
D0+, D0-
USB reference
voltage output
USB upstream
I/O
USB down-
stream I/O
I/O port P0
D1+, D1-,
D2+, D2-
P0
0
–P0
7
• Key input pins (key-on wake up interrupt)
P1
0
/DQ
0
/AN
0
– I/O port P1
P1
7
/DQ
7
/AN
7
• A-D converter input pins
• External bus interface function pins
P2
4
–P2
7
I/O port P2
P3
0
–P3
2
I/O port P3
P3
3
/ExINT
P3
4
/ExCS
P3
5
/ExWR
P3
6
/ExRD
P3
7
/ExA0
P4
0
/ExDREQ/RxD I/O port P4
P4
1
/ExDACK/TxD
P4
2
/ExTC/S
CLK
P4
3
/ExA1/S
RDY
P5
0
/INT
0
P5
1
/CNTR
0
P5
2
/INT
1
P5
3
–P5
7
P6
0
–P6
3
I/O port P5
• 4-bit I/O port
• I/O direction register allows each pin to be individually programmed as either input or output.
• CMOS compatible input level
• CMOS 3-state output structure
• 8-bit I/O port
• I/O direction register allows each pin to be individually
• External bus interface function pins
programmed as either input or output.
• CMOS compatible input level
• CMOS 3-state output structure
• Serial I/O function pins
• 4-bit I/O port
• External bus interface function pins
• I/O direction register allows each pin to be individually
programmed as either input or output.
• CMOS compatible input level
• CMOS 3-state output structure
• Interrupt input pin
• 8-bit I/O port
• I/O direction register allows each pin to be individually
• Timer X funciton pin
programmed as either input or output.
• Interrupt input pin
• CMOS compatible input level
• CMOS 3-state output structure
• 4-bit I/O port; • I/O direction register allows each pin to be individually programmed as either input
or output.; • CMOS compatible input level• CMOS 3-state output structure;
• Output large current for LED drive is enabled.
I/O port P6
3
MITSUBISHI MICROCOMPUTERS
38K2 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
PART NUMBERING
Product
M38K2
7 M 4 - XXX FP
Package type
FP : 64P6U-A package
HP : 64P6Q-A package
ROM number
Omitted in the flash memory version.
– : Standard
Omitted in the flash memory version.
ROM/PROM size
1 : 4096 bytes
2 : 8192 bytes
3 : 12288 bytes
4 : 16384 bytes
5 : 20480 bytes
6 : 24576 bytes
7 : 28672 bytes
8 : 32768 bytes
9 : 36864 bytes
A : 40960 bytes
B : 45056 bytes
C : 49152 bytes
D : 53248 bytes
E : 57344 bytes
F : 61440 bytes
The first 128 bytes and the last 2 bytes of ROM
are reserved areas ; they cannot be used as a
user’s ROM area.
However, they can be programmed or erased
in the flash memory version, so that users can
use them.
Memory type
M : Mask ROM version
F : Flash memory version
RAM size
0 : 192 bytes
1 : 256 bytes
2 : 384 bytes
3 : 512 bytes
4 : 640 bytes
5 : 768 bytes
6 : 896 bytes
7 : 1024 bytes
8 : 1536 bytes
9 : 2048 bytes
Fig. 3 Part numbering
4