Samsung S3C80M4/F80M4 User manual

S3C80M4/F80M4
8-BIT CMOS
MICROCONTROLLERS
USER'S MANUAL
Revision 1

Important Notice
The information in this publication has been carefully
checked and is believed to be entirely accurate at
the time of publication. Samsung assumes no
responsibility, however, for possible errors or
omissions, or for any consequences resulting from
the use of the information contained herein.
Samsung reserves the right to make changes in its
products or product specifications with the intent to
improve function or design at any time and without
notice and is not required to update this
documentation to reflect such changes.
This publication does not convey to a purchaser of
semiconductor devices described herein any license
under the patent rights of Samsung or others.
Samsung makes no warranty, representation, or
guarantee regarding the suitability of its products for
any particular purpose, nor does Samsung assume
any liability arising out of the application or use of
any product or circuit and specifically disclaims any
and all liability, including without limitation any
consequential or incidental damages.
"Typical" parameters can and do vary in different
applications. All operating parameters, including
"Typicals" must be validated for each customer
application by the customer's technical experts.
Samsung products are not designed, intended, or
authorized for use as components in systems
intended for surgical implant into the body, for other
applications intended to support or sustain life, or for
any other application in which the failure of the
Samsung product could create a situation where
personal injury or death may occur.
Should the Buyer purchase or use a Samsung
product for any such unintended or unauthorized
application, the Buyer shall indemnify and hold
Samsung and its officers, employees, subsidiaries,
affiliates, and distributors harmless against all
claims, costs, damages, expenses, and reasonable
attorney fees arising out of, either directly or
indirectly, any claim of personal injury or death that
may be associated with such unintended or
unauthorized use, even if such claim alleges that
Samsung was negligent regarding the design or
manufacture of said product.
S3C80M4/F80M4 8-Bit CMOS Microcontrollers
User's Manual, Revision 1
Publication Number: 21-S3-C80M4/F80M4-052005
© 2005 Samsung Electronics
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in
any form or by any means, electric or mechanical, by photocopying, recording, or otherwise, without the prior
written consent of Samsung Electronics.
Samsung Electronics' microcontroller business has been awarded full ISO-14001
certification (BSI Certificate No. FM24653). All semiconductor products are
designed and manufactured in accordance with the highest quality standards and
objectives.
Samsung Electronics Co., Ltd.
San #24 Nongseo-Ri, Giheung- Eup
Yongin-City, Gyeonggi-Do, Korea
C.P.O. Box #37, Suwon 449-900
TEL: (82)-(031)-209-1934
FAX: (82)-(031)-209-1889
Home-Page URL: Http://www.samsungsemi.com
Printed in the Republic of Korea

S3C80M4/F80M4 MICROCONTROLLER iii
Preface
The S3C80M4/F80M4 Microcontroller User's Manual is designed for application designers and programmers who
are using the S3C80M4/F80M4 microcontroller for application development. It is organized in two main parts:
Part I Programming Model Part II Hardware Descriptions
Part I contains software-related information to familiarize you with the microcontroller's architecture, programming
model, instruction set, and interrupt structure. It has six chapters:
Chapter 1 Product Overview
Chapter 2 Address Spaces
Chapter 3 Addressing Modes
Chapter 4 Control Registers
Chapter 5 Interrupt Structure
Chapter 6 Instruction Set
Chapter 1, "Product Overview," is a high-level introduction to S3C80M4/F80M4 with general product descriptions,
as well as detailed information about individual pin characteristics and pin circuit types.
Chapter 2, "Address Spaces," describes program and data memory spaces, the internal register file, and register
addressing. Chapter 2 also describes working register addressing, as well as system stack and user-defined
stack operations.
Chapter 3, "Addressing Modes," contains detailed descriptions of the addressing modes that are supported by the
S3C8-series CPU.
Chapter 4, "Control Registers," contains overview tables for all mapped system and peripheral control register
values, as well as detailed one-page descriptions in a standardized format. You can use these easy-to-read,
alphabetically organized, register descriptions as a quick-reference source when writing programs.
Chapter 5, "Interrupt Structure," describes the S3C80M4/F80M4 interrupt structure in detail and further prepares
you for additional information presented in the individual hardware module descriptions in Part II.
Chapter 6, "Instruction Set," describes the features and conventions of the instruction set used for all S3C8-series
microcontrollers. Several summary tables are presented for orientation and reference. Detailed descriptions of
each instruction are presented in a standard format. Each instruction description includes one or more practical
examples of how to use the instruction when writing an application program.
A basic familiarity with the information in Part I will help you to understand the hardware module descriptions in
Part II. If you are not yet familiar with the S3C8-series microcontroller family and are reading this manual for the
first time, we recommend that you first read Chapters 1-3 carefully. Then, briefly look over the detailed information
in Chapters 4, 5, and 6. Later, you can reference the information in Part I as necessary.
Part II "hardware Descriptions," has detailed information about specific hardware components of the
S3C80M4/F80M4 microcontroller. Also included in Part II are electrical, mechanical, flash, and development tools
data. It has 10 chapters:
Chapter 7 Clock Circuit
Chapter 8 RESET and Power-Down
Chapter 9 I/O Ports
Chapter 10 Basic Timer
Chapter 11 8-bit Timer 0
Chapter 12 8-bit PWM Timer
Chapter 13 Electrical Data
Chapter 14 Mechanical Data
Chapter 15 S3F80M4 Flash MCU
Chapter 16 Development Tools
Two order forms are included at the back of this manual to facilitate customer order for S3C80M4/F80M4
microcontrollers: the Mask ROM Order Form, and the Mask Option Selection Form. You can photocopy these
forms, fill them out, and then forward them to your local Samsung Sales Representative.

