E2E0031-38-95
¡ Semiconductor MSM64158A/64158AL
¡ Semiconductor
This version: Sep. 1998
Previous version: Mar. 1996
MSM64158A/64158AL
4-Bit Microcontroller with Built-in LCD Driver and Melody Circuit
GENERAL DESCRIPTION
The MSM64158A (1.5 V)/64158AL (3.0 V) is a high-performance 4-bit microcontroller that
incroporates Oki-original CPU core nX-4/20.
The MSM64158A/64158AL has an LCD driver for up to 144 segments, an event counter, and a
melody circuit. It is best suited for applications such as clocks and LCD games.
FEATURES
• Operating range
Operating voltage : 1.5 V/3.0 V
Operating temperature : –40 to +70°C
Operating frequency : 32.768 kHz crystal oscillation
Approx. 32 kHz RC oscillation
Supply current (Typ.) : 0.9 µA (3.0 V at HALT mode)
• Minimum instruction execution time : 91 µs
• General memory space : 2528 bytes
• Local memory space : 128 nibbles
• LCD drivers : 40
Common driver ¥ 4
Segment driver ¥ 36
1/4 duty, 1/3 bias; 144 segments (36 ¥ 4)
1/3 duty, 1/3 bias; 108 segments (36 ¥ 3)
• I/O port
Input-output port : 1 port ¥ 4 bits (open drain output/CMOS output
selectable; pull-down resistor input/highimpedance input selectable)
Input port : 1 port ¥ 2 bits (pull-down resistor input /high-
impedance input selectable)
1 port ¥ 4 bits (pull-down resistor input/highimpedance input selectable)
• Event counter : 1
• Melody output : 1
• Interrupts : 7 sources (external 3, time base 3, melody 1)
• Package:
64-pin plastic QFP (QFP64-P-1414-0.80-BK): (Product name : MSM64158A-¥¥¥GS-BK,
MSM64158AL-¥¥¥GS-BK)
Chip : MSM64158A-¥¥¥, MSM64158AL-¥¥¥
¥¥¥ indicates a code number.
• OTP version (for program evaluation) : MSM64P155/64P155L
(The packages, power polarity, and operating voltage of the MSM64P155/64P155L are
different from the MSM64158A/64158AL. For details, refer to the "MSM64P155 User's
Manual".)
1/25
¡ Semiconductor MSM64158A/64158AL
BLOCK DIAGRAM
SS3VSS2VSS1
C2C1V
BIAS
BSRHALTMIEF
TR2 TR0 TR1
(4)
PCM PCL
PCH
ROM
2528B
COM1
COM2
COM3
COM4
OSC0
OSC1
RESET
TST1
TST2
V
SSL
V
DD
OSC
RST
TST
VR
C
BA HL XY
ALU
(4) (4)
TIMING
CONTROLLER
TBC
A8 to A11
A7 to A0
PORT ADDRESS
RAM
128N
DB7 to DB0
ROMRSP
3
IR
IR
(8)
INTC
(8)
DECODER
INT
PORT ADDRESS
DB7 to DB0
BUP CAPR PORT2 EVENT PORT3 PORT6
INTINTINT
INT
LCD
MD0
SEG0
SEG35
MD0
MD0
is the CPU core (nX-4/20).
P2.0
P2.1
P2.2
P2.3
P3.0
P3.1
P6.0
P6.1
P6.2
P6.3
2/25
¡ Semiconductor MSM64158A/64158AL
PIN CONFIGURATION (TOP VIEW)
SEG24
SEG25
SEG26
SEG27
SEG28
SEG29
SEG30
SEG31
SEG32
SEG33
SEG34
64
63
62
61
60
59
58
57
56
55
54
53 SEG35
52 MD0
51 MD0
50 TST1
49 TST2
SEG23
SEG22
SEG21
SEG20
SEG19
SEG18
SEG17
SEG16
SEG15
SEG14
SEG13
10
11
12SEG12
13SEG11
14SEG10
15SEG9
16SEG8
1
2
3
4
5
6
7
8
9
48
47
46
45
44
43
42
41
40
39
38
P6.0
P6.1
P6.2
P6.3
V
DD
P2.0
P2.1
P2.2
P2.3
P3.0
P3.1
37 RESET
36 V
SSL
35 OSC1
34 OSC0
33 V
SS1
17
18
19
20
21
22
23
24
25
26
27
28COM1
29C2
30C1
31V
32V
SEG7
SEG6
SEG5
SEG4
SEG3
SEG2
SEG1
SEG0
64-Pin Plastic QFP
COM4
COM3
COM2
SS3
SS2
3/25
¡ Semiconductor MSM64158A/64158AL
PAD CONFIGURATION
Pad Layout
47
46
33
32
Y
X
1564
1
14
Chip Size : 3.63 mm ¥ 3.99 mm
Chip Thickness : 350 mm (typ.)
Coordinate Origin : Chip center
Pad Hole Size : 110 mm ¥ 110 mm
Pad Size : 120 mm ¥ 120 mm
Minimum Pad Pitch : 180 mm
Note: The chip substrate voltage is VDD.
4/25
¡ Semiconductor MSM64158A/64158AL
Pad Coordinates
Pad No. Y (µm)X (µm)Pad Name
1 –1794–1344MD0
2 MD0
3 SEG35
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 –1095
19 –891
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 844
37 657
38 471
39 285
SEG34
SEG33
SEG32
SEG31
SEG30
SEG29
SEG28
SEG27
SEG26
SEG25
SEG24
SEG23
SEG22
SEG21
SEG20
SEG19
SEG18
SEG17
SEG16
SEG15
SEG14
SEG13
SEG12
SEG11
SEG10
SEG9
SEG8
SEG7
SEG6
SEG5
SEG4
SEG3
SEG2
SEG1
SEG0
COM4
–1008 –274
–824 –461
–639 –647
–453 –1019
–267
–82
104
289
475
660
846
1031
1216
1664
1664
1664
1664
1664
1664
1664
1664
1664
1664
1664
1664
1664
1664
1664
1664
1664
1664
1216
1030
40 98COM3
–1794
–1794
–1794
–1794
–1794
–1794
–1794
–1794
–1794
–1794
–1794
–1794
–1794
–1689
–1491
–1293
–699
–501
–303
–105
93
291
489
687
885
1083
1281
1479
1677
17941395
1794
1794
1794
1794
1794
1794
1794
Pad No.
41 1794–88COM2
42 COM1
43 C2
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
C1
V
SS3
V
SS2
SS1
OSC0
OSC1
V
SSL
RESET
P3.1
P3.0
P2.3
P2.2
P2.1
P2.0
V
DD
P6.3
P6.2
P6.1
P6.0
TST2
TST1
–1496
–1664V
–1664
–1664
–1664
–1664
–1664
–1664
–1664
–1664
–1664
–1664
–1664
–1664
–1664
–1664
–1664
–1664
–1664
Y (µm)X (µm)Pad Name
1794
1794
1794
1794
1794
1671
1473
1275
1077
879
681
475
285
87
–111
–309
–507
–705
–903
–1101
–1299
–1497
–1703
5/25
¡ Semiconductor MSM64158A/64158AL
PIN DESCRIPTIONS
Basic Functions
Function SymbolPad Description
Pin
44
33
58 Digital power supply (0 V)
47 Digital negative power supply (for 1.5 V spec.)
V
DD
V
SS1
Type
—
—
Bias output for LCD drive (for 3.0 V spec.)
Power
Supply
Oscillation
32
31
30
29
36
34
35
50
46 Digital negative power supply (for 3.0 V spec.)
45 Bias output for LCD drive (–4.5 V)
50
V
SS2
—
Bias output for LCD drive (for 1.5 V spec.)
V
SS3
C144 Capacitor connection pins for LCD drive bias generation.
C243
V
SSL
OSC048 Clock oscillation input and output pins:
—
—
—
Negative power supply pin for internal logic
—
(An internally generated constant voltage is present at this pin.)
I
Either a crystal (32.768 kHz) and a capacitor (10 to 30 pF)
OSC149
TST164 Input pins for test.
are connected to these pins or a resistor (1 MW) is.
O
I
Test
49
37
TST263
RESET51 System reset input pin:
I
I
Setting this pin to "H" level puts this device into a reset state.
Reset
Then, setting this pin to "L" level starts executing an instruction
from address 000H.
This pin is internally connected to V
down resistor.
SS1
or V
through a pull-
SS2
6/25
¡ Semiconductor MSM64158A/64158AL
Basic Functions (continued)
Function Symbol Type Description
Ports
Melody
Drivers
Pin
43
42
41
40
39
38
48
47
46
45
51
52
28
Pad
57
56
55
54
53
52
62
61
60
59
1
2
42
P2.0 I 4-bit input port (port 2): Select between pull-down resistor
P2.1
P2.2
P2.3
P3.0
P3.1
P6.1
P6.2
P6.3
MD0 O
MD0 O
COM1 O
input and high impedance input for each bit with the port 2 control
register (P2CON). When configured for secondary function,
an external interrupt and capture circuit trigger input are allocated.
If P2.0 to P2.3 are all set to a "H" level, the device enters system
reset mode.
I
2-bit input port (port 3): Select between pull-down resistor input and
high impedance input with the port 3 control register (P3CON).
When configured for secondary function, an external interrupt is
allocated to P3.0 and an event counter input is allocated to P3.1.
I/OP6.0
4-bit I/O port (port 6): Select between input and output, between
pull-down resistor input and high impedance input, and between
open drain output and CMOS output with the port 6 control
register (P6CON).
When configured for secondary function, an external interrupt
is allocated to these pins.
Output pin of melody driver 0.
Inverted output pin of MD0 output.
LCD common signal output pins.
LCD
Drivers
27
26
25
41
40
39
COM2 O
COM3 O
COM4 O
7/25
¡ Semiconductor MSM64158A/64158AL
Basic Functions (continued)
LCD
Drivers
PadPin
3824
Symbol
SEG0
SEG1
SEG2
SEG3
SEG4
SEG5
SEG6
SEG7
SEG8
SEG9
SEG10
SEG11
SEG12
SEG13
SEG14
SEG15
SEG16
SEG17
SEG18
SEG19
SEG20
SEG21
TypeFunction
O
LCD segment signal output pins.
O3723
O3622
O3521
O3420
O3319
O3218
O3117
O3016
O2915
O2814
O2713
O2612
O2511
O2410
O239
O228
O217
O206
O195
O184
O173
Description
SEG22
SEG23
SEG24
SEG25
SEG26
SEG27
1060
SEG28
SEG29
SEG30
SEG31
SEG32
SEG33
SEG34
SEG35
O162
O151
O1464
O1363
O1262
O1161
O
O959
O858
O757
O656
O555
O454
O353
8/25