E2E0045-38-96
Preliminary
¡ Semiconductor MSM64P164
¡ Semiconductor
This version: Sep. 1998
Previous version: Sep. 1995
MSM64P164
4-Bit Microcontroller with Built-in RC Oscillation Type A/D Converter and LCD Driver
GENERAL DESCRIPTION
The MSM64P164 is a one-time-programmable ROM-version product, which has one-time
PROM (OTP) as internal program memory. On the other hand, the MSM64164C is a mask ROMversion product, which has mask ROM as internal program memory.
Unlike the mask ROM-version MSM64164C, which has a P-well CMOS structure, the MSM64P164
has been fabricated with the N-well CMOS-structured EEPROM process technology. Therefore,
the MSM64P164 differs from the MSM64164C in the polarity of the power supply for LCD bias
generation and 5 V interface, and in the external circuit structure.
Unlike the mask ROM-version product, the MSM64P164 cannot be supplied in the form of a chip.
The MSM64P164 is an OTP-version product used to evaluate an application program.
The MSM64P164 has two operation modes, microcontroller operation mode and PROM mode.
The microcontroller operation mode is used to operate the MSM64P164 like a mask ROM-version
product and the PROM mode is used to program or read the PROM.
FEATURES
• Operating range
Operating frequencies : 32.768 kHz, 400 kHz
Operating voltage : 1.5 V/3.0 V selectable by mask option
Low supply current
Operating temperature : 0 to +65°C
• Memory space
Internal program memory : 4064 bytes
Internal data memory : 256 nibbles
• RC oscillation type A/D converter : 2 channels
Time dividing 2-channel method
Counter A : 1/(104 ¥ 8) ¥ 1
Counter B : 1/214 ¥ 1
• Serial port : Synchronous 8-bit transfer
External clock/internal clock selectable
MSB first/LSB first selectable
• LCD driver : 34 outputs; duty ratio switchable by software
(1) At 1/4 duty and 1/3 bias : 120 segments (max)
(2) At 1/3 duty and 1/3 bias : 93 segments (max)
(3) At 1/2 duty and 1/2 bias : 64 segments (max)
• Buzzer driver : 1 output (4 output modes selectable)
• Capture circuit : 2 channels (256 Hz, 128 Hz, 64 Hz, 32 Hz)
• Watchdog timer
• I/O port
Input-output port : 3 ports ¥ 4 bits
Input port : 1 port ¥ 4 bits
Output port : 1 port ¥ 4 bits
1/37
¡ Semiconductor MSM64P164
• Interrupt sources
External interrupt : 2 sources
Internal interrupt : 8 sources
• Package:
80-pin plastic QFP (QFP80-P-1420-0.80-BK) : (Product name : MSM64P164-¥¥¥ GS-BK)
¥¥¥ indicates a code number.
2/37
3/37
¡ Semiconductor MSM64P164
BLOCK DIAGRAM
BSR
HALT
MIEF
TR2 TR0 TR1
C
ALU
BA
PCM PCL
(4)
(4)
(4)
PCH
HL XY
A11 to A8
A7 to A0
DB7 to DB0 (8)
PROM
(4064
bytes)
BIAS
RAM
(256
nibbles)
IR
SIOP
INT
(8)
ROMR
SP
TIMING
CONTROLLER
I·R
DECO-
DER
DB7 to DB0
V
DD1
V
DD2
V
DD3
C1
C2
LCD
L0
L1
P2.0
P4.3
V
DD
P0
P0.0
P0.1
P0.2
INT
P1.0
P1.1
BD
INTC
WDT
BD
INT
TBC
INT
2CLK
RSTG
TST
VR
OSC2
OSC1
XT
XT
RESET
TST1
TST2
V
SSL
P2.1
V
DD
INT
P1.2
5
P1
P1.3
V
SS
L33
V
DD
INT
P2
P3
P4
P0.3
V
DD
CAPR ADC
IN0
CS0
RS0
CRT0
RT0
IN1
CS1
RS1
RT1
PORT ADDRESS
PORT ADDRESS
Program
data/address
V
PP
¡ Semiconductor MSM64P164
PIN CONFIGURATION (TOP VIEW)
OSC2
OSC1
VDDXT
XT
RESET
TST1
TST2
P1.0
P1.1
P1.2
P1.3
P0.0
P0.2
79
P0.1
78
77
76
75
74
73
72
71
70
69
68
67
66
65
P0.3
80
L0/D0
L1/D1
L2/D2
L3/D3
L4/D4
L5/D5
L6/D6
L7/D7
L8/CE
L9/OE
L10/A0
L11/A1
L12/A2
L13/A3
L14/A4
L15/A5
L16/A6
P2.0
P2.1
P2.2
P2.3
P3.0
P3.1
P3.2
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
1
2
3
4
5
6
7
8
9
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
L33/P6.3
L32/P6.2
L31/P6.1
L30/P6.0
L29/P5.3
L28/P5.2
L27/P5.1
L26/P5.0
L25
L24
L23
L22
L21/A11
L20/A10
L19/A9
L18/A8
L17/A7
C2
C1
V
DD3
V
DD2
V
DD
V
DD1
RT1
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
SS
PP
P3.3
P4.0
P4.1
P4.2
P4.3
BD
V
V
RT0
RS0
CRT0
CS0
IN0
IN1
CS1
RS1
80-Pin Plastic QFP
Note: Because pin 32 and pin 67 are internally connected with each other, VDD can be supplied
from either pin 32 or pin 67.
4/37
¡ Semiconductor MSM64P164
PIN DESCRIPTIONS
Basic Functions
Function Symbol Type
Power
Pin
32
42
44
V
SS
V
DD1
V
DD2
—
—
—
Supply
45
43
31
46,47
69
68
DD3
DD
PP
C1, C2
XT
XT
—
—
—
—
I
O
Oscillation
Ports
A/D
Converter
66
65
73 to 76
77 to 80
18 to 29
30
33
34
35
36
37
41
40
39
38
OSC1
OSC2
P1.0 to P1.3
P2.0 to P4.3
BD
RT0 O
CRT0 O
RS0 O
CS0 O
IN0 I
RT1 O
RS1 O
CS1 O
IN1 I
I
O
O
I
I/O
O
Description
0 V power supply
Bias output for driving LCD (+1.5 V), or positive power supply
at 1.5 V spec.
Bias output for driving LCD (+3.0 V), or positive power supply
at 3.0 V spec.
Bias output for driving LCD (+4.5 V). V
Positive power supply for I/O port interface V
Positive power supply for writing to PROM (+12.5 V) V
Pins for connecting a capacitor for generating LCD driving bias.
32.768 kHz crystal connection pins
External 400 kHz oscillation resistor (R
) connection pins
OS
Output port (P1.0 : high current output)
Input port P0.0 to P0.3
Input-output ports
Output pin for the buzzer driver
Resistance temperature sensor
connection pin
RC oscillation pins
Resistance/capacitance temperature
sensor connection pin
Reference resistor connection pin
for A/D converter
(channel 0)
(CROSC0)
Reference capacitor connection pin
Input pin for RC oscillator circuit
Resistance temperature sensor
connection pin
RC oscillation pins
for A/D converter
Reference resistor connection pin
(channel 1)
Reference capacitor connection pin
(CROSC1)
Input pin for RC oscillator circuit
Reset
Test
LCD
Drivers
70
71
72
1 to 17,
48 to 56
57 to 64
RESET
TST1
TST2
L26/P5.0 to
L33/P6.3
System reset input pin.
Setting this pin to "L" level puts this device into a reset state.
I
Them, setting this pin to "H" level starts executing an instruction
from address 000H.
This pin is internally pulled up to V
I
Input pins for testing.
DD
.
I
O
O
LCD driver pins L0 to L25
LCD driver pins, or output ports by mask option
5/37
¡ Semiconductor MSM64P164
Secondary Functions
Function Symbol
External
Interrupt
Capture
Trigger
Serial Port
RC Oscillation
Monitor
Pin
77
78
79
80
18
19
20
21
22
23
24
25
26
27
28
29
77
78
25
26
27
28
29
P0.0
P0.1
P0.2
P0.3
P2.0
P2.1
P2.2
P2.3
P3.0
P3.1
P3.2
P3.3
P4.0
P4.1
P4.2
P4.3
P0.0
P0.1
P3.3
P4.0
P4.1
P4.2
P4.3
Type
I
I
I
I
O
O
I/O
O
Description
Secondary functions of P0.0 to P0.3:
Level-triggered external interrupt input pins.
The change of input signal level causes an interrupt to occur.
Secondary functions of P2.0 to P2.3, P3.0 to P3.3, and P4.0 to P4.3:
Level-triggered external interrupt input pins.
The change of input signal level causes an interrupt to occur.
Secondary functions of P0.0 and P0.1:
Capture circuit trigger input pins.
Secondary functions of P3.3:
This pin is assigned the data input of a serial port (SIN).
Secondary functions of P4.0:
This pin is assigned the data output of a serial port (SOUT).
Secondary functions of P4.1:
This pin is assigned the ready output of a serial port (SPR).
Secondary functions of P4.2:
This pin is assigned the clock I/O of a serial port (SCLK).
Secondary functions of P4.3:
This pin is a monitor output (MON) of an RC oscillation clock
(OSCCLK) for an A/D converter and a 400 kHz RC oscillation
clock for a system clock.
6/37
¡ Semiconductor MSM64P164
PROM-Related Pins
Function
Program-
ming
Pin
32, 67 O
42 —
44 —
31 —
70
71
72
1 I/O
2
3
4
5
6
7
8
9 I/O PROM chip enable pin.
10 I/O PROM output enable signal.
11 I Program address input pins.
12
13
14
15
16
17
48
49
50
51
52
53 I Apply a "H" level to this pin.
Symbol
V
SS
V
DD1
V
DD2
V
PP
RESET
TST1
TST2
L0/D0
L1/D1
L2/D2
L3/D3
L4/D4
L5/D5
L6/D6
L7/D7
L8/CE
L9/OE
L10/A0
L11/A1
L12/A2
L13/A3
L14/A4
L15/A5
L16/A6
L17/A7
L18/A8
L19/A9
L20/A10
L21/A11
L22
Type
0 V power supply.
*
*
Positive power supply pin (+5 V supplied).
Positive power supply pin (+5 V supplied).
PROM write power supply (+12.5 V supplied).
I
PROM write setting pins:
PROM mode is set by a "L" level input.
Pins for writing and reading program data.
Description
* When in PROM mode, supply a 5 V power to both V
DD1
and V
DD2
.
7/37
¡ Semiconductor MSM64P164
ABSOLUTE MAXIMUM RATINGS (1.5 V Spec.)
(V
= 0 V)
SS
Parameter
Power Supply Voltage 1
Power Supply Voltage 2 V
Power Supply Voltage 3 V
Power Supply Voltage 4 V
Input Voltage 1 V
Input Voltage 2 V
Output Voltage 1 V
Output Voltage 2 V
Output Voltage 3 V
Output Voltage 4 V
Storage Temperature T
Symbol Condition Rating Unit
V
DD1
DD2
DD3
OUT1
OUT2
OUT3
OUT4
STG
DD
IN1
IN2
Ta = 25°C –0.3 to +2.0 V
Ta = 25°C –0.3 to +4.0 V
Ta = 25°C –0.3 to +5.5 V
Ta = 25°C –0.3 to +5.5 V
V
input, Ta = 25°C –0.3 to V
DD1
VDD input, Ta = 25°C –0.3 to V
V
output, Ta = 25°C –0.3 to V
DD1
V
output Ta = 25°C –0.3 to V
DD2
V
output, Ta = 25°C –0.3 to V
DD3
VDD output, Ta = 25°C –0.3 to V
+ 0.3 V
DD1
+ 0.3 V
DD
+ 0.3 V
DD1
+ 0.3 V
DD2
+ 0.3 V
DD3
+ 0.3 V
DD
— –55 to +150 °C
RECOMMENDED OPERATING CONDITIONS (1.5 V Spec.)
Parameter Symbol Condition Range Unit
Operating Temperature
Operating Voltage
External 400 kHz RC Oscillator
Resistance
Crystal Oscillation Frequency f
V
T
V
R
op
DD1
DD
OS
XT
— 0 to +65 °C
— 1.4 to 1.7 V
—V
— 250 to 500 kW
— 30 to 35 kHz
to 5.25 V
DD1
(V
SS
= 0 V)
8/37
¡ Semiconductor MSM64P164
ELECTRICAL CHARACTERISTICS (1.5 V Spec.)
DC Characteristics
(VSS = 0 V, V
= VDD = 1.5 V, Ta = 0 to +65°C unless otherwise specified)
DD1
Parameter
V
Voltage V
DD2
V
Voltage V
DD3
Crystal Oscillation
Start Voltage
Crystal Oscillation
Hold Voltage
Crystal Oscillation
Stop Detection Time
Internal Crystal
Oscillator Capacitance
External Crystal
Oscillator Capacitance
Internal Crystal
Oscillator Capacitance
Internal 400k RC
Oscillator Capacitance
400k RC Oscillation
Frequency
POR Generation
Voltage
POR Non-generation
Voltage
Symbol
DD2Ca
DD3Ca
V
STA
V
HOLD
T
STOP
C
G
C
GEX
C
D
C
OS
f
OSC
V
POR1
V
POR2
Condition Min. Typ. Max. Unit
+100%
, Cb, C
= 0.1 m F 2.8 3.0 3.2 V
12
–50%
+100%
, Cb, C
= 0.1 m F 4.3 4.5 4.7 V
12
–50%
Oscillation start time:
within 5 seconds
1.47 — — V
— 1.40 — — V
— 0.1 — 1000 ms
— 1 01 52 0p F
When external CG used 10 — 30 pF
— 1 01 52 0p F
— 8 12 16 pF
External resistor R
= 1.40 to 1.7 V
V
DD1
When V
is between V
DD1
and 1.5 V
No POR when V
and 1.5 V
V
POR2
= 300 kW
OS
is between
DD1
POR1
80 220 350 kHz
0 — 0.4 V
1.4 — 1.5 V
Measuring
Circuit
1
Notes: 1. "POR" denotes Power On Reset.
2. "T
" indicates that if the crystal oscillator stops over the value of T
STOP
system reset occurs.
STOP
, the
9/37
¡ Semiconductor MSM64P164
DC Characteristics (continued)
Parameter
Symbol
Supply Current 1 I
Supply Current 2 I
Supply Current 3 I
Supply Current 4 I
Supply Current 5 I
(VSS = 0 V, V
Condition Min. Typ. Max. Unit
CPU in halt state
DD1
(400k RC oscillation halt)
CPU in operating state
DD2
(400k RC oscillation halt)
CPU in operating state
(400k RC oscillation in operation)
DD3
R
= 300 kW
OS
Serial transfer,
f
= 300 kHz,
SCK
DD4
CPU in operating state
(400k RC oscillation halt)
CPU in halt state
(400k RC oscillation
halt), RC oscillator for
DD5
A/D converter is in
operating state
= VDD = 1.5 V, Ta = 0 to +65°C unless otherwise specified)
DD1
Measuring
— 2.0 5.0 m A
—5 08 0mA
— 90 180 m A
— 60 100 m A
RT0 = 10 kW
RT0 = 2 kW
— 150 230 m A
— 600 900 m A
Circuit
1
10/37
¡ Semiconductor MSM64P164
DC Characteristics (continued)
(V
= 0 V, V
SS
DD1
= V
= 1.5 V, V
DD
DD2
= 3.0 V, V
DD3
= 4.5 V,
Ta = 0 to +65°C unless otherwise specified)
Parameter
(Pin Name)
Output Current 1
(P1.0)
Output Current 2
(P1.1 to P1.3)
(P2.0 to P2.3)
(P3.0 to P3.3)
(P4.0 to P4.3)
Output Current 3
(BD)
Output Current 4
(RT0, RT1, RS0, RS1,
CRT0, CS0, CS1)
Output Current 5
(When L26 to L33 are
configured as output
ports)
Symbol
I
OH1
I
OL1
I
OL1SVDD
I
OH2
I
OL2
I
OL2SVDD
I
OH3
I
OL3
I
OH4
I
OL4
I
OH5
I
OL5
I
OL5SVDD
Condition Unit
V
= VDD – 0.5 V
OH1
V
= 0.5 V 1.0 3.0 9.0 mA
OL1
= 5 V, V
= VDD – 0.5 V
V
OH2
V
= 0.5 V 0.2 0.7 2.1 mA
OL2
= 5 V, V
V
= V
OH3
V
= 0.7 V 0.2 0.6 1.8 mA
OL3
V
= V
OH4
V
= 0.1 V 0.3 0.6 1.1 mA
OL4
V
= VDD – 0.5 V –1.5 –0.5 –0.1 mA
OH5
V
= 0.5 V 0.1 0.5 1.5 mA
OL5
= 5 V, V
= 0.5 V 4.0 12 36 mA
OL1
= 0.5 V 1.0 3.0 9.0 mA
OL2
– 0.7 V –1.8 –0.6 –0.2 mA
DD1
– 0.1 V –1.1 –0.6 –0.3 mA
DD1
= 0.5 V 0.2 0.7 2.0 mA
OL5S
Min. Typ. Max.
–2.1 –0.7 –0.2 mA
–2.1 –0.7 –0.2 mA
Measuring
Circuit
2
Output Current 6
(OSC2)
Output Current 7
(L0 to L33)
Output Leakage Current
(P1.0 to P1.3)
(P2.0 to P2.3)
(P3.0 to P3.3)
(P4.0 to P4.3)
(RT0, RT1, RS0, RS1,
CRT0, CS0, CS1)
I
I
I
I
OMH7VOMH7
I
OMH7SVOMH7S
I
OML7VOML7
I
OML7SVOML7S
I
I
OOH
I
OH6
OL6
OH7
OL7
OOL
V
V
V
V
V
V
OH6
OL6
OH7
OL7
OH
OL
=
=
= V
= V
= V
– 0.5 V –2.1 –0.7 –0.2 mA
DD1
= 0.5 V 0.2 0.7 2.1 mA
V
– 0.2 V — — –4.0 m A
DD3
=
V
+ 0.2 V 4.0 — — m A
DD2
= V
– 0.2 V
DD2
=
V
+ 0.2 V 4.0 — — m A
DD1
= V
– 0.2 V
DD1
VSS + 0.2 V 4.0 — — m A
DD1
SS
(V
(V
(V
(V
(V
(V
DD3
DD2
DD2
DD1
DD1
SS
level)
level)
level)
level)
level)
level)
— — –4.0 m A
— — –4.0 m A
— — 0.3 m A
–0.3 — — m A
11/37
¡ Semiconductor MSM64P164
DC Characteristics (continued)
Parameter
(Pin Name)
Input Current 1
(P0.0 to P0.3)
(P2.0 to P2.3)
(P3.0 to P3.3)
(P4.0 to P4.3)
Input Current 2
(IN0, IN1)
Input Current 3
(OSC1)
Symbol
I
IH1
I
IL1
I
IH1S
I
IL1S
I
IH1Z
I
IL1Z
I
IH2
I
IH2Z
I
IL2Z
I
IL3
I
IH3Z
I
IL3Z
(V
= 0 V, V
SS
DD1
= V
= 1.5 V, V
DD
DD2
= 3.0 V, V
DD3
= 4.5 V,
Ta = 0 to +65°C unless otherwise specified)
Condition Unit
V
= V
IH1
V
IL1
V
IH1
V
= V
IL1
V
IH1
V
IL1
V
IH2
V
IH2
V
IL2
V
IL3
V
IH3
V
IL3
(when pulled down)
DD
= V
(when pulled up) –60 –18 –5.0 m A
SS
= V
= 5 V (when pulled down)
DD
V
= 5 V (when pulled up)
SS
,
DD
= V
(in a high impedance state)
DD
= V
(in a high impedance state)
SS
= V
(when pulled down) 5.0 18 60 m A
DD1
(in a high impedance state)
= V
DD1
= V
(in a high impedance state)
SS
= V
(when pulled up) –60 –22 –6.0 m A
SS
= V
(in a high impedance state)
DD1
= V
(in a high impedance state)
SS
Min. Typ. Max.
5.0 18 60 m A
70 250 660 m A
–660 –250 –70 m A
0 — 1.0 mA
–1.0 — 0 mA
0 — 1.0 mA
–1.0 — 0 m A
0 — 1.0 m A
–1.0 — 0 mA
Measuring
Circuit
3
Input Current 4
(RESET , TST1 , TST2 )
Input Voltage 1
(P0.0 to P0.3)
(P2.0 to P2.3)
(P3.0 to P3.3)
(P4.0 to P4.3)
Input Voltage 2
(IN0, IN1, OSC1)
Input Voltage 3
(RESET , TST1 , TST2 )
V
V
I
I
V
V
IH1S
V
V
V
V
IH4
IL4
IH1
IL1
IL1S
IH2
IL2
IH3
IL3
V
= V
IH4
DD1
V
= V
IL4
SS
0 — 1.0 m A
–1.0 –0.3 –0.1 mA
— 1.2 — 1.5 V
— 0 — 0.3 V
V
= 5 V
DD
V
= 5 V
DD
4.0 — 5.0 V
0 — 1.0 V
4
— 1.2 — 1.5 V
— 0 — 0.3 V
— 1.2 — 1.5 V
— 0 — 0.3 V
12/37