S3C80M4/F80M4 MICROCONTROLLER v
Table of Contents
Part I — Programming Model
Chapter 1 Product Overview
S3C8-Series Microcontrollers .......................................................................................................................1-1
S3C80M4/F80M4 Microcontroller .................................................................................................................1-1
Flash..............................................................................................................................................................1-1
Features ........................................................................................................................................................1-2
Block Diagram...............................................................................................................................................1-3
Pin Assignment .............................................................................................................................................1-4
Pin Descriptions ............................................................................................................................................1-6
Pin Circuits ....................................................................................................................................................1-7
Chapter 2 Address Spaces
Overview........................................................................................................................................................2-1
Program Memory (ROM)...............................................................................................................................2-2
Register Architecture.....................................................................................................................................2-3
Register Page Pointer (PP)..................................................................................................................2-5
Register Set 1.......................................................................................................................................2-6
Register Set 2.......................................................................................................................................2-6
Prime Register Space...........................................................................................................................2-7
Working Registers ................................................................................................................................2-8
Using The Register Points....................................................................................................................2-9
Register Addressing......................................................................................................................................2-11
Common Working Register Area (C0H–CFH) .....................................................................................2-13
4-Bit Working Register Addressing ......................................................................................................2-14
8-Bit Working Register Addressing ......................................................................................................2-16
System and User Stack.................................................................................................................................2-18

vi S3C80M4/F80M4 MICROCONTROLLER
Table of Contents (Continued)
Chapter 3 Addressing Modes
Overview....................................................................................................................................................... 3-1
Register Addressing Mode (R)..................................................................................................................... 3-2
Indirect Register Addressing Mode (IR)....................................................................................................... 3-3
Indexed Addressing Mode (X)...................................................................................................................... 3-7
Direct Address Mode (DA)............................................................................................................................ 3-10
Indirect Address Mode (IA)........................................................................................................................... 3-12
Relative Address Mode (RA)........................................................................................................................ 3-13
Immediate Mode (IM).................................................................................................................................... 3-14
Chapter 4 Control Registers
Overview....................................................................................................................................................... 4-1
Chapter 5 Interrupt Structure
Overview....................................................................................................................................................... 5-1
Interrupt Types..................................................................................................................................... 5-2
S3C80M4 Interrupt Structure............................................................................................................... 5-3
Interrupt Vector Addresses.................................................................................................................. 5-4
Enable/Disable Interrupt Instructions (EI, DI) ...................................................................................... 5-6
System-Level Interrupt Control Registers............................................................................................ 5-6
Interrupt Processing Control Points..................................................................................................... 5-7
Peripheral Interrupt Control Registers................................................................................................. 5-8
System Mode Register (SYM) ............................................................................................................. 5-9
Interrupt Mask Register (IMR) ............................................................................................................. 5-10
Interrupt Priority Register (IPR)............................................................................................................ 5-11
Interrupt Request Register (IRQ)......................................................................................................... 5-13
Interrupt Pending Function Types........................................................................................................ 5-14
Interrupt Source Polling Sequence...................................................................................................... 5-15
Interrupt Service Routines ................................................................................................................... 5-15
Generating Interrupt Vector Addresses............................................................................................... 5-16
Nesting of Vectored Interrupts............................................................................................................. 5-16
Instruction Pointer (IP) ......................................................................................................................... 5-16
Fast Interrupt Processing..................................................................................................................... 5-16
Chapter 6 Instruction Set
Overview....................................................................................................................................................... 6-1
Data Types........................................................................................................................................... 6-1
Register Addressing............................................................................................................................. 6-1
Addressing Modes ............................................................................................................................... 6-1
Flags Register (FLAGS)....................................................................................................................... 6-6
Flag Descriptions ................................................................................................................................. 6-7
Instruction Set Notation........................................................................................................................ 6-8
Condition Codes .................................................................................................................................. 6-12
Instruction Descriptions........................................................................................................................ 6-13

