MITSUBISHI MICROCOMPUTERS
3802 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
DESCRIPTION
The 3802 group is the 8-bit microcomputer based on the 740 fam-
ily core technology.
The 3802 group is designed for controlling systems that require
analog signal processing and include two serial I/O functions, A-D
converters, and D-A converters.
The various microcomputers in the 3802 group include variations
of internal memory size and packaging. For details, refer to the
section on part numbering.
For details on availability of microcomputers in the 3802 group, re-
fer to the section on group expansion.
•
Programmable input/output ports ............................................. 56
•
Interrupts .................................................. 16 sources, 16 vectors
•
Timers ............................................................................. 8 bit
!
4
•
Serial I/O1 .................... 8-bit
!
1 (UART or Clock-synchronized)
•
Serial I/O2 .................................... 8-bit
!
1 (Clock-synchronized)
•
PWM ................................................................................ 8-bit
!
1
•
A-D converter .................................................. 8-bit
!
8 channels
•
D-A converter .................................................. 8-bit
!
2 channels
•
Clock generating circuit ....................... Internal feedback resistor
•
•
•
•
(connect to external ceramic resonator or quartz-crystal oscillator)
Power source voltage .................................................. 3.0 to 5.5 V
(Extended operating temperature version : 4.0 to 5.5 V)
Power dissipation ............................................................... 32 mW
Memory expansion possible
Operating temperature range .................................... –20 to 85°C
(Extended operating temperature version : –40 to 85°C)
FEATURES
•
Basic machine-language instructions ....................................... 71
•
The minimum instruction execution time ............................ 0.5
µs
•
(at 8 MHz oscillation frequency)
Memory size
ROM .................................................................. 8 K to 32 K bytes
RAM ................................................................. 384 to 1024 bytes
APPLICATIONS
Office automation, VCRs, tuners, musical instruments, cameras,
air conditioners, etc.
PIN CONFIGURATION (TOP VIEW)
P0
0
/AD
0
P0
1
/AD
1
P0
2
/AD
2
P0
3
/AD
3
P0
4
/AD
4
P0
5
/AD
5
P0
6
/AD
6
P0
7
/AD
7
P1
0
/AD
8
P1
1
/AD
9
P1
2
/AD
10
P1
3
/AD
11
P1
4
/AD
12
P1
5
/AD
13
P1
6
/AD
14
P1
7
/AD
15
41
40
38
37
39
36
35
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
10
11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
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
P3
0
/DA
1
P3
1
/DA
2
P3
2
/ONW
P3
3
/RESET
OUT
P3
4
/φ
P3
5
/SYNC
P3
6
/WR
P3
7
/RD
P0
0
/AD
0
P0
1
/AD
1
P0
2
/AD
2
P0
3
/AD
3
P0
4
/AD
4
P0
5
/AD
5
P0
6
/AD
6
P0
7
/AD
7
P1
0
/AD
8
P1
1
/AD
9
P1
2
/AD
10
P1
3
/AD
11
P1
4
/AD
12
P1
5
/AD
13
P1
6
/AD
14
P1
7
/AD
15
P2
0
/DB
0
P2
1
/DB
1
P2
2
/DB
2
P2
3
/DB
3
P2
4
/DB
4
P2
5
/DB
5
P2
6
/DB
6
P2
7
/DB
7
Package type : 64P4B
64-pin shrink plastic-molded DIP
M38022M4-XXXSP
2
FUNCTIONAL BLOCK DIAGRAM (Package : 64P4B)
Reset input
V
SS
V
CC
RESET
27
26
1
32
Clock input
X
IN
CNV
SS
Clock output
X
OUT
30
31
Clock generating circuit
CPU
RAM
ROM
X
Prescaler 12 (8)
Y
S
PC
H
PS
CNTR
0
CNTR
1
PC
L
Prescaler Y (8)
Prescaler X (8)
A
Timer 1 (8)
Timer 2 (8)
Timer X (8)
Timer Y (8)
A-D
converter
(8)
SI/O2 (8)
SI/O1 (8)
D-A
converter 2
(8)
D-A
converter 1
(8)
PWM (8)
INT
0
~
INT
3
INT
2
INT
4
P6(8)
P5(8)
P4(8)
P3(8)
P2(8)
P1(8)
P0(8)
2
12 13 14 15 16 17 18 19
3
4 5 6 7 8 9 10 11
20 21 22 23 24 25 28 29
57 58 59 60 61 62 63 64 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
49 50 51 52 53 54 55 56
V
REF
AV
SS
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
I/O port P6
I/O port P5
I/O port P4
I/O port P3
I/O port P2
I/O port P1
I/O port P0
3802 Group
3
MITSUBISHI MICROCOMPUTERS
3802 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
PIN DESCRIPTION
Pin
V
CC
, V
SS
CNV
SS
Name
Power source
CNV
SS
Function
Function except a port function
• Apply voltage of 3.0 V–5.5 V to V
CC
, and 0 V to V
SS
.
(Extended operating temperature version : 4.0 V to 5.5 V)
• This pin controls the operation mode of the chip.
• Normally connected to V
SS
.
• If this pin is connected to V
CC
, the internal ROM is inhibited and external memory is accessed.
• Reference voltage input pin for A-D and D-A converters
• GND input pin for A-D and D-A converters
• Connect to V
SS
.
• Reset input pin for active “L”
• Input and output signals for the clock generating circuit.
• Connect a ceramic resonator or 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.
• The clock is used as the oscillating source of system clock.
•
•
•
•
•
•
8 bit CMOS I/O port
I/O direction register allows each pin to be individually programmed as either input or output.
At reset this port is set to input mode.
In modes other than single-chip, these pins are used as address, data, and control bus I/O pins.
CMOS compatible input level
CMOS 3-state output structure
• D–A conversion output pins
V
REF
AV
SS
RESET
X
IN
X
OUT
Analog reference
voltage
Analog power
source
Reset input
Clock input
Clock output
P0
0
–P0
7
P1
0
–P1
7
P2
0
–P2
7
P3
0
/DA
1
,
P3
1
/DA
2
P3
2
–P3
7
P4
0
/INT
4
,
P4
1
/INT
0
,
P4
2
/INT
1
,
P4
3
/INT
2
P4
4
/R
X
D,
P4
5
/T
X
D,
P4
6
/S
CLK1
,
P4
7
/S
RDY1
P5
0
/S
IN2
,
P5
1
/S
OUT2
,
P5
2
/S
CLK2
,
P5
3
/S
RDY2
P5
4
/CNTR
0
,
P5
5
/CNTR
1
P5
6
/PWM
P5
7
/INT
3
P6
0
/AN
0
–
P6
7
/AN
7
I/O port P0
I/O port P1
I/O port P2
I/O port P3
I/O port P4
• 8-bit CMOS I/O port with the same function as port P0
• CMOS compatible input level
• CMOS 3-state output structure
• External interrupt input pin
• Serial I/O1 I/O pins
I/O port P5
• 8-bit CMOS I/O port with the same function as port P0
• CMOS compatible input level
• CMOS 3-state output structure
• Serial I/O2 I/O pins
• Timer X and Timer Y I/O pins
• PWM output pin
• External interrupt input pin
I/O port P6
• 8-bit CMOS I/O port with the same function as port P0
• CMOS compatible input level
• CMOS 3-state output structure
• A-D conversion input pins
4
MITSUBISHI MICROCOMPUTERS
3802 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
GROUP EXPANSION
Mitsubishi plans to expand the 3802 group as follows:
(1) Support for mask ROM, One Time PROM, and EPROM
versions
ROM/PROM capacity ................................... 8 K to 32 K bytes
RAM capacity .............................................. 384 to 1024 bytes
(2) Packages
64P4B ............................................ Shrink plastic molded DIP
64P6N-A ................................................... Plastic molded QFP
64S1B-E .................................................... Shrink ceramic DIP
64D0 ................................................................... Ceramic LCC
Memory Expansion Plan
ROM size (bytes)
32K
Mass product
M38027M8/E8
28K
Mass product
24K
M38024M6
20K
Mass product
16K
M38022M4
12K
Mass product
8K
M38022M2
4K
192 256
384
512
RAM size (bytes)
640
768
896
1024
Currently supported products are listed below
Product
M38022M2-XXXSP
M38022M2-XXXFP
M38022M4-XXXSP
M38022M4-XXXFP
M38024M6-XXXSP
M38024M6-XXXFP
M38027M8-XXXSP
M38027E8-XXXSP
M38027E8SP
M38027M8-XXXFP
M38027E8-XXXFP
M38027E8FP
M38027E8SS
M38027E8FS
32768
(32638)
1024
(P) ROM size (bytes)
ROM size for User in ( )
8192
(8062)
16384
(16254)
24576
(24446)
RAM size (bytes)
384
384
640
Package
64P4B
64P6N-A
64P4B
64P6N-A
64P4B
64P6N-A
64P4B
Mask ROM version
Mask ROM version
Mask ROM version
Mask ROM version
Mask ROM version
Mask ROM version
Mask ROM version
One Time PROM version
One Time PROM version (blank)
Mask ROM version
One Time PROM version
One Time PROM version (blank)
EPROM version
EPROM version
Remarks
As of May 1996
64P6N-A
64S1B-E
64D0
5