The KS57C21408/C21418/P21408 is a SAM47 core-based 4-bit CMOS single-chip microcontroller. It has a
timer/counter and LCD drivers.
The KS57P21408 is especially suited for use in data bank, telephone and LCD general purpose.
It is built around the SAM47 core CPU and contains ROM, RAM, 39 I/O lines, programmable timer/counter,
buzzer output, enough LCD dot matrix, and segment drive pins.
The KS57C21408/C21418/P21408 can be used for dedicated control functions in a variety of applications, and is
especially designed for multi data bank, telephone and LCD game.
OTP
The KS57C21408/C21418 microcontroller is also available in OTP (One Time Programmable) version,
KS57P21408. KS57P21408 microcontroller has an on-chip 8 K-byte one-time-programable EPROM instead of
masked ROM. The KS57P21408 is comparable to KS57C21408/C21418, both in function and in pin
configuration.
1-1
PRODUCT OVERVIEWKS57C21408/C21418/P21408
FEATURES SUMMARY
Memory
•8192 × 8 bit program memory
•5120 × 4 bit data memory in KS57C21408
•2560 x 4 bit data memory in KS57C21418
•108 x 5 bit display memory
39 I/O Pins
•Input: 6 pins
•I/O: 17 pins
•Output: maximum 16 pins for 1-bit level output
(sharing with segment driver outputs)
8-Bit Basic Timer
•Four internal timer functions
8-Bit Timer/Counter 0
•Programmable 8-bit timer
•External event counter
•Arbitrary clock frequency output
•External clock signal divider
LCD Display
•12 characters dot matrix display (5 x 7)
•12 digit display (8 segments)
•60 segments and 9 common pins
Power-Down Modes
•Idle mode (only CPU clock stops)
•Stop mode (Main-System clock and CPU clock
stops)
Oscillation Sources
•Crystal, ceramic, or External RC for system clock
•Main-system clock frequency: 0.4 MHz - 6MHz
•Sub-system clock frequency: 32,768kHz
•CPU clock divider circuit (by 4,8, or 64)
Instruction Execution Times
•0.67, 1.33, 10.7 µs at 6MHz
•0.95, 1.91, 15.3 µs at 4.19 MHz
•122 µs at 32.768 kHz
Watch Timer
•Time interval generation: 0,5ms, 3,9ms at
32768Hz
K0-K3
1 and 4-bit read, and test are possible.
Pull-up registers.
P1.0
P1.1
2-bit Input port.
I
1 and 4-bit read, and test are possible, 2-bit pull-up
A-337
36
INT0
INT1
resistors are assignable by software.
P2.0
P2.1
2-bit I/O port. 1 and 4-bit read/write, and test are
I/O
possible.
D23
24
BUZ
CLO
Each individual pin can be specified as input or
output.
2-bit pull-up resistors are assignable by software.
Pull-up resistors are automatically disabled for
output pins.
P4.0
P4.1
P4.2
P5.0 - P5.3
4-bit I/O port. 1, 4, and 8-bit read/write, and test are
I/O
possible.
4-pin unit can be specified as input or output.
4-bit pull-up resistors are assignable by software.
E
E-1
E-1
E-1
29
30
31
25-28
TCL0
TCLO0
Pull-up resistors are automatically disabled for
output pins.
Individual pins are software configurable as opendrain or push-pull output.
P6.0 - P6.3
4-bit I/O port. 1, 4,and 8-bit read/write, and test are
I/O
D-17-10KS0 - KS3
possible.
Each individual pin can be specified as input or
output.
4-bit pull-up resistors are assignable by software.
Pull-up resistors are automatically disabled for
output pins.
P7.0 - P7.34-bit I/O port. 1, 4, and 8-bit read/write, and test are
11-14KS4 - KS7
possible.
4-pin unit can be specified as input or output.
4-bit pull-up resistors are assignable by software.
Pull-up resistors are automatically disabled for
output pins.
P8.0 - P8.15O4-bit controllable output.
(Dual function as segment output pins)
SEG16-SEG59LCD segment display signal output.H-1058-100
H-942-57SEG0 -
SEG15
-
,1
SEG0 - SEG15LCD segment display signal output.H-942-57P8.0 - P8.15
COM0 - COM8LCD common signal output.H-1138-41
-
2-6
INT0 - INT1IExternal interrupts. The triggering edge for INT0,
BUZI/O2,4,8 kHz or 16kHz frequency output for buzzer
DescriptionCircuit
Type
-23P2.0
Pin
Num.
Share Pin
signal.
CLOClock output-24P2.1
Xin, X
out
-Crystal, ceramic or RC oscillator pins for main
-18, 17-
system clock.
XTin, XT
out
-Crystal oscillator pins for sub-system clock.-20, 21TCL0I/OExternal clock input for Timer/Counter 0-29P4.0
TCLO0I/OTimer/Counter 0 clock output-30P4.1
RESET
V
DD
V
SS
TESTITest input: it must be connected to V
IReset input (active low).B22-
-Power supply.-15-
-Ground.-16-
SS
-19-
1-6
KS57C21408/C21418/P21408PRODUCT OVERVIEW
PIN CIRCUIT DIAGRAMS
V
V
DD
Pull-up
Resistor
DD
P-channel
IN
N-channel
Vss
Figure 1-3. Pin Circuit Type A
V
DD
Pull-up
Pull-up
Resistor
Enable
P-channel
IN
Schmitt Trigger
Figure 1-5. Pin Circuit Type A-3
V
DD
Pull-up
Register
Pull-up
Resistor
Enable
IN
Figure 1-4. Pin Circuit Type A-1
P-channel
IN
Schmitt Trigger
Figure 1-6. Pin Circuit Type B
1-7
PRODUCT OVERVIEWKS57C21408/C21418/P21408
V
DD
V
DD
Pull-up
Resistor
Pull-up
Data
P-channel
Resistor
Enable
P-channel
Output
Disable
Pull-Up
Resistor
Enable
Data
Output
Disable
V
SS
Figure 1-7. Pin Circuit Type C
V
DD
Pull-Up
Resistor
P-channel
Type C
OUT
N-channel
In/Out
Data
Output
Disable
Type C
Schmitt Trigger
Figure 1-9. Pin Circuit Type D-1
VDD
PNE
Data
Output
Disable
VDD
P-channel
N-channel
IN/OUT
Pull-up
Resistor
Pull-up
Resistor
Enable
I/O
1-8
Figure 1-8. Pin Circuit Type D
Schmitt Trigger
Figure 1-10. Pin Circuit Type E
KS57C21408/C21418/P21408PRODUCT OVERVIEW
V
DD
PNE
V
DD
Pull-up
resistor
Pull-up
V
LC2
Resistor
Data
P-channel
I/O
Enable
Segment
Data
OUT
Output
Disable
Figure 1-11. Pin Circuit Type E-1
SEG Data/P8.0-P8.15
Key
strobe
N-channel
V
V
LC2
LC0
Vss
OUT
V
LC0
Figure 1-13. Pin Circuit Type H-10
V
LC1
COM
Data
Polarity
Vss
V
Vss
DD
OUT
Figure 1-12. Pin Circuit Type H-9
Figure 1-14. Pin Circuit Type H-11
1-9
PRODUCT OVERVIEWKS57C21408/C21418/P21408
NOTES
1-10
KS57C21408/C21418/P21408ELECTRICAL DATA
13ELECTRICAL DATA
OVERVIEW
In this section, information on KS57C21408/C21418/P21408 electrical characteristics is presented as tables and
graphics. The information is arranged in the following order:
STANDARD ELECTRICAL CHARACTERISTICS
— Absolute maximum ratings
— D.C electrical characteristics
— Main-system clock oscillator characteristics
— Sub-system clock oscillator characteristics
— I/O capacitance
— A.C electrical characteristics
— Operating voltage range
MISCELLANEOUS TIMING WAVEFORMS
— A.C timing measurement point
— Clock timing measurement at X
— Clock timing measurement at XT
— TCL0 timing
— Input timing for RESET
— Input timing for external interrupts
STOP MODE CHARACTERISTICS AND TIMING WAVEFORMS
— RAM data retention supply voltage in stop mode
— Stop mode release timing when initiated by RESET
— Stop mode release timing when initiated by an interrupt request
in
in
13–1
ELECTRICAL DATAKS57C21408/C21418/P21408
Table 13-1. Absolute Maximum Ratings
(TA = 25 °C)
ParameterSymbolConditionsRatingUnits
Supply Voltage
Input Voltage
Output Voltage
High Level
V
V
I
DD
V
O
OH
–– 0.3 to + 6.5V
Ports 0, 1, 2, 4, 5, 6, 7
I
– 0.3 to V
–
– 0.3 to VDD + 0.3
DD
+ 0.3
One pin– 15mA
V
V
Output currentAll output pins– 30mA
Low Level
Output Current
1.Oscillation frequency and input frequency data are for oscillator characteristics only.
2.Stabilization time is the interval required for oscillating stabilization after a power-on or release of STOP mode.
XTH
, t
XTL
)
–5–15
µs
Table 13-6. Input/Output Capacitance
(TA = 25 °C, V
DD
=0 V )
ParameterSymbolConditionMinTypMaxUnits
C
C
IN
OUT
f = 1 MHz; Unmeasured pins
are returned to V
SS
––15pF
––15pF
Input
Capacitance
Output
Capacitance
I/O Capacitance
C
IO
––15pF
13–7
ELECTRICAL DATAKS57C21408/C21418/P21408
Table 13-7. A.C. Electrical Characteristics
(TA = – 40 °C to + 85 °C, V
= 1.8 V to 5.5 V)
DD
ParameterSymbolConditionsMinTypMaxUnits
Instruction Cycle
(NOTE)
Time
TCL0 Input
t
CY
f
TI
V
= 2.7 V to 5.5 V
DD
VDD = 1.8 V to 5.5 V
With sub-system clock (fxt)
V
= 2.7 V to 5.5 V
DD
0.67–64µs
1.33
1141221952
0–1.5MHz
Frequency
TCL0 Input High,
Low Width
External Interrupt
Input
t
TIH
t
TIL
t
INTH
t
INTL
VDD = 1.8 V to 5.5 V
V
= 2.7 V to 5.5 V
DD
VDD = 1.8 V to 5.5 V
,
INT0, INT1, KS0 - KS7
0.48––µs
1.8
10
––µs
1kHz
High, Low Width
10
RESET Low Level
t
RSL
KS0 - KS3
–10––µs
Width
NOTE: Unless otherwise specified, the values of instruction cycle time condition assume a main-system clock (fx) source.
13–8
KS57C21408/C21418/P21408ELECTRICAL DATA
Main Oscillator
CPU Clock
1.5 MHz
Frequency
6 MHz
0.75 MHz
15.625 kHz
Table 13-8. RAM Data Retention Supply Voltage in Stop Mode
(TA = – 40 °C to + 85 °C)
ParameterSymbolConditionsMinTypMaxUnit
Data retention supply voltage
Data retention supply current
Release signal set time
Oscillator stabilization wait
(1)
time
1 2 3 4 5 6 7
1.8 V
CPU CLOCK = 1/nx oscillator frequency (n = 4, 8, 64)
Supply Voltage(V)
Figure 13-1. Standard Operating Voltage Range
V
DDDR
I
DDDR
t
SREL
t
WAIT
V
DDDR
Released by RESET–
–1.8–5.5V
= 1.8 V
–0.110µA
–0––µs
Released by interrupt–
3 MHz
400 kHz
217 / fx
(2)
–ms
–
NOTES:
1.During oscillator stabilization time, all CPU operations are stopped to avoid unstable operation upon oscillation start.
2.The basic timer mode register (BMOD) interval timer delays execution of CPU instructions during the wait time.
13–9
ELECTRICAL DATAKS57C21408/C21418/P21408
TIMING WAVEFORMS
INTERNAL RESET
OPERATION
V
RESET
V
DD
DD
STOP MODE
DATA RETENTION MODE
V
EXECUTION OF
STOP INSTRUCTION
DDDR
t
SREL
Figure 13-2. Stop Mode Release Timing When Initiated By RESET
IDLE MODE
STOP MODE
DATA RETENTION MODE
IDLE MODE
t
WAIT
NORMAL
OPERATING
MODE
OPERATING
MODE
13–10
V
EXECUTION OF
STOP INSTRUCTION
POWER-DOWN MODE TERMINATING SIGNAL
(INTERRUPT REQUEST)
DDDR
t
SREL
t
WAIT
Figure 13-3. Stop Mode Release Timing When Initiated By Interrupt Request
KS57C21408/C21418/P21408ELECTRICAL DATA
0.8 V
DD
0.8 V
DD
MEASUREMENT
0.2 V
DD
POINTS
0.2 V
DD
Figure 13-4. A.C. Timing Measurement Points (Except for Xin and XTin)
1 / fx (1 / fXT)
Xin (XTin)
t
XL (tXTL)
t
XH (tXTH)
V
DD
0.4 V
– 0.5 V
Figure 13-5. Clock Timing Measurement at X
in
and XT
in
13–11
ELECTRICAL DATAKS57C21408/C21418/P21408
1 / f
TI
TCL0
RESET
t
TIL
t
TIH
Figure 13-6. TCL0 Timing
tRSL
0.2 V
Figure 13-7. Input Timing for RESET Signal
DD
0.8 V
0.2 V
DD
DD
13–12
INT0, 1
t
INTL
0.8 V
DD
t
INTH
INTP0
0.2 V
KS0 to KS7
DD
Figure 13-8. Input Timing for External Interrupts and Quasi-Interrupts
KS57C21408/C21418/P21408MECHANICAL DATA
14MECHANICAL DATA
OVERVIEW
This section contains the following information about the device package:
—Package dimensions in millimeters
—Pad diagram
—Pad/pin coordinate data table
17.90 ± 0.3
14.00 ± 0.2
#100
#1
23.90 ± 0.3
20.00 ± 0.2
100-QFP-1420C
0.3 ± 0.1
0.10 MAX
0.65
(0.58)
(0.83)
0-8
0.15
0.10 MAX
0.80 ± 0.20
0.05 MIN
2.65 ± 0.10
+0.10
-0.05
NOTE: Dimensions are in millimeters.
Figure 14-1. 100-QFP-1420 Package Dimensions
3.00 MAX
0.80 ± 0.20
14-1
MECHANICAL DATAKS57C21408/C21418/P21408
NOTES
14-2
KS57C21408/C21418/P21408 KS57P21408 OTP
15KS57P21408 OTP
OVERVIEW
The KS57P21408 single-chip CMOS microcontroller is the OTP (One Time Programmable)version of the
KS57C21408/C21418 microcontroller. It has an on-chip OTP ROM instead of masked ROM. The EPROM is
accessed by serial data format.
The KS57P21408 is fully compatible with the KS57C21408/C21418, both in function and in pin configuration.
Because of its simple programming requirements, the KS57P21408 is ideal for use as an evaluation chip for the
KS57C21408/C21418.
Table 15-1. Descriptions of Pins Used to Read/Write the EPROM
Main ChipDuring Programming
Pin NamePin NamePin No.I/OFunction
P3.1SDAT13I/OSerial data pin. Output port when reading and
input port when writing. Can be assigned as a
Input / push-pull output port.
P3.0SCLK14I/OSerial clock pin. Input only pin.
TEST
VPP(TEST)
19IPower supply pin for EPROM cell writing
(indicates that OTP enters into the writing
mode). When 12.5 V is applied, OTP is in writing
mode and when 5 V is applied, OTP is in reading
mode. (Option)
RESETRESET
VDD / V
SS
VDD / V
SS
22IChip initialization
15/16ILogic power supply pin. VDD should be tied to
+5 V during programming.
Table 15-2. Comparison of KS57P21408 and KS57C21408/C21418 Features
CharacteristicKS57P21408KS57C21408
Program Memory8 Kbyte EPROM8 Kbyte mask ROM
Operating Voltage (VDD)
1.8 V to 5.5 V1.8 V to 5.5V
OTP Programming Mode
VDD = 5 V, VPP(TEST)=12.5V
Pin Configuration100 QFP100 QFP
EPROM ProgrammabilityUser Program 1 timeProgrammed at the factory
OPERATING MODE CHARACTERISTICS
When 12.5 V is supplied to the VPP(TEST) pin of the KS57P21408, the EPROM programming mode is entered.
The operating mode (read, write, or read protection) is selected according to the input signals to the pins listed in
Table 15-3 below.
Table 15-3. Operating Mode Selection Criteria
V
DD
VPP
(TEST)
REG/
MEM
ADDRESS
(A15-A0)
R/WMODE
5 V5 V00000H1EPROM read
12.5 V00000H0EPROM program
12.5 V00000H1EPROM verify
12.5 V10E3FH0EPROM read protection
NOTE: "0" means Low level; "1" means High level.
15-3
KS57P21408 OTPKS57C21408/C21418/P21408
Table 15-4. D.C Characteristics
(TA = –40 °C to +85C, VDD = 1.8 V to 5.5V)
ParameterSymbolConditionsMin.Typ.Max.Units
Supply Current
(2)(3)
I
DD1
Run mode :
VDD=5V±10%
6MHz
–5.18mA
I
DD2
I
DD3
I
DD4
I
DD5
Crystal oscillator
C1=C2=22pF
VDD=3V±10%
Idle mode :
VDD=5V±10%
Crystal oscillator
C1=C2=22pF
VDD=3V±10%
Run mode : VDD=3V±10%
32kHz crystal oscillator
Idle mode :