S3C80M4/F80M4 MICROCONTROLLER vii
Table of Contents (Continued)
Part II Hardware Descriptions
Chapter 7 Clock Circuit
Overview........................................................................................................................................................7-1
System Clock Circuit ............................................................................................................................7-1
CPU Clock Notation..............................................................................................................................7-1
Main Oscillator Circuits.........................................................................................................................7-2
Clock Status During Power-Down Modes............................................................................................7-3
System Clock Control Register (CLKCON)..........................................................................................7-4
Clock Output Control Register (CLOCON)...........................................................................................7-5
Stop Control Register (STPCON).........................................................................................................7-6
Chapter 8 RESET and Power-Down
System Reset................................................................................................................................................8-1
Overview...............................................................................................................................................8-1
Normal Mode Reset Operation.............................................................................................................8-1
Hardware Reset Values........................................................................................................................8-2
Power-Down Modes......................................................................................................................................8-4
Power-Down Modes......................................................................................................................................8-4
Stop Mode ............................................................................................................................................8-4
Idle Mode..............................................................................................................................................8-5
Chapter 9 I/O Ports
Overview........................................................................................................................................................9-1
Port Data Registers ..............................................................................................................................9-1
Port 0 ....................................................................................................................................................9-2
Port 1 ....................................................................................................................................................9-5
Chapter 10 Basic Timer
Overview........................................................................................................................................................10-1
Basic Timer (BT)...................................................................................................................................10-1
Basic Timer Control Register (BTCON) ...............................................................................................10-1
Basic Timer Function Description.........................................................................................................10-3

viii S3C80M4/F80M4 MICROCONTROLLER
Table of Contents (Continued)
Chapter 11 8-bit Timer 0
Overview....................................................................................................................................................... 11-1
Timer 0 Function Description............................................................................................................... 11-1
Timer 0 Control Register (T0CON)...................................................................................................... 11-2
Block Diagram...................................................................................................................................... 11-3
Chapter 12 8-bit Pulse Width Modulation
Overview....................................................................................................................................................... 12-1
8-bit Pulse Width Modulation (PWMCON)........................................................................................... 12-2
Block Diagram...................................................................................................................................... 12-3
Chapter 13 Electrical Data
Overview....................................................................................................................................................... 13-1
Chapter 14 Mechanical Data
Overview....................................................................................................................................................... 14-1
Chapter 15 S3F80M Flash MCU
Overview....................................................................................................................................................... 15-1
Operating Mode Characteristics.......................................................................................................... 15-5
Chapter 16 Development Tools
Overview....................................................................................................................................................... 16-1
SHINE .................................................................................................................................................. 16-1
SAMA Assembler................................................................................................................................. 16-1
SASM88............................................................................................................................................... 16-1
HEX2ROM ........................................................................................................................................... 16-1
Target Boards ...................................................................................................................................... 16-1
TB80M4 Target Board ......................................................................................................................... 16-3
SMDS2+ Selection (SAM8) ................................................................................................................. 16-5
Idle LED ............................................................................................................................................... 16-5
Stop LED.............................................................................................................................................. 16-5

