KS88C0916/P0916 MICROCONTROLLER
PRODUCT OVERVIEW
1
PRODUCT OVERVIEW
KS88-SERIES MICROCONTROLLERS
Samsung's KS88 series of 8-bit single-chip CMOS microcontrollers offers a fast and efficient CPU, a wide range of integrated peripherals, and various mask-programmable ROM sizes. Important CPU features include: — Efficient register-oriented architecture — Selectable CPU clock sources — Idle and Stop power-down mode release by interrupt — Built-in basic timer with watchdog function A sophisticated interrupt structure recognizes up to eight interrupt levels. Each level can have one or more interrupt sources and vectors. Fast interrupt processing (within a minimum six CPU clocks) can be assigned to specific interrupt levels.
KS88C0916/P0916 MICROCONTROLLER
The KS88C0916/P0916 single-chip CMOS microcontroller is fabricated using a highly advanced CMOS process and is based on Samsung’s newest CPU architecture. The KS88C0916 is the microcontroller which has 16Kbytes mask-programmable ROM. The KS88P0916 is the microcontroller which has 16Kbytes one-time-programmable EPROM. Using a proven modular design approach, Samsung engineers developed the KS88C0916/P0916 by integrating the following peripheral modules with the powerful SAM87 core: — Four programmable I/O ports, including three 8-bit ports and one 2-bit port, for a total of 26 pins. — Twelve bit-programmable pins for external interrupts. — One 8-bit basic timer for oscillation stabilization and watchdog functions (system reset). Figure 1-1. KS88C0916 Microcontroller — One 8-bit timer/counter and one 16-bit timer/counter with selectable operating modes. — One 8-bit counter with auto-reload function and one-shot or repeat control. The KS88C0916 is a versatile general-purpose microcontroller. It is currently available in a 32-pin SOP and SDIP package.
1-1
PRODUCT OVERVIEW
KS88C0916/P0916 MICROCONTROLLER
FEATURES
CPU • SAM87 CPU core Timers and Timer/Counters • One programmable 8-bit basic timer (BT) for oscillation stabilization control or watchdog timer (software reset) function One 8-bit timer/counter (Timer 0) with three operating modes; Interval, Capture and PWM One 16-bit timer/counter (Timer 1) with two operating modes; Interval and Capture
Memory • • 16-Kbyte internal program memory (ROM) 317-byte internal register file • •
Instruction Set • • 78 instructions IDLE and STOP instructions added for powerdown modes
Carrier Frequency Generator • One 8-bit counter with auto-reload function and one-shot or repeat control (Counter A)
Instruction Execution Time • 750 ns at 8-MHz fOSC (minimum) •
Operating Temperature Range – 20°C to + 85°C
Interrupts • • • Six interrupt levels and 18 interrupt sources 15 vectors (14 sources have a dedicated vector address and four sources share a single vector) Fast interrupt processing feature (for one selected interrupt level)
Operating Voltage Range • • 2.0 V to 5.5 V at 4 MHz fOSC 2.4 V to 5.5 V at 8 MHz fOSC
Package Type I/O Ports • • Three 8-bit I/O ports (P0–P2) and one 2-bit port (P3) for a total of 26 bit-programmable pins Twelve input pins for external interrupts • • 32-pin SOP 32-pin SDIP
1-2
KS88C0916/P0916 MICROCONTROLLER
PRODUCT OVERVIEW
BLOCK DIAGRAM
P0.00.7 (INT0NT4)
P1.01.7
RESET TEST XIN XOUT MAIN OSC PORT 0 PORT 1
INTERNAL BUS PORT2 I/O PORT and INTERRUPT CONTROL
P2.02.3 (INT5NT8) P2.42.7
8-BIT BASIC TIMER
SAM8 CPU
8-BIT TIMER/ COUNTER
PORT 3
P3.0/T0PWM/ T0CAP/T1CAP
P3.1/REM/T0CK
16-BIT TIMER/ COUNTER
16-KB ROM
317-BYTES REGISTER FILE
CARRIER GENERATOR (COUNTER A)
Figure 1-2. Block Diagram
1-3
PRODUCT OVERVIEW
KS88C0916/P0916 MICROCONTROLLER
PIN ASSIGNMENTS
VSS XIN XOUT TEST P2.0 / INT5 P2.1 / INT6 P2.2 / INT7 P2.3 / INT8 P0.0 / INT0 P0.1 / INT1 P0.2 / INT2 P0.3 / INT3 P0.4 / INT4 P0.5 / INT4 P0.6 / INT4 P0.7 / INT4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
KS88C0916 32-SOP/SDIP (Top View)
32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
VDD RESET P3.1 / REM / T0CK P3.0 / T0PWM / T0CAP / T1CAP P2.7 P2.6 P2.5 P2.4 P1.7 P1.6 P1.5 P1.4 P1.3 P1.2 P1.1 P1.0
Figure 1-3. Pin Assignment Diagram (32-Pin SOP/SDIP Package)
1-4
KS88C0916/P0916 MICROCONTROLLER
PRODUCT OVERVIEW
PIN DESCRIPTIONS
Table 1-1. Pin Descriptions Pin Names P0.0–P0.7 Pin Type I/O Pin Description I/O port with bit-programmable pins. Configurable to input or push-pull output mode. Pull-up resistors are assignable by software. Pins can be assigned individually as external interrupt inputs with noise filters, interrupt enable/ disable, and interrupt pending control. I/O port with bit-programmable pins. Configurable to Schmitt trigger input mode or output mode. Pin circuits are either pushpull or n-channel open-drain type. Pull-up resistors are assignable by software. General-purpose I/O port with bitprogrammable pins. Configurable to Schmitt trigger input mode, push-pull output mode, or n-channel open-drain output mode. Pullup resistors are assignable by software. Lower nibble pins, P2.3–P2.0, can be assigned as external interrupt inputs with noise filters, interrupt enable/disable, and interrupt pending control. 2-bit I/O port with bit-programmable pins. Configurable to Schmitt trigger input mode, push-pull output mode, or n-channel opendrain output mode. Pull-up resistors are assignable by software. The two port 3 pins have high current drive capability. System clock input and output pins System reset signal input pin with schmitt trigger circuit. Test signal input pin (for factory use only; must be connected to VSS). VDD VSS — — Power supply input pin Ground pin — — 32 1 — — Circuit Type 1 Pin No. 9–16 Shared Functions INT0–INT4
P1.0–P1.7
I/O
3
17–24
—
P2.0–P2.3 P2.4–P2.7
I/O
2 3
5–8, 25–28
INT5–INT8 —
P3.0 P3.1
I/O
4
29 30
T0PWM/ T0CAP/ T1CAP/ REM/T0CK
XIN, XOUT RESET TEST
— I I
— 5 —
2, 3 31 4
— — —
1-5
PRODUCT OVERVIEW
KS88C0916/P0916 MICROCONTROLLER
PIN CIRCUITS
V DD
PULL-UP RESISTOR (Typical 50 ΚΩ)
PULL-UP ENABLE
V DD
DATA INPUT / OUTPUT OUTPUT DISABLE
INTERRUPT INPUT IRQ6,7 (INT0 -4)
NORMAL INPUT
NOISE FILTER
V SS
Figure 1-4. Pin Circuit Type 1 (Port 0)
1-6
KS88C0916/P0916 MICROCONTROLLER
PRODUCT OVERVIEW
PIN CIRCUITS (Cont.)
V DD
PULL-UP RESISTOR (Typical 50 ΚΩ) PULL-UP ENABLE
VDD
DATA
IN / OUT OPEN-DRAIN OUTPUT DISABLE
NORMAL INPUT EXTERNAL INTERRUPT IRQ5 (INT5-8)
VSS
NOISE FILTER
Figure 1–5. Pin Circuit Type 2 (Ports 2.0–2.3)
1-7
PRODUCT OVERVIEW
KS88C0916/P0916 MICROCONTROLLER
PIN CIRCUITS (Cont.)
VDD
PULL-UP RESISTOR (Typical 50 ΚΩ ) PULL-UP ENABLE
VDD
DATA
OPENDRAIN OUTPUT DISABLE NORMAL INPUT
IN / OUT
VSS
Figure 1-6. Pin Circuit Type 3 (Ports 1 and P2.4–P2.7)
1-8
KS88C0916/P0916 MICROCONTROLLER
PRODUCT OVERVIEW
PIN CIRCUITS (Cont.)
VDD
PULL-UP RESISTOR (Typical 50 Κ Ω) PULL-UP ENABLE PORT 3 DATA ALTERNATIVE OUTPUT OPENDRAIN OUTPUT DISABLE NORMAL INPUT ALTERNATIVE INPUT NOISE FILTER SELECT
VDD
M U X DATA
IN / OUT
VSS
Figure 1-7. Pin Circuit Type 4 (Port 3)
RESET
Figure 1-8. Pin Circuit Type 5 (RESET)
1-9
PRODUCT OVERVIEW
KS88C0916/P0916 MICROCONTROLLER
NOTES
1-10
KS88C0916/P0916 MICROCONTROLLER
OTP
13
OVERVIEW
OTP
The KS88P0916 single-chip CMOS microcontroller is the OTP (One Time Programmable) version of the KS88C0916 microcontroller. It has an on-chip EPROM instead of masked ROM. The KS88P0916 is fully compatible with the KS88C0916, both in function and in pin configuration. Because of its simple programming requirements, the KS88P0916 is ideal for use as an evaluation chip for the KS88C0916.
Vss Xin Xout MODE / TEST PG M / P2.0 / INT5 MEM_R EG / P2.1 / INT6 A8 / P2.2 / INT7 A9 / P2.3 / INT8 A0 / P0.0 / INT0 A1 / P0.1 / INT1 A2 / P0.2 / INT2 A3 / P0.3 / INT3 A4 / P0.4 / INT4 A5 / P0.5 / INT4 A6 / P0.6 / INT4 A7 / P0.7 / INT4
1 2 3 4 5 6 7 8 KS88P0916 9 (Top View) 10 11 12 13 14 15 16
32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
VDD
R ESET/ Vpp
P3.1 / REM / T0CK/ C E P3.0 / O E P2.7 / A13 P2.6 /A12 P2.5 / A11 P2.4 /A10 P1.7 / D7 P1.6 /D6 P1.5 / D5 P1.4 / D4 P1.3 /D3 P1.2 / D2 P1.1 / D1 P1.0 /D0
Figure 13–1. KS88P0916 Pin Assignments
13-1
OTP
KS88C0916/P0916 MICROCONTROLLER
Table 13–1. Pin Descriptions used to read/write the EPROM Pin Name A0 - A13 D0 - D7 MODE CE OE PGM MEM_REG VDD VPP VSS Xin Xout Pin No. 7 - 16, 25 - 28 17 - 24 4 30 29 5 6 32 31 1 2 3 I/O O I/O — I I I I — — — — — Function Address lines to read/write EPROM 8-bit data input/output lines to read/write EPROM Select EPROM mode. Chip enable (Connect to VSS, when read/write EPROM) Output enable EPROM Program enable Select Memory space of EPROM Supply voltage (normally 5 V) EPROM Program/Verify voltage (normally 12.5 V) GROUND System Clock input pin System Clock output pin
CHARACTERISTICS OF EPROM OPERATION When +12.5 V is supplied to VPP and MODE pins of the KS88P0916, the EPROM programming mode is entered. The operating mode (read, write) is selected according to the input signals to the pins listed in Table2 as below.
Table 13–2. Operating Mode Selection Criteria VDD 5V MODE VPP VPP 12.5 V PGM 1 0 1
NOTE: "0" means Low level; "1" means High level.
MEM 1 1 1
OE 0 1 0 READ PROGRAM
Mode
PROGRAM VERIFY
13-2
KS88C0916/P0916 MICROCONTROLLER
OTP
A13 - A0
t OED D7 - D0 t OEH t ACC OE t OEW MODE
12.5V
Figure 13–2. OTP Read Timing
Table 13–3. OTP Read characteristics (TA = 25 °C ± 5°C, VDD = 5 V ± 5 %, VPP = 12.5 V ± 0.25V) Parameter Address to Output Delay OE to Address Delay OE Pulse Width Output hold from OE whichever occurs first Symbol tACC tOED tOEW tOEH Min — 0 75 0 Typ — — — — Max 75 — — — Units ns
13-3
OTP
KS88C0916/P0916 MICROCONTROLLER
PROGRAM A13 - A0
PROGRAM VERIFY
D7 - D0 t DS MODE
Data In Stable
Data Out Valid t OEH
t VS PGM t PW
t DH t OE
t OEW OE
Figure 13–3. Program Memory Write Timing
Table 13–4. OTP Program/Program Verify Characterist