G Smsun: 4-BIT CMOS Microcontroller
G Smsun: 4-BIT CMOS Microcontroller
G Smsun: 4-BIT CMOS Microcontroller
KS57C0002/0004
4-BIT CMOS Microcontroller
Product Specification
OVERVIEW
The KS57C0002/0004 single-chip CMOS microcontroller is designed for high-performance using Samsung's newest 4-bit CPU core. With a four-channel comparator, eight LED direct drive pins, serial I/O interface, and a versatile 8-bit timer/countkxcellent design solution for a variety of general-purpose applications. Up to 24 pins of the 30-pin SDIP package can be dedicated to I/O. Five vectored interrupts provide fast response to internal and external events. In addition, the KS57C0002/0004's advanced CMOS technology ensures low power consumption and a wide operating voltage range.
FEATURES
Memory 256 4-bit data memory (KS57C0002) 512 4-bit data memory (KS57C0004) 2048 8-bit program memory (KS57C0002) 4096 8-bit program memory (KS57C0004) Watch Timer Interval generation: 0.5 s, 3.9ms at 32768 Hz Four frequency outputs to the BUZ pin Stop mode (system clock stops)
Oscillation Sources Crystal, ceramic, or RC for system clock (RC is only for the KS57C0002) Crystal, ceramic: 4.19 MHz (typical) RC: 1 MHz CPU clock divider circuit (by 4, 8, or 64) 0.95, 1.91, 15.3 s at 4.19 MHz
8-Bit Serial I/O Interface 8-bit transmit/receive mode 8-bit receive-only mode LSB-first or MSB-first transmission selectable Internal or external clock source
24 I/O Pins I/O: 18 pins, including 8 highcurrent pins Input only: 6 pins
Comparator 4-channel mode with internal reference (4-bit resolution) and 16-step variable reference voltage 3-channel mode with external reference 150 mV resolution (minimum)
Bit Sequential Carrier Support for 16-bit serial data transfer in arbitrary format
Interrupts Two external interrupt vectors Three internal interrupt vectors Two quasi-interrupts
8-Bit Timer/Counter Programmable interval timer External event counter function Timer/counter clock output to TCLO0 pin
21
PRODUCT SPECIFICATION
BASIC TIMER
WATCH TIMER
RESET
Xin
I/O PORT 3 INTERNAL INTERRUPTS I/O PORT 4 I/O PORT 5 ARITHMETIC LOGIC UNIT I/O PORT 6 INSTRUCTION DECODER
PROGRAM COUNTER
P4.0P4.3 P5.0P5.3
P1.0 / INT0 P1.1 / INT1 P2.0 / CIN0 P2.1 / CIN1 P2.2 / CIN2 P2.3 / CIN3
P0.0 /
SCK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
30 29 28 27 26 25
V DD P6.3 / BUZ P6.2 / KS2 P6.1 / KS1 P6.0 / KS0 P5.3 P5.2 P5.1 P5.0 P4.3 P4.2 P4.1 P4.0 Xout Xin
P0.0/ SCK P0.1/SO P0.2/SI P1.0/INT0 NC P1.1/INT1 P2.0/CIN0 P2.1/CIN1 P2.2/CIN2 P2.3/CIN3 P3.0/TCL0 P3.1/TCLO0 P3.2/CLO
RESET
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
32 31 30 29 28 27
VDD P6.3/BUZ P6.2/KS2 P6.1/KS1 P6.0/KS0 P5.3 P5.2 P5.1 P5.0 P4.3 P4.2 NC P4.1 P4.0 Xout Xin
P0.1 / SO P0.2 / SI P1.0 / INT0 P1.1 / INT1 P2.0 / CIN0 P2.1 / CIN1 P2.2 / CIN2 P2.3 / CIN3 P3.0 / TCL0 P3.1 / TCLO0 P3.2 / CLO
RESET
24 23 22 21 20 19 18 17 16
26
TEST V SS
TEST VSS
30 SDIP
32 SOP
S MSUN G
September 1996 22
ELECTRONICS
PRODUCT SPECIFICATION
Table 1. KS57C0002/0004 Pin Descriptions Pin Name P0.0 P0.1 P0.2 Pin Type I/O Description 3-bit I/O port. 1-bit or 3-bit read/write and test is possible. Pull-up resistors are assignable to input pins by software and are automatically disabled for output pins. Pins are individually configurable as input or output. 2-bit input port. 1-bit or 2-bit read and test is possible. Pull-up resistors are assignable by software. 4-bit input port. 1-bit or 4-bit read and test is possible. Same as port 0 Number 1 2 3 Share Pin
SCK
SO SI
I I I/O
4 5 69 10 11 12 1821 2225
I/O
4-bit I/O ports. 1-, 4-, or 8-bit read/write and test is possible. Pins are individually configurable as input or output. Ports can be configurable as n-channel open-drain by mask option (maximum 9V). 4-bit I/O port. 1-bit or 4-bit read/write and test is possible. Pull-up resistors are assignable to input pins by software and are automatically disabled for output pins. Pins individually configurable as input or output. External interrupts with rising/falling edge detection External interrupts with rising/falling edge detection 4-channel comparator input. CIN0CIN2: comparator input only. CIN3: comparator input or external reference input Serial interface clock signal Serial data output Serial data input External clock input for timer/counter Timer/counter clock output CPU clock output 2 kHz, 4 kHz, 8 kHz, or 16 kHz frequency output at 4.19 MHz for buzzer sound Quasi-interrupt input with falling edge detection Main power supply Ground Reset signal Test signal input (must be connected to VSS) Crystal, ceramic, or RC oscillator signal for system clock
I/O
26 27 28 29 4 5 69
I I I
SCK
1 2 3 10 11 12 29 2628 30 15 13 14 16, 17
S MSUN G
ELECTRONICS
23
September 1996
PRODUCT SPECIFICATION
Table 2. Supplemental KS57C0002/0004 Pin Data Pin Numbers 1, 2, 3 4, 5 69 1012 13 14 15 16, 17 1821 2225 2629 30 Pin Names P0.0P0.2 P1.0, P1.1 P2.0P2.3 P3.0P3.2
RESET
Share Pins
SCK
Circuit Type 5 3 6, 8 * 5 9 7 7 5
, SO, SI
S MSUN G
September 1996 24
ELECTRONICS