S3C80M4/F80M4 MICROCONTROLLER ix
List of Figures
Figure Title Page
Number Number
1-1 Block Diagram ............................................................................................................1-3
1-2 S3C80M4/F80M4 Pin Assignments (20-DIP-300A, 20-SOP-375).............................1-4
1-3 S3C80M4/F80M4 Pin Assignments (16-DIP-300A, 16-SOP-375).............................1-5
1-4 Pin Circuit Type A.......................................................................................................1-7
1-5 Pin Circuit Type B.......................................................................................................1-7
1-6 Pin Circuit Type E-2 (P1.4–P1.6) ...............................................................................1-7
1-7 Pin Circuit Type D-4 (P0)............................................................................................1-8
1-8 Pin Circuit Type E-4 (P1.0–P1.3) ...............................................................................1-8
2-1 Program Memory Address Space ..............................................................................2-2
2-2 Internal Register File Organization.............................................................................2-4
2-3 Register Page Pointer (PP)........................................................................................2-5
2-4 Set 1, Set 2, Prime Area Register Map......................................................................2-7
2-5 8-Byte Working Register Areas (Slices).....................................................................2-8
2-6 Contiguous 16-Byte Working Register Block.............................................................2-9
2-7 Non-Contiguous 16-Byte Working Register Block .....................................................2-10
2-8 16-Bit Register Pair ....................................................................................................2-11
2-9 Register File Addressing ............................................................................................2-12
2-10 Common Working Register Area................................................................................2-13
2-11 4-Bit Working Register Addressing ............................................................................2-15
2-12 4-Bit Working Register Addressing Example .............................................................2-15
2-13 8-Bit Working Register Addressing ............................................................................2-16
2-14 8-Bit Working Register Addressing Example .............................................................2-17
2-15 Stack Operations........................................................................................................2-18
3-1 Register Addressing...................................................................................................3-2
3-2 Working Register Addressing.....................................................................................3-2
3-3 Indirect Register Addressing to Register File.............................................................3-3
3-4 Indirect Register Addressing to Program Memory.....................................................3-4
3-5 Indirect Working Register Addressing to Register File ..............................................3-5
3-6 Indirect Working Register Addressing to Program or Data Memory..........................3-6
3-7 Indexed Addressing to Register File ..........................................................................3-7
3-8 Indexed Addressing to Program or Data Memory with Short Offset..........................3-8
3-9 Indexed Addressing to Program or Data Memory......................................................3-9
3-10 Direct Addressing for Load Instructions .....................................................................3-10
3-11 Direct Addressing for Call and Jump Instructions......................................................3-11
3-12 Indirect Addressing.....................................................................................................3-12
3-13 Relative Addressing....................................................................................................3-13
3-14 Immediate Addressing................................................................................................3-14

x S3C80M4/F80M4 MICROCONTROLLER
List of Figures(Continued)
Figure Title Page
Number Number
4-1 Register Description Format...................................................................................... 4-3
5-1 S3C8-Series Interrupt Types..................................................................................... 5-2
5-2 S3C80M4/F80M4 Interrupt Structure......................................................................... 5-3
5-3 ROM Vector Address Area ........................................................................................ 5-4
5-4 Interrupt Function Diagram........................................................................................ 5-7
5-5 System Mode Register (SYM) ................................................................................... 5-9
5-6 Interrupt Mask Register (IMR) ................................................................................... 5-10
5-7 Interrupt Request Priority Groups.............................................................................. 5-11
5-8 Interrupt Priority Register (IPR) ................................................................................. 5-12
5-9 Interrupt Request Register (IRQ)............................................................................... 5-13
6-1 System Flags Register (FLAGS) ............................................................................... 6-6
7-1 Crystal/Ceramic Oscillator (fx)................................................................................... 7-2
7-2 External Oscillator (fx)................................................................................................ 7-2
7-3 RC Oscillator (fx)........................................................................................................ 7-2
7-4 System Clock Circuit Diagram................................................................................... 7-3
7-5 System Clock Control Register (CLKCON)............................................................... 7-4
7-6 Clock Output Control Register (CLOCON)................................................................ 7-5
7-7 Clock Output Block Diagram...................................................................................... 7-5
7-8 STOP Control Register (STPCON)............................................................................ 7-6
9-1 Port 0 High-Byte Control Register (P0CONH)........................................................... 9-3
9-2 Port 0 Low-Byte Control Register (P0CONL) ............................................................ 9-3
9-3 Port 0 Interrupt Control Register................................................................................ 9-4
9-4 Port 0 Interrupt Pending Register (P0PND)............................................................... 9-4
9-5 Port 1 High-Byte Control Register (P1CONH)........................................................... 9-5
9-6 Port 1 Low-Byte Control Register (P1CONL) ............................................................ 9-6
9-7 Port 1 Pull-up Resistor Enable Register (P1PUR)..................................................... 9-6
10-1 Basic Timer Control Register (BTCON)..................................................................... 10-2
10-2 Basic Timer Block Diagram ....................................................................................... 10-4
11-1 Timer 0 Control Register (T0CON)............................................................................ 11-2
11-2 Timer 0 Functional Block Diagram............................................................................. 11-3
12-1 PWM Control Register (PWMCON)........................................................................... 12-2
12-2 PWM Circuit Diagram ................................................................................................ 12-3

