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
To all our customers
DESCRIPTION
The 3822 group is the 8-bit microcomputer based on the 740 fam-
ily core technology.
The 3822 group has the LCD drive control circuit, an 8-channel
A-D converter, and a serial I/O as additional functions.
The various microcomputers in the 3822 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 3822 group, re-
fer to the section on group expansion.
FEATURES
Basic machine-language instructions ...................................... 71
The minimum instruction execution time ........................... 0.5 µs
(at 8 MHz oscillation frequency)
Memory size
ROM ................................................................. 4 K to 48 K bytes
RAM ................................................................. 192 to 1024 bytes
Programmable input/output ports ............................................ 49
Software pull-up/pull-down resistors (Ports P0-P7 except port P4
0
)
Interrupts ................................................. 17 sources, 16 vectors
(includes key input interrupt)
Timers...........................................................8-bit 3, 16-bit 2
Serial I/O...................... 8-bit 1 (UART or Clock-synchronized)
A-D converter ................................................. 8-bit 8 channels
LCD drive control circuit
Bias...................................................................................1/2, 1/3
Duty ...........................................................................1/2, 1/3, 1/4
Common output.......................................................................... 4
Segment output ........................................................................ 32
2 clock generating circuits
(connect to external ceramic resonator or quartz-crystal oscillator)
Power source voltage
In high-speed mode .................................................. 4.0 to 5.5 V
In middle- speed mod e............................................... 2.5 to 5.5 V
(Extended operating temperature version:
2.0 to 5.5 V, Ta= – 20 to 85°C
3.0 to 5.5 V, Ta= – 40 to – 20°C)
(One time PROM version: 2.5 to 5.5 V)
(M version: 2.2 to 5.5 V)
(H version: 2.0 to 5.5 V)
In low-speed mode.................................................... 2.5 to 5.5 V
(Extended operating temperature version:
2.0 to 5.5 V, Ta= – 20 to 85°C
3.0 to 5.5 V, Ta= – 40 to – 20°C)
(One time PROM version: 2.5 to 5.5 V)
(M version: 2.2 to 5.5 V)
(H version: 2.0 to 5.5 V)
Power dissipation
In high-speed mode ..........................................................32 mW
(at 8 MHz oscillation frequency, at 5 V power source voltage)
In low-speed mode............................................................ 4 5 µW
(at 32 kHz oscillation frequency, at 3 V power source voltage)
Operating temperature range...................................– 20 to 85°C
(Extended operating temperature version: – 40 to 85 °C)
APPLICATIONS
Camera, household appliances, consumer electronics, etc.
Fig. 1 M38224M6HXXXFP pin configuration
(The pin configuration of 80D0 is same as this.)
PIN CONFIGURATION (TOP VIEW)
Package type : 80P6N-A (80-pin plastic-molded QFP)
3822 Group
MITSUBISHI MICROCOMPUTERS
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
S
E
G8
S
E
G9
P
34/
S
E
G1
2
P
35/
S
E
G1
3
P
00/
S
E
G1
6
P
03/
S
E
G1
9
P
04/
S
E
G2
0
P
05/
S
E
G2
1
P
06/
S
E
G2
2
P
07/
S
E
G2
3
P
11/
S
E
G2
5
P
12/
S
E
G2
6
P
13/
S
E
G2
7
P
14/
S
E
G2
8
P
15/
S
E
G2
9
P
16/
S
E
G3
0
P
17/
S
E
G3
1
V
L1
P
67/
A
N7
M
3
8
2
2
4
M
6
H
X
X
X
F
P
P
57/
A
D
T
P
50/
I
N
T2
P
46/
SC
L
K
P
45/
TXD
P
43/
I
N
T1
P
42/
I
N
T0
A
VS
S
VR
E
F
VC
C
S
E
G0
P41/φ
P
40
XIN
XOUT
VSS
P27
P26
P25
P24
P23
P22
P21
P20
RESET
P
51/
I
N
T3
P
55/
C
N
T
R1
P
54/
C
N
T
R0
P
53/
R
T
P1
P
52/
R
T
P0
P
56/
TO
U
T
P
10/
S
E
G2
4
P
01/
S
E
G1
7
P
02/
S
E
G1
8
P
47/
SR
D
Y
S
E
G1
0
S
E
G1
1
P
36/
S
E
G1
4
P
37/
S
E
G1
5
P
70/
XC
O
U
T
P71/XCIN
COM0
V
L3
P
66/
A
N6
P
65/
A
N5
P
64/
A
N4
P
63/
A
N3
P
62/
A
N2
P
61/
A
N1
P
60/
A
N0
V
L2
C
O
M1
COM2
C
O
M3
S
E
G1
S
E
G2
S
E
G3
S
E
G4
S
E
G5
S
E
G6
S
E
G7
P
44/
RXD
1234567891
01
1121
31
41
51
61
71
81
9202
1222
324
2
5
2
6
2
7
2
8
2
9
3
0
3
1
3
2
3
3
3
4
3
5
3
6
3
7
3
8
3
9
4
0
414
2434
4454
6474
8495
05152535
45556575
85
96
0616
26
36
4
6
5
6
6
6
7
6
8
6
9
7
0
7
1
7
2
7
3
7
4
7
5
76
7
7
78
7
9
8
0
2
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Package type : 80P6S-A/80P6Q-A
(80-pin plastic-molded QFP)
PIN CONFIGURATION (TOP VIEW)
Fig. 2 M38223M4MXXXGP/M38224M6HXXXHP pin configuration
1
2
3
4
7
8
9
1
0
1
1
1
2
1
3
1
4
1
5
1
6
1
7
1
8
1
9
2
0
5
6
2
1
2
2
2
3
24
25
2
6
2
7
2
8
29
30
31
3
2
3
3
3
4
35
3
6
37
3
8
3
9
4
0
4
1
4
2
4
3
4
4
4
5
4
6
4
7
4
8
4
9
5
0
5
1
5
2
5
3
5
4
5
5
5
6
5
7
5
8
5
9
6
0
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
P
1
4
/
S
E
G
2
8
P
1
5
/
S
E
G
2
9
P1
6
/SEG
30
P1
7
/SEG
31
P4
2
/INT
0
V
CC
X
IN
X
OUT
V
SS
P2
7
P2
6
P2
5
P2
4
P2
3
P2
2
P2
1
P2
0
RESET
P7
0
/X
COUT
P7
1
/X
CIN
P4
1
/φ
P4
0
P4
3
/INT
1
S
E
G
1
0
P
3
5
/
S
E
G
1
3
P
3
6
/
S
E
G
1
4
P
3
7
/
S
E
G
1
5
P
0
0
/
S
E
G
1
6
P
0
3
/
S
E
G
1
9
P
0
4
/
S
E
G
2
0
P
0
5
/
S
E
G
2
1
P
0
6
/
S
E
G
2
2
P
0
7
/
S
E
G
2
3
P
1
1
/
S
E
G
2
5
P
1
2
/
S
E
G
2
6
P
1
0
/
S
E
G
2
4
P
0
1
/
S
E
G
1
7
P
0
2
/
S
E
G
1
8
P
1
3
/
S
E
G
2
7
C
O
M
3
P
6
0
/
A
N
0
P
5
7
/
A
D
T
P
5
6
/
T
O
U
T
P
5
4
/
C
N
T
R
0
P
5
3
/
R
T
P
1
P
5
2
/
R
T
P
0
P
5
1
/
I
N
T
3
P
5
5
/
C
N
T
R
1
P
4
6
/
S
C
L
K
P
4
5
/
T
X
D
P
5
0
/
I
N
T
2
P
4
7
/
S
R
D
Y
P
4
4
/
R
X
D
SEG
1
SEG
2
S
E
G
3
S
E
G
4
S
E
G
6
S
E
G
5
S
E
G
7
SEG
0
S
E
G
8
SEG
9
COM
2
COM
1
COM
0
V
L3
V
L
2
V
L1
V
R
E
F
A
V
S
S
P
6
1
/
A
N
1
P
6
2
/
A
N
2
P
6
3
/
A
N
3
P
6
4
/
A
N
4
P
6
5
/
A
N
5
P
6
6
/
A
N
6
P
6
7
/
A
N
7
S
E
G
1
1
P
3
4
/
S
E
G
1
2
M38223M4MXXXGP
M38224M6HXXXHP
3
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
FUNCTIONAL BLOCK DIAGRAM (Package type : 80P6Q-A)
Fig. 3 Functional block diagram
K
e
y
o
n
w
a
k
e
u
p
R
e
a
l
t
i
m
e
p
o
r
t
f
u
n
c
t
i
o
n
I
N
T2,
I
N
T3
C
N
T
R0,
C
N
T
R1
T
O
U
T
A
D
T
I
N
T0,
I
N
T1
φ
R
T
P0,
R
T
P1
D
a
t
a
b
u
s
C
P
UA
X
Y
S
P
C
H
P
C
L
P
S
R
E
S
E
TVC
CVS
S
R
e
s
e
t
I
n
p
u
t(
5
V
)(
0
V
)
R
O
M
R
A
M
L
C
D
d
i
s
p
l
a
y
R
A
M
(
1
6
b
y
t
e
s
)
2
57
13
0
I
/
O
P
o
r
t
P
5
P
4
(
8
)
I
/
O
P
o
r
t
P
4I
/
O
P
o
r
t
P
2
P
2
(
8
)
I
/
O
P
o
r
t
P
0
P
0
(
8
)
I
/
O
P
o
r
t
P
1
P
1
(
8
)
P
6
(
8
)
I
n
p
u
t
P
o
r
t
P
3
P
3
(
4
)
I
/
O
P
o
r
t
P
6
P
5
(
8
)
I
/
O
P
o
r
t
P
7
P
7
(
2
)
8
0
7
9
7
8
7
7
7
6
7
5
7
4
7
0
6
9
6
8
6
7
6
6
6
5
6
4
6
3
6
2
6
1
6
0
5
9
4
74
84
95
05
15
25
35
43 94
04
14
24
34
44
54
6
3
13
23
33
43
53
63
73
8
5
55
65
75
81 92
02
12
22
32
41 71
8
2
62
7123
45678 7
37
21
01
11
21
31
41
51
69
C
l
o
c
k
g
e
n
e
r
a
t
i
n
g
c
i
r
c
u
i
t
M
a
i
n
C
l
o
c
k
I
n
p
u
t
X
I
N
M
a
i
n
C
l
o
c
k
O
u
t
p
u
t
X
O
U
T
X
C
O
U
T
S
u
b
-
C
l
o
c
k
O
u
t
p
u
t
X
C
I
N
S
u
b
-
C
l
o
c
k
I
n
p
u
t
S
I
/
O
(
8
)
V
R
E
F
A
V
S
S
(
0
V
)
A
-
D
c
o
n
v
e
r
t
e
r
(
8
)
T
i
m
e
r
X
(
1
6
)
T
i
m
e
r
Y
(
1
6
)
T
i
m
e
r
1
(
8
)T
i
m
e
r
2
(
8
)
T
i
m
e
r
3
(
8
)
L
C
D
d
r
i
v
e
c
o
n
t
r
o
l
c
i
r
c
u
i
t
V
L
1
V
L
2
V
L
3
C
O
M
0
C
O
M
1
C
O
M
2
C
O
M
3
S
E
G
0
S
E
G
1
S
E
G
2
S
E
G
3
S
E
G
4
S
E
G
5
S
E
G
6
S
E
G
7
S
E
G
8
S
E
G
9
S
E
G
1
0
S
E
G
1
1
φ
XC
I
N
XC
O
U
T
2
82
9
4
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
PIN DESCRIPTION
Table 1 Pin description (1)
VCC, VSS
FunctionPin Name Function except a port function
LCD segment output pins
Power source Apply voltage of power source to VCC, and 0 V to VSS. (For the limits of VCC, refer to Recom-
mended operating conditions).
VREF
AVSS
RESET
XIN
XOUT
VL1VL3
COM
0
COM
3
SEG
0
SEG
11
P00/SEG16
P07/SEG23
P10/SEG24
P17/SEG31
P20 P27
P3
4
/SEG
12
P3
7
/SEG
15
Analog refer-
ence voltage
Analog power
source
Reset input
Clock input
Clock output
LCD power
source
Common output
Segment output
I/O port P0
I/O port P1
I/O port P2
Reference voltage input pin for A-D converter.
GND input pin for A-D converter.
Connect to VSS.
Reset input pin for active L.
Input and output pins for the main clock generating circuit.
Feedback resistor is built in between XIN pin and XOUT pin.
Connect a ceramic resonator or a quartz-crystal oscillator between the XIN and XOUT pins to set
the oscillation frequency.
If an external clock is used, connect the clock source to the XIN pin and leave the XOUT pin open.
This clock is used as the oscillating source of system clock.
Input 0 VL1 VL2 VL3 VCC voltage.
Input 0 VL3 voltage to LCD.
LCD common output pins.
COM2 and COM3 are not used at 1/2 duty ratio.
COM3 is not used at 1/3 duty ratio.
LCD segment output pins.
8-bit output port.
CMOS compatible input level.
CMOS 3-state output structure.
I/O direction register allows each port to be individually
programmed as either input or output.
Pull-down control is enabled.
8-bit I/O port.
CMOS compatible input level.
CMOS 3-state output structure.
I/O direction register allows each pin to be individually
programmed as either input or output.
Pull-up control is enabled.
4-bit input port.
CMOS compatible input level.
Pull-down control is enabled.
Key input (key-on wake-up) interrupt
input pins
LCD segment output pins
Input port P3
5
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Table 2 Pin description (2)
FunctionPin Name Function except a port function
P40
P42/INT0,
P43/INT1
P44/RXD,
P45/TXD,
P46/SCLK,
P47/SRDY
P50/INT2,
P51/INT3
P52/RTP0,
P53/RTP1
P54/CNTR0,
P55/CNTR1
P56/TOUT
P57/ADT
P60/AN0
P67/AN7
P70/XCOUT,
P71/XCIN
I/O port P4
I/O port P5
I/O port P6
I/O port P7
1-bit Input port.
CMOS compatible input level.
7-bit I/O port.
CMOS compatible input level.
CMOS 3-state output structure.
I/O direction register allows each pin to be individually
programmed as either input or output.
Pull-up control is enabled.
8-bit I/O port.
CMOS compatible input level.
CMOS 3-state output structure.
I/O direction register allows each pin to be individually
programmed as either input or output.
Pull-up control is enabled.
8-bit I/O port.
CMOS compatible input level.
CMOS 3-state output structure.
I/O direction register allows each pin to be individually
programmed as either input or output.
Pull-up control is enabled.
2-bit I/O port.
CMOS compatible input level.
CMOS 3-state output structure.
I/O direction register allows each pin to be individually
programmed as either input or output.
Pull-up control is enabled.
φ clock output pin
Interrupt input pins
Interrupt input pins
Real time port function pins
Timer X, Y function pins
Timer 2 output pins
A-D conversion input pins
Sub-clock generating circuit I/O pins.
(Connect a resonator. External clock
cannot be used.)
Input port P4
P41/φ
Serial I/O function pins
A-D trigger input pins
6
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
PART NUMBERING
Fig. 4 Part numbering
Package type
FP : 80P6N-A package
GP : 80P6S-A package
HP : 80P6Q-A package
FS : 80D0 package
ROM number
Omitted in One Time PROM version shipped in blank and EPROM version.
Product M38224 M 6 H XXX FP
Normally, using hyphen.
When electrical characteristic, or division of identification code using
alaphanumeric character
:Standard
D :Extended operating temperature version
M :M version
H :H 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
The first 128 bites and the last 2 bytes of ROM are
reserved areas ; they cannot be used.
Memory type
M : Mask ROM version
E : EPROM or One Time PROM 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
9 : 36864 bytes
A : 40960 bytes
B : 45056 bytes
C : 49152 bytes
7
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
GROUP EXPANSION (STANDARD, ONE TIME
PROM VERSION, EPROM VERSION)
Mitsubishi plans to expand the 3822 group (Standard, One Time
PROM version, EPROM version) as follows:
Memory Type
Support for Mask ROM, One Time PROM, and EPROM versions
Memory Size
ROM size ............................................................. 8 K to 48 K bytes
RAM size ............................................................384 to 1024 bytes
Package
80P6N-A ....................................0.8 mm-pitch plastic molded QFP
80P6S-A ..................................0.65 mm-pitch plastic molded QFP
80P6Q-A ....................................0.5 mm-pitch plastic molded QFP
80D0 .......................0.8 mm-pitch ceramic LCC (EPROM version)
Currently products are listed below.
Memory Expansion Plan
Remarks
Package
Product
As of Feb. 2002
RAM size (bytes)
8192
(8062)
ROM size (bytes)
ROM size for User in ( )
16384
(16254)
Fig. 5 Memory expansion plan
Table 3 List of products
M38222M2-XXXFP
M38222M2-XXXGP
M38222M2-XXXHP
M38223M4-XXXFP
M38223E4FP
M38223M4-XXXGP
M38223E4GP
M38223M4-XXXHP
M38223E4HP
M38223E4FS
M38227ECFP
M38227ECHP
M38227ECFS
384
80P6N-A
80P6S-A
80P6Q-A
Mask ROM version
Mask ROM version
Mask ROM version
Mask ROM version
One Time PROM version (blank)
Mask ROM version
One Time PROM version (blank)
Mask ROM version
One Time PROM version (blank)
EPROM version
One Time PROM version (blank)
One Time PROM version (blank)
EPROM version
Note: Products under development or planning: the development schedule and specifications
may be revised without notice.
512
80P6N-A
80P6S-A
80P6Q-A
80D0
80P6N-A
80P6Q-A
80D0
49152
(49022) 1024
M
a
s
s
p
r
o
d
u
c
t
3
2
K
2
8
K
2
4
K
2
0
K
1
6
K
1
2
K
8
K
4
K
2
5
6 384 512 6
4
07
6
88
9
61
0
2
4
1
9
2
M
3
8
2
2
2
M
2
R
A
M
s
i
z
e
(
b
y
t
e
s
)
ROM size (bytes)
4
8
KM
3
8
2
2
7
E
C
M
a
s
s
p
r
o
d
u
c
t
M
3
8
2
2
3
M
4
/
E
4
Under development
8
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
GROUP EXPANSION
(EXTENDED OPERATING TEMPERATURE
VERSION)
Mitsubishi plans to expand the 3822 group (extended operating
temperature version) as follows:
Memory Type
Support for Mask ROM version.
Memory Size
ROM size ........................................................................48 K bytes
RAM size ....................................................................... 1024 bytes
Package
80P6N-A ....................................0.8 mm-pitch plastic molded QFP
Currently products are listed below.
Memory Expansion Plan
Remarks
Package
Product
As of Feb. 2002
RAM size (bytes)
49152(49022)
ROM size (bytes)
ROM size for User in ( )
Fig. 6 Memory expansion plan for extended operating temperature version
Table 4 List of products for extended operating temperature version
M38227MCDXXXFP 1024
80P6N-A
Mask ROM version
3
2
K
2
8
K
2
4
K
2
0
K
1
6
K
1
2
K
8
K
4
K
2
5
6 384 512 6
4
07
6
88
9
61
0
2
4
1
9
2
R
A
M
s
i
z
e
(
b
y
t
e
s
)
ROM size (bytes)
4
8
K
M
a
s
s
p
r
o
d
u
c
t
M
3
8
2
2
7
M
C
D
9
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
GROUP EXPANSION (M VERSION)
Mitsubishi plans to expand the 3822 group (M version) as follows:
Memory Type
Support for Mask ROM version.
Memory Size
ROM size ........................................................... 16 K to 24 K bytes
RAM size .............................................................. 512 to 640 bytes
Package
80P6N-A ....................................0.8 mm-pitch plastic molded QFP
80P6S-A ..................................0.65 mm-pitch plastic molded QFP
80P6Q-A ....................................0.5 mm-pitch plastic molded QFP
Currently products are listed below.
Memory Expansion Plan
Remarks
Package
Product
As of Feb. 2002
RAM size (bytes)
16384
(16254)
ROM size (bytes)
ROM size for User in ( )
24576
(24446)
Fig. 7 Memory expansion plan for M version
Table 5 List of products for M version
M38223M4MXXXFP
M38223M4MXXXGP
M38223M4MXXXHP
M38224M6MXXXFP
M38224M6MXXXHP
512
640
80P6N-A
80P6S-A
80P6Q-A
80P6N-A
80P6Q-A
Mask ROM version
Mask ROM version
Mask ROM version
Mask ROM version
Mask ROM version
M
a
s
s
p
r
o
d
u
c
t
3
2
K
2
8
K
2
4
K
2
0
K
1
6
K
1
2
K
8
K
4
K
2
5
63
8
45
1
26
4
07
6
88
9
61
0
2
4
1
9
2
M
3
8
2
2
4
M
6
M
R
A
M
s
i
z
e
(
b
y
t
e
s
)
R
O
M
s
i
z
e
(
b
y
t
e
s
)
4
8
K
M
a
s
s
p
r
o
d
u
c
t
M
3
8
2
2
3
M
4
M
10
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
GROUP EXPANSION (H VERSION)
Mitsubishi plans to expand the 3822 group (H version) as follows:
Memory Type
Support for Mask ROM version.
Memory Size
ROM size ........................................................... 16 K to 48 K bytes
RAM size ............................................................512 to 1024 bytes
Package
80P6N-A ....................................0.8 mm-pitch plastic molded QFP
80P6Q-A ....................................0.5 mm-pitch plastic molded QFP
Currently products are listed below.
Memory Expansion Plan
Remarks
Package
Product
As of Feb. 2002
RAM size (bytes)
16384
(16254)
ROM size (bytes)
ROM
size for User in ( )
24576
(24446)
Fig. 8 Memory expansion plan for H version
Table 6 List of products for H version
M38223M4HXXXFP
M38223M4HXXXHP
M38224M6HXXXFP
M38224M6HXXXHP
M38227M8HXXXFP
M38227M8HXXXHP
M38227MCHXXXFP
M38227MCHXXXHP
512
80P6N-A
80P6Q-A
80P6N-A
80P6Q-A
80P6N-A
80P6Q-A
80P6N-A
80P6Q-A
Mask ROM version
Mask ROM version
Mask ROM version
Mask ROM version
Mask ROM version
Mask ROM version
Mask ROM version
Mask ROM version
640
32768
(32638)
49152
(49022)
1024
Mass product
Mass product
3
2
K
28K
2
4
K
2
0
K
16K
1
2
K
8
K
4
K
2
5
63
8
45
1
2 640 768 8
9
61024
192
M38223M4H
RAM size (bytes)
R
O
M
s
i
z
e
(
b
y
t
e
s
)
4
8
K
Mass product
M38224M6H
M
3
8
2
2
7
M
8
H
Mass product
M
3
8
2
2
7
M
C
H
11
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
FUNCTIONAL DESCRIPTION
CENTRAL PROCESSING UNIT (CPU)
The 3822 group uses the standard 740 family instruction set. Re-
fer to the table of 740 family addressing modes and machine
instructions or the 740 Family Software Manual for details on the
instruction set.
Machine-resident 740 family instructions are as follows:
The FST and SLW instruction cannot be used.
The STP, WIT, MUL, and DIV instruction can be used.
[Accumulator (A)]
The accumulator is an 8-bit register. Data operations such as data
transfer, etc., are executed mainly through the accumulator.
[Index Register X (X)]
The index register X is an 8-bit register. In the index addressing
modes, the value of the OPERAND is added to the contents of
register X and specifies the real address.
[Index Register Y (Y)]
The index register Y is an 8-bit register. In partial instruction, the
value of the OPERAND is added to the contents of register Y and
specifies the real address.
[Stack Pointer (S)]
The stack pointer is an 8-bit register used during subroutine calls
and interrupts. This register indicates start address of stored area
(stack) for storing registers during subroutine calls and interrupts.
The low-order 8 bits of the stack address are determined by the
contents of the stack pointer. The high-order 8 bits of the stack ad-
dress are determined by the stack page selection bit. If the stack
page selection bit is 0 , the high-order 8 bits becomes 0016. If
the stack page selection bit is 1, the high-order 8 bits becomes
0116.
The operations of pushing register contents onto the stack and
popping them from the stack are shown in Figure 10.
Store registers other than those described in Figure 10 with pro-
gram when the user needs them during interrupts or subroutine
calls.
[Program Counter (PC)]
The program counter is a 16-bit counter consisting of two 8-bit
registers PCH and PCL. It is used to indicate the address of the
next instruction to be executed.
Fig.9 740 Family CPU register structure
A Accumulator
b7
b7
b7
b7 b0
b7b15 b0
b7 b0
b0
b0
b0
X Index register X
Y Index register Y
S Stack pointer
PC
L
Program counterPC
H
N V T B D I Z C Processor status register (PS)
Carry flag
Zero flag
Interrupt disable flag
Decimal mode flag
Break flag
Index X mode flag
Overflow flag
Negative flag
12
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Table 7 Push and pop instructions of accumulator or processor status register
Accumulator
Processor status register
Push instruction to stack
PHA
PHP
Pop instruction from stack
PLA
PLP
Fig. 10 Register push and pop at interrupt generation and subroutine call
Note: Condition for acceptance of an interrupt Interrupt enable flag is 1
E
x
e
c
u
t
e
J
S
R
O
n
-
g
o
i
n
g
R
o
u
t
i
n
e
M
(
S
)(
P
C
H
)
(
S
)
(
S
)
1
M
(
S
)(
P
C
L
)
E
x
e
c
u
t
e
R
T
S
(
P
C
L
)M
(
S
)
(S) (S) 1
(
S
)
(
S
)
+
1
(S) (S) + 1
(
P
C
H
)M
(
S
)
Subroutine
POP return
address from stack
P
u
s
h
r
e
t
u
r
n
a
d
d
r
e
s
s
o
n
s
t
a
c
kM
(
S
)(
P
S
)
Execute RTI
(PS ) M (S)
(
S
)
(
S
)
1
(
S
)
(
S
)
+
1
Interrupt
Service Routine
POP conten ts of
processor status
register from stack
M (S) (PC
H
)
(
S
)
(
S
)
1
M
(
S
)(
P
C
L
)
(
S
)
(
S
)
1
(PC
L
)M (S)
(
S
)
(
S
)
+
1
(
S
)
(
S
)
+
1
(PC
H
)M (S)
POP return
address
from stack
I Flag is set from 0 to 1
Fetch the jump vector
Push return addre ss
on stack
Push contents of processor
status register on stack
Interrupt request
(Note)
I
n
t
e
r
r
u
p
t
d
i
s
a
b
l
e
f
l
a
g
i
s
0
13
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
[Processor status register (PS)]
The processor status register is an 8-bit register consisting of 5
flags which indicate the status of the processor after an arithmetic
operation and 3 flags which decide MCU operation. Branch opera-
tions can be performed by testing the Carry (C) flag , Zero (Z) flag,
Overflow (V) flag, or the Negative (N) flag. In decimal mode, the Z,
V, N flags are not valid.
•Bit 0: Carry flag (C)
The C flag contains a carry or borrow generated by the arithmetic
logic unit (ALU) immediately after an arithmetic operation. It can
also be changed by a shift or rotate instruction.
•Bit 1: Zero flag (Z)
The Z flag is set if the result of an immediate arithmetic operation
or a data transfer is “0”, and cleared if the result is anything other
than “0”.
•Bit 2: Interrupt disable flag (I)
The I flag disables all interrupts except for the interrupt
generated by the BRK instruction.
Interrupts are disabled when the I flag is “1”.
•Bit 3: Decimal mode flag (D)
The D flag determines whether additions and subtractions are
executed in binary or decimal. Binary arithmetic is executed when
this flag is “0”; decimal arithmetic is executed when it is “1”.
Decimal correction is automatic in decimal mode. Only the ADC
and SBC instructions can be used for decimal arithmetic.
•Bit 4: Break flag (B)
The B flag is used to indicate that the current interrupt was
generated by the BRK instruction. The BRK flag in the processor
status register is always “0”. When the BRK instruction is used to
generate an interrupt, the processor status register is pushed
onto the stack with the break flag set to “1”.
•Bit 5: Index X mode flag (T)
When the T flag is “0”, arithmetic operations are performed
between accumulator and memory. When the T flag is “1”, direct
arithmetic operations and direct data transfers are enabled
between memory locations.
•Bit 6: Overflow flag (V)
The V flag is used during the addition or subtraction of one byte
of signed data. It is set if the result exceeds +127 to -128. When
the BIT instruction is executed, bit 6 of the memory location
operated on by the BIT instruction is stored in the overflow flag.
•Bit 7: Negative flag (N)
The N flag is set if the result of an arithmetic operation or data
transfer is negative. When the BIT instruction is executed, bit 7 of
the memory location operated on by the BIT instruction is stored
in the negative flag.
Table 8 Set and clear instructions of each bit of processor status register
Set instruction
Clear instruction
C flag
SEC
CLC
Z flag
I flag
SEI
CLI
D flag
SED
CLD
B flag
T flag
SET
CLT
V flag
CLV
N flag
14
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
[CPU Mode Register (CPUM)] 003B16
The CPU mode register contains the stack page selection bit and
the internal system clock selection bit.
The CPU mode register is allocated at address 003B16.
Fig. 11 Structure of CPU mode register
Not available
Processor mode bits
b1 b0
0 0 : Single-chip mode
0 1 :
1 0 :
1 1 :
Stack page selection bit
0 : 0 page
1 : 1 page
Not used (returns 1 when read)
(Do not write 0 to this bit)
Port XC switch bit
0 : I/O port function (stop oscillating)
1 : XCINXCOUT oscillating function
Main clock (XINXOUT) stop bit
0 : Oscillating
1 : Stopped
Main clock division ratio selection bit
0 : f(XIN)/2 (high-speed mode)
1 : f(XIN)/8 (middle-speed mode)
Internal system clock selection bit
0 : XINXOUT selected (middle-/high-speed mode)
1 : XCINXCOUT selected (low-speed mode)
CPU mode register
(CPUM (CM) : address 003B16)
b7 b0
15
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
MEMORY
Special Function Register (SFR) Area
The Special Function Register area in the zero page contains con-
trol registers such as I/O ports and timers.
RAM
RAM is used for data storage and for stack area of subroutine
calls and interrupts.
ROM
The first 128 bytes and the last 2 bytes of ROM are reserved for
device testing and the rest is user area for storing programs.
Interrupt Vector Area
The interrupt vector area contains reset and interrupt vectors.
Zero Page
The 256 bytes from addresses 000016 to 00FF16 are called the
zero page area. The internal RAM and the special function regis-
ter (SFR) are allocated to this area.
The zero page addressing mode can be used to specify memory
and register addresses in the zero page area. Access to this area
with only 2 bytes is possible in the zero page addressing mode.
Special Page
The 256 bytes from addresses FF0016 to FFFF16 are called the
special page area. The special page addressing mode can be
used to specify memory addresses in the special page area.
Access to this area with only 2 bytes is possible in the special
page addressing mode.
Fig. 12 Memory map diagram
1
9
2
2
5
6
3
8
4
5
1
2
6
4
0
7
6
8
8
9
6
1
0
2
4
0
0
F
F
1
6
0
1
3
F1
6
0
1
B
F1
6
0
2
3
F1
6
0
2
B
F1
6
0
3
3
F1
6
0
3
B
F1
6
0
4
3
F1
6
R
A
M
a
r
e
a
R
A
M
s
i
z
e
(
b
y
t
e
s
)
A
d
d
r
e
s
s
X
X
X
X1
6
4
0
9
6
8
1
9
2
1
2
2
8
8
1
6
3
8
4
2
0
4
8
0
2
4
5
7
6
2
8
6
7
2
3
2
7
6
8
3
6
8
6
4
4
0
9
6
0
4
5
0
5
6
4
9
1
5
2
F
00016
E00016
D00016
C00016
B00016
A00016
900016
800016
700016
600016
500016
400016
F
08016
E08016
D08016
C08016
B08016
A08016
908016
808016
708016
608016
508016
408016
R
O
M
a
r
e
a
s
ze
(bytes)
A
d
d
r
e
s
s
Y
Y
Y
Y1
6
A
d
d
r
e
s
s
Z
Z
Z
Z1
6
010016
0
0
0
01
6
0
0
4
01
6
0
8
4
01
6
F
F
0
01
6
FFDC
16
FFFE
16
F
F
F
F
1
6
X
X
X
X
1
6
Y
Y
Y
Y
1
6
ZZZZ
16
RAM
ROM
R
eserve
d
area
SFR
area
N
ot use
d
I
n
t
e
r
r
u
p
t
v
e
c
t
o
r
a
r
e
a
R
eserve
d
ROM
area
(128 bytes)
Z
ero pa ge
S
pec
i
a
l
page
R
eserve
d
ROM
area
0
0
5
01
6
L
C
D
d
i
s
p
l
a
y
R
A
M
a
r
e
a
16
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig. 13 Memory map of special function register (SFR)
002016
002116
002216
002316
002416
002516
002616
002716
002816
002916
002A16
002B16
002C16
002D16
002E16
002F16
003016
003116
003216
003316
003416
003516
003616
003716
003816
003916
003A16
003B16
003C16
003D16
003E16
003F16
000016
000116
000216
000316
000416
000516
000616
000716
000816
000916
000A16
000B16
000C16
000D16
000E16
000F16
001016
001116
001216
001316
001416
001516
001616
001716
001816
001916
001A16
001B16
001C16
001D16
001E16
001F16
Port P0 (P0)
Port P1 (P1)
Port P1 output control register (P1D)
Port P2 (P2)
Port P2 direction register (P2D)
Port P3 (P3)
Port P4 (P4)
Port P4 direction register (P4D)
Port P5 (P5)
Port P5 direction register (P5D)
Port P6 (P6)
Port P6 direction register (P6D)
Port P7 (P7)
Port P7 direction register (P7D)
Serial I/O status register (SIOSTS)
Serial I/O control register (SIO1CON)
UART control register (UARTCON)
Baud rate generator (BRG)
Interrupt control register 2(ICON2)
Timer 3 (T3)
Timer X mode register (TXM)
Interrupt edge selection register (INTEDGE)
CPU mode register (CPUM)
Interrupt request register 1(IREQ1)
Interrupt request register 2(IREQ2)
Interrupt control register 1(ICON1)
Timer X (low) (TXL)
Timer Y (low) (TYL)
Timer 1 (T1)
Timer 2 (T2)
Timer X (high) (TXH)
Timer Y (high) (TYH)
PULL register A (PULLA)
PULL register B (PULLB)
Timer Y mode register (TYM)
Timer 123 mode register (T123M)
φ output control register (CKOUT)
Segment output enable register (SEG)
LCD mode register (LM)
A-D control register (ADCON)
A-D conversion register (AD)
Transmit/Receive buffer register(TB/RB)
Port P0 direction register (P0D)
17
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
I/O PORTS
Direction Registers (ports P2, P41-P47, and
P5-P7)
The 3822 group has 49 programmable I/O pins arranged in seven
I/O ports (ports P0P2, P41P47 and P5-P7). The I/O ports P2,
P41P47 and P5-P7 have direction registers which determine the
input/output direction of each individual pin. Each bit in a direction
register corresponds to one pin, and each pin can be set to be in-
put port or output port.
When 0 is written to the bit corresponding to a pin, that pin be-
comes an input pin. When 1 is written to that bit, that pin be-
comes an output pin.
If data is read from a pin set to output, the value of the port output
latch is read, not the value of the pin itself. Pins set to input are
floating. If a pin set to input is written to, only the port output latch
is written to and the pin remains floating.
Direction Registers (ports P0 and P1)
Ports P0 and P1 have direction registers which determine the in-
put/output direction of each individual port.
Each port in a direction register corresponds to one port, each port
can be set to be input or output. When 0 is written to the bit 0 of
a direction register, that port becomes an input port. When 1 is
written to that port, that port becomes an output port. Bits 1 to 7 of
ports P0 and P1 direction registers are not used.
Ports P3 and P40
These ports are only for input.
Pull-up/Pull-down Control
By setting the PULL register A (address 001616) or the PULL reg-
ister B (address 001716), ports except for port P40 can control
either pull-down or pull-up (pins that are shared with the segment
output pins for LCD are pull-down; all other pins are pull-up) with
a program.
However, the contents of PULL register A and PULL register B do
not affect ports programmed as the output ports.
Fig. 14 Structure of PULL register A and PULL register B
P
00
P
07 pu
ll
-
d
own
P10P17 pull-do w n
P20P27 pull-up
P34P37 pull-do w n
P70, P71 pull- up
Not used (retu rn 0 when re ad)
P
U
L
L
r
e
g
i
s
t
e
r
A
(
P
U
L
L
A
:
a
d
d
r
e
s
s
0
0
1
61
6)
b
7
b
0
P
41
P
43 pu
ll
-up
P44P47 pull-up
P50P53 pull-up
P54P57 pull-up
P60P63 pull-up
P64P67 pull-up
Not used (retu rn 0 when re ad)
0
:
D
i
s
a
b
l
e
1
:
E
n
a
b
l
e
P
U
L
L
r
e
g
i
s
t
e
r
B
(
P
U
L
L
B
:
a
d
d
r
e
s
s
0
0
1
71
6)
b
7
b
0
N
ote:
Th
e contents o
f
PULL
re g
i
ster
A
an
d
PULL
re g
i
ster
B
do not affect ports programmed as the output port.
18
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Real time port
function output
A-D conversion input
A-D trigger input
Diagram No.
Related SFRs
Input/OutputName
Pin Non-Port Function
I/O Format
Table 9 List of I/O port function
P00/SEG16
P07/SEG23
P10/SEG24
P17/SEG31
P20P27
P34/SEG12
P37/SEG15
P40
P41/φ
P42/INT0,
P43/INT1
P44/RXD
P45/TXD
P46/SCLK
P47/SRDY
P50/INT2,
P51/INT3
P52/RTP0,
P53/RTP1
P54/CNTR0
Port P0
Port P1
Port P2
Port P3
Port P4
Input/output,
individual ports
Input/output,
individual bits
Input
Input
Input/output,
individual bits
CMOS compatible
input level
CMOS 3-state output
CMOS compatible
input level
CMOS 3-state output
CMOS compatible
input level
CMOS compatible
input level
CMOS compatible
input level
CMOS 3-state output
CMOS compatible
input level
CMOS 3-state output
CMOS compatible
input level
CMOS 3-state output
CMOS compatible
input level
CMOS 3-state output
LCD segment output
Key input (key-on
wake-up) interrupt
input
LCD segment output
φ clock output
External interrupt input
Serial I/O function I/O
External interrupt input
Timer X function I/O
Timer Y function input
Timer 2 function output
PULL register A
Segment output enable
register
PULL register A
Interrupt control register 2
PULL register A
Segment output enable
register
PULL register B
φ
output control register
PULL register B
Interrupt edge selection
register
PULL register B
Serial I/O control register
Serial I/O status register
UART control register
PULL register B
Interrupt edge selection
register
PULL register B
Timer X mode register
PULL register B
Timer X mode register
PULL register B
Timer Y mode register
PULL register B
Timer 123 mode register
PULL register B
A-D control register
PULL register A
CPU mode register
(1)
(2)
(3)
(4)
(6)
(5)
(2)
(8)
(7)
Port P5
(9)
(2)
Input/output,
individual bits
(10)
P55/CNTR1
(11)
(12)
(13)
(12)
(14)
P56/TOUT
P57/ADT
P60/AN0
P67/AN7
(15)
P70/XCOUT
P71/XCIN
COM0COM3
SEG0SEG11
(16)
(17)
(18)
Input/output,
individual bits
Input/output,
individual bits
Output
Output
Sub-clock
generating circuit I/O
LCD common output
LCD segment output
Notes1: How to use double-function ports as function I/O ports, refer to the applicable sections.
2: Make sure that the input level at each pin is either 0 V or VCC during execution of the STP instruction. When an input level is at an intermediate po-
tential, a current will flow VCC to VSS through the input-stage gate.
Port P6
Port P7
Common
Segment LCD mode register
19
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig. 15 Port block diagram (1)
(3) Ports P3
4
P3
7
VL2/VL3
VL1/VSS
(1) Ports P0, P1
Segment output enable bit
VL2/VL3
VL1/VSS
(Note)
(2) Ports P2, P4
2
, P4
3
, P5
0
, P5
1
Direction register
(5) Port P4
1
Direction register
(6) Port P4
4
Receive enable bit
Direction register
(4) Port P4
0
Data bus
Pull-down control
Segment output enable bit
Data bus
Direction register
Port latch
Pull-down control
Segment output enable bit
Note: Bit 0 of direction register.
Data bus Port latch
Pull-up control
Key input (Key-on wake-up) interrupt input
INT0INT3 interrupt input
φ
φ output control bit
Pull-up control
Data bus Port latch
Pull-up control
Serial I/O enable bit
Serial I/O input
Data bus Port latch
Data bus
20
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig. 16 Port block diagram (2)
Direction register
Port latch
Serial I/O enable bit
Transmit enable bit
P4
5
/T
x
D P-channel output disable bit Pull-up control
(7) Port P45
Serial I/O output
Data bus
Direction register
Port latchData bus
Serial I/O ready output
Serial I/O mode selection bit Pull-up control
(9) Port P47
(8) Port P46
Serial I/O clock-
synchronized selection bit
Serial I/O enable bit
Serial I/O mode selection bit
Serial I/O enable bit
Direction register
Port latch
Serial I/O clock output
Data bus
Serial I/O clock input
Pull-up control
(10) Ports P52, P53
Direction register
Port latchData bus
Pull-up control
Real time port control bit
Data for real time port
Direction register
Port latch
Data bus
Pull-up control
(12) Ports P55, P57
CNTR
1
interrupt input
A-D trigger interrupt input
(11) Port P54
Direction register
Port latchData bus
Pull-up control
Timer X operating mode bit
Timer output
CNTR
0
interrupt input
Serial I/O enable bit
S
RDY
output enable bit
(Pulse output mode selection)
21
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig. 17 Port block diagram (3)
V
L2
/V
L3
V
L
1
/
V
S
S
(
1
3
)
P
o
r
t
P
5
6
D
a
t
a
b
u
s
D
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
o
r
t
l
a
t
c
h
P
u
l
-
u
p
c
o
n
t
r
o
l
T
O
U
T
o
u
t
p
u
t
c
o
n
t
r
o
l
b
i
t
T
i
m
e
r
o
u
t
p
u
t
(
1
4
)
P
o
r
t
P
6
D
a
t
a
b
u
s
D
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
o
r
t
l
a
t
c
h
Pull-up contro l
A-D conversion input
A
n
a
l
o
g
i
n
p
u
t
p
i
n
s
e
l
e
c
t
i
o
n
b
i
t
(
1
5
)
P
o
r
t
P
7
0
D
a
t
a
b
u
s
D
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
o
r
t
l
a
t
c
h
P
o
r
t
X
C
s
w
i
t
c
h
b
i
t
+
P
u
l
l
-
u
p
c
o
n
t
r
o
l
Port X
C
switch bit
Oscillation circuit
P
o
r
t
P
7
1
P
o
r
t
X
C
s
w
i
t
c
h
b
i
t
(
1
6
)
P
o
r
t
P
7
1
Data bus
D
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
o
r
t
l
a
t
c
h
Port X
C
switch bit
P
o
r
t
X
C
s
w
i
t
c
h
b
i
t
+
P
u
l
l
-
u
p
c
o
n
t
r
o
l
Sub-clock generating circuit input
V
L3
V
L2
V
L1
(
1
7
)
C
O
M
0
C
O
M
3
(
1
8
)
S
E
G
0
S
E
G
1
1
T
h
e
g
a
t
e
i
n
p
u
t
s
i
g
n
a
l
o
f
e
a
c
h
t
r
a
n
s
i
s
t
o
r
i
s
c
o
n
t
r
o
l
l
e
d
b
y
t
h
e
L
C
D
d
u
t
y
r
a
t
i
o
a
n
d
t
h
e
b
i
a
s
v
a
l
u
e
.
The vol tage applied to the sources of
P-cha nnel and N-channel transi s tors
is the controlled voltage by the bias
value.
22
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
INTERRUPTS
Interrupts occur by seventeen sources: eight external, eight inter-
nal, and one software.
Interrupt Control
Each interrupt is controlled by an interrupt request bit, an interrupt
enable bit, and the interrupt disable flag except for the software
interrupt set by the BRK instruction. An interrupt occurs if the cor-
responding interrupt request and enable bits are “1” and the
interrupt disable flag is “0”.
Interrupt enable bits can be set or cleared by software.
Interrupt request bits can be cleared by software, but cannot be
set by software.
The BRK instruction cannot be disabled with any flag or bit. The I
flag disables all interrupts except the BRK instruction interrupt.
When several interrupts occur at the same time, the interrupts are
received according to priority.
Interrupt Operation
Upon acceptance of an interrupt the following operations are auto-
matically performed:
1. The contents of the program counter and processor status
register are automatically pushed onto the stack.
2. The interrupt disable flag is set and the corresponding
interrupt request bit is cleared.
3. The interrupt jump destination address is read from the vec-
tor table into the program counter.
Notes on interrupts
When setting the followings, the interrupt request bit may be set to
“1”.
•When setting external interrupt active edge
Related register: Interrupt edge selection register (address 3A16)
Timer X mode register (address 2716)
Timer Y mode register (address 2816)
•When switching interrupt sources of an interrupt vector address
where two or more interrupt sources are allocated
Related register: A-D control regsiter (address 3416)
When not requiring for the interrupt occurrence synchronized with
these setting, take the following sequence.
Set the corresponding interrupt enable bit to “0” (disabled).
Set the interrupt edge select bit or the interrupt source select bit
to “1”.
Set the corresponding interrupt request bit to “0” after 1 or more
instructions have been executed.
Set the corresponding interrupt enable bit to “1” (enabled).
Notes1: Vector addresses contain interrupt jump destination addresses.
2: Reset function in the same way as an interrupt with the highest priority.
Table 10 Interrupt vector addresses and priority
Remarks
Interrupt Request
Generating Conditions
At reset
At detection of either rising or
falling edge of INT0 input
At detection of either rising or
falling edge of INT1 input
At completion of serial I/O data
reception
At completion of serial I/O trans-
mit shift or when transmission
buffer is empty
Interrupt Source LowHigh
Priority V ector Addresses (Note 1)
Reset (Note 2)
INT0
INT1
Serial I/O
reception
Serial I/O
transmission
Timer X
Timer Y
Timer 2
Timer 3
CNTR0
CNTR1
Timer 1
INT2
INT3
Key input
(Key-on wake-up)
ADT
A-D conversion
BRK instruction
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FFFD16
FFFB16
FFF916
FFF716
FFF516
FFF316
FFF116
FFEF16
FFED16
FFEB16
FFE916
FFE716
FFE516
FFE316
FFE116
FFDF16
FFDD16
FFFC16
FFFA16
FFF816
FFF616
FFF416
FFF216
FFF016
FFEE16
FFEC16
FFEA16
FFE816
FFE616
FFE416
FFE216
FFE016
FFDE16
FFDC16
At timer X underflow
At timer Y underflow
At timer 2 underflow
At timer 3 underflow
At detection of either rising or
falling edge of CNTR0 input
At detection of either rising or
falling edge of CNTR1 input
At timer 1 underflow
At detection of either rising or
falling edge of INT2 input
At detection of either rising or
falling edge of INT3 input
At falling of conjunction of input
level for port P2 (at input mode)
At falling of ADT input
At completion of A-D conversion
At BRK instruction execution
Non-maskable
External interrupt
(active edge selectable)
External interrupt
(active edge selectable)
Valid when serial I/O is selected
Valid when serial I/O is selected
External interrupt
(active edge selectable)
External interrupt
(active edge selectable)
External interrupt
(active edge selectable)
External interrupt
(active edge selectable)
External interrupt
(Valid at falling)
Valid when ADT interrupt is se-
lected, External interrupt
(Valid at falling)
Valid when A-D interrupt is se-
lected
Non-maskable software interrupt
23
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig. 18 Interrupt control
Fig. 19 Structure of interrupt-related registers
Interrupt request bit
Interrupt enable bit
Interrupt disable flag (I)
BRK instruction
Reset Interrupt request
b7 b0 Interrupt edge selection register
INT
0
interrupt edge selection bit
INT
1
interrupt edge selection bit
INT
2
interrupt edge selection bit
INT
3
interrupt edge selection bit
Not used (return 0 when read)
(INTEDGE : address 003A
16
)
Interrupt request register 1
INT
0
interrupt request bit
INT
1
interrupt request bit
Serial I/O receive interrupt request bit
Serial I/O transmit interrupt request bit
Timer X interrupt request bit
Timer Y interrupt request bit
Timer 2 interrupt request bit
Timer 3 interrupt request bit
Interrupt control register 1
INT
0
interrupt enable bit
INT
1
interrupt enable bit
Serial I/O receive interrupt enable bit
Serial I/O transmit interrupt enable bit
Timer X interrupt enable bit
Timer Y interrupt enable bit
Timer 2 interrupt enable bit
Timer 3 interrupt enable bit
0 : No interrupt request issued
1 : Interrupt request issued
(IREQ1 : address 003C
16
)
(ICON1 : address 003E
16
)
Interrupt request register 2
CNTR
0
interrupt request bit
CNTR
1
interrupt request bit
Timer 1 interrupt request bit
INT
2
interrupt request bit
INT
3
interrupt request bit
Key input interrupt request bit
ADT/AD conversion interrupt request bit
Not used (returns 0 when read)
(IREQ2 : address 003D
16
)
Interrupt control register 2
CNTR
0
interrupt enable bit
CNTR
1
interrupt enable bit
Timer 1 interrupt enable bit
INT
2
interrupt enable bit
INT
3
interrupt enable bit
Key input interrupt enable bit
ADT/AD conversion interrupt enable bit
Not used (returns 0 when read)
(Do not write 1 to this bit.)
0 : Interrupts disabled
1 : Interrupts enabled
(ICON2 : address 003F
16
)
0 : Falling edge active
1 : Rising edge active
b7 b0
b7 b0
b7 b0
b7 b0
24
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Key Input Interrupt (Key-on wake-up)
A Key-on wake-up interrupt request is generated by applying a
falling edge to any pin of port P2 that have been set to input mode.
In other words, it is generated when AND of input level goes from
1 to 0. An example of using a key input interrupt is shown in
Figure 20, where an interrupt request is generated by pressing
one of the keys consisted as an active-low key matrix which inputs
to ports P20P23.
Fig. 20 Connection example when using key input interrupt and port P2 block diagram
P
o
r
t
P
XX
L
l
e
v
e
l
o
u
t
p
u
t
Port P2
7
direction register = 1
P
2
7
o
u
t
p
u
t
P2
6
output
PULL register A bit 2 = 1
P
2
5
o
u
t
p
u
t
P
2
4
o
u
t
p
u
t
P
2
3
i
n
p
u
t
P
o
r
t
P
2
6
l
a
t
c
h
P
o
r
t
P
2
5
l
a
t
c
h
P
o
r
t
P
2
4
l
a
t
c
h
Port P2
3
latch
P
o
r
t
P
2
7
l
a
t
c
h
P
o
r
t
P
2
5
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
=
1
Port P2
4
direction register = 1
Port P2
3
direction register = 0
P2
2
input
P
2
1
i
n
p
u
t
P
2
0
i
n
p
u
t
P
o
r
t
P
2
2
l
a
t
c
h
P
o
r
t
P
2
1
l
a
t
c
h
Port P2
0
latch
P
o
r
t
P
2
2
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
=
0
P
o
r
t
P
2
1
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
=
0
Port P2
0
direction register = 0
P
o
r
t
P
2
I
n
p
u
t
r
e
a
d
i
n
g
c
i
r
c
u
i
t
P
-
c
h
a
n
n
e
l
t
r
a
n
s
i
s
t
o
r
f
o
r
p
u
l
l
-
u
p
C
M
O
S
o
u
t
p
u
t
b
u
f
f
e
r
K
e
y
i
n
p
u
t
i
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
P
o
r
t
P
2
6
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
=
1
✽✽
✽✽
✽✽
✽✽
✽✽
✽✽
✽✽
25
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
TIMERS
The 3822 group has five timers: timer X, timer Y, timer 1, timer 2,
and timer 3. Timer X and timer Y are 16-bit timers, and timer 1,
timer 2, and timer 3 are 8-bit timers.
All timers are down count timers. When the timer reaches “00 16”,
an underflow occurs at the next count pulse and the correspond-
ing timer latch is reloaded into the timer and the count is
continued. When a timer underflows, the interrupt request bit cor-
responding to that timer is set to “1”.
Read and write operation on 16-bit timer must be performed for
both high and low-order bytes. When reading a 16-bit timer, read
the high-order byte first. When writing to a 16-bit timer, write the
low-order byte first. The 16-bit timer cannot perform the correct
operation when reading during the write operation, or when writing
during the read operation.
Fig. 21 Timer block diagram
CNTR
0 act
i
ve
edge switch bit
Ti
mer 1 count source
sel e ct i on bit
R
ea
l
t
i
me port
control bit 0
1
P
55/
C
N
T
R
1
0
f(XIN)/16
(
f
(
XCIN
)
516 in low-s
p
eed mode
)
CNTR
1 act
i
ve
edge switch bit
1
0
T
i
m
e
r
Y
s
t
o
p
c
o
n
t
r
o
l
b
i
t
Falling edge detection
P
er
i
o
d
measurement mode
Ti
mer
Y
interrupt
request
Pulse width H L c ontinuously measurem ent mode
R
i
s
i
n
g
e
d
g
e
d
e
t
e
c
t
i
o
n
0
0
,
0
1
,
1
1
Ti
mer
Y
operat
i
ng
mode bits
Ti
mer
X
interrupt
request
Ti
mer
X
mo
d
e reg
i
ster
write signal
P
54/
C
N
T
R
0
Q
Q
T
S
P
54
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
u
l
s
e
o
u
t
p
u
t
m
o
d
e
P
54
l
a
t
c
h
Ti
mer
X
stop
control bit
0
1
Ti
mer
X
wr
i
te
control bit
Q
D
L
a
t
c
h
Q
D
L
a
t
c
h
1
0
1
1
0
Timer X ope rat-
ing mode bit s
00,01,11
f
(
X
I
N
)
/
1
6
(
f
(
XI
N
)
/
1
6
i
n
l
o
w
-
s
p
e
e
d
m
o
d
e
)
P
u
l
se w
id
t
h
measurement
mode
C
N
T
R
0
a
c
t
i
v
e
e
d
g
e
s
w
i
t
c
h
b
i
t
P
u
l
se output mo
d
e
Q
Q
T
S
0
P
56
di
rect
i
on reg
i
ster
P
56
l
atc
h
1
T
O
U
T
o
u
t
p
u
t
a
c
t
i
v
e
e
d
g
e
s
w
i
t
c
h
b
i
t
Ti
me r 2 wr
i
te
control bit
0
1
T
O
U
T
o
u
t
p
u
t
c
o
n
t
r
o
l
b
i
t
1
P
56/
T
OUT
X
CIN
T
i
m
e
r
3
c
o
u
n
t
s
o
u
r
c
e
s
e
l
e
c
t
i
o
n
b
i
t
0
1
T
i
m
e
r
2
i
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
Ti
me r 3
interrupt
request
Ti
mer 2 count source
sel e ct i on bit
Ti
me r 1
interrupt
request
D
a
t
a
b
u
s
f(X
IN
)
/16
(
f
(
XCIN
)
/16 in lo w-s
p
eed mode]
)
f
(
XI
N)
/
1
6
(
f
(
XC
I
N)
/
1
6
i
n
l
o
w
-
s
p
e
e
d
m
o
d
e)
f
(
XI
N
)
/
1
6
(
f
(
XC
I
N
)
/
1
6
i
n
l
o
w
-
s
p
e
e
d
m
o
d
e
)
C
N
T
R
0
i
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
CNTR
1
interrupt
request
T
i
m
e
r
Y
o
p
e
r
a
t
i
n
g
m
o
d
e
b
i
t
s
0
0
,
0
1
,
1
0
1
1
R
e
a
l
t
i
m
e
p
o
r
t
c
o
n
t
r
o
l
b
i
t
1
P
52
l
a
t
c
h
R
e
a
l
t
i
m
e
p
o
r
t
c
o
n
t
r
o
l
b
i
t
1
P
53
l
a
t
c
h
Timer Y (low ) (8) T
i
m
e
r
Y
(
h
i
g
h
)
(
8
)
Ti
me r 3
l
atc
h
(
8
)
Ti
mer 3
(
8
)
T
i
m
e
r
1
l
a
t
c
h
(
8
)
T
i
m
e
r
1
(
8
)
T
i
m
e
r
2
l
a
t
c
h
(
8
)
Ti
mer 2
(
8
)
Timer X (low ) (8) Timer X (hig h) (8)
T
i
m
e
r
X
(
l
o
w
)
l
a
t
c
h
(
8
) Tim er X ( high) latc h ( 8)
T
i
m
e
r
Y
(
l
o
w
)
l
a
t
c
h
(
8
) T im er Y ( high) lat c h ( 8)
T
OUT output
control bit
0
0
0
P
52
P
53
P
52
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
53
di
rect
i
on reg
i
ster
P
52
d
a
t
a
f
o
r
r
e
a
l
t
i
m
e
p
o
r
t
P
53
d
a
t
a
f
o
r
r
e
a
l
t
i
m
e
p
o
r
t
I
n
t
e
r
n
a
l
c
l
o
c
k
φ =
XC
I
N
/
2
26
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Timer X
Timer X is a 16-bit timer that can be selected in one of four modes
and can be controlled the timer X write and the real time port by
setting the timer X mode register.
(1) Timer Mode
The timer counts f(XIN)/16 (or f(XCIN)/16 in low-speed mode).
(2) Pulse Output Mode
Each time the timer underflows, a signal output from the CNTR0
pin is inverted. Except for this, the operation in pulse output mode
is the same as in timer mode. When using a timer in this mode,
set the corresponding port P54 direction register to output mode.
(3) Event Counter Mode
The timer counts signals input through the CNTR0 pin.
Except for this, the operation in event counter mode is the same
as in timer mode. When using a timer in this mode, set the corre-
sponding port P54 direction register to input mode.
(4) Pulse Width Measurement Mode
The count source is f(XIN)/16 (or f(XCIN)/16 in low-speed mode). If
CNTR0 active edge switch bit is 0, the timer counts while the in-
put signal of CNTR0 pin is at H. If it is 1, the timer counts while
the input signal of CNTR 0 pin is at L. When using a timer in this
mode, set the corresponding port P54 direction register to input
mode.
Timer X write control
If the timer X write control bit is 0, when the value is written in the
address of timer X, the value is loaded in the timer X and the latch
at the same time.
If the timer X write control bit is 1, when the value is written in the
address of timer X, the value is loaded only in the latch. The value
in the latch is loaded in timer X after timer X underflows.
If the value is written in latch only, when writing in the timer latch at
the timer underflow, the value is set in the timer and the latch at
one time. Additionally, unexpected value may be set in the high-or-
der counter when the writing in high-order latch and the underflow
of timer X are performed at the same timing.
Real time port control
While the real time port function is valid, data for the real time port
are output from ports P52 and P53 each time the timer X
underflows. (However, after rewriting a data for real time port, if
the real time port control bit is changed from 0 to 1, data are
output independent of the timer X operation.) If the data for the
real time port is changed while the real time port function is valid,
the changed data are output at the next underflow of timer X.
Before using this function, set the corresponding port direction
registers to output mode.
Note on CNTR0 interrupt active edge
selection
CNTR0 interrupt active edge depends on the CNTR0 active edge
switch bit.
Fig. 22 Structure of timer X mode register
T
i
m
e
r
X
m
o
d
e
r
e
g
i
s
t
e
r
(
T
X
M
:
a
d
d
r
e
s
s
0
0
2
71
6)
T
i
m
e
r
X
w
r
i
t
e
c
o
n
t
r
o
l
b
i
t
0
:
W
r
i
t
e
v
a
l
u
e
i
n
l
a
t
c
h
a
n
d
c
o
u
n
t
e
r
1
:
W
r
i
t
e
v
a
l
u
e
i
n
l
a
t
c
h
o
n
l
y
R
e
a
l
t
i
m
e
p
o
r
t
c
o
n
t
r
o
l
b
i
t
0
:
R
e
a
l
t
i
m
e
p
o
r
t
f
u
n
c
t
i
o
n
i
n
v
a
l
i
d
1
:
R
e
a
l
t
i
m
e
p
o
r
t
f
u
n
c
t
i
o
n
v
a
l
i
d
P
52
d
a
t
a
f
o
r
r
e
a
l
t
i
m
e
p
o
r
t
P
53
d
a
t
a
f
o
r
r
e
a
l
t
i
m
e
p
o
r
t
T
i
m
e
r
X
o
p
e
r
a
t
i
n
g
m
o
d
e
b
i
t
s
b
5
b
4
0
0
:
T
i
m
e
r
m
o
d
e
0
1
:
P
u
l
s
e
o
u
t
p
u
t
m
o
d
e
1
0
:
E
v
e
n
t
c
o
u
n
t
e
r
m
o
d
e
1
1
:
P
u
l
s
e
w
i
d
t
h
m
e
a
s
u
r
e
m
e
n
t
m
o
d
e
C
N
T
R0
a
c
t
i
v
e
e
d
g
e
s
w
i
t
c
h
b
i
t
0
:
C
o
u
n
t
a
t
r
i
s
i
n
g
e
d
g
e
i
n
e
v
e
n
t
c
o
u
n
t
e
r
m
o
d
e
S
t
a
r
t
f
r
o
m
H
o
u
t
p
u
t
i
n
p
u
l
s
e
o
u
t
p
u
t
m
o
d
e
M
e
a
s
u
r
e
H
p
u
l
s
e
w
i
d
t
h
i
n
p
u
l
s
e
w
i
d
t
h
m
e
a
s
u
r
e
m
e
n
t
m
o
d
e
F
a
l
l
i
n
g
e
d
g
e
a
c
t
i
v
e
f
o
r
C
N
T
R0
i
n
t
e
r
r
u
p
t
1
:
C
o
u
n
t
a
t
f
a
l
l
i
n
g
e
d
g
e
i
n
e
v
e
n
t
c
o
u
n
t
e
r
m
o
d
e
S
t
a
r
t
f
r
o
m
L
o
u
t
p
u
t
i
n
p
u
l
s
e
o
u
t
p
u
t
m
o
d
e
M
e
a
s
u
r
e
L
p
u
l
s
e
w
i
d
t
h
i
n
p
u
l
s
e
w
i
d
t
h
m
e
a
s
u
r
e
m
e
n
t
m
o
d
e
R
i
s
i
n
g
e
d
g
e
a
c
t
i
v
e
f
o
r
C
N
T
R0
i
n
t
e
r
r
u
p
t
T
i
m
e
r
X
s
t
o
p
c
o
n
t
r
o
l
b
i
t
0
:
C
o
u
n
t
s
t
a
r
t
1
:
C
o
u
n
t
s
t
o
p
b
7
b
0
27
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Timer Y
Timer Y is a 16-bit timer that can be selected in one of four modes.
(1) Timer Mode
The timer counts f(XIN)/16 (or f(XCIN)/16 in low-speed mode).
(2) Period Measurement Mode
CNTR1 interrupt request is generated at rising/falling edge of
CNTR1 pin input signal. Simultaneously, the value in timer Y latch
is reloaded in timer Y and timer Y continues counting down. Ex-
cept for the above-mentioned, the operation in period
measurement mode is the same as in timer mode.
The timer value just before the reloading at rising/falling of CNTR1
pin input signal is retained until the timer Y is read once after the
reload.
The rising/falling timing of CNTR1 pin input signal is found by
CNTR1 interrupt. When using a timer in this mode, set the corre-
sponding port P55 direction register to input mode.
(3) Event Counter Mode
The timer counts signals input through the CNTR1 pin.
Except for this, the operation in event counter mode is the same
as in timer mode. When using a timer in this mode, set the corre-
sponding port P55 direction register to input mode.
(4) Pulse W idth HL Continuously Measurement
Mode
CNTR1 interrupt request is generated at both rising and falling
edges of CNTR1 pin input signal. Except for this, the operation in
pulse width HL continuously measurement mode is the same as in
period measurement mode. When using a timer in this mode, set
the corresponding port P55 direction register to input mode.
Note on CNTR1 interrupt active edge selection
CNTR1 interrupt active edge depends on the CNTR1 active edge
switch bit. However, in pulse width HL continuously measurement
mode, CNTR1 interrupt request is generated at both rising and
falling edges of CNTR1 pin input signal regardless of the setting of
CNTR1 active edge switch bit.
Fig. 23 Structure of timer Y mode register
T
i
m
e
r
Y
m
o
d
e
r
e
g
i
s
t
e
r
(
T
Y
M
:
a
d
d
r
e
s
s
0
0
2
81
6)
b
7
b
0
N
o
t
u
s
e
d
(
r
e
t
u
r
n
0
w
h
e
n
r
e
a
d
)
T
i
m
e
r
Y
o
p
e
r
a
t
i
n
g
m
o
d
e
b
i
t
s
b
5
b
4
0
0
:
T
i
m
e
r
m
o
d
e
0
1
:
P
e
r
i
o
d
m
e
a
s
u
r
e
m
e
n
t
m
o
d
e
1
0
:
E
v
e
n
t
c
o
u
n
t
e
r
m
o
d
e
1
1
:
P
u
l
s
e
w
i
d
t
h
H
L
c
o
n
t
i
n
u
o
u
s
l
y
m
e
a
s
u
r
e
m
e
n
t
m
o
d
e
C
N
T
R1
a
c
t
i
v
e
e
d
g
e
s
w
i
t
c
h
b
i
t
0
:
C
o
u
n
t
a
t
r
i
s
i
n
g
e
d
g
e
i
n
e
v
e
n
t
c
o
u
n
t
e
r
m
o
d
e
M
e
a
s
u
r
e
t
h
e
f
a
l
l
i
n
g
e
d
g
e
t
o
f
a
l
l
i
n
g
e
d
g
e
p
e
r
i
o
d
i
n
p
e
r
i
o
d
m
e
a
s
u
r
e
m
e
n
t
m
o
d
e
F
a
l
l
i
n
g
e
d
g
e
a
c
t
i
v
e
f
o
r
C
N
T
R1
i
n
t
e
r
r
u
p
t
1
:
C
o
u
n
t
a
t
f
a
l
l
i
n
g
e
d
g
e
i
n
e
v
e
n
t
c
o
u
n
t
e
r
m
o
d
e
M
e
a
s
u
r
e
t
h
e
r
i
s
i
n
g
e
d
g
e
p
e
r
i
o
d
i
n
p
e
r
i
o
d
m
e
a
s
u
r
e
m
e
n
t
m
o
d
e
R
i
s
i
n
g
e
d
g
e
a
c
t
i
v
e
f
o
r
C
N
T
R1
i
n
t
e
r
r
u
p
t
T
i
m
e
r
Y
s
t
o
p
c
o
n
t
r
o
l
b
i
t
0
:
C
o
u
n
t
s
t
a
r
t
1
:
C
o
u
n
t
s
t
o
p
28
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Timer 1, Timer 2, Timer 3
Timer 1, timer 2, and timer 3 are 8-bit timers. The count source for
each timer can be selected by timer 123 mode register. The timer
latch value is not affected by a change of the count source. How-
ever, because changing the count source may cause an
inadvertent count down of the timer, rewrite the value of timer
whenever the count source is changed.
Timer 2 write control
If the timer 2 write control bit is 0, when the value is written in the
address of timer 2, the value is loaded in the timer 2 and the latch
at the same time.
If the timer 2 write control bit is 1, when the value is written in the
address of timer 2, the value is loaded only in the latch. The value
in the latch is loaded in timer 2 after timer 2 underflows.
Timer 2 output control
When the timer 2 (TOUT) is output enabled, an inversion signal
from the TOUT pin is output each time timer 2 underflows.
In this case, set the port shared with the TOUT pin to the output
mode.
Notes on timer 1 to timer 3
When the count source of timer 1 to 3 is changed, the timer count-
ing value may be changed large because a thin pulse is generated
in count input of timer . If timer 1 output is selected as the count
source of timer 2 or timer 3, when timer 1 is written, the counting
value of timer 2 or timer 3 may be changed large because a thin
pulse is generated in timer 1 output.
Therefore, set the value of timer in the order of timer 1, timer 2
and timer 3 after the count source selection of timer 1 to 3.
Fig. 24 Structure of timer 123 mode register
T
OUT output act
i
ve e
d
ge sw
i
tc
h
bi
t
0 : Start at H output
1 : Start at L output
TOUT output control bit
0 : TOUT output disabled
1 : TOUT output enabled
Timer 2 write control bit
0 : Write data in latch and counter
1 : Write data in latch only
Timer 2 count source selection bit
0 : Timer 1 output
1 : f( XIN)/16
(or f(XCIN)/16 in lo w-speed mode)
Timer 3 count source selection bit
0 : Timer 1 output
1 : f( XIN)/16
(or f(XCIN)/16 in lo w-speed mode)
Timer 1 count source selection bit
0 : f( XIN)/16
(or f(XCIN)/16 in lo w-speed mode)
1 : f( XCIN)
Not used (retu rn 0 when re ad)
Ti
me r 123 m o
d
e reg
i
ster
(T123M :address 002916)
N
o
t
e
:
I
n
t
e
r
n
a
l
c
l
o
c
k
φ
i
s
f
(
X
C
I
N
)
/
2
i
n
t
h
e
l
o
w
-
s
p
e
e
d
m
o
d
e
.
b
7
b
0
29
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
SERIAL I/O
Serial I/O can be used as either clock synchronous or asynchro-
nous (UART) serial I/O. A dedicated timer (baud rate generator) is
also provided for baud rate generation.
(1) Clock Synchronous Serial I/O Mode
Clock synchronous serial I/O can be selected by setting the mode
selection bit of the serial I/O control register to 1.
For clock synchronous serial I/O, the transmitter and the receiver
must use the same clock. If an internal clock is used, transfer is
started by a write signal to the transmit/receive buffer register.
Fig. 25 Block diagram of clock synchronous serial I/O
Fig. 26 Operation of clock synchronous serial I/O function
P
46/
S
C
L
K
P
47/
S
R
D
Y
1
P
44/
R
X
D
P
45/
T
X
D
f
(
X
I
N
)
1/4
1
/
4
F
/
F
Se rial I/O status r egister
S
e
r
i
a
l
I
/
O
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
R
e
c
e
i
v
e
b
u
f
f
e
r
r
e
g
i
s
t
e
r
A
d
d
r
e
s
s
0
0
1
81
6
R
e
c
e
i
v
e
s
h
i
f
t
r
e
g
i
s
t
e
r
R
e
c
e
i
v
e
b
u
f
f
e
r
f
u
l
l
f
l
a
g
(
R
B
F
)
R
e
c
e
i
v
e
i
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
(
R
I
)
Clock control ci rcuit
Shif
t c
l
oc
k
S
er
i
a
l
I
/
O
clock selection bit
Frequency division ratio 1/(n+1)
Ba ud rate ge ner ator
A
d
d
r
e
s
s
0
0
1
C
1
6
BRG
count source se
l
ect
i
on
bi
t
C
l
o
c
k
c
o
n
t
r
o
l
c
i
r
c
u
i
t
Falling- edge detector
D
ata
b
us
A
d
d
r
e
s
s
0
0
1
81
6
S
h
i
f
t
c
l
o
c
k
T
r
a
n
s
m
i
t
s
h
i
f
t
r
e
g
i
s
t
e
r
s
h
i
f
t
c
o
m
p
l
e
t
i
o
n
f
l
a
g
(
T
S
C
)
T
ransm
i
t
b
u
ff
er empty
fl
ag
(TBE)
T
ransm
i
t
i
nterrupt request
(TI)
T
ransm
i
t
i
nterrupt source se
l
ect
i
on
bi
t
A
d
d
r
e
s
s
0
0
1
91
6
D
a
t
a
b
u
s
A
d
d
r
e
s
s
0
0
1
A
1
6
Transmit buffer reg ist er
T
r
a
n
s
m
i
t
s
h
i
f
t
r
e
g
i
s
t
e
r
(f(X
CIN
)
i
n
l
ow-spee
d
mo
d
e
)
R
e
c
e
i
v
e
e
n
a
b
l
e
s
i
g
n
a
l
S
R
D
Y
D
7
D
0
D
1
D
2
D
3
D
4
D
5
D
6
RBF
= 1
TSC = 1
T
B
E
=
0
T
B
E
=
1
T
S
C
=
0
T
rans
f
er s
hif
t c
l
oc
k
(1/2 to 1/2048 of the internal
clock, or an external cl ock)
S
e
r
i
a
l
o
u
t
p
u
t
T
X
D
S
e
r
i
a
l
i
n
p
u
t
R
X
D
W
r
i
t
e
s
i
g
n
a
l
t
o
r
e
c
e
i
v
e
/
t
r
a
n
s
m
i
t
b
u
f
f
e
r
r
e
g
i
s
t
e
r
(
a
d
d
r
e
s
s
0
0
1
8
1
6
)
O
v
e
r
r
u
n
e
r
r
o
r
(
O
E
)
d
e
t
e
c
t
i
o
n
N
o
t
e
s1
:
T
h
e
t
r
a
n
s
m
i
t
i
n
t
e
r
r
u
p
t
(
T
I
)
c
a
n
b
e
g
e
n
e
r
a
t
e
d
e
i
t
h
e
r
w
h
e
n
t
h
e
t
r
a
n
s
m
i
t
b
u
f
f
e
r
r
e
g
i
s
t
e
r
h
a
s
e
m
p
t
i
e
d
(
T
B
E
=
1
)
o
r
a
f
t
e
r
t
h
e
t
r
a
n
s
m
i
t
s
h
i
f
t
o
p
e
r
a
t
i
o
n
h
a
s
e
n
d
e
d
(
T
S
C
=
1
)
,
b
y
s
e
t
t
i
n
g
t
h
e
t
r
a
n
s
m
i
t
i
n
t
e
r
r
u
p
t
s
o
u
r
c
e
s
e
l
e
c
t
i
o
n
b
i
t
(
T
I
C
)
o
f
t
h
e
s
e
r
i
a
l
I
/
O
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
.
2
:
I
f
d
a
t
a
i
s
w
r
i
t
t
e
n
t
o
t
h
e
t
r
a
n
s
m
i
t
b
u
f
f
e
r
r
e
g
i
s
t
e
r
w
h
e
n
T
S
C
=
0
,
t
h
e
t
r
a
n
s
m
i
t
c
l
o
c
k
i
s
g
e
n
e
r
a
t
e
d
c
o
n
t
i
n
u
o
u
s
l
y
a
n
d
s
e
r
i
a
l
d
a
t
a
i
s
o
u
t
p
u
t
c
o
n
t
i
n
u
o
u
s
l
y
f
r
o
m
t
h
e
T
X
D
p
i
n
.
3
:
T
h
e
r
e
c
e
i
v
e
i
n
t
e
r
r
u
p
t
(
R
I
)
i
s
s
e
t
w
h
e
n
t
h
e
r
e
c
e
i
v
e
b
u
f
f
e
r
f
u
l
l
f
l
a
g
(
R
B
F
)
b
e
c
o
m
e
s
1
.
D
7
D
0
D
1
D
2
D
3
D
4
D
5
D
6
30
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
(2) Asynchronous Serial I/O (UART) Mode
Clock asynchronous serial I/O mode (UART) can be selected by
clearing the serial I/O mode selection bit of the serial I/O control
register to 0.
Eight serial data transfer formats can be selected, and the transfer
formats used by a transmitter and receiver must be identical.
The transmit and receive shift registers each have a buffer regis-
ter, but the two buffers have the same address in memory. Since
the shift register cannot be written to or read from directly, transmit
data is written to the transmit buffer, and receive data is read from
the receive buffer.
The transmit buffer can also hold the next data to be transmitted,
and the receive buffer register can hold a character while the next
character is being received.
Fig. 27 Block diagram of UART serial I/O
Fig. 28 Operation of UART serial I/O function
f
(
X
I
N
)
1/4
OE
P
E
F
E
1
/
1
6
1/16
D
ata
b
us
R
e
c
e
i
v
e
b
u
f
f
e
r
r
e
g
i
s
t
e
r
A
d
d
r
e
s
s
0
0
1
8
1
6
R
ece
i
ve s
hif
t reg
i
ster
R
ece
i
ve
b
u
ff
er
f
u
ll
fl
ag
(RBF)
R
ece
i
ve
i
nte r ru pt re qu es t
(RI)
B
au
d
rate generato
r
F
r
e
q
u
e
n
c
y
d
i
v
i
s
i
o
n
r
a
t
i
o
1
/
(
n
+
1
)
Add
ress 001
C
16
S
T
/
S
P
/
P
A
g
e
n
e
r
a
t
o
r
Trans mit bu ff er r egister
D
a
t
a
b
u
s
T
ransm
i
t s
hif
t reg
i
ster
A
d
d
r
e
s
s
0
0
1
8
1
6
T
ransm
i
t s
hif
t reg
i
ster s
hif
t comp
l
et
i
on
fl
ag
(TSC)
T
ransm
i
t
b
u
ff
er empty
fl
ag
(TBE)
T
ransm
i
t
i
nterrupt request
(TI)
Add
ress 0019
16
S
T
d
e
t
e
c
t
o
r
S
P
d
e
t
e
c
t
o
r
UART
contro
l
reg
i
ster
Add
ress 001
B
16
C
h
a
r
a
c
t
e
r
l
e
n
g
t
h
s
e
l
e
c
t
i
o
n
b
i
t
A
d
d
r
e
s
s
0
0
1
A
1
6
BRG
count source se
l
ect
i
on
bit
T
ransm
i
t
i
nterrupt source se
l
ect
i
on
bit
S
e
r
i
a
l
I
/
O
s
y
n
c
h
r
o
n
o
u
s
c
l
o
c
k
s
e
l
e
c
t
i
o
n
b
i
t
Cl
oc
k
contro
l
c
i
rcu
i
t
Ch
aracter
l
engt
h
se
l
ect
i
on
bi
t
7 bits
8
b
i
t
s
Serial I/O c ontrol re gis ter
P
4
6
/
S
C
L
K
S
er
i
a
l
I
/
O
status reg
i
ster
P
4
4
/
R
X
D
P
4
5
/
T
X
D
(
f
(
X
C
I
N
)
i
n
l
o
w
-
s
p
e
e
d
m
o
d
e
)
T
S
C
=
0
T
B
E
=
1
R
B
F
=
0
T
B
E
=
0
T
B
E
=
0
R
B
F
=
1
RBF
=1
ST
D
0
D
1
S
P
D0
D
1
S
T
SP
TBE
=1 TSC=1
ST
D
0
D
1
SP
D
0
D
1
ST
SP
T
ransm
i
t
b
u
ff
er wr
i
te s
i
gna
l
Generated at 2nd bit in 2-stop-bit mode
1
s
t
a
r
t
b
i
t
7
o
r
8
d
a
t
a
b
i
t
s
1
o
r
0
p
a
r
i
t
y
b
i
t
1
o
r
2
s
t
o
p
b
i
t
(
s
)
1
:
E
r
r
o
r
f
l
a
g
d
e
t
e
c
t
i
o
n
o
c
c
u
r
s
a
t
t
h
e
s
a
m
e
t
i
m
e
t
h
a
t
t
h
e
R
B
F
f
l
a
g
b
e
c
o
m
e
s
1
(
a
t
1
s
t
s
t
o
p
b
i
t
,
d
u
r
i
n
g
r
e
c
e
p
t
i
o
n
)
.
2
:T
h
e
t
r
a
n
s
m
i
t
i
n
t
e
r
r
u
p
t
(
T
I
)
c
a
n
b
e
s
e
l
e
c
t
e
d
t
o
o
c
c
u
r
w
h
e
n
e
i
t
h
e
r
t
h
e
T
B
E
o
r
T
S
C
f
l
a
g
b
e
c
o
m
e
s
1
b
y
t
h
e
s
e
t
t
i
n
g
o
f
t
h
e
t
r
a
n
s
m
i
t
i
n
t
e
r
r
u
p
t
s
o
u
r
c
e
s
e
l
e
c
t
i
o
n
b
i
t
(
T
I
C
)
o
f
t
h
e
s
e
r
i
a
l
I
/
O
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
.
3
: T
h
e
r
e
c
e
i
v
e
i
n
t
e
r
r
u
p
t
(
R
I
)
i
s
s
e
t
w
h
e
n
t
h
e
R
B
F
f
l
a
g
b
e
c
o
m
e
s
1
.
4
: A
f
t
e
r
d
a
t
a
i
s
w
r
i
t
t
e
n
t
o
t
h
e
t
r
a
n
s
m
i
t
b
u
f
f
e
r
r
e
g
i
s
t
e
r
w
h
e
n
T
S
C
=
1
,
0
.
5
t
o
1
.
5
c
y
c
l
e
s
o
f
t
h
e
d
a
t
a
s
h
i
f
t
c
y
c
l
e
i
s
n
e
c
e
s
s
a
r
y
u
n
t
i
l
c
h
a
n
g
i
n
g
t
o
T
S
C
=
0
.
N
o
t
e
s
S
e
r
i
a
l
o
u
t
p
u
t
T
X
D
S
e
r
i
a
l
i
n
p
u
t
R
X
D
R
e
c
e
i
v
e
b
u
f
f
e
r
r
e
a
d
s
i
g
n
a
l
T
r
a
n
s
m
i
t
o
r
r
e
c
e
i
v
e
c
l
o
c
k
31
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
[Transmit Buffer/Receive Buffer Register
(TB/RB)] 001816
The transmit buffer register and the receive buffer register are lo-
cated at the same address. The transmit buffer register is
write-only and the receive buffer register is read-only. If a charac-
ter bit length is 7 bits, the MSB of data stored in the receive buffer
register is “0”.
[Serial I/O Status Register (SIOSTS)] 001916
The read-only serial I/O status register consists of seven flags
(bits 0 to 6) which indicate the operating status of the serial I/O
function and various errors.
Three of the flags (bits 4 to 6) are valid only in UART mode.
The receive buffer full flag (bit 1) is cleared to “0” when the receive
buffer is read.
If there is an error, it is detected at the same time that data is
transferred from the receive shift register to the receive buffer reg-
ister, and the receive buffer full flag is set. A write to the serial I/O
status register clears all the error flags OE, PE, FE, and SE. Writ-
ing “0” to the serial I/O enable bit (SIOE) also clears all the status
flags, including the error flags.
All bits of the serial I/O status register are initialized to “0” at reset,
but if the transmit enable bit (bit 4) of the serial I/O control register
has been set to “1”, the transmit shift register shift completion flag
(bit 2) and the transmit buffer empty flag (bit 0) become “1”.
[Serial I/O Control Register (SIOCON)] 001A16
The serial I/O control register contains eight control bits for the se-
rial I/O function.
[UART Control Register (UARTCON) ]001B16
The UART control register consists of four control bits (bits 0 to 3)
which are valid when asynchronous serial I/O is selected and set
the data format of an data transfer. One bit in this register (bit 4) is
always valid and sets the output structure of the P45/TXD pin.
[Baud Rate Generator (BRG)] 001C16
The baud rate generator determines the baud rate for serial trans-
fer.
The baud rate generator divides the frequency of the count source
by 1/(n + 1), where n is the value written to the baud rate genera-
tor.
Notes on serial I/O
When setting the transmit enable bit to “1”, the serial I/O transmit
interrupt request bit is automatically set to “1”. When not requiring
the interrupt occurrence synchronized with the transmission
enalbed, take the following sequence.
Set the serial I/O transmit interrupt enable bit to “0” (disabled).
Set the transmit enable bit to “1”.
Set the serial I/O transmit interrupt request bit to “0” after 1 or
more instructions have been executed.
Set the serial I/O transmit interrupt enable bit to “1” (enabled).
32
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig. 29 Structure of serial I/O control registers
BRG
count source se
l
ect
i
on
bi
t
(CSS)
0: f(X
IN
) (f(X
CIN
) in low-speed mode)
1: f(X
IN
)/4 (f(X
CIN
)/4 in low-spee d mode)
Seria l I/O synchr oni zati o n clock selecti o n bit (SCS)
0: BRG output divided by 4 when clock synchronized serial
I/O is selected.
BRG output divided by 16 when UART is selected.
1: External clock input when clock synchronized serial I/O is
selected.
External clock input divided by 16 when UART is selected.
S
RDY
output enable bit (SRDY)
0: P4
7
pin operate s as o r dina ry I/O pin
1: P4
7
pin ope r ates as S
RDY
output pin
Transmit interrupt source selection bit (TIC)
0: Interrupt when transmit buffer has emptied
1: Interrupt when transmit shift operation is completed
Transmit enabl e bit ( TE)
0: Transmit disabled
1: Transmit enabled
Receive enable bit (RE)
0: Receive disabled
1: Receive enabled
Seria l I/O mode select io n bit (SIOM)
0: Asynchronous serial I/O (UART)
1: Clock synchronous serial I/O
Seria l I/O enabl e bit (SI OE)
0: Serial I/O disabled
(pins P4
4
P4
7
operate as ordinary I/O pins)
1: Serial I/O enabled
(pins P4
4
P4
7
operate as serial I/O pins)
S
e
r
i
a
l
I
/
O
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
(
S
I
O
C
O
N
:
a
d
d
r
e
s
s
0
0
1
A
1
6
)
b7 b0
T
r
a
n
s
m
i
t
b
u
f
f
e
r
e
m
p
t
y
f
l
a
g
(
T
B
E
)
0
:
B
u
f
f
e
r
f
u
l
l
1
:
B
u
f
f
e
r
e
m
p
t
y
R
e
c
e
i
v
e
b
u
f
f
e
r
f
u
l
l
f
l
a
g
(
R
B
F
)
0
:
B
u
f
f
e
r
e
m
p
t
y
1
:
B
u
f
f
e
r
f
u
l
l
T
r
a
n
s
m
i
t
s
h
i
f
t
r
e
g
i
s
t
e
r
s
h
i
f
t
c
o
m
p
l
e
t
i
o
n
f
l
a
g
(
T
S
C
)
0
:
T
r
a
n
s
m
i
t
s
h
i
f
t
i
n
p
r
o
g
r
e
s
s
1
:
T
r
a
n
s
m
i
t
s
h
i
f
t
c
o
m
p
l
e
t
e
d
O
v
e
r
r
u
n
e
r
r
o
r
f
l
a
g
(
O
E
)
0
:
N
o
e
r
r
o
r
1
:
O
v
e
r
r
u
n
e
r
r
o
r
P
a
r
i
t
y
e
r
r
o
r
f
l
a
g
(
P
E
)
0
:
N
o
e
r
r
o
r
1
:
P
a
r
i
t
y
e
r
r
o
r
F
r
a
m
i
n
g
e
r
r
o
r
f
l
a
g
(
F
E
)
0
:
N
o
e
r
r
o
r
1
:
F
r
a
m
i
n
g
e
r
r
o
r
S
u
m
m
i
n
g
e
r
r
o
r
f
l
a
g
(
S
E
)
0
:
(
O
E
)
U
(
P
E
)
U
(
F
E
)
=
0
1
:
(
O
E
)
U
(
P
E
)
U
(
F
E
)
=
1
N
o
t
u
s
e
d
(
r
e
t
u
r
n
s
1
w
h
e
n
r
e
a
d
)
S
er
i
a
l
I
/
O
status reg
i
ster
(SIOSTS : address 0019
16
)
b
7b0
U
A
R
T
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
(
U
A
R
T
C
O
N
:
a
d
d
r
e
s
s
0
0
1
B
1
6
)
Ch
aracter
l
engt
h
se
l
ect
i
on
bi
t
(CHAS)
0: 8 bits
1: 7 bits
Parity enable bit (PARE)
0: Parity checking disabled
1: Parity checking enab l ed
Parity selection bit (PARS)
0: Even parity
1: Odd parity
Stop bit length selection bit (STPS)
0: 1 stop bit
1: 2 stop bits
P4
5
/T
X
D P-channel output disable bit (POFF)
0: CMOS output (in output mode)
1: N-channel open-drain output (in output mode)
Not used (retu rn 1 when re ad)
b
7b0
33
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
A-D CONVERTER
[A-D Conversion Register (AD)] 003516
The A-D conversion register is a read-only register that contains
the result of an A-D conversion. When reading this register during
an A-D conversion, the previous conversion result is read.
[A-D Control Register (ADCON)] 003416
The A-D control register controls the A-D conversion process. Bits
0 to 2 of this register select specific analog input pins. Bit 3 signals
the completion of an A-D conversion. The value of this bit remains
at 0 during an A-D conversion, then changes to 1 when the A-
D conversion is completed. Writing 0 to this bit starts the A-D
conversion. Bit 4 controls the transistor which breaks the through
current of the resistor ladder. When bit 5, which is the AD external
trigger valid bit, is set to 1, this bit enables A-D conversion even
by a falling edge of an ADT input. Set ports which share with ADT
pins to input when using an A-D external trigger.
[Comparison Voltage Generator]
The comparison voltage generator divides the voltage between
AVSS and VREF by 256, and outputs the divided voltages.
[Channel Selector]
The channel selector selects one of the input ports P67/AN7P60/
AN0, and inputs it to the comparator.
[Comparator and Control Circuit]
The comparator and control circuit compares an analog input volt-
age with the comparison voltage and stores the result in the A-D
conversion register. When an A-D conversion is completed, the
control circuit sets the AD conversion completion bit and the AD
interrupt request bit to 1.
Note that the comparator is constructed linked to a capacitor, so
set f(XIN) to at least 500 kHz during A-D conversion.
Use the clock divided from the main clock XIN as the internal clock
φ.
Fig. 31 A-D converter block diagram
Fig. 30 Structure of A-D control register
A
-
D
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
(
A
D
C
O
N
:
a
d
d
r
e
s
s
0
0
3
41
6)
A
D
c
o
n
v
e
r
s
i
o
n
c
o
m
p
l
e
t
i
o
n
b
i
t
0
:
C
o
n
v
e
r
s
i
o
n
i
n
p
r
o
g
r
e
s
s
1
:
C
o
n
v
e
r
s
i
o
n
c
o
m
p
l
e
t
e
d
A
n
a
l
o
g
i
n
p
u
t
p
i
n
s
e
l
e
c
t
i
o
n
b
i
t
s
0
0
0
:
P
60/
A
N0
0
0
1
:
P
61/
A
N1
0
1
0
:
P
62/
A
N2
0
1
1
:
P
63/
A
N3
1
0
0
:
P
64/
A
N4
1
0
1
:
P
65/
A
N5
1
1
0
:
P
66/
A
N6
1
1
1
:
P
67/
A
N7
V
R
E
F
i
n
p
u
t
s
w
i
t
c
h
b
i
t
0
:
O
F
F
1
:
O
N
AD
externa
l
tr
i
gger va
lid
bi
t
0 : A -D external trigger invalid
1 : A-D external trigger valid
b
7
b
0
I
n
t
e
r
r
u
p
t
s
o
u
r
c
e
s
e
l
e
c
t
i
o
n
b
i
t
0
:
I
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
a
t
A
-
D
c
o
n
v
e
r
s
i
o
n
c
o
m
p
l
e
t
e
d
1
:
I
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
a
t
A
D
T
i
n
p
u
t
f
a
l
l
i
n
g
N
o
t
u
s
e
d
(
r
e
t
u
r
n
s
0
w
h
e
n
r
e
a
d
)
C
omparator
A
-
D
contro
l
c
i
rcu
it
A
D
T
/
A
-
D
i
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
AV
S
S
V
R
E
F
P
60/
A
N
0
D
a
t
a
b
u
s
A
-
D
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
b
7
b
0
A
-
D
convers
i
on
register
R
es
i
stor
l
a
dd
e
r
C
h
a
n
n
e
l
s
e
l
e
c
t
o
r
P
67/
A
N
7
P
66/
A
N
6
P
65/
A
N
5
P
64/
A
N
4
P
63/
A
N
3
P
62/
A
N
2
P
61/
A
N
1
P
57/
A
D
T
8
3
34
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
LCD DRIVE CONTROL CIRCUIT
The 3822 group has the built-in Liquid Crystal Display (LCD) drive
control circuit consisting of the following.
LCD display RAM
Segment output enable register
LCD mode register
Selector
Timing controller
Common driver
Segment driver
Bias control circuit
A maximum of 32 segment output pins and 4 common output pins
can be used.
Up to 128 pixels can be controlled for LCD display. When the LCD
Fig. 32 Structure of segment output enable register and LCD mode register
enable bit is set to 1 after data is set in the LCD mode register,
the segment output enable register and the LCD display RAM, the
LCD drive control circuit starts reading the display data automati-
cally, performs the bias control and the duty ratio control, and
displays the data on the LCD panel.
Table 11 Maximum number of display pixels at each duty ratio
Duty ratio Maximum number of display pixel
64 dots
or 8 segment LCD 8 digits
96 dots
or 8 segment LCD 12 digits
128 dots
or 8 segment LCD 16 digits
2
3
4
L
C
D
m
o
d
e
r
e
g
i
s
t
e
r
(
L
M
:
a
d
d
r
e
s
s
0
0
3
91
6)
Segment output enab le reg ister
(SEG : address 003816)
Duty ratio selection bits
0 0 : Not used
0 1 : 2 (use COM0, COM1)
1 0 : 3 (use COM0COM2)
1 1 : 4 (use COM0COM3)
Bias control bit
0 : 1/3 bias
1 : 1/2 bias
LCD enable bit
0 : LCD OFF
1 : LCD ON
Not used (returns 0 when r ead)
(Do not write 1 to this bit)
LCD circuit divider division ratio selection bits
0 0 : Clock input
0 1 : 2 division of clock input
1 0 : 4 division of clock input
1 1 : 8 division of clock input
LCDCK count source selection bit (Note)
0 : f(X CIN)/32
1 : f(X IN)/8192 (or f(XCIN)/8192 in low-speed
mode)
N
o
t
e
:
L
C
D
C
K
i
s
a
c
l
o
c
k
f
o
r
a
L
C
D
t
i
m
i
n
g
c
o
n
t
r
o
l
l
e
r
.
Segment output enab le bit 0
0 : Input port P34P37
1 : Segment output SEG12SEG15
Segment output enab le bit 1
0 : I/O po rt P00,P01
1 : Segment output SEG16, SEG17
Segment output enab le bit 2
0 : I/O po rt P02P07
1 : Segment output SEG18SEG23
Segment output enab le bit 3
0 : I/O po rt P10,P11
1 : Segment output SEG24, SEG25
Segment output enab le bit 4
0 : I/O po rt P12
1 : Segment output SEG26
Segment output enab le bit 5
0 : I/O po rt P13P17
1 : Segment output SEG27SEG31
Not used (returns 0 when r ead)
(Do not wr ite
1
to this bit. )
b
7b
0
b
7b
0
35
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig. 33 Block diagram of LCD controller/driver
C
O
M
0
C
O
M
1
C
O
M
2
C
O
M
3
V
S
S
V
L
1
V
L
2
V
L
3
S
E
G
3
S
E
G
2
S
E
G
1
S
E
G
0
1
0
L
C
D
C
K
2
2
P
1
7
/
S
E
G
3
1
P
1
6
/
S
E
G
3
0
P
3
4
/
S
E
G
1
2
f
(
X
C
I
N
)
/
3
2
f
(
X
I
N
)
/
8
1
9
2
(
o
r
f
(
X
C
I
N
)
/
8
1
9
2
i
n
l
o
w
-
s
p
e
e
d
m
o
d
e
)
D
a
t
a
b
u
s
A
d
d
r
e
s
s
0
0
4
0
1
6
A
d
d
r
e
s
s
0
0
4
1
1
6
A
d
d
r
e
s
s
0
0
4
F
1
6
S
e
l
e
c
t
o
r
S
e
l
e
c
t
o
r
S
e
l
e
c
t
o
r
S
e
l
e
c
t
o
r
S
e
l
e
c
t
o
r
S
e
l
e
c
t
o
r
S
e
g
m
e
n
t
d
r
i
v
e
r
S
e
g
m
e
n
t
d
r
i
v
e
r
S
e
g
m
e
n
t
d
r
i
v
e
r
S
e
g
m
e
n
t
d
r
i
v
e
r
S
e
g
m
e
n
t
d
r
i
v
e
r
S
e
g
m
e
n
t
d
r
i
v
e
r
B
i
a
s
c
o
n
t
r
o
l
L
C
D
d
i
v
i
d
e
r
T
i
m
i
n
g
c
o
n
t
r
o
l
l
e
r
C
o
m
m
o
n
d
r
i
v
e
r
D
u
t
y
r
a
t
i
o
s
e
l
e
c
t
i
o
n
b
i
t
s
C
o
m
m
o
n
d
r
i
v
e
r
C
o
m
m
o
n
d
r
i
v
e
r
C
o
m
m
o
n
d
r
i
v
e
r
B
i
a
s
c
o
n
t
r
o
l
b
i
t
L
C
D
c
i
r
c
u
i
t
d
i
v
i
d
e
r
d
i
v
i
s
i
o
n
r
a
t
i
o
s
e
l
e
c
t
i
o
n
b
i
t
s
L
C
D
C
K
c
o
u
n
t
s
o
u
r
c
e
s
e
l
e
c
t
i
o
n
b
i
t
L
C
D
d
i
s
p
l
a
y
R
A
M
L
C
D
e
n
a
b
l
e
b
i
t
36
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Bias Control and Applied Voltage to LCD
Power Input Pins
To the LCD power input pins (VL1VL3), apply the voltage shown
in Table 12 according to the bias value.
Select a bias value by the bias control bit (bit 2 of the LCD mode
register).
Common Pin and Duty Ratio Control
The common pins (COM0COM3) to be used are determined by
duty ratio.
Select duty ratio by the duty ratio selection bits (bits 0 and 1 of the
LCD mode register).
Fig. 34 Example of circuit at each bias
Table 13 Duty ratio control and common pins used
Duty
ratio
Common pins used
Notes1: COM2 and COM3 are open.
2: COM3 is open.
Bit 1 Bit 0 COM0, COM1 (Note 1)
Duty ratio selection bit
2
3
4
0
1
1
1
0
1COM0COM2 (Note 2)
COM0COM3
Table 12 Bias control and applied voltage to VL1–VL3
Bias value
1/3 bias
Voltage value
VL3=VLCD
VL2=2/3 VLCD
VL1=1/3 VLCD
Note 1: VLCD is the maximum value of supplied voltage for the
LCD panel.
1/2 bias VL3=VLCD
VL2=VL1=1/2 VLCD
Contrast control
1/2 bias1/3 bias
Contrast control
VL3
R
4
R5
R
4
=
R
5
R
1
R
2
R3
R
1
=
R
2
=
R
3
VL2
VL1
VL
3
VL2
VL
1
37
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
LCD Display RAM
Address 004016 to 004F16 is the designated RAM for the LCD dis-
play. When 1 are written to these addresses, the corresponding
segments of the LCD display panel are turned on.
Fig. 35 LCD display RAM map
LCD Drive Timing
The LCDCK timing frequency (LCD drive timing) is generated in-
ternally and the frame frequency can be determined with the
following equation;
f(LCDCK) =
Frame frequency =
(frequency of count source for LCDCK)
(divider division ratio for LCD)
f(LCDCK)
(duty ratio)
B
i
t
A
d
d
r
e
s
s7
0
0
4
01
6
0
0
4
11
6
0
0
4
21
6
0
0
4
31
6
0
0
4
41
6
0
0
4
51
6
0
0
4
61
6
0
0
4
71
6
0
0
4
81
6
0
0
4
91
6
0
0
4
A1
6
0
0
4
B1
6
0
0
4
C1
6
0
0
4
D1
6
0
0
4
E1
6
0
0
4
F1
6
C
O
M3
01
2
3456
C
O
M0
COM1 C
O
M2
COM3C
O
M0COM1C
O
M2
S
E
G1
S
E
G3
S
E
G5
S
E
G7
S
E
G9
S
E
G1
1
S
E
G1
3
S
E
G1
5
S
E
G1
7
S
E
G1
9
S
E
G2
1
S
E
G2
3
S
E
G2
5
S
E
G2
7
S
E
G2
9
S
E
G3
1
SEG0
SEG2
SEG4
SEG6
SEG8
SEG10
SEG12
SEG14
SEG16
SEG18
SEG20
SEG22
SEG24
SEG26
SEG28
SEG30
38
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig. 36 LCD drive waveform (1/2 bias)
I
n
t
e
r
n
a
l
l
o
g
i
c
L
C
D
C
K
t
i
m
i
n
g
1
/
4
d
u
t
yV
o
l
t
a
g
e
l
e
v
e
l
V
L3
V
L2
=V
L1
V
SS
V
L3
V
SS
C
O
M
0
C
O
M
1
C
O
M
2
C
O
M
3
SEG
0
O
F
FON O
F
FON
C
O
M
3
C
O
M
2
C
O
M
1
C
O
M
0
C
O
M
3
C
O
M
2
COM
1
C
O
M
0
1/3 du ty
V
L3
V
L2
=V
L1
V
SS
V
L3
V
SS
OFFON ON OFF ON OFF
1
/
2
d
u
t
y
COM
0
COM
1
COM
2
SEG
0
C
O
M
0
COM
1
SEG
0
V
L3
V
L2
=V
L1
V
SS
V
L3
V
SS
OFFO
N O
F
FON O
F
FON O
F
FO
N
C
O
M
0
C
O
M
2
C
O
M
1
C
O
M
0
COM
2
C
O
M
1
COM
0
C
O
M
2
COM
1
COM
0
COM
1
C
O
M
0
COM
1
COM
0
COM
1
COM
0
39
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig. 37 LCD drive waveform (1/3 bias)
I
n
t
e
r
n
a
l
l
o
g
i
c
L
C
D
C
K
t
i
m
i
n
g
1/4 du ty V
o
l
t
a
g
e
l
e
v
e
l
V
L
3
V
S
S
C
O
M
0
C
O
M
1
C
O
M
2
C
O
M
3
SEG
0
O
F
FO
N O
F
FO
N
COM
3
C
O
M
2
C
O
M
1
C
O
M
0
COM
3
C
O
M
2
C
O
M
1
COM
0
1/3 du ty
O
F
FON O
NO
F
FON O
F
F
1
/
2
d
u
t
y
COM
0
C
O
M
1
C
O
M
2
S
E
G
0
C
O
M
0
C
O
M
1
S
E
G
0
OFFON OFFON OFFON OFFON
V
L3
V
L
2
V
S
S
V
L
1
V
L3
V
L2
V
S
S
V
L1
V
L
3
V
SS
V
L3
V
L
2
V
SS
V
L
1
V
L3
V
S
S
C
O
M
0
C
O
M
2
C
O
M
1
C
O
M
0
C
O
M
2
C
O
M
1
COM
0
C
O
M
2
C
O
M
1
C
O
M
0
C
O
M
1
C
O
M
0
C
O
M
1
C
O
M
0
COM
1
C
O
M
0
40
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
φ CLOCK SYSTEM OUTPUT FUNCTION
The internal system clock φ can be output from port P4 1 by setting
the φ output control register. Set bit 1 of the port P4 direction reg-
ister to 1 when outputting φ clock.
Fig. 38 Structure of φ output control register
φ
o
u
t
p
u
t
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
(
C
K
O
U
T
:
a
d
d
r
e
s
s
0
0
2
A
1
6
)
φ output control bit
0 : port function
1 : φ clock output
Not used (return 0 when read)
b
7b
0
41
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
RESET CIRCUIT
To reset the microcomputer, RESET pin should be held at an L
level for 2 µs or more. Then the RESET pin is returned to an H
level (the power source voltage should be between VCC(min.) and
5.5 V, and the quartz-crystal oscillator should be stable), reset is
released. After the reset is completed, the program starts from the
address contained in address FFFD16 (high-order byte) and ad-
dress FFFC16 (low-order byte). Make sure that the reset input
voltage meets VIL spec. when a power source voltage passes
VCC(min.).
Fig. 39 Reset Circuit Example
Fig. 40 Reset Sequence
P
o
w
e
r
o
n
P
o
w
e
r
s
o
u
r
c
e
v
o
l
t
a
g
e
Rese t input
voltage
P
o
w
e
r
s
o
u
r
c
e
v
o
l
t
a
g
e
d
e
t
e
c
t
i
o
n
c
i
r
c
u
i
t
V
I
L
s
p
e
c
.
0
V
0
V
V
CC
R
E
S
E
T
V
CC
R
E
S
E
T
R
E
S
E
T
I
n
t
e
r
n
a
l
r
e
s
e
t
A
d
d
r
e
s
s
D
a
t
a
S
Y
N
C
φ
XIN
XI
N
:
a
b
o
u
t
8
0
0
0
c
y
c
l
e
s
R
e
s
e
t
a
d
d
r
e
s
s
f
r
o
m
v
e
c
t
o
r
t
a
b
l
e
N
o
t
e
s
1
:
T
h
e
f
r
e
q
u
e
n
c
y
r
e
l
a
t
i
o
n
o
f
f
(
XI
N)
a
n
d
f
(φ)
i
s
f
(
XI
N)
=
8
f
(φ)
2
:
T
h
e
q
u
e
s
t
i
o
n
m
a
r
k
s
(
?
)
i
n
d
i
c
a
t
e
a
n
u
n
d
e
f
i
n
e
d
s
t
a
t
e
t
h
a
t
d
e
p
e
n
d
s
o
n
t
h
e
p
r
e
v
i
o
u
s
s
t
a
t
e
.
FFFC FFFD A
DH
,
A
DL
ADLADH
????
42
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig. 41 Initial status of microcomputer after reset
P
o
r
t
P
0
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
o
r
t
P
1
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
o
r
t
P
2
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
o
r
t
P
4
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
o
r
t
P
5
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
o
r
t
P
6
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
o
r
t
P
7
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
P
U
L
L
r
e
g
i
s
t
e
r
A
P
U
L
L
r
e
g
i
s
t
e
r
B
S
i
r
i
a
l
I
/
O
s
t
a
t
u
s
r
e
g
i
s
t
e
r
S
i
r
i
a
l
I
/
O
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
U
A
R
T
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
T
i
m
e
r
X
(
L
o
w
)
T
i
m
e
r
X
(
H
i
g
h
)
T
i
m
e
r
Y
(
L
o
w
)
T
i
m
e
r
Y
(
H
i
g
h
)
T
i
m
e
r
1
T
i
m
e
r
2
T
i
m
e
r
3
T
i
m
e
r
X
m
o
d
e
r
e
g
i
s
t
e
r
T
i
m
e
r
Y
m
o
d
e
r
e
g
i
s
t
e
r
T
i
m
e
r
1
2
3
m
o
d
e
r
e
g
i
s
t
e
r
φ
o
u
t
p
u
t
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
A
-
D
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
S
e
g
m
e
n
t
o
u
t
p
u
t
e
n
a
b
l
e
r
e
g
i
s
t
e
r
L
C
D
m
o
d
e
r
e
g
i
s
t
e
r
I
n
t
e
r
r
u
p
t
e
d
g
e
s
e
l
e
c
t
i
o
n
r
e
g
i
s
t
e
r
C
P
U
m
o
d
e
r
e
g
i
s
t
e
r
I
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
r
e
g
i
s
t
e
r
1
I
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
r
e
g
i
s
t
e
r
2
I
n
t
e
r
r
u
p
t
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
1
I
n
t
e
r
r
u
p
t
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
2
P
r
o
c
e
s
s
o
r
s
t
a
t
u
s
r
e
g
i
s
t
e
r
P
r
o
g
r
a
m
c
o
u
n
t
e
r
Note: The contents of all other registers and RAM are undefined after reset, so they must be
initialized by software.
: undefined
R
e
g
i
s
t
e
r
C
o
n
t
e
n
t
s
A
d
d
r
e
s
s0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
F
F
1
6
F
F
1
6
F
F
1
6
F
F
1
6
F
F
1
6
0
1
1
6
F
F
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
0
0
1
6
C
o
n
t
e
n
t
s
o
f
a
d
d
r
e
s
s
F
F
F
D
1
6
C
o
n
t
e
n
t
s
o
f
a
d
d
r
e
s
s
F
F
F
C
1
6
(
1
)
(
2
)
(
3
)
(
4
)
(
5
)
(
6
)
(
7
)
(
8
)
(
9
)
(
1
0
)
(
1
1
)
(
1
2
)
(
1
3
)
(
1
4
)
(
1
5
)
(
1
6
)
(
1
7
)
(
1
8
)
(
1
9
)
(
2
0
)
(
2
1
)
(
2
2
)
(
2
3
)
(
2
4
)
(
2
5
)
(
2
6
)
(
2
7
)
(
2
8
)
(
2
9
)
(
3
0
)
(
3
1
)
(
3
2
)
(
3
3
)
(
3
4
)
0
0
0
1
1
6
0
0
0
3
1
6
0
0
0
5
1
6
0
0
0
9
1
6
0
0
0
B
1
6
0
0
0
D
1
6
0
0
0
F
1
6
0
0
1
6
1
6
0
0
1
7
1
6
0
0
1
9
1
6
0
0
1
A
1
6
0
0
1
B
1
6
0
0
2
0
1
6
0
0
2
1
1
6
0
0
2
2
1
6
0
0
2
3
1
6
0
0
2
4
1
6
0
0
2
5
1
6
0
0
2
6
1
6
0
0
2
7
1
6
0
0
2
8
1
6
0
0
2
9
1
6
0
0
2
A
1
6
0
0
3
4
1
6
0
0
3
8
1
6
0
0
3
9
1
6
0
0
3
A
1
6
0
0
3
B
1
6
0
0
3
C
1
6
0
0
3
D
1
6
0
0
3
E
1
6
0
0
3
F
1
6
(
P
S
)
(
P
C
H
)
(
P
C
L
)
01001 000
00001 000
11100 000
10000 000
00001 110
✕✕✕✕✕ ✕✕
1
43
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
CLOCK GENERATING CIRCUIT
The 3822 group has two built-in oscillation circuits. An oscillation
circuit can be formed by connecting a resonator between XIN and
XOUT (XCIN and XCOUT). Use the circuit constants in accordance
with the resonator manufacturer's recommended values. No exter-
nal resistor is needed between XIN and XOUT since a feed-back
resistor exists on-chip. However, an external feed-back resistor is
needed between XCIN and XCOUT.
To supply a clock signal externally, input it to the XIN pin and make
the XOUT pin open. The sub-clock XCIN-XCOUT oscillation circuit
cannot directly input clocks that are externally generated. Accord-
ingly, be sure to cause an external resonator to oscillate.
Immediately after poweron, only the XIN oscillation circuit starts
oscillating, and XCIN and XCOUT pins function as I/O ports.
Frequency Control
(1) Middle-speed Mode
The internal clock φ is the frequency of XIN divided by 8.
After reset, this mode is selected.
(2) High-speed Mode
The internal clock φ is half the frequency of XIN.
(3) Low-speed Mode
The internal clock φ is half the frequency of XCIN.
A low-power consumption operation can be realized by stopping
the main clock XIN in this mode. To stop the main clock, set bit 5
of the CPU mode register to 1.
When the main clock X IN is restarted, set enough time for oscil-
lation to stabilize by programming.
Note: If you switch the mode between middle/high-speed and low-
speed, stabilize both XIN and XCIN oscillations. The
sufficient time is required for the sub-clock to stabilize, es-
pecially immediately after poweron and at returning from
stop mode. When switching the mode between middle/high-
speed and low-speed, set the frequency on condition that
f(XIN) > 3f(X CIN).
Fig. 42 Ceramic resonator circuit
Fig. 43 External clock input circuit
Oscillation Control
(1) Stop Mode
If the STP instruction is executed, the internal clock φ stops at an
H level, and XIN and XCIN oscillators stop. Timer 1 is set to
FF16 and timer 2 is set to 0116.
Either XIN or XCIN divided by 16 is input to timer 1 as count
source, and the output of timer 1 is connected to timer 2. The bits
of the timer 123 mode register except bit 4 are cleared to 0. Set
the timer 1 and timer 2 interrupt enable bits to disabled (0) be-
fore executing the STP instruction. Oscillator restarts at reset or
when an external interrupt is received, but the internal clock φ is
not supplied to the CPU until timer 2 underflows. This allows timer
for the clock circuit oscillation to stabilize.
(2) Wait Mode
If the WIT instruction is executed, the internal clock φ stops at an
H level. The states of XIN and XCIN are the same as the state be-
fore the executing the WIT instruction. The internal clock restarts
at reset or when an interrupt is received. Since the oscillator does
not stop, normal operation can be started immediately after the
clock is restarted.
XC
I
NXC
O
U
TXI
NXO
U
T
CI
NCOUT
CCIN CC
O
U
T
R
fRd
XI
N
E
x
t
e
r
n
a
l
o
s
c
i
l
l
a
t
i
o
n
c
i
r
c
u
i
t
O
p
e
n
VC
C
VS
S
CC
I
NCCOUT
Rf R
d
XC
I
N
XC
O
U
TXO
U
T
44
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig.44 Clock generating circuit block diagram
W
I
T
i
n
s
t
r
u
c
t
i
o
n
STP
i
nstruct
i
on
Ti
m
i
ng φ
(Internal system clock)
S
R
Q
STP
i
nstruct
i
on
S
R
Q
M
a
i
n c
l
oc
k
stop
bi
t
S
R
Q
T
i
m
e
r
2
T
i
m
e
r
1
1/2 1/4
X
I
N
X
O
U
T
X
C
O
U
T
X
C
I
N
I
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
R
eset
P
o
r
t
X
C
s
w
i
t
c
h
b
i
t
1
”“0
T
i
m
e
r
1
c
o
u
n
t
s
o
u
r
c
e
s
e
l
e
c
t
i
o
n
b
i
t
T
i
m
e
r
2
c
o
u
n
t
s
o
u
r
c
e
s
e
l
e
c
t
i
o
n
b
i
t
L
o
w
-
s
p
e
e
d
m
o
d
e
Middl
e-/
Hi
g
h
-spee
d
mo
d
e
I
n
t
e
r
n
a
l
s
y
s
t
e
m
c
l
o
c
k
s
e
l
e
c
t
i
o
n
b
i
t
(
N
o
t
e
)
M
i
d
d
l
e
-
s
p
e
e
d
m
o
d
e
Hi
g
h
-spee
d
mo
d
e
or Low-speed mode
N
ote :
Wh
en us
i
ng t
h
e
l
ow-spee
d
mo
d
e, set t
h
e po rt
X
C sw
i
tc
h
bi
t to “1” .
M
a
i
n c
l
oc
k
di
v
i
s
i
on rat
i
o se
l
ect
i
on
bi
t
1
“0”
1
0
1
0
I
n
t
e
r
r
u
p
t
d
i
s
a
b
l
e
f
l
a
g
I
1
/
2
1
“0”
45
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig. 45 State transitions of system clock
N
o
t
e
s1
:
S
w
i
t
c
h
t
h
e
m
o
d
e
b
y
t
h
e
a
l
l
o
w
s
s
h
o
w
n
b
e
t
w
e
e
n
t
h
e
m
o
d
e
b
l
o
c
k
s
.
(
D
o
n
o
t
s
w
i
t
c
h
b
e
t
w
e
e
n
t
h
e
m
o
d
e
d
i
r
e
c
t
l
y
w
i
t
h
o
u
t
a
n
a
l
l
o
w
.
)
2
:
T
h
e
a
l
l
m
o
d
e
s
c
a
n
b
e
s
w
i
t
c
h
e
d
t
o
t
h
e
s
t
o
p
m
o
d
e
o
r
t
h
e
w
a
i
t
m
o
d
e
a
n
d
r
e
t
u
r
n
e
d
t
o
t
h
e
s
o
u
r
c
e
m
o
d
e
w
h
e
n
t
h
e
s
t
o
p
m
o
d
e
o
r
t
h
e
w
a
i
t
m
o
d
e
i
s
e
n
d
e
d
.
3
:
T
i
m
e
r
a
n
d
L
C
D
o
p
e
r
a
t
e
i
n
t
h
e
w
a
i
t
m
o
d
e
.
4
:
W
h
e
n
t
h
e
s
t
o
p
m
o
d
e
i
s
e
n
d
e
d
,
a
d
e
l
a
y
o
f
a
p
p
r
o
x
i
m
a
t
e
l
y
1
m
s
o
c
c
u
r
s
a
u
t
o
m
a
t
i
c
a
l
l
y
b
y
t
i
m
e
r
1
a
n
d
t
i
m
e
r
2
i
n
m
i
d
d
l
e
-
/
h
i
g
h
-
s
p
e
e
d
m
o
d
e
.
5
:
W
h
e
n
t
h
e
s
t
o
p
m
o
d
e
i
s
e
n
d
e
d
,
a
d
e
l
a
y
o
f
a
p
p
r
o
x
i
m
a
t
e
l
y
0
.
2
5
s
o
c
c
u
r
s
a
u
t
o
m
a
t
i
c
a
l
l
y
b
y
t
i
m
e
r
1
a
n
d
t
i
m
e
r
2
i
n
l
o
w
-
s
p
e
e
d
m
o
d
e
.
6
:
W
a
i
t
u
n
t
i
l
o
s
c
i
l
l
a
t
i
o
n
s
t
a
b
i
l
i
z
e
s
a
f
t
e
r
o
s
c
i
l
l
a
t
i
n
g
t
h
e
m
a
i
n
c
l
o
c
k
XI
N
b
e
f
o
r
e
t
h
e
s
w
i
t
c
h
i
n
g
f
r
o
m
t
h
e
l
o
w
-
s
p
e
e
d
m
o
d
e
t
o
m
i
d
d
l
e
-
/
h
i
g
h
-
s
p
e
e
d
m
o
d
e
.
7
:
T
h
e
e
x
a
m
p
l
e
a
s
s
u
m
e
s
t
h
a
t
8
M
H
z
i
s
b
e
i
n
g
a
p
p
l
i
e
d
t
o
t
h
e
XI
N
p
i
n
a
n
d
3
2
k
H
z
t
o
t
h
e
XC
I
N
p
i
n
.
φ
i
n
d
i
c
a
t
e
s
t
h
e
i
n
t
e
r
n
a
l
c
l
o
c
k
.
CM
4 :
P
ort
X
c sw
i
tc
h
bi
t
0: I/O port
1: XCIN, XCOUT
CM5 : Main clock (XINXOUT) s top bit
0: Oscillating
1: Stopped
CM6 : Main clock division ratio selecti on bit
0: f(XIN)/2 (high-speed mode)
1: f(XIN)/8 (middle-speed mode)
CM7 : Internal system clock selection bit
0: XINXOUT selected
(middle-/high-speed mode)
1: XCINXCOUT selected
(low-spe ed mode)
CPU
mo
d
e reg
i
ster
(CPUM : address 003B16)
b
7
b
4
R
ese
t
CM
6
0
1
C
M4
0
1
C
M7
=
0
(
8
M
H
z
s
e
l
e
c
t
e
d
)
C
M6
=
1
(
M
i
d
d
l
e
-
s
p
e
e
d
)
C
M5
=
0
(
8
M
H
z
o
s
c
i
l
l
a
t
i
n
g
)
C
M4
=
0
(
3
2
k
H
z
s
t
o
p
p
e
d
)
M
i
d
d
l
e
-
s
p
e
e
d
m
o
d
e
(
f
(φ)
=
1
M
H
z
)
C
M7
=
0
(
8
M
H
z
s
e
l
e
c
t
e
d
)
C
M6
=
1
(
M
i
d
d
l
e
-
s
p
e
e
d
)
C
M5
=
0
(
8
M
H
z
o
s
c
i
l
l
a
t
i
n
g
)
C
M4
=
1
(
3
2
k
H
z
o
s
c
i
l
l
a
t
i
n
g
)
M
i
d
d
l
e
-
s
p
e
e
d
m
o
d
e
(
f
(φ)
=
1
M
H
z
)
C
M7
=
0
(
8
M
H
z
s
e
l
e
c
t
e
d
)
C
M6
=
0
(
H
i
g
h
-
s
p
e
e
d
)
C
M5
=
0
(
8
M
H
z
o
s
c
i
l
l
a
t
i
n
g
)
C
M4
=
0
(
3
2
k
H
z
s
t
o
p
p
e
d
)
High-speed mode (f(φ) = 4 MHz)
CM7 = 0 (8 MHz selected)
CM6 = 0 (High-s peed)
CM5 = 0 (8 MHz oscillating)
CM4 = 1 (32 kHz oscillating)
High-speed mode (f(φ) = 4 MHz)
C
M7
=
1
(
3
2
k
H
z
s
e
l
e
c
t
e
d
)
C
M6
=
1
(
M
i
d
d
l
e
-
s
p
e
e
d
)
C
M5
=
0
(
8
M
H
z
o
s
c
i
l
l
a
t
i
n
g
)
C
M4
=
1
(
3
2
k
H
z
o
s
c
i
l
l
a
t
i
n
g
)
L
o
w
-
s
p
e
e
d
m
o
d
e
(
f
(φ)
=
1
6
k
H
z
)CM7 = 1 (32 kHz selected)
CM6 = 0 (High-s peed)
CM5 = 0 (8 MHz oscillating)
CM4 = 1 (32 kHz oscillating)
L
o
w
-
s
p
e
e
d
m
o
d
e
(
f
(φ)
=
1
6
k
H
z
)
C
M7
=
1
(
3
2
k
H
z
s
e
l
e
c
t
e
d
)
C
M6
=
1
(
M
i
d
d
l
e
-
s
p
e
e
d
)
C
M5
=
1
(
8
M
H
z
s
t
o
p
p
e
d
)
C
M4
=
1
(
3
2
k
H
z
o
s
c
i
l
l
a
t
i
n
g
)
L
o
w
-
s
p
e
e
d
m
o
d
e
(
f
(φ)
=
1
6
k
H
z
)C
M7=
1
(
3
2
k
H
z
s
e
l
e
c
t
e
d
)
C
M6=
0
(
H
i
g
h
-
s
p
e
e
d
)
C
M5=
1
(
8
M
H
z
s
t
o
p
p
e
d
)
C
M4=
1
(
3
2
k
H
z
o
s
c
i
l
l
a
t
i
n
g
)
L
o
w
-
s
p
e
e
d
m
o
d
e
(
f
(φ)
=
1
6
k
H
z
)
CM
6
0
1
CM
6
0
1
CM
6
0
1
C
M4
0
1
C
M7
0
1
C
M7
0
1
C
M5
0
1
C
M5
0
1
C
M
4
C
M
6
0
1
0
1
C
M4
C
M6
0
1
1
0
C
M
5
C
M
6
0
1
0
1
C
M5
C
M6
0
1
1
0
46
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
NOTES ON PROGRAMMING
Processor Status Register
The contents of the processor status register (PS) after a reset are
undefined, except for the interrupt disable flag (I) which is 1. Af-
ter a reset, initialize flags which affect program execution.
In particular, it is essential to initialize the index X mode (T) and
the decimal mode (D) flags because of their effect on calculations.
Interrupt
The contents of the interrupt request bits do not change immedi-
ately after they have been written. After writing to an interrupt
request register, execute at least one instruction before perform-
ing a BBC or BBS instruction.
Decimal Calculations
To calculate in decimal notation, set the decimal mode flag (D)
to 1, then execute an ADC or SBC instruction. After executing
an ADC or SBC instruction, execute at least one instruction be-
fore executing a SEC, CLC, or CLD instruction.
In decimal mode, the values of the negative (N), overflow (V),
and zero (Z) flags are invalid.
Timers
If a value n (between 0 and 255) is written to a timer latch, the fre-
quency division ratio is 1/(n + 1).
Multiplication and Division Instructions
The index mode (T) and the decimal mode (D) flags do not affect
the MUL and DIV instruction.
The execution of these instructions does not change the contents
of the processor status register.
Ports
The contents of the port direction registers cannot be read.
The following cannot be used:
The data transfer instruction (LDA, etc.)
The operation instruction when the index X mode flag (T) is 1
The addressing mode which uses the value of a direction regis-
ter as an index
The bit-test instruction (BBC or BBS, etc.) to a direction register
The read-modify-write instruction (ROR, CLB, or SEB, etc.) to a
direction register
Use instructions such as LDM and STA, etc., to set the port direc-
tion registers.
Serial I/O
In clock synchronous serial I/O, if the receive side is using an ex-
ternal clock and it is to output the SRDY signal, set the transmit
enable bit, the receive enable bit, and the SRDY output enable bit
to 1.
Serial I/O continues to output the final bit from the TXD pin after
transmission is completed.
A-D Converter
The comparator uses internal capacitors whose charge will be lost
if the clock frequency is too low.
Make sure that f(XIN) is at least 500 kHz during an A-D conver-
sion.
Do not execute the STP or WIT instruction during an A-D conver-
sion.
Instruction Execution Time
The instruction execution time is obtained by multiplying the fre-
quency of the internal clock φ by the number of cycles needed to
execute an instruction.
The number of cycles required to execute an instruction is shown
in the list of machine instructions.
The frequency of the internal clock φ is half of the XIN frequency.
47
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
NOTES ON USE
Countermeasures against noise
(1) Shortest wiring length
Wiring for RESET pin
Make the length of wiring which is connected to the RESET pin
as short as possible. Especially, connect a capacitor across the
RESET pin and the VSS pin with the shortest possible wiring
(within 20mm).
Reason
The width of a pulse input into the RESET pin is determined by
the timing necessary conditions. If noise having a shorter pulse
width than the standard is input to the RESET pin, the reset is
released before the internal state of the microcomputer is com-
pletely initialized. This may cause a program runaway. (2) Connection of bypass capacitor across VSS line and VCC line
In order to stabilize the system operation and avoid the latch-up,
connect an approximately 0.1
µ
F bypass capacitor across the VSS
line and the VCC line as follows:
• Connect a bypass capacitor across the VSS pin and the VCC pin
at equal length.
• Connect a bypass capacitor across the VSS pin and the VCC pin
with the shortest possible wiring.
• Use lines with a larger diameter than other signal lines for VSS
line and VCC line.
• Connect the power source wiring via a bypass capacitor to the
VSS pin and the VCC pin.
Wiring for clock input/output pins
• Make the length of wiring which is connected to clock I/O pins
as short as possible.
• Make the length of wiring (within 20 mm) across the grounding
lead of a capacitor which is connected to an oscillator and the
VSS pin of a microcomputer as short as possible.
• Separate the VSS pattern only for oscillation from other VSS
patterns.
Reason
If noise enters clock I/O pins, clock waveforms may be de-
formed. This may cause a program failure or program runaway.
Also, if a potential difference is caused by the noise between
the VSS level of a microcomputer and the VSS level of an oscil-
lator, the correct clock will not be input in the microcomputer.
RESET
Reset
circuit
Noise
V
SS
V
SS
Reset
circuit
V
SS
RESET
V
SS
N.G.
O.K.
Noise
X
IN
X
OUT
V
SS
X
IN
X
OUT
V
SS
N.G. O.K.
V
SS
V
CC
AA
AA
AA
AA
AA
AA
V
SS
V
CC
AA
AA
AA
AA
AA
AA
AA
AA
AA
N.G. O.K.
Fig. 47 Wiring for clock I/O pins
Fig. 46 Wiring for the RESET pin
Fig. 48 Bypass capacitor across the VSS line and the VCC line
48
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
(3) Oscillator concerns
In order to obtain the stabilized operation clock on the user system
and its condition, contact the oscillator manufacturer and select
the oscillator and oscillation circuit constants. Be careful espe-
cially when range of votage and temperature is wide.
Also, take care to prevent an oscillator that generates clocks for a
microcomputer operation from being affected by other signals.
Keeping oscillator away from large current signal lines
Install a microcomputer (and especially an oscillator) as far as
possible from signal lines where a current larger than the toler-
ance of current value flows.
Reason
In the system using a microcomputer, there are signal lines for
controlling motors, LEDs, and thermal heads or others. When a
large current flows through those signal lines, strong noise oc-
curs because of mutual inductance.
Installing oscillator away from signal lines where potential levels
change frequently
Install an oscillator and a connecting pattern of an oscillator
away from signal lines where potential levels change frequently.
Also, do not cross such signal lines over the clock lines or the
signal lines which are sensitive to noise.
Reason
Signal lines where potential levels change frequently (such as
the CNTR pin signal line) may affect other lines at signal rising
edge or falling edge. If such lines cross over a clock line, clock
waveforms may be deformed, which causes a microcomputer
failure or a program runaway.
Keeping oscillator away from large current signal lines
Installing oscillator away from signal lines where potential
levels change frequently
Fig. 50 Wiring for the VPP pin of One Time PROM
Fig. 49 Wiring for a large current signal line/
Wiring of signal
lines where potential levels change frequently
P4
0
/V
PP
V
SS
About 5k
(4) Analog input
The analog input pin is connected to the capacitor of a voltage
comparator. Accordingly, sufficient accuracy may not be obtained
by the charge/discharge current at the time of A-D conversion
when the analog signal source of high-impedance is connected to
an analog input pin. In order to obtain the A-D conversion result
stabilized more, please lower the impedance of an analog signal
source, or add the smoothing capacitor to an analog input pin.
(5) Difference of memory type and size
When Mask ROM and PROM version and memory size differ in
one group, actual values such as an electrical characteristics, A-D
conversion accuracy, and the amount of -proof of noise incorrect
operation may differ from the ideal values.
When these products are used switching, perform system evalua-
tion for each product of every after confirming product
specification.
(6) Wiring to VPP pin of One Time PROM version
Connect an approximately 5 k resistor to the VPP pin the
shortest possible in series and also to the VSS pin.
Note: Even when a circuit which included an approximately 5 k
resistor is used in the Mask ROM version, the microcomputer
operates correctly.
Reason
The VPP pin of the One Time PROM version is the power source
input pin for the built-in PROM. When programming in the built-in
PROM, the impedance of the VPP pin is low to allow the electric
current for writing flow into the built-in PROM. Because of this,
noise can enter easily. If noise enters the VPP pin, abnormal in-
struction codes or data are read from the built-in PROM, which
may cause a program runaway.
Electric Characteristic Differences Between
Mask ROM and One T ime PROM V ersion MCUs
There are differences in electric characteristics, operation margin,
noise immunity, and noise radiation between Mask ROM and
One T ime PROM version MCUs due to the dif ference in the manufac-
turing processes.
When manufacturing an application system with the One TIme PROM
version and then switching to use of the Mask ROM version,
please perform sufficient evaluations for the commercial
samples of the Mask ROM version.
XIN
XOUT
VSS
Microcomputer
Mutual inductance
Large
current
GND
M
XIN
XOUT
VSS
CNTR
Do not cross
N.G.
49
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
DATA REQUIRED FOR MASK ORDERS
The following are necessary when ordering a mask ROM produc-
tion:
1.Mask ROM Order Confirmation Form
2.Mark Specification Form
3.Data to be written to ROM, in EPROM form (three identical cop-
ies) or one floppy disk
For the mask ROM confirmation and the mark specifications, re-
fer to the Mitsubishi MCU Technical Information Homepage
(http://www.infomicom.maec.co.jp/).
ROM PROGRAMMING METHOD
The built-in PROM of the blank One Time PROM version and built-
in EPROM version can be read or programmed with a general-
purpose PROM programmer using a special programming
adapter. Set the address of PROM programmer in the user ROM
area.
Table 14 Programming adapter
The PROM of the blank One Time PROM version is not tested or
screened in the assembly process and following processes. To en-
sure proper operation after programming, the procedure shown in
Figure 51 is recommended to verify programming.
Fig. 51 Programming and testing of One Time PROM version
Package
80P6N-A
80P6S-A
80P6Q-A
80D0
Name of Programming Adapter
PCA4738F-80A
PCA4738G-80A
PCA4738H-80A
PCA4738L-80A
P
r
o
g
r
a
m
m
i
n
g
w
i
t
h
P
R
O
M
p
r
o
g
r
a
m
m
e
r
Screening (Caution)
(150°C for 40 hours)
V
e
r
i
f
i
c
a
t
i
o
n
w
i
t
h
P
R
O
M
p
r
o
g
r
a
m
m
e
r
F
u
n
c
t
i
o
n
a
l
c
h
e
c
k
i
n
t
a
r
g
e
t
d
e
v
i
c
e
The s cree ning tem per ature is far highe
r
than the storage temperature. Neve
r
expose to 150 °C exceeding 100 hours.
Caution :
50
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
VO
VO
Pd
Topr
Tstg
–0.3 to 7.0 VPower source voltage
Input voltage P00–P07, P10–P17, P20–P27,
P34–P37, P40–P47, P50–P57
P60–P67, P70, P71
VCC
VI
Symbol Parameter Conditions Ratings Unit
All voltages are based on VSS.
Output transistors are cut off.
VI
VI
VI
VI
VO
VO
VO
Input voltage VL1
Input voltage VL2
Input voltage VL3
Input voltage RESET, XIN
Output voltage P00–P07, P10–P17
Output voltage P34–P37
Output voltage P20–P27, P41–P47,P50–P57,
P60–P67, P70, P71
Output voltage SEG0–SEG11
Output voltage XOUT
Power dissipation
Operating temperature
Storage temperature
At output port
At segment output
At segment output
–0.3 to VCC +0.3
–0.3 to VL2
VL1 to VL3
VL2 to VCC +0.3
–0.3 to VCC +0.3
–0.3 to VCC +0.3
–0.3 to VL3+0.3
–0.3 to VL3+0.3
–0.3 to VCC +0.3
–0.3 to VL3+0.3
–0.3 to VCC +0.3
300
–20 to 85
–40 to 125
V
V
V
V
V
V
V
V
V
V
V
mW
°C
°C
Ta = 25°C
Table 16 Recommended operating conditions (Standard, One Time PROM version)
(VCC = 2.5 to 5.5 V, Ta = –20 to 85 °C, unless otherwise noted)
Power source voltage
A-D conversion reference voltage
Analog power source voltage
Analog input voltage AN 0–AN7
“H” input voltage P00–P07, P10–P17,P34–P37, P40, P41, P45, P47, P52, P53,
P56,P60–P67,P70,P71 (CM4= 0)
“H” input voltage P20–P27, P42–P44,P46,P50, P51, P54, P55, P57
“H” input voltage RESET
“H” input voltage XIN
“L” input voltage P00–P07, P10–P17,P34–P37, P40, P41, P45, P47, P52, P53,
P56,P60–P67,P70,P71 (CM4= 0)
“L” input voltage P20–P27, P42–P44,P46,P50, P51, P54, P55, P57
“L” input voltage RESET
“L” input voltage XIN
5.5
5.5
5.5
VCC
VCC
VCC
VCC
VCC
VCC
0.3 VCC
0.2 VCC
0.2 VCC
0.2 VCC
VCC
VSS
VREF
AVSS
VIA
VIH
VIH
VIH
VIH
VIL
VIL
VIL
VIL
Symbol Parameter Limits
Min.
V
V
V
V
V
V
V
V
V
V
V
V
V
Unit
4.0
2.5
2.5
2.0
AVSS
0.7VCC
0.8VCC
0.8VCC
0.8VCC
0
0
0
0
5.0
5.0
5.0
0
0
Typ. Max.
Power source voltage High-speed mode f(XIN) = 8 MHz
Middle-speed mode f(XIN) = 8 MHz
Low-speed mode
Table 15 Absolute maximum ratings (Standard, One Time PROM version)
51
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17 (Note 2)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 2)
P00–P07, P10–P17 (Note 2)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 2)
P00–P07, P10–P17 (Note 3)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 3)
P00–P07, P10–P17 (Note 3)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 3)
–40
–40
40
40
–20
–20
20
20
–2
–5
(VCC = 2.5 to 5.5 V, Ta = –20 to 85 °C, unless otherwise noted)
Notes 1: The total output current is the sum of all the currents flowing through all the applicable ports. The total average current is an average value mea-
sured over 100 ms. The total peak current is the peak value of all the currents.
2: The peak output current is the peak current flowing in each port.
3: The average output current is an average value measured over 100 ms.
4: When the oscillation frequency has a duty cycle of 50 %.
5: When using the microcomputer in low-speed mode, make sure that the sub-clock input oscillation frequency on condition that f(XCIN) < f(XIN)/3.
“H” total peak output current
“H” total peak output current
“L” total peak output current
“L” total peak output current
“H” total average output current
“H” total average output current
“L” total average output current
“L” total average output current
“H” peak output current
“H” peak output current
ΣIOH(peak)
ΣIOH(peak)
ΣIOL(peak)
ΣIOL(peak)
ΣIOH(avg)
ΣIOH(avg)
ΣIOL(avg)
ΣIOL(avg)
IOH(peak)
IOH(peak)
Symbol Parameter Limits
Min. mA
mA
mA
mA
mA
mA
mA
mA
mA
mA
Unit
Typ. Max.
IOL(peak)
IOL(peak)
IOH(avg)
IOH(avg)
IOL(avg)
5
10
–1.0
–2.5
mA
mA
mA
mA
mA
mA
“L” peak output current
“L” peak output current
2.5
5.0
4.0
(2VCC)-4
8.0
(4VCC)-8
8.0
50
“H” average output current
“H” average output current
“L” average output current
“L” average output current
Input frequency for timers X and Y
(duty cycle 50%)
IOL(avg)
f(CNTR0)
f(CNTR1)MHz
MHz
MHz
MHz
MHz
kHz
(4.0 V VCC 5.5 V)
(2.5 V VCC 4.0 V)
32.768
High-speed mode
(4.0 V VCC 5.5 V)
High-speed mode
(2.5 V VCC 4.0 V)
Middle-speed mode
Main clock input oscillation frequency
(Note 4)
Sub-clock input oscillation frequency (Notes 4, 5)
f(XIN)
f(XCIN)
Table 17 Recommended operating conditions (Standard, One Time PROM version)
52
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
IOL = 10 mA
IOL = 2.5 mA
IOL = 2.5 mA
VCC = 2.5 V
IOL = 5 mA
IOL = 1.25 mA
IOL = 1.25 mA
VCC = 2.5 V
VOL
IOH = –2.5 mA
IOH = –0.6 mA
VCC = 2.5 V
IOH = –5 mA
IOH = –1.25 mA
IOH = –1.25 mA
VCC = 2.5 V
VVCC–2.0
“H” output voltage
P00–P07, P10–P17
Symbol Parameter Limits
Min. Unit
0.5
Typ. Max.
Test conditions
VOH
2.0
0.5
(VCC =4.0 to 5.5 V, Ta = –20 to 85°C, unless otherwise noted)
RESET : VCC = 2.5 V to 5.5 V
VI = VCC
Pull-downs “off”
VCC = 5 V, VI = VCC
Pull-downs “on”
VCC = 3 V, VI = VCC
Pull-downs “on”
VI = VCC
“H” output voltage
P20–P27, P41–P47, P50–P57, P60–P67,
P70, P71 (Note)
“L” output voltage
P00–P07, P10–P17
“L” output voltage
P20–P27, P41–P47, P50–P57, P60–P67,
P70, P71 (Note)
Hysteresis
INT0–INT3, ADT, CNTR0, CNTR1, P20–P27
Hysteresis SCLK, RXD
Hysteresis RESET
“H” input current
P00–P07, P10–P17, P34–P37
“H” input current
P20–P27, P40–P47, P50–P57, P60–P67,
P70, P71 (Note)
VOH
VOL
VT+ – VT–
VT+ – VT–
VT+ – VT–
IIH
IIH
IIH
VCC–2.0
VCC–0.5
30
6.0
–30
–6.0
0.5
0.5
70
2.0
0.5
45
140
5.0
5.0
–5.0
–5.0
–140
–45
V
V
V
V
V
V
V
V
V
IIH
IIL
VCC–1.0
VCC–1.0
V
V
V1.0
V1.0
5.0 µA
25
VI = VCC
VI = VCC
VI = VSS
VI = VSS
Pull-ups “off”
VCC = 5 V, VI = VSS
Pull-ups “on”
VCC = 3 V, VI = VSS
Pull-ups “on”
VI = VSS
VI = VSS
“H” input current RESET
“H” input current XIN
“L” input current
P00–P07, P10–P17, P34–P37,P40
“L” input current
P20–P27, P41–P47, P50–P57, P60–P67,
P70, P71 (Note)
“L” input current RESET
“L” input current XIN
4.0
–5.0
–70
µA
µA
µA
µA
µA
µA
µA
µA
µA
µA
µA
IIL
IIL
IIL
–25
–4.0
Note: When “1” is set to port XC switch bit (bit 4 at address 003B16) of the CPU mode register, the drive ability of port P70 is different from the value above
mentioned.
Table 18 Electrical characteristics (Standard, One Time PROM version)
53
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
(VCC = 2.5 to 5.5 V, Ta = –20 to 85 °C, unless otherwise noted)
V
5.5
High-speed mode, VCC = 5 V
f(XIN) = 8 MHz
f(XCIN) = 32.768 kHz
Output transistors “off”
A-D converter in operating
High-speed mode, VCC = 5 V
f(XIN) = 8 MHz (in WIT state)
f(XCIN) = 32.768 kHz
Output transistors “off”
A-D converter stopped
Low-speed mode, VCC = 5 V, Ta 55°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz
Output transistors “off”
Low-speed mode, VCC = 5 V, Ta = 25°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz (in WIT state)
Output transistors “off”
Low-speed mode, VCC = 3 V, Ta 55°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz
Output transistors “off”
Low-speed mode, VCC = 3 V, Ta = 25°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz (in WIT state)
Output transistors “off”
All oscillation stopped
(in STP state)
Output transistors “off”
Symbol Parameter Limits
Min. Unit
Typ. Max.
Ta = 25 °C
Ta = 85 °C
Test conditions
ICC Power source current
6.4
VRAM RAM retention voltage At clock stop mode 2.0
1.6
25
7.0
15
4.5
0.1
3.2
36
14
22
9.0
1.0
10
mA
µA
µA
µA
µA
µA
mA
13
(VCC = 4.0 to 5.5 V, VSS = 0 V, Ta = –20 to 85 °C, 4 MHz f(XIN) 8 MHz, middle-/high-speed mode, unless otherwise noted)
Symbol Parameter Limits
Min. Unit
Typ. Max.
Test conditions
Resolution
Absolute accuracy
(excluding quantization error) VCC = VREF = 5V
f(XIN) = 8 MHz
VREF = 5 V 12
Bits
LSB
35
150
8
±2
Note: When an internal trigger is used in middle-speed mode, it is 14 µs.
µsConversion time
Ladder resistor
Reference power source input current
tCONV
RLADDER
IVREF
k
µA
Analog port input currentIIA µA
12.5
(Note)
100
200
5.0
50
Table 19 Electrical characteristics (Standard, One Time PROM version)
Table 20 A-D converter characteristics (Standard, One Time PROM version)
54
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
(VCC = 4.0 to 5.5 V, VSS = 0 V, Ta = –20 to 85 °C, unless otherwise noted)
2
125
45
40
250
105
105
80
80
800
370
370
220
100
Note: When bit 6 of address 001A16 is “1” (clock synchronous).
Divide this value by four when bit 6 of address 001A16 is “0” (UART).
Reset input “L” pulse width
Main clock input cycle time (XIN input)
Main clock input “H” pulse width
Main clock input “L” pulse width
CNTR0, CNTR1 input cycle time
CNTR0, CNTR1 input “H” pulse width
CNTR0, CNTR1 input “L” pulse width
INT0 to INT3 input “H” pulse width
INT0 to INT3 input “L” pulse width
Serial I/O clock input cycle time (Note)
Serial I/O clock input “H” pulse width (Note)
Serial I/O clock input “L” pulse width (Note)
Serial I/O input set up time
Serial I/O input hold time
tw(RESET)
tc(XIN)
twH(XIN)
twL(XIN)
tc(CNTR)
twH(CNTR)
twL(CNTR)
twH(INT)
twL(INT)
tc(SCLK)
twH(SCLK)
twL(SCLK)
t
su(R
X
D–S
CLK
)
th(SCLK–RXD)
Symbol Parameter Limits
Min. µs
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
Unit
Typ. Max.
(VCC = 2.5 to 4.0 V, VSS = 0 V, Ta = –20 to 85 °C, unless otherwise noted)
2
125
45
40
500/(VCC-2)
250/(VCC-2)-20
250/(VCC-2)-20
230
230
2000
950
950
400
200
Reset input “L” pulse width
Main clock input cycle time (XIN input)
Main clock input “H” pulse width
Main clock input “L” pulse width
CNTR0, CNTR1 input cycle time
CNTR0, CNTR1 input “H” pulse width
CNTR0, CNTR1 input “L” pulse width
INT0 to INT3 input “H” pulse width
INT0 to INT3 input “L” pulse width
Serial I/O clock input cycle time (Note)
Serial I/O clock input “H” pulse width (Note)
Serial I/O clock input “L” pulse width (Note)
Serial I/O input set up time
Serial I/O input hold time
tw(RESET)
tc(XIN)
twH(XIN)
twL(XIN)
tc(CNTR)
twH(CNTR)
twL(CNTR)
twH(INT)
twL(INT)
tc(SCLK)
twH(SCLK)
twL(SCLK)
t
su(R
X
D–S
CLK
)
th(SCLK–RXD)
Symbol Parameter Limits
Min. µs
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
Unit
Typ. Max.
Note: When bit 6 of address 001A16 is “1” (clock synchronous).
Divide this value by four when bit 6 of address 001A16 is “0” (UART).
Table 21 Timing requirements 1 (Standard, One Time PROM version)
Table 22 Timing requirements 2 (Standard, One Time PROM version)
55
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
(VCC = 4.0 to 5.5 V, VSS = 0 V, Ta = –20 to 85 °C, unless otherwise noted)
Notes 1: When the P45/TXD P-channel output disable bit of the UART control register (bit 4 of address 001B16) is “0”.
2: XOUT and XCOUT pins are excluded.
Serial I/O clock output “H” pulse width
Serial I/O clock output “L” pulse width
Serial I/O output delay time (Note 1)
Serial I/O output valid time (Note 1)
Serial I/O clock output rising time
Serial I/O clock output falling time
CMOS output rising time (Note 2)
CMOS output falling time (Note 2)
140
30
30
30
30
Symbol Parameter Limits
Min. ns
ns
ns
ns
ns
ns
ns
ns
Unit
tC (SCLK)/2–30
tC (SCLK)/2–30
–30
10
10
Typ. Max.
twH(SCLK)
twL(SCLK)
td(SCLK–TXD)
tv(SCLK–TXD)
tr(SCLK)
tf(SCLK)
tr(CMOS)
tf(CMOS)
(VCC = 2.5 to 4.0 V, VSS = 0 V, Ta = –20 to 85 °C, unless otherwise noted)
ns
ns
ns
ns
ns
ns
ns
ns
Unit
Notes 1: When the P45/TXD P-channel output disable bit of the UART control register (bit 4 of address 001B16) is “0”.
2: XOUT and XCOUT pins are excluded.
Serial I/O clock output “H” pulse width
Serial I/O clock output “L” pulse width
Serial I/O output delay time (Note 1)
Serial I/O output valid time (Note 1)
Serial I/O clock output rising time
Serial I/O clock output falling time
CMOS output rising time (Note 2)
CMOS output falling time (Note 2)
350
50
50
50
50
Symbol Parameter Limits
Min.
tC (SCLK)/2–50
tC (SCLK)/2–50
–30
20
20
Max.
twH(SCLK)
twL(SCLK)
td(SCLK–TXD)
tv(SCLK–TXD)
tr(SCLK)
tf(SCLK)
tr(CMOS)
tf(CMOS)
Typ.
Table 23 Switching characteristics 1 (Standard, One Time PROM version)
Table 24 Switching characteristics 2 (Standard, One Time PROM version)
56
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Power source voltage
A-D conversion reference voltage
Analog power source voltage
Analog input voltage AN0–AN7
“H” input voltage P00–P07, P10–P17,P34–P37, P40, P41, P45, P47, P52, P53,
P56,P60–P67,P70,P71 (CM4 = 0)
“H” input voltage P20–P27, P42–P44,P46,P50, P51, P54, P55, P57
“H” input voltage RESET
“H” input voltage XIN
“L” input voltage P00–P07, P10–P17,P34–P37, P40, P41, P45, P47, P52, P53,
P56,P60–P67,P70,P71 (CM4 = 0)
“L” input voltage P20–P27, P42–P44,P46,P50, P51, P54, P55, P57
“L” input voltage RESET
“L” input voltage XIN
VO
VO
Pd
Topr
Tstg
–0.3 to 6.5 VPower source voltage
Input voltage P00–P07, P10–P17, P20–P27,
P34–P37, P40–P47, P50–P57
P60–P67, P70, P71
VCC
VI
Symbol Parameter Conditions Ratings Unit
All voltages are based on VSS.
Output transistors are cut off.
VI
VI
VI
VI
VO
VO
VO
Input voltage VL1
Input voltage VL2
Input voltage VL3
Input voltage RESET, XIN
Output voltage P00–P07, P10–P17
Output voltage P34–P37
Output voltage P20–P27, P41–P47,P50–P57,
P60–P67, P70, P71
Output voltage SEG0–SEG11
Output voltage XOUT
Power dissipation
Operating temperature
Storage temperature
At output port
At segment output
At segment output
–0.3 to VCC +0.3
–0.3 to VL2
VL1 to VL3
VL2 to VCC +0.3
–0.3 to VCC +0.3
–0.3 to VCC +0.3
–0.3 to VL3
–0.3 to VL3
–0.3 to VCC +0.3
–0.3 to VL3
–0.3 to VCC +0.3
300
–40 to 85
–65 to 150
V
V
V
V
V
V
V
V
V
V
V
mW
°C
°C
Ta = 25°C
Table 26 Recommended operating conditions (Extended operating temperature version)
(VCC = 2.0 to 5.5 V, Ta = –20 to 85 °C, and VCC = 3.0 to 5.5 V, Ta = –40 to –20°C, unless otherwise noted)
5.5
5.5
5.5
5.5
5.5
VCC
VCC
VCC
VCC
VCC
VCC
0.3 VCC
0.2 VCC
0.2 VCC
0.2 VCC
VCC
VSS
VREF
AVSS
VIA
VIH
VIH
VIH
VIH
VIL
VIL
VIL
VIL
Symbol Parameter Limits
Min.
V
V
V
V
V
V
V
V
V
V
V
V
V
Unit
4.0
2.0
3.0
2.0
3.0
2.0
AVSS
0.7VCC
0.8VCC
0.8VCC
0.8VCC
0
0
0
0
5.0
5.0
5.0
5.0
5.0
0
0
Typ. Max.
Power source voltage
High-speed mode f(XIN) = 8 MHz
Middle-speed mode Ta = 20 to 85°C
f(XIN) = 8 MHz Ta = 40 to 20°C
Low-speed mode Ta = 20 to 85°C
Ta = 40 to 20°C
Table 25 Absolute maximum ratings (Extended operating temperature version)
57
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17 (Note 2)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 2)
P00–P07, P10–P17 (Note 2)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 2)
P00–P07, P10–P17 (Note 3)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 3)
P00–P07, P10–P17 (Note 3)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 3)
–40
–40
40
40
–20
–20
20
20
–2
–5
Table 27 Recommended operating conditions (Extended operating temperature version)
(VCC = 2.0 to 5.5 V, Ta = –20 to 85 °C, and VCC = 3.0 to 5.5 V, Ta = –40 to –20° C, unless otherwise noted)
Notes 1: The total output current is the sum of all the currents flowing through all the applicable ports. The total average current is an average value mesured
over 100 ms. The total peak current is the peak value of all the currents.
2: The peak output current is the peak current flowing in each port.
3: The average output current is an average value measured over 100 ms.
4: When the oscillation frequency has a duty cycle of 50 %.
5: When using the microcomputer in low-speed mode, make sure that the sub-clock input oscillation frequency on condition that f(XCIN) < f(XIN)/3.
“H” total peak output current
“H” total peak output current
“L” total peak output current
“L” total peak output current
“H” total average output current
“H” total average output current
“L” total average output current
“L” total average output current
“H” peak output current
“H” peak output current
ΣIOH(peak)
ΣIOH(peak)
ΣIOL(peak)
ΣIOL(peak)
ΣIOH(avg)
ΣIOH(avg)
ΣIOL(avg)
ΣIOL(avg)
IOH(peak)
IOH(peak)
Symbol Parameter Limits
Min. mA
mA
mA
mA
mA
mA
mA
mA
mA
mA
Unit
Typ. Max.
IOL(peak)
IOL(peak)
IOH(avg)
IOH(avg)
IOL(avg)
5
10
–1.0
–2.5
mA
mA
mA
mA
mA
mA
“L” peak output current
“L” peak output current
2.5
5.0
4.0
VCC
8.0
2VCC
8.0
50
“H” average output current
“H” average output current
“L” average output current
“L” average output current
Input frequency for timers X and Y
(duty cycle 50%)
IOL(avg)
f(CNTR0)
f(CNTR1)MHz
MHz
MHz
MHz
MHz
kHz
(4.0 V VCC 5.5 V)
(2.0 V VCC 4.0 V)
32.768
High-speed mode
(4.0 V VCC 5.5 V)
High-speed mode
(2.0 V VCC 4.0 V)
Middle-speed mode
Main clock input oscillation frequency
(Note 4)
Sub-clock input oscillation frequency (Notes 4, 5)
f(XIN)
f(XCIN)
58
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Table 28 Electrical characteristics (Extended operating temperature version)
(VCC =2.0 to 5.5 V, Ta = –20 to 85 °C, and VCC = 3.0 to 5.5 V, Ta = –40 to –20 °C, unless otherwise noted)
IOL = 10 mA
IOL = 2.5 mA
IOL = 2.5 mA
VCC = 3.0 V
IOL = 5 mA
IOL = 1.25 mA
IOL = 1.25 mA
VCC = 3.0 V
VOL
IOH = –2.5 mA
IOH = –0.6 mA
VCC = 3.0 V
IOH = –5 mA
IOH = –1.25 mA
IOH = –1.25 mA
VCC = 3.0 V
VVCC–2.0
“H” output voltage
P00–P07, P10–P17
Symbol Parameter Limits
Min. Unit
0.5
Typ. Max.
Test conditions
VOH
2.0
0.5
RESET : VCC = 2.0 V to 5.5 V
VI = VCC
Pull-downs “off”
VCC = 5 V, VI = VCC
Pull-downs “on”
VCC = 3 V, VI = VCC
Pull-downs “on”
VI = VCC
“H” output voltage
P20–P27, P41–P47, P50–P57, P60–P67,
P70, P71 (Note)
“L” output voltage
P00–P07, P10–P17
“L” output voltage
P20–P27, P41–P47, P50–P57, P60–P67,
P70, P71 (Note)
Hysteresis
INT0–INT3, ADT, CNTR0, CNTR1, P20–P27
Hysteresis SCLK, RXD
Hysteresis RESET
“H” input current
P00–P07, P10–P17, P34–P37
“H” input current
P20–P27, P40–P47, P50–P57, P60–P67,
P70, P71 (Note)
VOH
VOL
VT+ – VT–
VT+ – VT–
VT+ – VT–
IIH
IIH
IIH
VCC–2.0
VCC–0.5
30
6.0
–30
–6.0
0.5
0.5
70
2.0
0.5
55
170
5.0
5.0
–5.0
–5.0
–140
–45
V
V
V
V
V
V
V
V
V
IIH
IIL
VCC–0.9
VCC–0.9
V
V
V1.1
V1.1
5.0 µA
25
VI = VCC
VI = VCC
VI = VSS
VI = VSS
Pull-ups “off”
VCC = 5 V, VI = VSS
Pull-ups “on”
VCC = 3 V, VI = VSS
Pull-ups “on”
VI = VSS
VI = VSS
“H” input current RESET
“H” input current XIN
“L” input current
P00–P07, P10–P17, P34–P37,P40
“L” input current
P20–P27, P41–P47, P50–P57, P60–P67,
P70, P71 (Note)
“L” input current RESET
“L” input current XIN
4.0
–5.0
–70
µA
µA
µA
µA
µA
µA
µA
µA
µA
µA
µA
IIL
IIL
IIL
–25
–4.0
Note: When “1” is set to port XC switch bit (bit 4 at address 003B16) of CPU mode register, the drive ability of port P70 is different from the value above men-
tioned.
59
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Table 29 Electrical characteristics (Extended operating temperature version)
(VCC =2.0 to 5.5 V, Ta = –20 to 85 °C, and VCC = 3.0 to 5.5 V, Ta = –40 to –20 °C, unless otherwise noted)
V
5.5
High-speed mode, VCC = 5 V
f(XIN) = 8 MHz
f(XCIN) = 32.768 kHz
Output transistors “off”
A-D converter in operating
High-speed mode, VCC = 5 V
f(XIN) = 8 MHz (in WIT state)
f(XCIN) = 32.768 kHz
Output transistors “off”
A-D converter stopped
Low-speed mode, VCC = 5 V, Ta 55°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz
Output transistors “off”
Low-speed mode, VCC = 5 V, Ta = 25°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz (in WIT state)
Output transistors “off”
Low-speed mode, VCC = 3 V, Ta 55°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz
Output transistors “off”
Low-speed mode, VCC = 3 V, Ta = 25°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz (in WIT state)
Output transistors “off”
All oscillation stopped
(in STP state)
Output transistors “off”
Symbol Parameter Limits
Min. Unit
Typ. Max.
Ta = 25 °C
Ta = 85 °C
Test conditions
ICC Power source current
6.4
VRAM RAM retention voltage At clock stop mode 2.0
1.6
25
7.0
15
4.5
0.1
3.2
36
14
22
9.0
1.0
10
mA
µA
µA
µA
µA
µA
mA
13
Table 30 A-D converter characteristics (Extended operating temperature version)
(VCC = 3.0 to 5.5 V, VSS =AVSS = 0 V, Ta = –40 to 85 °C, 4 MHz f(XIN) 8 MHz, in middle/high-speed mode unless otherwise noted)
Symbol Parameter Limits
Min. Unit
Typ. Max.
Test conditions
Resolution
Absolute accuracy
(excluding quantization error) VCC = VREF = 4.0V to 5.5V
f(XIN) = 8 MHz
VCC = VREF = 3.0 V to 4.0V
f(XIN) = 2 VCC MHz
12
Bits
LSB
8
±2
Note: When an internal trigger is used in middle-speed mode, it is 14 µs.
µs
f(XIN) = 8 MHz
Conversion time
Ladder resistor
Reference power source input current
tCONV
RLADDER
IVREF
k
µA
Analog port input currentIIA µA
35
150
VREF = 5 V
12.5
(Note)
100
200
5.0
50
60
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Table 31 Timing requirements 1 (Extended operating temperature version)
(VCC = 4.0 to 5.5 V, VSS = 0 V, Ta = –40 to 85 °C, unless otherwise noted)
2
125
45
40
250
105
105
80
80
800
370
370
220
100
Note: When bit 6 of address 001A16 is “1” (clock synchronous).
Divide this value by four when bit 6 of address 001A16 is “0” (UART).
Reset input “L” pulse width
Main clock input cycle time (XIN input)
Main clock input “H” pulse width
Main clock input “L” pulse width
CNTR0, CNTR1 input cycle time
CNTR0, CNTR1 input “H” pulse width
CNTR0, CNTR1 input “L” pulse width
INT0 to INT3 input “H” pulse width
INT0 to INT3 input “L” pulse width
Serial I/O clock input cycle time (Note)
Serial I/O clock input “H” pulse width (Note)
Serial I/O clock input “L” pulse width (Note)
Serial I/O input set up time
Serial I/O input hold time
tw(RESET)
tc(XIN)
twH(XIN)
twL(XIN)
tc(CNTR)
twH(CNTR)
twL(CNTR)
twH(INT)
twL(INT)
tc(SCLK)
twH(SCLK)
twL(SCLK)
t
su(R
X
D–S
CLK
)
th(SCLK–RXD)
Symbol Parameter Limits
Min. µs
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
Unit
Typ. Max.
Table 32 Timing requirements 2 (Extended operating temperature version)
(VCC = 2.0 to 4.0 V, VSS = 0 V, Ta = –20 to 85 °C, and VCC = 3.0 to 4.0 V, Ta = –40 to –20 °C, unless otherwise noted)
2
125
45
40
900/(VCC–0.4)
450/(VCC–0.4)–20
450/(VCC–0.4)–20
230
230
2000
950
950
400
200
Reset input “L” pulse width
Main clock input cycle time (XIN input)
Main clock input “H” pulse width
Main clock input “L” pulse width
CNTR0, CNTR1 input cycle time
CNTR0, CNTR1 input “H” pulse width
CNTR0, CNTR1 input “L” pulse width
INT0 to INT3 input “H” pulse width
INT0 to INT3 input “L” pulse width
Serial I/O clock input cycle time (Note)
Serial I/O clock input “H” pulse width (Note)
Serial I/O clock input “L” pulse width (Note)
Serial I/O input set up time
Serial I/O input hold time
tw(RESET)
tc(XIN)
twH(XIN)
twL(XIN)
tc(CNTR)
twH(CNTR)
twL(CNTR)
twH(INT)
twL(INT)
tc(SCLK)
twH(SCLK)
twL(SCLK)
t
su(R
X
D–S
CLK
)
th(SCLK–RXD)
Symbol Parameter Limits
Min. µs
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
Unit
Max.
Note: When bit 6 of address 001A16 is “1” (clock synchronous).
Divide this value by four when bit 6 of address 001A16 is “0” (UART).
Typ.
61
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Table 33 Switching characteristics 1 (Extended operating temperature version)
(VCC = 4.0 to 5.5 V, VSS = 0 V, Ta = –40 to 85 °C, unless otherwise noted)
Notes 1: When the P45/TXD P-channel output disable bit of the UART control register (bit 4 of address 001B16) is “0”.
2: XOUT and XCOUT pins are excluded.
Serial I/O clock output “H” pulse width
Serial I/O clock output “L” pulse width
Serial I/O output delay time (Note 1)
Serial I/O output valid time (Note 1)
Serial I/O clock output rising time
Serial I/O clock output falling time
CMOS output rising time (Note 2)
CMOS output falling time (Note 2)
140
30
30
30
30
Symbol Parameter Limits
Min. ns
ns
ns
ns
ns
ns
ns
ns
Unit
tC (SCLK)/2–30
tC (SCLK)/2–30
–30
10
10
Typ. Max.
twH(SCLK)
twL(SCLK)
td(SCLK–TXD)
tv(SCLK–TXD)
tr(SCLK)
tf(SCLK)
tr(CMOS)
tf(CMOS)
Table 34 Switching characteristics 2 (Extended operating temperature version)
(VCC = 2.0 to 4.0 V, VSS = 0 V, Ta = –20 to 85 °C, and VCC = 3.0 to 4.0 V, VSS = 0 V, Ta = –40 to –20 °C, unless otherwise noted)
ns
ns
ns
ns
ns
ns
ns
ns
Unit
Notes 1: When the P45/TXD P-channel output disable bit of the UART control register (bit 4 of address 001B16) is “0”.
2: XOUT and XCOUT pins are excluded.
Serial I/O clock output “H” pulse width
Serial I/O clock output “L” pulse width
Serial I/O output delay time (Note 1)
Serial I/O output valid time (Note 1)
Serial I/O clock output rising time
Serial I/O clock output falling time
CMOS output rising time (Note 2)
CMOS output falling time (Note 2)
350
50
50
50
50
Symbol Parameter Limits
Min.
tC (SCLK)/2–50
tC (SCLK)/2–50
–30
20
20
Max.
twH(SCLK)
twL(SCLK)
td(SCLK–TXD)
tv(SCLK–TXD)
tr(SCLK)
tf(SCLK)
tr(CMOS)
tf(CMOS)
Typ.
62
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
VO
VO
Pd
Topr
Tstg
–0.3 to 7.0 VPower source voltage
Input voltage P00–P07, P10–P17, P20–P27,
P34–P37, P40–P47, P50–P57
P60–P67, P70, P71
VCC
VI
Symbol Parameter Conditions Ratings Unit
All voltages are based on VSS.
Output transistors are cut off.
VI
VI
VI
VI
VO
VO
VO
Input voltage VL1
Input voltage VL2
Input voltage VL3
Input voltage RESET, X IN
Output voltage P00–P07, P10–P17
Output voltage P34–P37
Output voltage P20–P27, P41–P47,P50–P57,
P60–P67, P70, P71
Output voltage SEG0–SEG11
Output voltage XOUT
Power dissipation
Operating temperature
Storage temperature
At output port
At segment output
At segment output
–0.3 to VCC +0.3
–0.3 to VL2
VL1 to VL3
VL2 to VCC +0.3
–0.3 to VCC +0.3
–0.3 to VCC +0.3
–0.3 to VL3 +0.3
–0.3 to VL3 +0.3
–0.3 to VCC +0.3
–0.3 to VL3 +0.3
–0.3 to VCC +0.3
300
–20 to 85
–40 to 150
V
V
V
V
V
V
V
V
V
V
V
mW
°C
°C
Ta = 25°C
(VCC = 2.2 to 5.5 V, Ta = –20 to 85 °C, unless otherwise noted)
Power source voltage
A-D conversion reference voltage
Analog power source voltage
Analog input voltage AN0–AN7
5.5
5.5
5.5
VCC
VCC
VCC
VSS
VREF
AVSS
VIA
Symbol Parameter Limits
Min.
V
V
V
V
V
Unit
4.0
2.2
2.2
2.0
AVSS
5.0
5.0
5.0
0
0
Typ. Max.
Power source voltage High-speed mode f(XIN) = 8 MHz
Middle-speed mode f(XIN) = 8 MHz
Low-speed mode
Table 35 Absolute maximum ratings (M version)
Table 36 Recommended operating conditions (M version)
63
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
(VCC = 2.5 to 5.5 V, Ta = –20 to 85 °C, unless otherwise noted)
“H” input voltage P00–P07, P10–P17,P34–P37, P40, P41, P45, P47,
P52, P53,P56,P60–P67,P70,P71 (CM4= 0)
“H” input voltage P20–P27, P42–P44,P46,P50, P51, P54, P55, P57
“H” input voltage RESET
“H” input voltage XIN
“L” input voltage P00–P07, P10–P17,P34–P37, P40, P41, P45, P47, P52, P53,
P56,P60–P67,P70,P71 (CM4= 0)
“L” input voltage P20–P27, P42–P44,P46,P50, P51, P54, P55, P57
“L” input voltage RESET
“L” input voltage XIN
VCC
VCC
VCC
VCC
0.3 VCC
0.2 VCC
0.2 VCC
0.2 VCC
VIH
VIH
VIH
VIH
VIL
VIL
VIL
VIL
Symbol Parameter Limits
Min. V
V
V
V
V
V
V
V
Unit
0.7VCC
0.8VCC
0.8VCC
0.8VCC
0
0
0
0
Typ. Max.
(VCC = 2.2 to 5.5 V, Ta = –20 to 85 °C, unless otherwise noted)
“H” input voltage P00–P07, P10–P17,P34–P37, P40, P41, P45, P47,
P52, P53,P56,P60–P67,P70,P71 (CM4= 0)
“H” input voltage P20–P27, P42–P44,P46,P50, P51, P54, P55, P57
“H” input voltage RESET
“H” input voltage XIN
“L” input voltage P00–P07, P10–P17,P34–P37, P40, P41, P45, P47, P52, P53,
P56,P60–P67,P70,P71 (CM4= 0)
“L” input voltage P20–P27, P42–P44,P46,P50, P51, P54, P55, P57
“L” input voltage RESET
“L” input voltage XIN
VCC
VCC
VCC
VCC
0.2 VCC
0.05 VCC
0.05 VCC
0.05 VCC
VIH
VIH
VIH
VIH
VIL
VIL
VIL
VIL
Symbol Parameter Limits
Min. V
V
V
V
V
V
V
V
Unit
0.8VCC
0.95VCC
0.95VCC
0.95VCC
0
0
0
0
Typ. Max.
Table 37 Recommended operating conditions (M version)
Table 38 Recommended operating conditions (M version)
64
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17 (Note 2)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 2)
P00–P07, P10–P17 (Note 2)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 2)
P00–P07, P10–P17 (Note 3)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 3)
P00–P07, P10–P17 (Note 3)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 3)
–40
–40
40
40
–20
–20
20
20
–2
–5
(VCC = 2.2 to 5.5 V, Ta = –20 to 85 °C, unless otherwise noted)
Notes 1: The total output current is the sum of all the currents flowing through all the applicable ports. The total average current is an average value
measured over 100 ms. The total peak current is the peak value of all the currents.
2: The peak output current is the peak current flowing in each port.
3: The average output current is an average value measured over 100 ms.
4: When the oscillation frequency has a duty cycle of 50%.
5: When using the microcomputer in low-speed mode, make sure that the sub-clock input oscillation frequency on condition that f(XCIN) < f(XIN)/3.
“H” total peak output current
“H” total peak output current
“L” total peak output current
“L” total peak output current
“H” total average output current
“H” total average output current
“L” total average output current
“L” total average output current
“H” peak output current
“H” peak output current
ΣIOH(peak)
ΣIOH(peak)
ΣIOL(peak)
ΣIOL(peak)
ΣIOH(avg)
ΣIOH(avg)
ΣIOL(avg)
ΣIOL(avg)
IOH(peak)
IOH(peak)
Symbol Parameter Limits
Min. mA
mA
mA
mA
mA
mA
mA
mA
mA
mA
Unit
Typ. Max.
IOL(peak)
IOL(peak)
IOH(avg)
IOH(avg)
IOL(avg)
5
10
–1.0
–2.5
mA
mA
mA
mA
mA
mA
“L” peak output current
“L” peak output current
“H” average output current
“H” average output current
“L” average output current
“L” average output current
Input frequency for timers X and Y
(duty cycle 50%)
IOL(avg)
f(CNTR0)
f(CNTR1)MHz
MHz
MHz
MHz
MHz
kHz
(4.0 V VCC 5.5 V)
(2.2 V VCC 4.0 V)
32.768
High-speed mode
(4.0 V VCC 5.5 V)
High-speed mode
(2.2 V VCC 4.0 V)
Middle-speed mode
Main clock input oscillation frequency
(Note 4)
Sub-clock input oscillation frequency (Notes 4, 5)
f(XIN)
f(XCIN)
2.5
5.0
4.0
(10V
CC
-4)/9
8.0
(20V
CC
-8)/9
8.0
50
Table 39 Recommended operating conditions (M version)
65
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
IOL = 10 mA
IOL = 2.5 mA
IOL = 2.5 mA
VCC = 2.5 V
IOL = 5 mA
IOL = 1.25 mA
IOL = 1.25 mA
VCC = 2.5 V
VOL
IOH = –2.5 mA
IOH = –0.6 mA
VCC = 2.5 V
IOH = –5 mA
IOH = –1.25 mA
IOH = –1.25 mA
VCC = 2.5 V
VVCC–2.0
“H” output voltage
P00–P07, P10–P17
Symbol Parameter Limits
Min. Unit
0.5
Typ. Max.
Test conditions
VOH
2.0
0.5
(VCC = 4.0 to 5.5 V, Ta = –20 to 85 °C, unless otherwise noted)
RESET : VCC = 2.2 V to 5.5 V
VI = VCC
Pull-downs “off”
VCC = 5 V, VI = VCC
Pull-downs “on”
VCC = 3 V, VI = VCC
Pull-downs “on”
VI = VCC
“H” output voltage
P20–P27, P41–P47, P50–P57, P60–P67,
P70, P71 (Note)
“L” output voltage
P00–P07, P10–P7
“L” output voltage
P20–P27, P41–P47, P50–P57, P60–P67,
P70, P71 (Note)
Hysteresis
INT0–INT3, ADT, CNTR0, CNTR1, P20–P27
Hysteresis SCLK, RXD
Hysteresis RESET
“H” input current
P00–P07, P10–P17, P34–P37
“H” input current
P20–P27, P40–P47, P50–P57, P60–P67,
P70, P71 (Note)
VOH
VOL
VT+ – VT–
VT+ – VT–
VT+ – VT–
IIH
IIH
IIH
VCC–2.0
VCC–0.5
30
6.0
–30
–6.0
0.5
0.5
70
2.0
0.5
45
140
5.0
5.0
–5.0
–5.0
–140
–45
V
V
V
V
V
V
V
V
V
IIH
IIL
VCC–1.0
VCC–1.0
V
V
V1.0
V1.0
5.0 µA
25
VI = VCC
VI = VCC
VI = VSS
VI = VSS
Pull-ups “off”
VCC = 5 V, VI = VSS
Pull-ups “on”
VCC = 3 V, VI = VSS
Pull-ups “on”
VI = VSS
VI = VSS
“H” input current RESET
“H” input current XIN
“L” input current
P00–P07, P10–P17, P34–P37,P40
“L” input current
P20–P27, P41–P47, P50–P57, P60–P67,
P70, P71 (Note)
“L” input current RESET
“L” input current XIN
4.0
–5.0
–70
µA
µA
µA
µA
µA
µA
µA
µA
µA
µA
µA
IIL
IIL
IIL
–25
–4.0
Note: When “1” is set to the port XC switch bit (bit 4 at address 003B16) of CPU mode register, the drive ability of port P70 is different from the value above
mentioned.
Table 40 Electrical characteristics (M version)
66
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
(VCC = 2.2 to 5.5 V, Ta = –20 to 85 °C, unless otherwise noted)
V
5.5
High-speed mode, VCC = 5 V
f(XIN) = 8 MHz
f(XCIN) = 32.768 kHz
Output transistors “off”
A-D converter in operating
High-speed mode, VCC = 5 V
f(XIN) = 8 MHz (in WIT state)
f(XCIN) = 32.768 kHz
Output transistors “off”
A-D converter stopped
Low-speed mode, VCC = 5 V, Ta 55°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz
Output transistors “off”
Low-speed mode, VCC = 5 V, Ta = 25°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz (in WIT state)
Output transistors “off”
Low-speed mode, VCC = 3 V, Ta 55°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz
Output transistors “off”
Low-speed mode, VCC = 3 V, Ta = 25°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz (in WIT state)
Output transistors “off”
All oscillation stopped
(in STP state)
Output transistors “off”
Symbol Parameter Limits
Min. Unit
Typ. Max.
Ta = 25 °C
Ta = 85 °C
Test conditions
ICC Power source current
6.4
VRAM RAM retention voltage At clock stop mode 2.0
1.6
25
7.0
15
4.5
0.1
3.2
36
14
22
9.0
1.0
10
mA
µA
µA
µA
µA
µA
mA
13
(VCC = 4.0 to 5.5 V, VSS = 0 V, Ta = –20 to 85 °C, 4 MHz f(XIN) 8 MHz, in middle/high-speed mode, unless otherwise noted)
Table 41 Electrical characteristics (M version)
Table 42 A-D converter characteristics (M version)
Symbol Parameter Limits
Min. Unit
Typ. Max.
Test conditions
Resolution
Absolute accuracy
(excluding quantization error) VCC = VREF = 5V
f(XIN) = 8 MHz
VREF = 5 V 12
Bits
LSB
35
150
8
±2
Note: When an internal trigger is used in middle-speed mode, it is 14 µs.
µsConversion time
Ladder resistor
Reference power source input current
tCONV
RLADDER
IVREF
k
µA
Analog port input currentIIA µA
12.5
(Note)
100
200
5.0
50
67
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
(VCC = 4.0 to 5.5 V, VSS = 0 V, Ta = –20 to 85 °C, unless otherwise noted)
2
125
45
40
250
105
105
80
80
800
370
370
220
100
Note: When bit 6 of address 001A16 is “1” (clock synchronous).
Divide this value by four when bit 6 of address 001A16 is “0” (UART).
Reset input “L” pulse width
Main clock input cycle time (XIN input)
Main clock input “H” pulse width
Main clock input “L” pulse width
CNTR0, CNTR1 input cycle time
CNTR0, CNTR1 input “H” pulse width
CNTR0, CNTR1 input “L” pulse width
INT0 to INT3 input “H” pulse width
INT0 to INT3 input “L” pulse width
Serial I/O clock input cycle time (Note)
Serial I/O clock input “H” pulse width (Note)
Serial I/O clock input “L” pulse width (Note)
Serial I/O input set up time
Serial I/O input hold time
tw(RESET)
tc(XIN)
twH(XIN)
twL(XIN)
tc(CNTR)
twH(CNTR)
twL(CNTR)
twH(INT)
twL(INT)
tc(SCLK)
twH(SCLK)
twL(SCLK)
t
su(R
X
D–S
CLK
)
th(SCLK–RXD)
Symbol Parameter Limits
Min. µs
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
Unit
Typ. Max.
(VCC = 2.2 to 4.0 V, VSS = 0 V, Ta = –20 to 85 °C, unless otherwise noted)
2
125
45
40
900/(VCC–0.4)
450/(VCC–0.4)–20
450/(VCC–0.4)–20
230
230
2000
950
950
400
200
Reset input “L” pulse width
Main clock input cycle time (XIN input)
Main clock input “H” pulse width
Main clock input “L” pulse width
CNTR0, CNTR1 input cycle time
CNTR0, CNTR1 input “H” pulse width
CNTR0, CNTR1 input “L” pulse width
INT0 to INT3 input “H” pulse width
INT0 to INT3 input “L” pulse width
Serial I/O clock input cycle time (Note)
Serial I/O clock input “H” pulse width (Note)
Serial I/O clock input “L” pulse width (Note)
Serial I/O input set up time
Serial I/O input hold time
tw(RESET)
tc(XIN)
twH(XIN)
twL(XIN)
tc(CNTR)
twH(CNTR)
twL(CNTR)
twH(INT)
twL(INT)
tc(SCLK)
twH(SCLK)
twL(SCLK)
t
su(R
X
D–S
CLK
)
th(SCLK–RXD)
Symbol Parameter Limits
Min. µs
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
Unit
Typ. Max.
Note: When bit 6 of address 001A16 is “1” (clock synchronous).
Divide this value by four when bit 6 of address 001A16 is “0” (UART).
Table 43 Timing requirements 1 (M version)
Table 44 Timing requirements 2 (M version)
68
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
(VCC = 4.0 to 5.5 V, VSS = 0 V, Ta = –20 to 85 °C, unless otherwise noted)
Notes 1: When the P45/TXD P-channel output disable bit of the UART control register (bit 4 of address 001B16) is “0”.
2: XOUT and XCOUT pins are excluded.
Serial I/O clock output “H” pulse width
Serial I/O clock output “L” pulse width
Serial I/O output delay time (Note 1)
Serial I/O output valid time (Note 1)
Serial I/O clock output rising time
Serial I/O clock output falling time
CMOS output rising time (Note 2)
CMOS output falling time (Note 2)
140
30
30
30
30
Symbol Parameter Limits
Min. ns
ns
ns
ns
ns
ns
ns
ns
Unit
tC (SCLK)/2–30
tC (SCLK)/2–30
–30
10
10
Typ. Max.
twH(SCLK)
twL(SCLK)
td(SCLK–TXD)
tv(SCLK–TXD)
tr(SCLK)
tf(SCLK)
tr(CMOS)
tf(CMOS)
(VCC = 2.2 to 4.0 V, VSS = 0 V, Ta = –20 to 85 °C, unless otherwise noted)
ns
ns
ns
ns
ns
ns
ns
ns
Unit
Notes 1: When the P45/TXD P-channel output disable bit of the UART control register (bit 4 of address 001B16) is “0”.
2: XOUT and XCOUT pins are excluded.
Serial I/O clock output “H” pulse width
Serial I/O clock output “L” pulse width
Serial I/O output delay time (Note 1)
Serial I/O output valid time (Note 1)
Serial I/O clock output rising time
Serial I/O clock output falling time
CMOS output rising time (Note 2)
CMOS output falling time (Note 2)
350
50
50
50
50
Symbol Parameter Limits
Min.
tC (SCLK)/2–50
tC (SCLK)/2–50
–30
20
20
Max.
twH(SCLK)
twL(SCLK)
td(SCLK–TXD)
tv(SCLK–TXD)
tr(SCLK)
tf(SCLK)
tr(CMOS)
tf(CMOS)
Typ.
Table 45 Switching characteristics 1 (M version)
Table 46 Switching characteristics 2 (M version)
69
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
VO
VO
Pd
Topr
Tstg
–0.3 to 6.5 VPower source voltage
Input voltage P00–P07, P10–P17, P20–P27,
P34–P37, P40–P47, P50–P57
P60–P67, P70, P71
VCC
VI
Symbol Parameter Conditions Ratings Unit
All voltages are based on VSS.
Output transistors are cut off.
VI
VI
VI
VI
VO
VO
VO
Input voltage VL1
Input voltage VL2
Input voltage VL3
Input voltage RESET, X IN
Output voltage P00–P07, P10–P17
Output voltage P34–P37
Output voltage P20–P27, P41–P47,P50–P57,
P60–P67, P70, P71
Output voltage SEG0–SEG11
Output voltage XOUT
Power dissipation
Operating temperature
Storage temperature
At output port
At segment output
At segment output
–0.3 to VCC +0.3
–0.3 to VL2
VL1 to VL3
VL2 to VCC +0.3
–0.3 to VCC +0.3
–0.3 to VCC +0.3
–0.3 to VL3
–0.3 to VL3
–0.3 to VCC +0.3
–0.3 to VL3
–0.3 to VCC +0.3
300
–20 to 85
–40 to 150
V
V
V
V
V
V
V
V
V
V
V
mW
°C
°C
Ta = 25°C
(VCC = 2.0 to 5.5 V, Ta = –20 to 85 °C, unless otherwise noted)
Power source voltage
A-D conversion reference voltage
Analog power source voltage
Analog input voltage AN0–AN7
“H” input voltage P00–P07, P10–P17,P34–P37, P40, P41, P45, P47, P52, P53,
P56,P60–P67,P70,P71 (CM4= 0)
“H” input voltage P20–P27, P42–P44,P46,P50, P51, P54, P55, P57
“H” input voltage RESET
“H” input voltage XIN
“L” input voltage P00–P07, P10–P17,P34–P37, P40, P41, P45, P47, P52, P53,
P56,P60–P67,P70,P71 (CM4= 0)
“L” input voltage P20–P27, P42–P44,P46,P50, P51, P54, P55, P57
“L” input voltage RESET
“L” input voltage XIN
5.5
5.5
5.5
VCC
VCC
VCC
VCC
VCC
VCC
0.3 VCC
0.2 VCC
0.2 VCC
0.2 VCC
VCC
VSS
VREF
AVSS
VIA
VIH
VIH
VIH
VIH
VIL
VIL
VIL
VIL
Symbol Parameter Limits
Min.
V
V
V
V
V
V
V
V
V
V
V
V
V
Unit
4.0
2.0
2.0
2.0
AVSS
0.7VCC
0.8VCC
0.8VCC
0.8VCC
0
0
0
0
5.0
5.0
5.0
0
0
Typ. Max.
Power source voltage High-speed mode f(XIN) = 8 MHz
Middle-speed mode f(XIN) = 8 MHz
Low-speed mode
Table 47 Absolute maximum ratings (H version)
Table 48 Recommended operating conditions (H version)
70
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17, P20–P27 (Note 1)
P41–P47, P50–P57, P60–P67, P70, P71 (Note 1)
P00–P07, P10–P17 (Note 2)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 2)
P00–P07, P10–P17 (Note 2)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 2)
P00–P07, P10–P17 (Note 3)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 3)
P00–P07, P10–P17 (Note 3)
P20–P27, P41–P47, P50–P57, P60–P67, P70, P71
(Note 3)
–40
–40
40
40
–20
–20
20
20
–2
–5
(VCC = 2.0 to 5.5 V, Ta = –20 to 85°C, unless otherwise noted)
Notes 1: The total output current is the sum of all the currents flowing through all the applicable ports. The total average current is an average value
measured over 100 ms. The total peak current is the peak value of all the currents.
2: The peak output current is the peak current flowing in each port.
3: The average output current is an average value measured over 100 ms.
4: When the oscillation frequency has a duty cycle of 50 %.
5: When using the microcomputer in low-speed mode, make sure that the sub-clock input oscillation frequency on condition that f(XCIN) < f(XIN)/3.
“H” total peak output current
“H” total peak output current
“L” total peak output current
“L” total peak output current
“H” total average output current
“H” total average output current
“L” total average output current
“L” total average output current
“H” peak output current
“H” peak output current
ΣIOH(peak)
ΣIOH(peak)
ΣIOL(peak)
ΣIOL(peak)
ΣIOH(avg)
ΣIOH(avg)
ΣIOL(avg)
ΣIOL(avg)
IOH(peak)
IOH(peak)
Symbol Parameter Limits
Min. mA
mA
mA
mA
mA
mA
mA
mA
mA
mA
Unit
Typ. Max.
IOL(peak)
IOL(peak)
IOH(avg)
IOH(avg)
IOL(avg)
5
10
–1.0
–2.5
mA
mA
mA
mA
mA
mA
“L” peak output current
“L” peak output current
2.5
5.0
4.0
VCC
8.0
2VCC
8.0
50
“H” average output current
“H” average output current
“L” average output current
“L” average output current
Input frequency for timers X and Y
(duty cycle 50%)
IOL(avg)
f(CNTR0)
f(CNTR1)MHz
MHz
MHz
MHz
MHz
kHz
(4.0 V VCC 5.5 V)
(2.0 V VCC 4.0 V)
32.768
High-speed mode
(4.0 V VCC 5.5 V)
High-speed mode
(2.0 V VCC 4.0 V)
Middle-speed mode
Main clock input oscillation frequency
(Note 4)
Sub-clock input oscillation frequency (Notes 4, 5)
f(XIN)
f(XCIN)
Table 49 Recommended operating conditions (H version)
71
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
IOL = 10 mA
IOL = 2.5 mA
IOL = 2.5 mA
VCC = 2.5 V
IOL = 5 mA
IOL = 1.25 mA
IOL = 1.25 mA
VCC = 2.5 V
VOL
IOH = –2.5 mA
IOH = –0.6 mA
VCC = 2.5 V
IOH = –5 mA
IOH = –1.25 mA
IOH = –1.25 mA
VCC = 2.5 V
VVCC–2.0
“H” output voltage
P00–P07, P10–P17
Symbol Parameter Limits
Min. Unit
0.5
Typ. Max.
Test conditions
VOH
2.0
0.5
(VCC = 4.0 to 5.5 V, Ta = –20 to 85 °C, unless otherwise noted)
RESET : VCC = 2.0 V to 5.5 V
VI = VCC
Pull-downs “off”
VCC = 5 V, VI = VCC
Pull-downs “on”
VCC = 3 V, VI = VCC
Pull-downs “on”
VI = VCC
“H” output voltage
P20–P27, P41–P47, P50–P57, P60–P67,
P70, P71 (Note)
“L” output voltage
P00–P07, P10–P7
“L” output voltage
P20–P27, P41–P47, P50–P57, P60–P67,
P70, P71 (Note)
Hysteresis
INT0–INT3, ADT, CNTR0, CNTR1, P20–P27
Hysteresis SCLK, RXD
Hysteresis RESET
“H” input current
P00–P07, P10–P17, P34–P37
“H” input current
P20–P27, P40–P47, P50–P57, P60–P67,
P70, P71 (Note)
VOH
VOL
VT+ – VT–
VT+ – VT–
VT+ – VT–
IIH
IIH
IIH
VCC–2.0
VCC–0.5
30
6.0
–30
–6.0
0.5
0.5
70
2.0
0.5
45
140
5.0
5.0
–5.0
–5.0
–140
–45
V
V
V
V
V
V
V
V
V
IIH
IIL
VCC–1.0
VCC–1.0
V
V
V1.0
V1.0
5.0 µA
25
VI = VCC
VI = VCC
VI = VSS
VI = VSS
Pull-ups “off”
VCC = 5 V, VI = VSS
Pull-ups “on”
VCC = 3 V, VI = VSS
Pull-ups “on”
VI = VSS
VI = VSS
“H” input current RESET
“H” input current XIN
“L” input current
P00–P07, P10–P17, P34–P37,P40
“L” input current
P20–P27, P41–P47, P50–P57, P60–P67,
P70, P71 (Note)
“L” input current RESET
“L” input current XIN
4.0
5.0
–70
µA
µA
µA
µA
µA
µA
µA
µA
µA
µA
µA
IIL
IIL
IIL
–25
–4.0
Note: When “1” is set to the port XC switch bit (bit 4 at address 003B16) of CPU mode register, the drive ability of port P70 is different from the value above
mentioned.
Table 50 Electrical characteristics (H version)
72
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
(VCC =2.0 to 5.5 V, Ta = –20 to 85 °C, unless otherwise noted)
V
5.5
High-speed mode, VCC = 5 V
f(XIN) = 8 MHz
f(XCIN) = 32.768 kHz
Output transistors “off”
A-D converter in operating
High-speed mode, VCC = 5 V
f(XIN) = 8 MHz (in WIT state)
f(XCIN) = 32.768 kHz
Output transistors “off”
A-D converter stopped
Low-speed mode, VCC = 5 V, Ta 55°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz
Output transistors “off”
Low-speed mode, VCC = 5 V, Ta = 25°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz (in WIT state)
Output transistors “off”
Low-speed mode, VCC = 3 V, Ta 55°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz
Output transistors “off”
Low-speed mode, VCC = 3 V, Ta = 25°C
f(XIN) = stopped
f(XCIN) = 32.768 kHz (in WIT state)
Output transistors “off”
All oscillation stopped
(in STP state)
Output transistors “off”
Symbol Parameter Limits
Min. Unit
Typ. Max.
Ta = 25 °C
Ta = 85 °C
Test conditions
ICC Power source current
6.4
VRAM RAM retention voltage At clock stop mode 2.0
1.6
25
7.0
15
4.5
0.1
3.2
36
14
22
9.0
1.0
10
mA
µA
µA
µA
µA
µA
mA
13
(VCC = 2.2 to 5.5 V, VSS = AVSS = 0 V, Ta = –20 to 85 °C, 4 MHz f(XIN) 8 MHz, in middle/high-speed mode unless otherwise noted)
Symbol Parameter Limits
Min. Unit
Typ. Max.
Test conditions
Resolution
Absolute accuracy
(excluding quantization error) VCC = VREF = 4.0 V to 5.5 V
f(XIN) = 8 MHz
VCC = VREF = 2.2 V to 4.0V
f(XIN) = 2 VCC MHz
12
Bits
LSB
8
±2
Note: When an internal trigger is used in middle-speed mode, it is 14 µs.
µs
f(XIN) = 8 MHz
Conversion time
Ladder resistor
Reference power source input current
tCONV
RLADDER
IVREF
k
µA
Analog port input currentIIA µA
35
150
VREF = 5 V
12.5
(Note)
100
200
5.0
50
Table 51 Electrical characteristics (H version)
Table 52 A-D converter characteristics (H version)
73
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
(VCC = 4.0 to 5.5 V, VSS = 0 V, Ta = –20 to 85 °C, unless otherwise noted)
2
125
45
40
250
105
105
80
80
800
370
370
220
100
Note: When bit 6 of address 001A16 is “1” (clock synchronous).
Divide this value by four when bit 6 of address 001A16 is “0” (UART).
Reset input “L” pulse width
Main clock input cycle time (XIN input)
Main clock input “H” pulse width
Main clock input “L” pulse width
CNTR0, CNTR1 input cycle time
CNTR0, CNTR1 input “H” pulse width
CNTR0, CNTR1 input “L” pulse width
INT0 to INT3 input “H” pulse width
INT0 to INT3 input “L” pulse width
Serial I/O clock input cycle time (Note)
Serial I/O clock input “H” pulse width (Note)
Serial I/O clock input “L” pulse width (Note)
Serial I/O input set up time
Serial I/O input hold time
tw(RESET)
tc(XIN)
twH(XIN)
twL(XIN)
tc(CNTR)
twH(CNTR)
twL(CNTR)
twH(INT)
twL(INT)
tc(SCLK)
twH(SCLK)
twL(SCLK)
t
su(R
X
D–S
CLK
)
th(SCLK–RXD)
Symbol Parameter Limits
Min. µs
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
Unit
Typ. Max.
(VCC = 2.0 to 4.0 V, VSS = 0 V, Ta = –20 to 85 °C, unless otherwise noted)
2
125
45
40
900/(VCC–0.4)
450/(VCC–0.4)–20
450/(VCC–0.4)–20
230
230
2000
950
950
400
200
Reset input “L” pulse width
Main clock input cycle time (XIN input)
Main clock input “H” pulse width
Main clock input “L” pulse width
CNTR0, CNTR1 input cycle time
CNTR0, CNTR1 input “H” pulse width
CNTR0, CNTR1 input “L” pulse width
INT0 to INT3 input “H” pulse width
INT0 to INT3 input “L” pulse width
Serial I/O clock input cycle time (Note)
Serial I/O clock input “H” pulse width (Note)
Serial I/O clock input “L” pulse width (Note)
Serial I/O input set up time
Serial I/O input hold time
tw(RESET)
tc(XIN)
twH(XIN)
twL(XIN)
tc(CNTR)
twH(CNTR)
twL(CNTR)
twH(INT)
twL(INT)
tc(SCLK)
twH(SCLK)
twL(SCLK)
t
su(R
X
D–S
CLK
)
th(SCLK–RXD)
Symbol Parameter Limits
Min. µs
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
Unit
Typ. Max.
Note: When bit 6 of address 001A16 is “1” (clock synchronous).
Divide this value by four when bit 6 of address 001A16 is “0” (UART).
Table 53 Timing requirements 1 (H version)
Table 54 Timing requirements 2 (H version)
74
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
(VCC = 4.0 to 5.5 V, VSS = 0 V, Ta = –20 to 85 °C, unless otherwise noted)
Notes1: When the P45/TXD P-channel output disable bit of the UART control register (bit 4 of address 001B16) is “0”.
2: XOUT and XCOUT pins are excluded.
Serial I/O clock output “H” pulse width
Serial I/O clock output “L” pulse width
Serial I/O output delay time (Note 1)
Serial I/O output valid time (Note 1)
Serial I/O clock output rising time
Serial I/O clock output falling time
CMOS output rising time (Note 2)
CMOS output falling time (Note 2)
140
30
30
30
30
Symbol Parameter Limits
Min. ns
ns
ns
ns
ns
ns
ns
ns
Unit
tC (SCLK)/2–30
tC (SCLK)/2–30
–30
10
10
Typ. Max.
twH(SCLK)
twL(SCLK)
td(SCLK–TXD)
tv(SCLK–TXD)
tr(SCLK)
tf(SCLK)
tr(CMOS)
tf(CMOS)
(VCC = 2.0 to 4.0 V, VSS = 0 V, Ta = –20 to 85 °C, unless otherwise noted)
ns
ns
ns
ns
ns
ns
ns
ns
Unit
Notes1: When the P45/TXD P-channel output disable bit of the UART control register (bit 4 of address 001B16) is “0”.
2: XOUT and XCOUT pins are excluded.
Serial I/O clock output “H” pulse width
Serial I/O clock output “L” pulse width
Serial I/O output delay time (Note 1)
Serial I/O output valid time (Note 1)
Serial I/O clock output rising time
Serial I/O clock output falling time
CMOS output rising time (Note 2)
CMOS output falling time (Note 2)
350
50
50
50
50
Symbol Parameter Limits
Min.
tC (SCLK)/2–50
tC (SCLK)/2–50
–30
20
20
Max.
twH(SCLK)
twL(SCLK)
td(SCLK–TXD)
tv(SCLK–TXD)
tr(SCLK)
tf(SCLK)
tr(CMOS)
tf(CMOS)
Typ.
Fig. 52 Circuit for measuring output switching characteristics
Table 55 Switching characteristics 1 (H version)
Table 56 Switching characteristics 2 (H version)
M
e
a
s
u
r
e
m
e
n
t
o
u
t
p
u
t
p
i
n
1
0
0
p
F
C
M
O
S
o
u
t
p
u
t
N
ote:
Wh
en
bi
t 4 o
f
t
h
e
UART
contro
l
reg
i
ster
(address 001B
16
) i s 1. (N-channel open-
d r ain output m ode)
N
-c
h
anne
l
ope n-
d
ra
i
n o utp ut
(N
ote
)
1
k
1
0
0
p
F
M
easurement output p
i
n
75
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
Fig. 53 Timing diagram
tW(RESET)
0.8
V
C
C
0.2
V
CC
R
E
S
E
T
tC(X
IN
)
tC
(
C
N
T
R
)
tW
H
(
C
N
T
R
)tW
L
(
C
N
T
R
)
0
.
8
V
C
C
0.2
V
C
C
C
N
T
R0,
C
N
T
R1
tW
H
(
I
N
T
)tW
L
(
I
N
T
)
0
.
8
V
C
C
0.2
V
C
C
I
N
T0
I
N
T3
tW
H
(
X
I
N
)tW
L
(
X
I
N
)
0
.
8
V
C
C
0.2
V
C
C
XIN
tC(S
CLK
)
tW
L
(
S
C
L
K
)tWH(S
CLK
)
0.2
V
C
C
0.8
V
C
C
SCLK
t
r
tf
td
(
S
C
L
K
-
T
X
D
)tv(S
CLK
-T
X
D)
TXD
RXD
0.2
V
CC
0.8
V
CC
ts
u
(
R
X
D
-
S
C
L
K
)th
(
S
C
L
K
-
R
X
D
)
76
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
PACKAGE OUTLINE
QFP80-P-1420-0.80 1.58
Weight(g)
JEDEC Code
EIAJ Package Code Lead Material
Alloy 42
80P6N-A Plastic 80pin 1420mm body QFP
0.1
––
0.2
––
Symbol Min Nom Max
A
A
2
b
c
D
E
H
E
L
L
1
y
b
2
Dimension in Millimeters
H
D
A
1
0.5
I
2
1.3
M
D
14.6
M
E
20.6
10°0°0.1
1.4 0.80.60.4 23.122.822.5 17.116.816.5 0.8 20.220.019.8 14.214.013.8 0.20.150.13 0.450.350.3 2.8
03.05
e
e
e
E
c
H
E
1
80 65
40
64
41
25
24
H
D
D
M
D
M
E
A
F
A
1
A
2
L
1
L
y
b
2
I
2
Recommended Mount Pad
Detail F
x 0.2
bx
M
MMP
QFP80-P-1414-0.65 1.11
Weight(g)
JEDEC Code
EIAJ Package Code Lead Material
Alloy 42
80P6S-A
Plastic 80pin 1414mm body QFP
0.1
––
0.2
––
Symbol Min Nom Max
A
A
2
b
c
D
E
H
E
L
L
1
y
b
2
Dimension in Millimeters
H
D
A
1
0.35
I
2
1.3
M
D
14.6
M
E
14.6
10°0°0.1
1.4 0.80.60.4 17.116.816.5 17.116.816.5 0.65 14.214.013.8 14.214.013.8 0.20.150.13 0.40.30.25 2.8
03.05
e
e
e
E
c
H
E
1
80 61
40
60
41
21
20
H
D
D
M
D
M
E
A
F
A
1
A
2
L
1
L
y
b
2
I
2
Recommended Mount Pad
Detail F
x––0.13
b
x
M
MMP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
© 2002 MITSUBISHI ELECTRIC CORP.
New publication, effective Feb. 2002.
Specifications subject to change without notice.
Notes regarding these materials
These materials are intended as a reference to assist our customers in the selection of the Mitsubishi semiconductor product best suited to the customers application; they do not convey any license under any intellectual property
rights, or any other rights, belonging to Mitsubishi Electric Corporation or a third party.
Mitsubishi Electric Corporation assumes no responsibility for any damage, or infringement of any third-partys rights, originating in the use of any product data, diagrams, charts, programs, algorithms, or circuit application examples
contained in these materials.
All information contained in these materials, including product data, diagrams, charts, programs and algorithms represents information on products at the time of publication of these materials, and are subject to change by
Mitsubishi Electric Corporation without notice due to product improvements or other reasons. It is therefore recommended that customers contact Mitsubishi Electric Corporation or an authorized Mitsubishi Semiconductor product
distributor for the latest product information before purchasing a product listed herein.
The information described here may contain technical inaccuracies or typographical errors. Mitsubishi Electric Corporation assumes no responsibility for any damage, liability, or other loss rising from these inaccuracies or errors.
Please also pay attention to information published by Mitsubishi Electric Corporation by various means, including the Mitsubishi Semiconductor home page (http://www.mitsubishichips.com).
When using any or all of the information contained in these materials, including product data, diagrams, charts, programs, and algorithms, please be sure to evaluate all information as a total system before making a final decision
on the applicability of the information and products. Mitsubishi Electric Corporation assumes no responsibility for any damage, liability or other loss resulting from the information contained herein.
Mitsubishi Electric Corporation semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake. Please contact Mitsubishi Electric
Corporation or an authorized Mitsubishi Semiconductor product distributor when considering the use of a product contained herein for any specific purposes, such as apparatus or systems for transportation, vehicular, medical,
aerospace, nuclear, or undersea repeater use.
The prior written approval of Mitsubishi Electric Corporation is necessary to reprint or reproduce in whole or in part these materials.
If these products or technologies are subject to the Japanese export control restrictions, they must be exported under a license from the Japanese government and cannot be imported into a country other than the approved
destination.
Any diversion or reexport contrary to the export control laws and regulations of Japan and/or the country of destination is prohibited.
Please contact Mitsubishi Electric Corporation or an authorized Mitsubishi Semiconductor product distributor for further details on these materials or the products contained therein.
Keep safety first in your circuit designs!
Mitsubishi Electric Corporation puts the maximum effort into making semiconductor products better and more reliable, but there is always the possibility that trouble may occur with them. Trouble with semiconductors may lead to
personal injury, fire or property damage. Remember to give due consideration to safety when making your circuit designs, with appropriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of non-flammable
material or (iii) prevention against any malfunction or mishap.
LQFP80-P-1212-0.5 Weight(g)
0.47
JEDEC Code
EIAJ Package Code Lead Material
Cu Alloy
80P6Q-A
Plastic 80pin 1212mm body LQFP
0.1
––
0.2
––
Symbol Min Nom Max
A
A
2
b
c
D
E
H
E
L
L
1
y
b
2
Dimension in Millimeters
H
D
A
1
0.225
I
2
0.9
M
D
12.4
M
E
12.4
10°0°0.1
1.0 0.70.50.3 14.214.013.8 14.214.013.8 0.5 12.112.011.9 12.112.011.9 0.1750.1250.105 0.280.180.13 1.4
01.7
e
A
F
e
H
D
E
H
E
D
1
20
21 40
41
60
6180
y
Lp 0.45
0.6
0.25
0.75
0.08
x
A3
M
D
l
2
b
2
M
E
e
Recommended Mount Pad
b
x
M
A
1
A
2
L
1
L
Detail F
Lp
A3
c
MMP
REVISION HISTORY 3822 GROUP DATA SHEET
Rev. Date Description
Page Summary
(1/2)
1.0 01/20/98 First Edition
2.0 10/23/00 1
1
1
1
1
1
1
2
3
4
5
6
7
7
7
8
8
8
9
9
9
10
10
10
11–13
11
12
12
13
15
17
18
21
22
22
22
22
24
25
26
26
29
30
32
33
33
34
Memory size” of “FEATURES” is partly revised.
Serial I/O” of “FEATURES” is partly revised.
A-D converter” of “FEATURES” is added.
2 clock generating circuits” of “FEATURES” is partly revised.
Power source voltage” of “FEATURES” is partly revised.
Power dissipation” of “FEATURES” is partly added.
Product name into Figure 1 is revised.
Product name into Figure 2 is revised.
Figure 3 is partly revised.
“Function” of “Vcc, Vss” into Table 1 is partly revised.
“Function except a port function” into Table 2 is partly revised.
Figure 4 is partly revised.
Explanations of “GROUP EXPANSION (STANDARD, ONE TIME PROM VER-
SION, EPROM VERSION)” are partly revised.
Figure 5 is partly revised.
Table 3 is partly revised.
Explanations of “GROUP EXPANSION (EXTENDED OPERATING TEMPERA-
TURE VERSION)” are partly revised.
Figure 6 is partly revised.
Table 4 is partly revised.
“GROUP EXPANSION (M VERSION)” is added.
Figure 7 is added.
Table 5 is added.
“GROUP EXPANSION (H VERSION)” is added.
Figure 8 is added.
Table 6 is added.
Explanations of “CENTRAL PROCESSING UNIT (CPU)” are added.
Figure 9 is added.
Figure 10 is added.
Table 7 is added.
Table 8 is added.
Figure 12 is partly revised.
Figure 14 is partly revised.
Table 9 is partly revised.
Figure 17 is partly revised.
Explanations of “Interrupt Control” is partly added.
Explanations of “Interrupt Operation” is partly revised.
Explanations of “Notes” are partly revised.
Table 9 is partly revised.
Explanations of “Key Input Interrupt (Key-on wake up)” are partly revised.
Figure 21 is partly revised.
Explanations of “Timer X write control” are partly revised.
Explanations of “Real time port control” are partly revised.
Figure 25 is partly revised.
Figure 27 is partly revised.
Figure 29 is partly revised.
Explanations of “[Channel Selector]” are partly added.
Explanations of “[Comparator and Control Circuit]” are partly added.
Figure 32 is partly revised.
REVISION HISTORY 3822 GROUP DATA SHEET
Rev. Date Description
Page Summary
(2/2)
35
40
41
41
43
46
47
47
50
52
52
52
52
52
52
54–72
74, 75
Figure 33 is partly revised.
Explanations of “φ CLOCK SYSTEM OUTPUT FUNCTION” are partly revised.
Explanations of “RESET CIRCUIT” are partly revised.
Figure 39 is partly revised.
Explanations of “CLOCK GENERATING CIRCUIT” are partly eliminated.
Explanations of “Decimal Calculations” are partly eliminated.
Explanations of “DATA REQUIRED FOR MASK ORDERS” are partly added.
Table 14 is partly revised.
Test conditions of IIL of P00–P07, P10–P17, P34–P37, P40 is added.
Limit of tC(CNTR) into Table 21 is revised.
Limit of tWH(CNTR) into Table 21 is revised.
Limit of tWL(CNTR) into Table 21 is revised.
Limit of tC(CNTR) into Table 22 is revised.
Limit of tWH(CNTR) into Table 22 is revised.
Limit of tWL(CNTR) into Table 22 is revised.
Tables 25 to 56 are added.
“PACKAGE OUTLINE” is added.
2.0 10/23/00
13
21
22
25
31
44
47
Explanations of “•Bit 3: Decimal mode flag (D)” are partly added.
Figure 17 is partly revised.
Explanations of “Notes on interrupts” are revised.
Figure 21 is partly revised.
Notes on serial I/O” is added.
Figure 44 is partly revised.
Explanations of “DATA REQUIRED FOR MASK ORDERS” are partly revised.
2.1 01/31/01
2.2 02/28/02 47-48
48 “NOTES ON USE - Countermeasures against noise” is added.
“Electric Characteristic Differences Between Mask Rom and One Time PROM
Version MCUs” is added.