S3C80M4/F80M4 MICROCONTROLLER xi
List of Figures(Concluded)
Page Title Page
Number Number
13-1 Input Timing for External Interrupts............................................................................13-5
13-2 Input Timing for nRESET............................................................................................13-5
13-3 Stop Mode Release Timing Initiated by RESET.........................................................13-6
13-4 Stop Mode Release Timing Initiated by Interrupt.......................................................13-7
13-5 Clock Timing Measurement at XIN .............................................................................13-9
13-6 Operating Voltage Range...........................................................................................13-9
14-1 20-DIP-300A Package Dimensions............................................................................14-1
14-2 20-SOP-375 Package Dimensions.............................................................................14-2
14-3 16-DIP-300A Package Dimensions............................................................................14-3
14-4 16-SOP-375 Package Dimensions.............................................................................14-4
15-1 S3F80M4 Pin Assignments (20-DIP-300A, 20-SOP-375) .........................................15-2
15-2 S3F80M4 Pin Assignments (16-DIP-300A, 16-SOP-375) .........................................15-3
15-3 Operating Voltage Range...........................................................................................15-6
16-1 SMDS Product Configuration (SMDS2+) ...................................................................16-2
16-2 TB80M4 Target Board Configuration .........................................................................16-3
16-3 20-Pin Connectors (J101) for TB80M4.......................................................................16-7
16-4 S3E80M0 Cables for 16/20-DIP Package..................................................................16-7

S3C80M4/F80M4 MICROCONTROLLER xiii
List of Tables
Table Title Page
Number Number
1-1 S3C80M4/F80M4 Pin Descriptions ............................................................................1-6
2-1 S3C80M4/F80M4 Register Type Summary ...............................................................2-3
4-1 Set 1 Registers...........................................................................................................4-1
4-2 Set 1, Bank 0 Registers..............................................................................................4-2
5-1 Interrupt Vectors.........................................................................................................5-5
5-2 Interrupt Control Register Overview...........................................................................5-6
5-3 Interrupt Source Control and Data Registers.............................................................5-8
6-1 Instruction Group Summary........................................................................................6-2
6-2 Flag Notation Conventions.........................................................................................6-8
6-3 Instruction Set Symbols..............................................................................................6-8
6-4 Instruction Notation Conventions ...............................................................................6-9
6-5 Opcode Quick Reference...........................................................................................6-10
6-6 Condition Codes.........................................................................................................6-12
8-1 S3C80M4/F80M4 Set 1 Register and Values after RESET.......................................8-2
8-2 S3C80M4/F80M4 Set 1, Bank 0 Register and Values after RESET..........................8-3
9-1 S3C80M4/F80M4 Port Configuration Overview.........................................................9-1
9-2 Port Data Register Summary......................................................................................9-1

xiv S3C80M4/F80M4 MICROCONTROLLER
List of Tables (Continued)
Table Title Page
Number Number
13-1 Absolute Maximum Ratings....................................................................................... 13-2
13-2 D.C. Electrical Characteristics................................................................................... 13-2
13-3 A.C. Electrical Characteristics ................................................................................... 13-5
13-4 Input/Output Capacitance.......................................................................................... 13-6
13-5 Data Retention Supply Voltage in Stop Mode ........................................................... 13-6
13-6 Main Oscillator Characteristics.................................................................................. 13-8
13-7 Main Oscillation Stabilization Time............................................................................ 13-9
15-1 Descriptions of Pins Used to Read/Write the EPROM.............................................. 15-4
15-2 Comparison of S3F80M4 and F80M4 Features........................................................ 15-4
15-3 Operating Mode Selection Criteria............................................................................. 15-5
15-4 D.C. Electrical Characteristics................................................................................... 15-5
16-1 Power Selection Settings for TB80M4....................................................................... 16-4
16-2 Main-clock Selection Settings for TB80M4................................................................ 16-4
16-3 Device Selection Settings for TB80M4...................................................................... 16-5
16-4 The SMDS2+ Tool Selection Setting......................................................................... 16-5
16-5 Smart Option Source Selection Settings for TB80M4 ............................................... 16-6
16-6 Smart Option Switch Setting for TB80M4.................................................................. 16-6

S3C80M4/F80M4 MICROCONTROLLER xv
List of Programming Tips
Description Page
Number
Chapter 2: Address Spaces
Using the Page Pointer for RAM clear (Page 0, Page1) ..........................................................................2-5
Setting the Register Pointers....................................................................................................................2-9
Using the RPs to Calculate the Sum of a Series of Registers..................................................................2-10
Addressing the Common Working Register Area.....................................................................................2-14
Standard Stack Operations Using PUSH and POP..................................................................................2-19
Chapter 7: Clock Circuit
How to Use Stop Instruction .....................................................................................................................7-6

S3C80M4/F80M4 MICROCONTROLLER xvii
List of Register Descriptions
Register Full Register Name Page
Identifier Number
BTCON Basic Timer Control Register .....................................................................................4-4
CLKCON System Clock Control Register..................................................................................4-5
CLOCON Clock Output Control Register ...................................................................................4-6
FLAGS System Flags Register...............................................................................................4-7
IMR Interrupt Mask Register..............................................................................................4-8
IPH Instruction Pointer (High Byte) .................................................................................4-9
IPL Instruction Pointer (Low Byte) ..................................................................................4-9
IPR Interrupt Priority Register ...........................................................................................4-10
IRQ Interrupt Request Register.........................................................................................4-11
P0CONH Port 0 Control Register (High Byte)............................................................................4-12
P0CONL Port 0 Control Register (Low Byte) ............................................................................4-13
P0INT Port 0 Interrupt Control Register................................................................................4-14
P0PND Port 0 Interrupt Pending Register...............................................................................4-15
P1CONH Port 1 Control Register (High Byte)............................................................................4-16
P1CONL Port 1 Control Register (Low Byte) ............................................................................4-17
P1PUR Port 1 Pull-up Resistor Enable Register ....................................................................4-18
PP Register Page Pointer................................................................................................4-19
PWMCON Pulse Width Modulation Control Register ..................................................................4-20
RP0 Register Pointer 0.......................................................................................................4-21
RP1 Register Pointer 1.......................................................................................................4-21
SPH Stack Pointer (High Byte)...........................................................................................4-22
SPL Stack Pointer (Low Byte)............................................................................................4-22
STPCON Stop Control Register.................................................................................................4-23
SYM System Mode Register...............................................................................................4-24
T0CON Timer 0 Control Register............................................................................................4-25

S3C80M4/F80M4 MICROCONTROLLER xix
List of Instruction Descriptions
Instruction Full Register Name Page
Mnemonic Number
ADC Add with Carry............................................................................................................6-14
ADD Add.............................................................................................................................6-15
AND Logical AND ...............................................................................................................6-16
BAND Bit AND.......................................................................................................................6-17
BCP Bit Compare ...............................................................................................................6-18
BITC Bit Complement..........................................................................................................6-19
BITR Bit Reset.....................................................................................................................6-20
BITS Bit Set.........................................................................................................................6-21
BOR Bit OR.........................................................................................................................6-22
BTJRF Bit Test, Jump Relative on False ...............................................................................6-23
BTJRT Bit Test, Jump Relative on True.................................................................................6-24
BXOR Bit XOR.......................................................................................................................6-25
CALL Call Procedure............................................................................................................6-26
CCF Complement Carry Flag.............................................................................................6-27
CLR Clear...........................................................................................................................6-28
COM Complement...............................................................................................................6-29
CP Compare.....................................................................................................................6-30
CPIJE Compare, Increment, and Jump on Equal.................................................................6-31
CPIJNE Compare, Increment, and Jump on Non-Equal .........................................................6-32
DA Decimal Adjust ...........................................................................................................6-33
DEC Decrement..................................................................................................................6-35
DECW Decrement Word........................................................................................................6-36
DI Disable Interrupts.......................................................................................................6-37
DIV Divide (Unsigned).......................................................................................................6-38
DJNZ Decrement and Jump if Non-Zero..............................................................................6-39
EI Enable Interrupts........................................................................................................6-40
ENTER Enter...........................................................................................................................6-41
EXIT Exit..............................................................................................................................6-42
IDLE Idle Operation.............................................................................................................6-43
INC Increment ...................................................................................................................6-44
INCW Increment Word..........................................................................................................6-45
IRET Interrupt Return..........................................................................................................6-46
JP Jump...........................................................................................................................6-47
JR Jump Relative.............................................................................................................6-48
LD Load............................................................................................................................6-49
LDB Load Bit ......................................................................................................................6-51

xx S3C80M4/F80M4 MICROCONTROLLER
List of Instruction Descriptions(Continued)
Instruction Full Register Name Page
Mnemonic Number
LDC/LDE Load Memory..............................................................................................................6-52
LDCD/LDED Load Memory and Decrement....................................................................................6-54
LDCI/LDEI Load Memory and Increment......................................................................................6-55
LDCPD/LDEPD Load Memory with Pre-Decrement.............................................................................6-56
LDCPI/LDEPI Load Memory with Pre-Increment ..............................................................................6-57
LDW Load Word..................................................................................................................6-58
MULT Multiply (Unsigned).....................................................................................................6-59
NEXT Next.............................................................................................................................6-60
NOP No Operation ..............................................................................................................6-61
OR Logical OR..................................................................................................................6-62
POP Pop from Stack...........................................................................................................6-63
POPUD Pop User Stack (Decrementing).................................................................................6-64
POPUI Pop User Stack (Incrementing) ..................................................................................6-65
PUSH Push to Stack..............................................................................................................6-66
PUSHUD Push User Stack (Decrementing)...............................................................................6-67
PUSHUI Push User Stack (Incrementing) ................................................................................6-68
RCF Reset Carry Flag.........................................................................................................6-69
RET Return.........................................................................................................................6-70
RL Rotate Left..................................................................................................................6-71
RLC Rotate Left through Carry...........................................................................................6-72
RR Rotate Right................................................................................................................6-73
RRC Rotate Right through Carry.........................................................................................6-74
SB0 Select Bank 0..............................................................................................................6-75
SB1 Select Bank 1..............................................................................................................6-76
SBC Subtract with Carry.....................................................................................................6-77
SCF Set Carry Flag.............................................................................................................6-78
SRA Shift Right Arithmetic..................................................................................................6-79
SRP/SRP0/SRP1 Set Register Pointer....................................................................................................6-80
STOP Stop Operation............................................................................................................6-81
SUB Subtract ......................................................................................................................6-82
SWAP Swap Nibbles..............................................................................................................6-83
TCM Test Complement under Mask ...................................................................................6-84
TM Test under Mask.........................................................................................................6-85
WFI Wait for Interrupt.........................................................................................................6-86
XOR Logical Exclusive OR..................................................................................................6-87

S3C80M4/F80M4 PRODUCT OVERVIEW
1-1
1PRODUCT OVERVIEW
S3C8-SERIES MICROCONTROLLERS
Samsung's S3C8 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. Among the major CPU features are:
— 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 of four CPU clocks) can be assigned to
specific interrupt levels.
S3C80M4/F80M4 MICROCONTROLLER
The S3C80M4/F80M4 single-chip CMOS microcontroller is fabricated using the highly advanced CMOS process,
Its design is based on the SAM88RC CPU core. Stop and Idle (Power-down) modes were implemented to reduce
power consumption.
The S3C80M4 is a microcontroller with a 4K-byte mask-programmable ROM embedded.
The S3F80M4 is a microcontroller with a 4K-byte Flash ROM embedded.
Using a proven modular design approach, Samsung engineers have successfully developed the
S3C80M4/F80M4 by integrating the following peripheral modules with the powerful SAM8 core:
— Two programmable I/O ports, including one 8-bit port, one 7-bit port (Total 15 pins).
— Four bit-programmable pins for external interrupts.
— One 8-bit basic timer for oscillation stabilization and watchdog functions (system reset).
— One 8-bit timer/counter.
— 8-bit high-speed PWM.
FLASH
The S3F80M4 microcontroller is available in Flash version. The S3F80M4 microcontroller has an on-chip FLASH
ROM instead of a masked ROM. The S3F80M4 is comparable to the S3C80M4, both in function and in pin
configuration.

PRODUCT OVERVIEW S3C80M4/F80M4
1-2
FEATURES
CPU
• SAM88 RC CPU core
Memory
• Program Memory (ROM)
- 4K ×8 bits program memory
• Data Memory (RAM)
- 128 ×8 bits data memory
Instruction Set
• 78 instructions
• Idle and stop instructions added for power-down
modes
15 I/O Pins
• 15 normal I/O pins
• Bit programmable ports
Interrupts
• 6 interrupt levels and 6 interrupt sources
8-Bit Basic Timer
• Watchdog timer function
• 4 kinds of clock source
8-Bit Timer/Counter 0
• Programmable 8-bit internal timer
• External event counter function
8-Bit High-Speed PWM
• 8-bit PWM 1-ch
• 6-bit base +2-bit extension
Oscillation Sources
• Crystal, ceramic, or RC for main clock
• Main clock frequency: 0.4 MHz – 10 MHz
Two Power-Down Modes
• Idle: only CPU clock stops
• Stop: selected system clock and CPU clock stop
Power Consumption
• RUM Mode: 4mA at 10MHz, 5V
• Stop Mode: 100uA at 5V
Instruction Execution Times
• 400nS at 10 MHz fosc(minimum)
Operating Temperature Range
• –25°C to +85°C
Operating Voltage Range
• 2.4 V to 5.5 V at 0.4 – 4.2MHz
• 2.7 V to 5.5 V at 0.4 – 10MHz
Package Type
• 20-DIP-300A, 20-SOP-375
• 16-DIP-300A, 16-SOP-375
IVC
• Internal Voltage Converter for 5V operation

S3C80M4/F80M4 PRODUCT OVERVIEW
1-3
BLOCK DIAGRAM
nRESET Vss
Port I/O and
Interrupt Control
SAM88RC CPU
4-Kbyte
ROM 128-byte
Register File
VDD
8-Bit Timer/
Counter 0 T0OUT/P1.0
T0CLK/P1.1
I/O Port 0
I/O Port 1
P0.0/INT0
P0.1/INT1
P0.2/INT2
P0.3/INT3
P0.4
P0.5
P0.6/PWM
P0.7
PWM
Watchdog
Timer
Basic Timer
XIN
XOUT
PWM/P0.6
OSC.
P1.0/T0OUT
P1.1/T0CLK
P1.2
P1.3
P1.4
P1.5
P1.6/CLKOUT
Figure 1-1. Block Diagram

PRODUCT OVERVIEW S3C80M4/F80M4
1-4
PIN ASSIGNMENT
VSS
XIN
XOUT
nRESET
P1.0/T0OUT
P1.1/T0CLK
P1.2
P1.3
P1.4
P1.5
S3C80M4/F80M4
(20-DIP-300A)
(20-SOP-375)
20
19
18
17
16
15
14
13
12
11
1
2
3
4
5
6
7
8
9
10
VDD
P0.0/INT0
P0.1/INT1
P0.2/INT2
P0.3/INT3
P0.4
P0.5
P0.6/PWM
P0.7
P1.6/CLKOUT
Figure 1-2. S3C80M4/F80M4 Pin Assignments (20-DIP-300A, 20-SOP-375)
Table of contents
Other Samsung Microcontroller manuals

Samsung
Samsung SAM88RCRI S3C9442 User manual

Samsung
Samsung S3F84B8 User manual

Samsung
Samsung S3P80C5 User manual

Samsung
Samsung S3C9444 User manual

Samsung
Samsung S3C8275X User manual

Samsung
Samsung KS86C6004 User manual

Samsung
Samsung S3C8248 User manual

Samsung
Samsung S3F80P5X User manual

Samsung
Samsung S3C9454B User manual

Samsung
Samsung KS57C0302 User manual