Samsung S3F80P5X Manual do Utilizador

Consulte online ou descarregue Manual do Utilizador para não Samsung S3F80P5X. Samsung S3F80P5X User`s manual Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 321
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes

Resumo do Conteúdo

Página 1 - USER’S MANUAL

USER’S MANUAL S3F80P5X S3F80P5 MICROCONTROLLERS April 2010 REV 1.00 Confidential Proprietary of Samsung Electronics Co., Ltd Copyright © 2009 Samsun

Página 3 - Preface

CONTROL REGISTERS S3F80P5_UM_ REV1.00 SPL — Stack Pointer (Low Byte) D9H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Valu

Página 4 - Table of Contents

S3F80P5_UM_ REV1.00 CONTROL REGISTERS SYM — System Mode Register DEH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Value 0 − − x

Página 5 - (Continued)

CONTROL REGISTERS S3F80P5_UM_ REV1.00 T0CON — Timer 0 Control Register D2H Set 1 Bank0 Bit Identifier .7 .6 .5 .4 .3

Página 6 - Table of Contents(Continued)

S3F80P5_UM_ REV1.00 CONTROL REGISTERS T1CON — Timer 1 Control Register FAH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Valu

Página 7 - Hardware Descriptions

ADDRESSING MODES S3F80P5_UM_ REV1.00 T2CON − Timer 2 Control Register E8H Set1 Bank1 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Value

Página 8 - Chapter 13 Timer 2

S3F80P5_UM_ REV1.00 INTERRUPT STRUCTURE 5 INTERRUPT STRUCTURE OVERVIEW The S3C8/S3F8-series interrupt structure has three basic components: levels

Página 9 - Table of Contents (Conclude)

INTERRUPT STRUCTURE S3F80P5_UM_ REV1.00 INTERRUPT TYPES The three components of the S3C8/S3F8-series interrupt structure described above — levels,

Página 10

S3F80P5_UM_ REV1.00 INTERRUPT STRUCTURE Vectors(14) Sources(17)Levels(7)IRQ0Timer 0 match/capture01Reset/ClearRESET100HBasic timer overflowFCHIRQ2

Página 11 - List of Figures

INTERRUPT STRUCTURE S3F80P5_UM_ REV1.00 INTERRUPT VECTOR ADDRESSES All interrupt vector addresses for the S3F80P5 interrupt structure are stored in

Página 12 - List of Figures (Continued)

S3F80P5_UM_ REV1.00 INTERRUPT STRUCTURE Table 5-1. S3F80P5 Interrupt Vectors Vector Address Interrupt Source Request Reset/ClearDecimal Value He

Página 13 - List of Figures (Conclude)

List of Figures Figure Title Page Number Number 1-1 Block Diagram (24-pin) ...

Página 14

INTERRUPT STRUCTURE S3F80P5_UM_ REV1.00 ENABLE/DISABLE INTERRUPT INSTRUCTIONS (EI, DI) Executing the Enable Interrupts (EI) instruction globally en

Página 15 - List of Tables

S3F80P5_UM_ REV1.00 INTERRUPT STRUCTURE INTERRUPT PROCESSING CONTROL POINTS Interrupt processing can therefore be controlled in two ways: globally

Página 16 - List of Tables(Conclude)

INTERRUPT STRUCTURE S3F80P5_UM_ REV1.00 PERIPHERAL INTERRUPT CONTROL REGISTERS For each interrupt source there is one or more corresponding periphe

Página 17 - 1 PRODUCT OVERVIEW

S3F80P5_UM_ REV1.00 INTERRUPT STRUCTURE SYSTEM MODE REGISTER (SYM) The system mode register, SYM (DEH, Set 1, Bank0), is used to globally enable an

Página 18 - FEATURES

INTERRUPT STRUCTURE S3F80P5_UM_ REV1.00 INTERRUPT MASK REGISTER (IMR) The interrupt mask register, IMR (DDH, Set 1, and Bank0) is used to enable or

Página 19

S3F80P5_UM_ REV1.00 INTERRUPT STRUCTURE INTERRUPT PRIORITY REGISTER (IPR) The interrupt priority register, IPR (FFH, Set 1, Bank 0), is used to set

Página 20 - PIN ASSIGNMENTS

INTERRUPT STRUCTURE S3F80P5_UM_ REV1.00 Interrupt Priority Register(IPR)FEH, Set 1, Bank 0 , R/W.7 .6 .5 .4 .3 .2 .1 .0MSB LSBGroup A0=IRQ0>IRQ

Página 21

S3F80P5_UM_ REV1.00 INTERRUPT STRUCTURE INTERRUPT REQUEST REGISTER (IRQ) You can poll bit values in the interrupt request register, IRQ (DCH, Set 1

Página 22 - PIN CIRCUITS

INTERRUPT STRUCTURE S3F80P5_UM_ REV1.00 INTERRUPT PENDING FUNCTION TYPES Overview There are two types of interrupt pending bits: One type is automa

Página 23 - PIN CIRCUITS (Continued)

S3F80P5_UM_ REV1.00 INTERRUPT STRUCTURE INTERRUPT SOURCE POLLING SEQUENCE The interrupt request polling and servicing sequence is as follows: 1. A

Página 24 - PIN CIRCUITS (Continued)

List of Figures (Continued) Figure Title Page Number Number 5-1 S3C8/S3F8-Series Interrupt Types ...

Página 25

INTERRUPT STRUCTURE S3F80P5_UM_ REV1.00 GENERATING INTERRUPT VECTOR ADDRESSES The interrupt vector area in the ROM (except smart option ROM Cell- 0

Página 26

S3F80P5_UM_ REV1.00 INTERRUPT STRUCTURE FAST INTERRUPT PROCESSING (Continued) Two other system registers support fast interrupt processing: • The

Página 27 - 2 ADDRESS SPACE

INTERRUPT STRUCTURE S3F80P5_UM_ REV1.00 NOTES 5-18

Página 28 - PROGRAM MEMORY

S3F80P5_UM_ REV1.00 INSTRUCTION SET 6 INSTRUCTION SET OVERVIEW The SAM8 instruction set is specifically designed to support the large register fil

Página 29

INSTRUCTION SET S3F80P5_UM_ REV1.00 Table 6-1. Instruction Group Summary Mnemonic Operands Instruction Load Instructions CLR dst Clear LD dst, s

Página 30

S3F80P5_UM_ REV1.00 INSTRUCTION SET Table 6-1. Instruction Group Summary (Continued) Mnemonic Operands Instruction Arithmetic Instructions ADC d

Página 31 - REGISTER ARCHITECTURE

INSTRUCTION SET S3F80P5_UM_ REV1.00 Table 6-1. Instruction Group Summary (Continued) Mnemonic Operands Instruction Program Control Instructions B

Página 32

S3F80P5_UM_ REV1.00 INSTRUCTION SET Table 6-1. Instruction Group Summary (Concluded) Mnemonic Operands Instruction Rotate and Shift Instructions

Página 33

INSTRUCTION SET S3F80P5_UM_ REV1.00 FLAGS REGISTER (FLAGS) The flags register FLAGS contains eight bits that describe the current status of CPU ope

Página 34

S3F80P5_UM_ REV1.00 INSTRUCTION SET FLAG DESCRIPTIONS C Carry Flag (FLAGS.7) The C flag is set to "1" if the result from an arithmetic

Página 35

List of Figures (Conclude) Figure Title Page Number Number 12-1 Counter A Block Diagram...

Página 36 - 2-10

INSTRUCTION SET S3F80P5_UM_ REV1.00 INSTRUCTION SET NOTATION Table 6-2. Flag Notation Conventions Flag Description C Carry flag Z Zero flag S Sign

Página 37 - 2-11

S3F80P5_UM_ REV1.00 INSTRUCTION SET Table 6-4. Instruction Notation Conventions Notation Description Actual Operand Range cc Condition code See

Página 38

INSTRUCTION SET S3F80P5_UM_ REV1.00 Table 6-5. Opcode Quick Reference OPCODE MAP LOWER NIBBLE (HEX) – 0 1 2 3 4 5 6 7 U 0 DEC R1 DEC IR1 ADD r1,r

Página 39 - REGISTER ADDRESSING

S3F80P5_UM_ REV1.00 INSTRUCTION SET Table 6-5. Opcode Quick Reference (Continued) OPCODE MAP LOWER NIBBLE (HEX) – 8 9 A B C D E F U 0 LD r1,R2 LD

Página 40 - 2-14

INSTRUCTION SET S3F80P5_UM_ REV1.00 CONDITION CODES The op-code of a conditional jump always contains a 4-bit field called the condition code (cc).

Página 41 - 2-15

S3F80P5_UM_ REV1.00 INSTRUCTION SET INSTRUCTION DESCRIPTIONS This section contains detailed information and programming examples for each instructi

Página 42 - 2-16

INSTRUCTION SET S3F80P5_UM_ REV1.00 ADC — Add with Carry ADC dst,src Operation: dst ← dst + src + c The source operand, along with the s

Página 43 - 2-17

S3F80P5_UM_ REV1.00 INSTRUCTION SET ADD — Add ADD dst,src Operation: dst ← dst + src The source operand is added to the destination operand

Página 44 - 2-18

INSTRUCTION SET S3F80P5_UM_ REV1.00 AND — Logical AND AND dst,src Operation: dst ← dst AND src The source operand is logically ANDed with

Página 45 - 2-19

S3F80P5_UM_ REV1.00 INSTRUCTION SET BAND — Bit AND BAND dst,src.b BAND dst.b,src Operation: dst(0) ← dst(0) AND src(b) or dst(b) ← dst(b

Página 47

INSTRUCTION SET S3F80P5_UM_ REV1.00 BCP — Bit Compare BCP dst,src.b Operation: dst(0) – src(b) The specified bit of the source is compared to

Página 48 - 2-22

S3F80P5_UM_ REV1.00 INSTRUCTION SET BITC — Bit Complement BITC dst.b Operation: dst(b) ← NOT dst(b) This instruction complements the specified bi

Página 49 - 3 ADDRESSING MODES

INSTRUCTION SET S3F80P5_UM_ REV1.00 BITR — Bit Reset BITR dst.b Operation: dst(b) ← 0 The BITR instruction clears the specified bit within the d

Página 50

S3F80P5_UM_ REV1.00 INSTRUCTION SET BITS — Bit Set BITS dst.b Operation: dst(b) ← 1 The BITS instruction sets the specified bit within the des

Página 51

INSTRUCTION SET S3F80P5_UM_ REV1.00 BOR — Bit OR BOR dst,src.b BOR dst.b,src Operation: dst(0) ← dst(0) OR src(b) or dst(b) ← dst(b) OR

Página 52

S3F80P5_UM_ REV1.00 INSTRUCTION SET BTJRF — Bit Test, Jump Relative on False BTJRF dst,src.b Operation: If src(b) is a "0", then PC ←

Página 53

INSTRUCTION SET S3F80P5_UM_ REV1.00 BTJRT — Bit Test, Jump Relative on True BTJRT dst,src.b Operation: If src(b) is a "1", then PC ←

Página 54

S3F80P5_UM_ REV1.00 INSTRUCTION SET BXOR — Bit XOR BXOR dst,src.b BXOR dst.b,src Operation: dst(0) ← dst(0) XOR src(b) or dst(b) ← dst(b

Página 55

INSTRUCTION SET S3F80P5_UM_ REV1.00 CALL — Call Procedure CALL dst Operation: SP ← SP – 1 @SP ← PCL SP ← SP –1 @SP ← PCH PC ← dst The current

Página 56 - RP0 or RP1

S3F80P5_UM_ REV1.00 INSTRUCTION SET CCF — Complement Carry Flag CCF Operation: C ← NOT C The carry flag (C) is complemented. If C = "1&qu

Página 57

List of Tables Table Title Page Number Number 1-1 Pin Descriptions of 24-SOP/SDIP...

Página 58 - 3-10

INSTRUCTION SET S3F80P5_UM_ REV1.00 CLR — Clear CLR dst Operation: dst ← "0" The destination location is cleared to "0". Fla

Página 59 - 3-11

S3F80P5_UM_ REV1.00 INSTRUCTION SET COM — Complement COM dst Operation: dst ← NOT dst The contents of the destination location are complement

Página 60 - 3-12

INSTRUCTION SET S3F80P5_UM_ REV1.00 CP — Compare CP dst,src Operation: dst – src The source operand is compared to (subtracted from) the destin

Página 61 - 3-13

S3F80P5_UM_ REV1.00 INSTRUCTION SET CPIJE — Compare, Increment, and Jump on Equal CPIJE dst,src,RA Operation: If dst – src = "0", PC

Página 62 - 3-14

INSTRUCTION SET S3F80P5_UM_ REV1.00 CPIJNE — Compare, Increment, and Jump on Non-Equal CPIJNE dst,src,RA Operation: If dst – src "0",

Página 63 - 4 CONTROL REGISTERS

S3F80P5_UM_ REV1.00 INSTRUCTION SET DA — Decimal Adjust DA dst Operation: dst ← DA dst The destination operand is adjusted to form two 4-bit BC

Página 64

INSTRUCTION SET S3F80P5_UM_ REV1.00 DA — Decimal Adjust DA (Continued) Example: Given: Working register R0 contains the value 15 (BCD), working

Página 65

S3F80P5_UM_ REV1.00 INSTRUCTION SET DEC — Decrement DEC dst Operation: dst ← dst – 1 The contents of the destination operand are decremented by

Página 66

INSTRUCTION SET S3F80P5_UM_ REV1.00 DECW — Decrement Word DECW dst Operation: dst ← dst – 1 The contents of the destination location (which mu

Página 67 - Read/Write

S3F80P5_UM_ REV1.00 INSTRUCTION SET DI — Disable Interrupts DI Operation: SYM (0) ← 0 Bit zero of the system mode control register, SYM.0, is cl

Página 68

List of Tables(Conclude) Table Title Page Number Number 18-1 Descriptions of Pins Used to Read/Write the Flash ROM...

Página 69

INSTRUCTION SET S3F80P5_UM_ REV1.00 DIV — Divide (Unsigned) DIV dst,src Operation: dst ÷ src dst (UPPER) ← REMAINDER dst (LOWER) ← QU

Página 70

S3F80P5_UM_ REV1.00 INSTRUCTION SET DJNZ — Decrement and Jump if Non-Zero DJNZ r,dst Operation: r ← r – 1 If r ≠ 0, PC ← PC + dst Th

Página 71 - FEH Set1 Bank0

INSTRUCTION SET S3F80P5_UM_ REV1.00 EI — Enable Interrupts EI Operation: SYM (0) ← 1 An EI instruction sets bit zero of the system mode regist

Página 72 - 4-10

S3F80P5_UM_ REV1.00 INSTRUCTION SET ENTER — Enter ENTER Operation: SP ← SP – 2 @SP ← IP IP ← PC PC ← @IP IP ← IP + 2 This instruction is us

Página 73 - 4-11

INSTRUCTION SET S3F80P5_UM_ REV1.00 EXIT — Exit EXIT Operation: IP ← @SP SP ← SP + 2 PC ← @IP IP ← IP + 2 This instruction is useful whe

Página 74 - 4-12

S3F80P5_UM_ REV1.00 INSTRUCTION SET IDLE — Idle Operation IDLE Operation: The IDLE instruction stops the CPU clock while allowing system clock

Página 75 - 4-13

INSTRUCTION SET S3F80P5_UM_ REV1.00 INC — Increment INC dst Operation: dst ← dst + 1 The contents of the destination operand are incremented b

Página 76 - 4-14

S3F80P5_UM_ REV1.00 INSTRUCTION SET INCW — Increment Word INCW dst Operation: dst ← dst + 1 The contents of the destination (which must be a

Página 77 - 4-15

INSTRUCTION SET S3F80P5_UM_ REV1.00 IRET — Interrupt Return IRET IRET (Normal) IRET (Fast)Operation: FLAGS ← @SP PC ↔ IP SP ← SP + 1 F

Página 78 - 4-16

S3F80P5_UM_ REV1.00 INSTRUCTION SET JP — Jump JP cc,dst (Conditional) JP dst (Unconditional) Operation: If cc is true, PC ← dst The cond

Página 79 - 4-17

S3F80P5_UM_ REV1.00 PRODUCT OVERVIEW 1 PRODUCT OVERVIEW S3C8/S3F8-SERIES MICROCONTROLLERS Samsung's S3C8/S3F8-series of 8-bit single-chip CMOS

Página 80 - 4-18

INSTRUCTION SET S3F80P5_UM_ REV1.00 JR — Jump Relative JR cc,dst Operation: If cc is true, PC ← PC + dst If the condition specified by t

Página 81

S3F80P5_UM_ REV1.00 INSTRUCTION SET LD — Load LD dst,src Operation: dst ← src The contents of the source are loaded into the destination. The so

Página 82

INSTRUCTION SET S3F80P5_UM_ REV1.00 LD — Load LD (Continued) Examples: Given: R0 = 01H, R1 = 0AH, register 00H = 01H, register 01H = 20H

Página 83 - 4-21

S3F80P5_UM_ REV1.00 INSTRUCTION SET LDB — Load Bit LDB dst,src.b LDB dst.b,src Operation: dst(0) ← src(b) or dst(b) ← src(0) The specifi

Página 84 - 4-22

INSTRUCTION SET S3F80P5_UM_ REV1.00 LDC/LDE — Load Memory LDC/LDE dst,src Operation: dst ← src This instruction loads a byte from program or dat

Página 85 - 4-23

S3F80P5_UM_ REV1.00 INSTRUCTION SET LDC/LDE — Load Memory LDC/LDE (Continued) Examples: Given: R0 = 11H, R1 = 34H, R2 = 01H, R3 = 04H; P

Página 86 - 4-24

INSTRUCTION SET S3F80P5_UM_ REV1.00 LDCD/LDED — Load Memory and Decrement LDCD/LDED dst,src Operation: dst ← src rr ← rr – 1 These instruct

Página 87 - 4-25

S3F80P5_UM_ REV1.00 INSTRUCTION SET LDCI/LDEI — Load Memory and Increment LDCI/LDEI dst,src Operation: dst ← src rr ← rr + 1 These instru

Página 88 - 4-26

INSTRUCTION SET S3F80P5_UM_ REV1.00 LDCPD/LDEPD — Load Memory with Pre-Decrement LDCPD/ LDEPD dst,src Operation: rr ← rr – 1 dst ← src Th

Página 89 - 4-27

S3F80P5_UM_ REV1.00 INSTRUCTION SET LDCPI/LDEPI — Load Memory with Pre-Increment LDCPI/ LDEPI dst,src Operation: rr ← rr + 1 dst ← src Th

Página 90 - 4-28

PRODUCT OVERVIEW S3F80P5_UM_ REV1.00 FEATURES CPU • SAM8 RC CPU core Memory • Program memory: - 18-Kbyte Internal Flash Memory - 10 years data r

Página 91 - 4-29

INSTRUCTION SET S3F80P5_UM_ REV1.00 LDW — Load Word LDW dst,src Operation: dst ← src The contents of the source (a word) are loaded into the des

Página 92 - 4-30

S3F80P5_UM_ REV1.00 INSTRUCTION SET MULT — Multiply (Unsigned) MULT dst,src Operation: dst ← dst × src The 8-bit destination operand (even re

Página 93 - 4-31

INSTRUCTION SET S3F80P5_UM_ REV1.00 NEXT — Next NEXT Operation: PC ← @ IP IP ← IP + 2 The NEXT instruction is useful when implementing thr

Página 94 - 4-32

S3F80P5_UM_ REV1.00 INSTRUCTION SET NOP — No Operation NOP Operation: No action is performed when the CPU executes this instruction. Typically, on

Página 95

INSTRUCTION SET S3F80P5_UM_ REV1.00 OR — Logical OR OR dst,src Operation: dst ← dst OR src The source operand is logically ORed with the des

Página 96 - 4-34

S3F80P5_UM_ REV1.00 INSTRUCTION SET POP — Pop From Stack POP dst Operation: dst ← @SP SP ← SP + 1 The contents of the location addressed

Página 97 - (See Note)

INSTRUCTION SET S3F80P5_UM_ REV1.00 POPUD — Pop User Stack (Decrementing) POPUD dst,src Operation: dst ← src IR ← IR – 1 This instruction i

Página 98 - (note3) (note2)

S3F80P5_UM_ REV1.00 INSTRUCTION SET POPUI — Pop User Stack (Incrementing) POPUI dst,src Operation: dst ← src IR ← IR + 1 The POPUI instructio

Página 99 - 4-37

INSTRUCTION SET S3F80P5_UM_ REV1.00 PUSH — Push To Stack PUSH src Operation: SP ← SP – 1 @SP ← src A PUSH instruction decrements the stac

Página 100

S3F80P5_UM_ REV1.00 INSTRUCTION SET PUSHUD — Push User Stack (Decrementing) PUSHUD dst,src Operation: IR ← IR – 1 dst ← src This instructi

Página 101

S3F80P5_UM_ REV1.00 PRODUCT OVERVIEW BLOCK DIAGRAM (24-PIN PACKAGE) Figure 1-1. Block Diagram (24-pin) 1-3

Página 102 - 4-40

INSTRUCTION SET S3F80P5_UM_ REV1.00 PUSHUI — Push User Stack (Incrementing) PUSHUI dst,src Operation: IR ← IR + 1 dst ← src This instruct

Página 103 - 4-41

S3F80P5_UM_ REV1.00 INSTRUCTION SET RCF — Reset Carry Flag RCF RCF Operation: C ← 0 The carry flag is cleared to logic zero, regardless of its

Página 104 - 4-42

INSTRUCTION SET S3F80P5_UM_ REV1.00 RET — Return RET Operation: PC ← @SP SP ← SP + 2 The RET instruction is normally used to return to the

Página 105 - 5 INTERRUPT STRUCTURE

S3F80P5_UM_ REV1.00 INSTRUCTION SET RL — Rotate Left RL dst Operation: C ← dst (7) dst (0) ← dst (7) dst (n + 1) ← dst (n), n = 0–6

Página 106

INSTRUCTION SET S3F80P5_UM_ REV1.00 RLC — Rotate Left Through Carry RLC dst Operation: dst (0) ← C C ← dst (7) dst (n + 1) ← dst (n), n

Página 107

S3F80P5_UM_ REV1.00 INSTRUCTION SET RR — Rotate Right RR dst Operation: C ← dst (0) dst (7) ← dst (0) dst (n) ← dst (n + 1), n = 0–6

Página 108

INSTRUCTION SET S3F80P5_UM_ REV1.00 RRC — Rotate Right Through Carry RRC dst Operation: dst (7) ← C C ← dst (0) dst (n) ← dst (n + 1),

Página 109

S3F80P5_UM_ REV1.00 INSTRUCTION SET SB0 — Select Bank 0 SB0 Operation: BANK ← 0 The SB0 instruction clears the bank address flag in the FLAGS r

Página 110

INSTRUCTION SET S3F80P5_UM_ REV1.00 SB1 — Select Bank 1 SB1 Operation: BANK ← 1 The SB1 instruction sets the bank address flag in the FLAGS reg

Página 111

S3F80P5_UM_ REV1.00 INSTRUCTION SET SBC — Subtract With Carry SBC dst,src Operation: dst ← dst – src – c The source operand, along with th

Página 112

Important Notice The information in this publication has been carefully checked and is believed to be entirely accurate at the time of publication. S

Página 113

PRODUCT OVERVIEW S3F80P5_UM_ REV1.00 PIN ASSIGNMENTS VssXinXoutTESTSDAT/P0.0/INT0SCLK/P0.1/INT1nRESET/P0.2/INT2P0.3/INT3P0.4/INT4P0.5/INT4P0.6/INT

Página 114 - 5-10

INSTRUCTION SET S3F80P5_UM_ REV1.00 SCF — Set Carry Flag SCF Operation: C ← 1 The carry flag (C) is set to logic one, regardless of its previou

Página 115 - 5-11

S3F80P5_UM_ REV1.00 INSTRUCTION SET SRA — Shift Right Arithmetic SRA dst Operation: dst (7) ← dst (7) C ← dst (0) dst (n) ← dst (n + 1

Página 116 - 5-12

INSTRUCTION SET S3F80P5_UM_ REV1.00 SRP/SRP0/SRP1 — Set Register Pointer SRP src SRP0 src SRP1 src Operation: If src (1) = 1 and src (0) =

Página 117 - 5-13

S3F80P5_UM_ REV1.00 INSTRUCTION SET STOP — Stop Operation STOP Operation: The STOP instruction stops the both the CPU clock and system clock and

Página 118 - 5-14

INSTRUCTION SET S3F80P5_UM_ REV1.00 SUB — Subtract SUB dst,src Operation: dst ← dst – src The source operand is subtracted from the destinati

Página 119 - 5-15

S3F80P5_UM_ REV1.00 INSTRUCTION SET SWAP — Swap Nibbles SWAP dst Operation: dst (0 – 3) ↔ dst (4 – 7) The contents of the lower four bits

Página 120 - 5-16

INSTRUCTION SET S3F80P5_UM_ REV1.00 TCM — Test Complement Under Mask TCM dst,src Operation: (NOT dst) AND src This instruction tests selected

Página 121 - 5-17

S3F80P5_UM_ REV1.00 INSTRUCTION SET TM — Test Under Mask TM dst,src Operation: dst AND src This instruction tests selected bits in the destin

Página 122 - 5-18

INSTRUCTION SET S3F80P5_UM_ REV1.00 WFI — Wait For Interrupt WFI Operation: The CPU is effectively halted until an interrupt occurs, except that

Página 123 - 6 INSTRUCTION SET

S3F80P5_UM_ REV1.00 INSTRUCTION SET XOR — Logical Exclusive OR XOR dst,src Operation: dst ← dst XOR src The source operand is logically excl

Página 124

S3F80P5_UM_ REV1.00 PRODUCT OVERVIEW Table 1-1. Pin Descriptions of 24-SOP/SDIP Pin Names Pin Type Pin Description CircuitType 28 Pin No. Shared Fu

Página 125

INSTRUCTION SET S3F80P5_UM_ REV1.00 NOTES 6-88

Página 126

S3F80P5_UM_ REV1.00 CLOCK AND POWER CIRCUITS 7 CLOCK AND POWER CIRCUITS OVERVIEW The clock frequency for the S3F80P5 can be generated by an extern

Página 127

CLOCK AND POWER CIRCUITS S3F80P5_UM_ REV1.00 XINXOUTC1C2 Figure 7-1. Main Oscillator Circuit (External Crystal or Ceramic Resonator) XINXOUTExterna

Página 128

S3F80P5_UM_ REV1.00 CLOCK AND POWER CIRCUITS CLOCK STATUS DURING POWER-DOWN MODES The two power-down modes, Stop mode and Idle mode, affect the sys

Página 129

CLOCK AND POWER CIRCUITS S3F80P5_UM_ REV1.00 SYSTEM CLOCK CONTROL REGISTER (CLKCON) The system clock control register, CLKCON, is located in addres

Página 130

S3F80P5_UM_ REV1.00 CLOCK AND POWER CIRCUITS VDDVDDR 1C 1 C 2 Figure 7-5. Power Circuit (VDD) Typically, application systems have a resister and tw

Página 131

CLOCK AND POWER CIRCUITS S3F80P5_UM_ REV1.00 NOTES 7-6

Página 132 - 6-10

S3F80P5_UM_ REV1.00 RESET 8 RESET OVERVIEW Resetting the MCU is the function to start processing by generating reset signal using several reset

Página 133 - ↓ ↓ ↓ ↓ ↓ ↓ ↓

RESET S3F80P5_UM_ REV1.00 Watchdog Timer STOP(EI)external interrupt enableP0&P2.0 (INT0-INT5)STOPLVDIPORP0RESET12345RESET Contorl Bit '1&ap

Página 134

S3F80P5_UM_ REV1.00 RESET P0&P2.0(INT0~INT5)NoiseFilterExternal InterruptControl BlockP0& P2.0EnabledINT0~INT5SED&RCircuitP0STOPSTOPCO

Página 135 - 6-13

PRODUCT OVERVIEW S3F80P5_UM_ REV1.00 PIN CIRCUITS VDDPull-upEnableVDDINPUT/OUTPUTPull-UpResistor(67kΩ- typ)DataVSSExternalInterruptOutput DisableNo

Página 136 - ADC — Add with Carry

RESET S3F80P5_UM_ REV1.00 RESET MECHANISM The interlocking work of reset pin and LVD circuit supplies two operating modes: back-up mode input, and s

Página 137 - ADD — Add

S3F80P5_UM_ REV1.00 RESET INTERNAL POWER-ON RESET The power-on reset circuit is built on the S3F80P5 product. When power is initially applied to t

Página 138 - AND — Logical AND

RESET S3F80P5_UM_ REV1.00 Normal Operating Mode (LVD on)VDDVLVDtWAIT(4096x16x1/fosc)VPORPOR Reset ReleaseInternal ResetReleaseLVD ResetReleaseStop M

Página 139 - BAND — Bit AND

S3F80P5_UM_ REV1.00 RESET STOP ERROR DETECTION & RECOVERY When RESET Control Bit (smart option bit [0] @ 03FH) is set to ‘0’ and chip is in sto

Página 140 - BCP — Bit Compare

RESET S3F80P5_UM_ REV1.00 POWER-DOWN MODES The power down mode of S3F80P5 are described following that: — Idle mode — Back- up mode — Stop mode IDL

Página 141 - BITC — Bit Complement

S3F80P5_UM_ REV1.00 RESET BACK-UP MODE For reducing current consumption, S3F80P5 goes into Back-up mode. If a falling level of VDD is detected by L

Página 142 - BITR — Bit Reset

RESET S3F80P5_UM_ REV1.00 Normal Operating ModeVDDVLVDtWAITVPORStop Mode (LVD off)Key-inNormal Operating ModeVDDVLVDtWAITVPORStop Mode (LVD off)Key

Página 143 - BITS — Bit Set

S3F80P5_UM_ REV1.00 RESET STOP MODE STOP mode is invoked by executing the instruction ‘STOP’, after setting the stop control register (STOPCON). In

Página 144 - BOR — Bit OR

RESET S3F80P5_UM_ REV1.00 SOURCES TO RELEASE STOP MODE Stop mode is released when following sources go active: — System Reset by Internal Power-On

Página 145

S3F80P5_UM_ REV1.00 RESET SED&R (Stop Error Detect and Recovery) The Stop Error Detect & Recovery circuit is used to release stop mode and

Página 146

S3F80P5_UM_ REV1.00 PRODUCT OVERVIEW PIN CIRCUITS (Continued) VDDPull-upResistor(67kΩ-Typ)VDDVSSNoiseFilter INPUT/OUTPUTPull-upEnableDataOutput Disa

Página 147 - BXOR — Bit XOR

RESET S3F80P5_UM_ REV1.00 SYSTEM RESET OPERATION System reset starts the oscillation circuit, synchronize chip operation with CPU clock, and initial

Página 148 - CALL — Call Procedure

S3F80P5_UM_ REV1.00 RESET HARDWARE RESET VALUES Tables 8-2 list the reset values for CPU and system registers, peripheral control registers, and pe

Página 149 - CCF — Complement Carry Flag

RESET S3F80P5_UM_ REV1.00 Table 8-2. Set 1, Bank 0 Register Values After Reset (Continued) Address Bit Values After Reset Register Name MnemonicDe

Página 150 - CLR — Clear

S3F80P5_UM_ REV1.00 RESET Table 8-3. Set 1, Bank 1 Register Values After Reset Address Bit Values After Reset Register Name MnemonicDec Hex 7 6

Página 151 - COM — Complement

RESET S3F80P5_UM_ REV1.00 Table 8-4. Reset Generation According to the Condition of Smart Option Smart option 1st bit @3FH Mode Reset Source 1 0 Wat

Página 152 - CP — Compare

S3F80P5_UM_ REV1.00 RESET RECOMMENDATION FOR UNUSUED PINS To reduce overall power consumption, please configure unused pins according to the guidel

Página 153 - 6-31

RESET S3F80P5_UM_ REV1.00 SUMMARY TABLE OF BACK-UP MODE, STOP MODE, AND RESET STATUS For more understanding, please see the below description Table

Página 154 - 6-32

S3F80P5_UM_ REV1.00 I/O PORTS 9 I/O PORTS OVERVIEW The S3F80P5 microcontroller has four bit-programmable I/O ports, P0, P1, P2, P3. Two ports, P0 a

Página 155 - DA — Decimal Adjust

I/O PORTS S3F80P5_UM_ REV1.00 Table 9-1. S3F80P5 Port Configuration Overview (24-SOP) Port Configuration Options Port 0 8-bit general-purpose I/O

Página 156

S3F80P5_UM_ REV1.00 I/O PORTS PORT DATA REGISTERS Table 9-4 gives you an overview of the register locations of all four S3F80P5 I/O port data regis

Página 157 - DEC — Decrement

PRODUCT OVERVIEW S3F80P5_UM_ REV1.00 PIN CIRCUITS (Continued) DataOutput DisableOpen-DrainVDDPull-upEnableVDDINPUT/OUTPUTPull-UpResistor(67kΩ- typ

Página 158 - DECW — Decrement Word

I/O PORTS S3F80P5_UM_ REV1.00 PULL-UP RESISTOR ENABLE REGISTERS You can assign pull-up resistors to the pin circuits of individual pins in port0 an

Página 159 - DI — Disable Interrupts

S3F80P5_UM_ REV1.00 BASIC TIMER and TIMER 0 10 BASIC TIMER and TIMER 0 OVERVIEW The S3F80P5 has two default timers: the 8-bit basic timer and the

Página 160 - DIV — Divide (Unsigned)

BASIC TIMER and TIMER 0 S3F80P5_UM_ REV1.00 BASIC TIMER CONTROL REGISTER (BTCON) The basic timer control register, BTCON, is used to select the inp

Página 161 - 6-39

S3F80P5_UM_ REV1.00 BASIC TIMER and TIMER 0 BASIC TIMER FUNCTION DESCRIPTION Watch-dog Timer Function You can program the basic timer overflow sign

Página 162 - EI — Enable Interrupts

BASIC TIMER and TIMER 0 S3F80P5_UM_ REV1.00 TIMER 0 CONTROL REGISTER (T0CON) You use the timer 0 control register, T0CON, to — Select the timer 0

Página 163 - ENTER — Enter

S3F80P5_UM_ REV1.00 BASIC TIMER and TIMER 0 Timer 0 Control Register (T0CON)D2H, Set 1, Bank0 , R/W.7 .6 .5 .4 .3 .2 .1 .0MSBLSB Timer 0 Interrupt

Página 164 - EXIT — Exit

BASIC TIMER and TIMER 0 S3F80P5_UM_ REV1.00 TIMER 0 FUNCTION DESCRIPTION Timer 0 Interrupts (IRQ0, Vectors FAH and FCH) The timer 0 module can gene

Página 165 - IDLE — Idle Operation

S3F80P5_UM_ REV1.00 BASIC TIMER and TIMER 0 Pulse Width Modulation Mode Pulse width modulation (PWM) mode lets you program the width (duration) of

Página 166 - INC — Increment

BASIC TIMER and TIMER 0 S3F80P5_UM_ REV1.00 Capture Mode In capture mode, a signal edge that is detected at the T0CAP pin opens a gate and loads th

Página 167 - INCW — Increment Word

S3F80P5_UM_ REV1.00 BASIC TIMER and TIMER 0 MUXMUXDIVR8-Bit Up-Counter(T0CNT)8-Bit CompatatorTimer0 BufferRegisterBits 5, 4Bit 0Bit 1IRQ0ClearData

Página 168 - IRET — Interrupt Return

S3F80P5_UM_ REV1.00 PRODUCT OVERVIEW PIN CIRCUITS (Continued) VDDPull-upEnable P3.0/T0PWM/T0CAP/ T1CAP/T2CAP Pull-upResistor(67kΩ-Typ)Open-DrainPort

Página 169 - JP — Jump

BASIC TIMER and TIMER 0 S3F80P5_UM_ REV1.00  PROGRAMMING TIP — Configuring the Basic Timer This example shows how to configure the basic timer to

Página 170 - JR — Jump Relative

S3F80P5_UM_ REV1.00 BASIC TIMER and TIMER 0  PROGRAMMING TIP — Programming Timer 0 This sample program sets timer 0 to interval timer mode, sets t

Página 171 - LD — Load

BASIC TIMER and TIMER 0 S3F80P5_UM_ REV1.00  PROGRAMMING TIP — Programming Timer 0 (Continued) CP R0,#32H ; 50 × 4 = 200 ms JR ULT,

Página 172

S3F80P5_UM_ REV1.00 TIMER 1 11 TIMER 1 OVERVIEW The S3F80P5 microcontroller has a 16-bit timer/counter called Timer 1 (T1). For universal remote co

Página 173 - LDB — Load Bit

TIMER 1 S3F80P5_UM_ REV1.00 TIMER 1 OVERFLOW INTERRUPT Timer 1 can be programmed to generate an overflow interrupt (IRQ1, F4H) whenever an overflo

Página 174 - LDC/LDE — Load Memory

S3F80P5_UM_ REV1.00 TIMER 1 TIMER 1 MATCH INTERRUPT Timer 1 can also be used to generate a match interrupt (IRQ1, vector F6H) whenever the 16-bit c

Página 175

TIMER 1 S3F80P5_UM_ REV1.00 MUX16-Bit Up-Counter(Read-Only)16-Bit CompatatorTimer 1 High/LowBuffer RegisterMUXIRQ1ClearIRQ1Match(note) NOTE:Match

Página 176 - — Load Memory and Decrement

S3F80P5_UM_ REV1.00 TIMER 1 TIMER 1 CONTROL REGISTER (T1CON) The Timer 1 control register, T1CON, is located in Set 1, FAH, Bank0 and is read/write

Página 177 - — Load Memory and Increment

TIMER 1 S3F80P5_UM_ REV1.00 Timer1 Counter High-byte Register (T1CNTH)F6H, Set 1, Bank 0, R.7 .6 .5 .4 .3 .2 .1 .0MSB LSBReset Value: 00HTimer 1 C

Página 178 - 6-56

S3F80P5_UM_ REV1.00 COUNTER A 12 COUNTER A OVERVIEW The S3F80P5 microcontroller has one 8-bit counter called counter A. Counter A, which can be use

Página 179 - 6-57

PRODUCT OVERVIEW S3F80P5_UM_ REV1.00 PIN CIRCUITS (Continued) VDDPull-upEnableVDD P3.1/REM/T0CKPull-upResistor(67kΩ-Typ)Open-DrainPort 3.1 DataVSSP

Página 180 - LDW — Load Word

COUNTER A S3F80P5_UM_ REV1.00 MUX 8-Bit Down CounterMUXCounter A DataLow Byte RegisterIRQ2(CAINT) NOTE:The value of the CADATAL register is loaded

Página 181 - MULT — Multiply (Unsigned)

S3F80P5_UM_ REV1.00 COUNTER A COUNTER A CONTROL REGISTER (CACON) The counter A control register, CACON, is located in F3H, Set 1, Bank 0, and is re

Página 182 - NEXT — Next

COUNTER A S3F80P5_UM_ REV1.00 COUNTER A PULSE WIDTH CALCULATIONS tLOWtHIGHtLOW To generate the above repeated waveform consisted of low period ti

Página 183 - NOP — No Operation

S3F80P5_UM_ REV1.00 COUNTER A HighHighCounter A Clock0HCAOF = '0'CADATAL = 01-FFHCADATAH = 00HCAOF = '0'CADATAL = 00HCADATAH =

Página 184 - OR — Logical OR

COUNTER A S3F80P5_UM_ REV1.00  PROGRAMMING TIP — To generate 38 kHz, 1/3duty signal through P3.1 This example sets Counter A to the repeat mode, s

Página 185 - POP — Pop From Stack

S3F80P5_UM_ REV1.00 COUNTER A  PROGRAMMING TIP — To generate a one-pulse signal through P3.1 This example sets Counter A to the one shot mode, set

Página 186 - 6-64

COUNTER A S3F80P5_UM_ REV1.00 NOTES 12-8

Página 187 - 6-65

S3F80P5_UM_ REV1.00 TIMER 2 13 TIMER 2 OVERVIEW The S3F80P5 microcontroller has a 16-bit timer/counter called Timer 2 (T2). For universal remote co

Página 188 - PUSH — Push To Stack

TIMER 2 S3F80P5_UM_ REV1.00 TIMER 2 OVERFLOW INTERRUPT Timer 2 can be programmed to generate an overflow interrupt (IRQ3, F0H) whenever an overflow

Página 189 - 6-67

S3F80P5_UM_ REV1.00 TIMER 2 TIMER 2 MATCH INTERRUPT Timer 2 can also be used to generate a match interrupt (IRQ3, vector F2H) whenever the 16-bit c

Página 190 - 6-68

S3F80P5_UM_ REV1.00 ADDRESS SPACE 2 ADDRESS SPACE OVERVIEW The S3F80P5 microcontroller has two types of address space: — Internal program memory (

Página 191 - RCF — Reset Carry Flag

TIMER 2 S3F80P5_UM_ REV1.00 MUX16-Bit Up-Counter(Read-Only)16-Bit CompatatorTimer 2 High/LowBuffer RegisterMUXIRQ3ClearIRQ3Match (note) NOTE:Match

Página 192 - RET — Return

S3F80P5_UM_ REV1.00 TIMER 2 TIMER 2 CONTROL REGISTER (T2CON) The timer 2 control register, T2CON, is located in address E8H, Bank1, Set 1 and is re

Página 193 - RL — Rotate Left

TIMER 2 S3F80P5_UM_ REV1.00 Timer2 Counter High-Byte Register (T2CNTH)E4H , Set 1, Bank 1, Read-only.7 .6 .5 .4 .3 .2 .1 .0MSB LSBReset Value: 00HT

Página 194 - — Rotate Left Through Carry

S3F80P5_UM_ REV1.00 EMBEDDED FLASH MEMORY INTERFACE 14 EMBEDDED FLASH MEMORY INTERFACE OVERVIEW The S3F80P5 has an on-chip flash memory internally

Página 195 - RR — Rotate Right

EMBEDDED FLASH MEMORY INTERFACE S3F80P5_UM_ REV1.00 User Program Mode This mode supports sector erase, byte programming, byte read and one protecti

Página 196 - 6-74

S3F80P5_UM_ REV1.00 EMBEDDED FLASH MEMORY INTERFACE SMART OPTION Smart option is the program memory option for starting condition of the chip. The

Página 197 - SB0 — Select Bank 0

EMBEDDED FLASH MEMORY INTERFACE S3F80P5_UM_ REV1.00 NOTES 1. By setting ISP Reset Vector Change Selection Bit (3EH.7) to ‘0’, user can have the av

Página 198 - SB1 — Select Bank 1

S3F80P5_UM_ REV1.00 EMBEDDED FLASH MEMORY INTERFACE FLASH MEMORY CONTROL REGISTERS (USER PROGRAM MODE) FLASH MEMORY CONTROL REGISTER (FMCON) FMCON

Página 199 - SBC — Subtract With Carry

EMBEDDED FLASH MEMORY INTERFACE S3F80P5_UM_ REV1.00 FLASH MEMORY SECTOR ADDRESS REGISTERS There are two sector address registers for the erase or

Página 200 - SCF — Set Carry Flag

S3F80P5_UM_ REV1.00 EMBEDDED FLASH MEMORY INTERFACE SECTOR ERASE User can erase a flash memory partially by using sector erase function only in use

Página 201 - SRA — Shift Right Arithmetic

ADDRESS SPACE S3F80P5_UM_ REV1.00 PROGRAM MEMORY Program memory stores program code or table data. The S3F80P5 has 18-Kbyte of internal programma

Página 202 - — Set Register Pointer

EMBEDDED FLASH MEMORY INTERFACE S3F80P5_UM_ REV1.00 The Sector Erase Procedure in User Program Mode 1. Set Flash Memory User Programming Enable Re

Página 203 - STOP — Stop Operation

S3F80P5_UM_ REV1.00 EMBEDDED FLASH MEMORY INTERFACE  PROGRAMMING TIP — Sector Erase Case1. Erase one sector • • ERASE_ONESECTOR:

Página 204 - SUB — Subtract

EMBEDDED FLASH MEMORY INTERFACE S3F80P5_UM_ REV1.00 SECTOR_ERASE: LD R12,SecNumH LD R14,SecNumL

Página 205 - SWAP — Swap Nibbles

S3F80P5_UM_ REV1.00 EMBEDDED FLASH MEMORY INTERFACE PROGRAMMING A flash memory is programmed in one-byte unit after sector erase. The write operat

Página 206 - 6-84

EMBEDDED FLASH MEMORY INTERFACE S3F80P5_UM_ REV1.00 SB1Start; Select Bank1; User Program Mode Enable; Set Secotr Base Address; Write data at fla

Página 207 - TM — Test Under Mask

S3F80P5_UM_ REV1.00 EMBEDDED FLASH MEMORY INTERFACE SB1Start; Select Bank1; User Program Mode Enable; Set Secotr Base Address; Write data at fla

Página 208 - WFI — Wait For Interrupt

EMBEDDED FLASH MEMORY INTERFACE S3F80P5_UM_ REV1.00  PROGRAMMING TIP — Programming Case1. 1-byte programming • • WR_BYTE: ; Wr

Página 209 - XOR — Logical Exclusive OR

S3F80P5_UM_ REV1.00 EMBEDDED FLASH MEMORY INTERFACE Case3. Programming to the flash memory space located in other sectors • • WR_INSECTOR2:

Página 210 - 6-88

EMBEDDED FLASH MEMORY INTERFACE S3F80P5_UM_ REV1.00 READING The read operation starts by ‘LDC’ instruction. The program procedure in user program

Página 211 - 7 CLOCK AND POWER CIRCUITS

S3F80P5_UM_ REV1.00 EMBEDDED FLASH MEMORY INTERFACE HARD LOCK PROTECTION User can set Hard Lock Protection by writing ‘0110B’ in FMCON7-4. This fun

Página 212 - External

S3F80P5_UM_ REV1.00 ADDRESS SPACE SMART OPTION Smart option is the program memory option for starting condition of the chip. The program memory addr

Página 213

EMBEDDED FLASH MEMORY INTERFACE S3F80P5_UM_ REV1.00 NOTES 14-18

Página 214

S3F80P5_UM_ REV1.00 LOW VOLTAGE DETECTOR 15 LOW VOLTAGE DETECTOR OVERVIEW The S3F80P5 micro-controller has a built-in Low Voltage Detector (LVD) c

Página 215

LOW VOLTAGE DETECTOR S3F80P5_UM_ REV1.00 NOTES 1. A term of LVD is a symbol of parameter that means ‘Low Level Detect Voltage for Back-Up Mode’.

Página 216

S3F80P5_UM_ REV1.00 LOW VOLTAGE DETECTOR LOW VOLTAGE DETECTOR CONTROL REGISTER (LVDCON) LVDCON.0 is used flag bit to indicate low battery in IR ap

Página 217 - 8 RESET

S3F80P5_UM_ REV1.00 ELECTRICAL DATA 16 ELECTRICAL DATA OVERVIEW In this section, S3F80P5 electrical characteristics are presented in tables and g

Página 218 - (EI)external interrupt enable

ELECTRICAL DATA S3F80P5_UM_ REV1.00 Table 16-1. Absolute Maximum Ratings (TA = 25 °C) Parameter Symbol Conditions Rating *TBD Unit Supply Voltag

Página 219 - S3F80P5_UM_ REV1.00 RESET

S3F80P5_UM_ REV1.00 ELECTRICAL DATA Table 16-2. D.C. Electrical Characteristics (Continued) (TA = -25 °C to + 85 °C, VDD = 1.60 V to 3.6 V) Par

Página 220 - (note 3)

ELECTRICAL DATA S3F80P5_UM_ REV1.00 Table 16-2. D.C. Electrical Characteristics (Continued) (TA = -25 °C to + 85 °C, VDD = 1.60 V to 3.6 V) Para

Página 221 - Normal Operating Mode

S3F80P5_UM_ REV1.00 ELECTRICAL DATA NOTE: The voltage gaps (LVD_GAPn (n=1~4)) between LVD and LVD FLAGn(n=1~4) have ± 80mV distribution. LVD and

Página 222 - RESET S3F80P5_UM_ REV1.00

ELECTRICAL DATA S3F80P5_UM_ REV1.00 Execution ofSTOP Instrction~~VDDDR~~Stop ModeIdle Mode(Basic Timer Active)Data Retention ModetWAITEXT INTVDDNo

Página 223

Preface The S3F80P5 Microcontroller User's Manual is designed for application designers and programmers who are using the S3F80P5 microcontrolle

Página 224 - POWER-DOWN MODES

ADDRESS SPACE S3F80P5_UM_ REV1.00 NOTES 1. By setting ISP Reset Vector Change Selection Bit (3EH.7) to ‘0’, user can have the available ISP

Página 225 - Back-Up Mode

S3F80P5_UM_ REV1.00 ELECTRICAL DATA Normal Operating ModeStop ModeOscillation Stabilization TimeResetOccurExecution ofSTOP InstrctionVDDNOTE:tWAIT

Página 226 - 8-10

ELECTRICAL DATA S3F80P5_UM_ REV1.00 tINTHtINTL0.8 VDD0.2 VDD0.2 VDD0.8 VDDNOTE:The unit tCPU means one CPU clock period. Figure 16-3. Input Timing

Página 227

S3F80P5_UM_ REV1.00 ELECTRICAL DATA Table 16-8. Oscillation Characteristics (TA = -25 °C to + 85 °C) Oscillator Clock Circuit Conditions Min T

Página 228 - 8-12

ELECTRICAL DATA S3F80P5_UM_ REV1.00 Table 16-9. Oscillation Stabilization Time (TA = -25 °C to + 85 °C, VDD = 3.6 V) Oscillator Test Condition Mi

Página 229 - 8-13

S3F80P5_UM_ REV1.00 ELECTRICAL DATA Minimun InstructionClock1kHzfOSC(Main Oscillator Frequency)12345Supply Voltage (V)Minimun Instruction Clock =

Página 230 - 8-14

ELECTRICAL DATA S3F80P5_UM_ REV1.00 Table 16-11. ESD Characteristics Parameter Symbol Conditions Min Typ Max Unit HBM 2000 − − V MM 200 − − V El

Página 231 - 8-15

S3F80P5_UM_ REV1.00 MECHANICAL DATA 17 MECHANICAL DATA OVERVIEW The S3F80P5 micro-controller is currently available in a 24-pin SOP and SDIP packag

Página 232

MECHANICAL DATA S3F80P5_UM_ REV1.00 NOTE: Dimensions are in millimeters.23.35 MAX22.95 ± 0.20(1.70)24-SDIP-3006.40 ± 0.20#24#10.46 ± 0.100.89 ±

Página 233 - 8-17

S3F80P5_UM_ REV1.00 S3F80P5 FLASH MCU 18 S3F80P5 FLASH MCU OVERVIEW The S3F80P5 single-chip CMOS microcontroller is the Flash MCU. It has an on-chip

Página 234 - 8-18

S3F80P5 FLASH MCU S3F80P5_UM_ REV1.00 VssXinXoutTESTSDAT/P0.0/INT0SCLK/P0.1/INT1nRESET/P0.2/INT2P0.3/INT3P0.4/INT4P0.5/INT4P0.6/INT4P0.7/INT4S3C80P5

Página 235 - 8-19

S3F80P5_UM_ REV1.00 ADDRESS SPACE REGISTER ARCHITECTURE In the S3F80P5 implementation, the upper 64-byte area of register files is expanded two 64-b

Página 236 - DD is lower than V

S3F80P5_UM_ REV1.00 S3F80P5 FLASH MCU Table 18-1. Descriptions of Pins Used to Read/Write the Flash ROM Main Chip During Programming Pin Name Pin N

Página 237 - 9 I/O PORTS

S3F80P5 FLASH MCU S3F80P5_UM_ REV1.00 OPERATING MODE CHARACTERISTICS When 3.3 V is supplied to the TEST pin of the S3F80P5, the Flash ROM programming

Página 238

S3F80P5_UM_ REV1.00 ELECTRICAL DATA 19 DEVELOPMENT TOOLS OVERVIEW Samsung provides a powerful and easy-to-use development support system on a tur

Página 239

DEVELOPMENT TOOLS S3F80P5_UM_ REV1.00 [Development System Configuration] BusEmulator [ SK-1200(RS-232,USB) or OPENIce I-500(RS-232) ]R

Página 240

S3F80P5_UM_ REV1.00 ELECTRICAL DATA TB80PB TARGET BOARD The TB80PB target board can be used for development of S3F80P5. The TB80PB target board is

Página 241 - 10 BASIC TIMER and TIMER 0

DEVELOPMENT TOOLS S3F80P5_UM_ REV1.00 Table 19-1. Setting of the Jumper in TB80PB JP# Description 1-2 Connection 2-3 Connection Default Setting

Página 242 - 10-2

S3F80P5_UM_ REV1.00 ELECTRICAL DATA – STOP LED This LED is ON when the evaluation chip (S3E80PB) is in stop mode. 19-5

Página 243 - 10-3

DEVELOPMENT TOOLS S3F80P5_UM_ REV1.00 NOTE:N.C means No Connection.J21234567891011121314151617181920444342414039383736353433323130292827262521 2422

Página 244 - 10-4

S3F80P5_UM_ REV1.00 ELECTRICAL DATA Third Parties for Development Tools SAMSUNG provides a complete line of development tools for SAMSUNG's m

Página 245 - Reset Value: FFH

DEVELOPMENT TOOLS S3F80P5_UM_ REV1.00 OTP/MTP PROGRAMMER (WRITER) SPW-uni Single OTP/ MTP/FLASH Programmer • Download/Upload and data edit functio

Página 246 - 10-6

ADDRESS SPACE S3F80P5_UM_ REV1.00 Bank1D0HCFHE0HDFHC0HBank 0System andPeripheralControl Register(Register AddressingMode)System Register(Register

Página 247 - 10-7

S3F80P5_UM_ REV1.00 ELECTRICAL DATA OTP/MTP PROGRAMMER (WRITER) (Continued) US-pro Portable Samsung OTP/MTP/FLASH Programmer • Portable Samsung

Página 248 - 10-8

DEVELOPMENT TOOLS S3F80P5_UM_ REV1.00 NOTES 19-10

Página 249 - 10-9

S3F80P5_UM_ REV1.00 ADDRESS SPACE REGISTER PAGE POINTER (PP) The S3C8/S3F8-series architecture supports the logical expansion of the physical 333-by

Página 250

ADDRESS SPACE S3F80P5_UM_ REV1.00 REGISTER SET 1 The term set 1 refers to the upper 64 bytes of the register file, locations C0H–FFH. The upper 3

Página 251

S3F80P5_UM_ REV1.00 ADDRESS SPACE PRIME REGISTER SPACE The lower 192 bytes of the 256-byte physical internal register file (00H–BFH) are called the

Página 252 - 10-12

ADDRESS SPACE S3F80P5_UM_ REV1.00 WORKING REGISTERS Instructions can access specific 8-bit registers or 16-bit register pairs using either 4-bit

Página 253 - 11 TIMER 1

S3F80P5_UM_ REV1.00 ADDRESS SPACE USING THE REGISTER POINTERS Register pointers RP0 and RP1, mapped to addresses D6H and D7H in set 1, are used to s

Página 254 - 11-2

ADDRESS SPACE S3F80P5_UM_ REV1.00 16-byte non-contiguousworking register blockRegister FileContains 328-Byte Slices8-Byte Slice00H (R0)07H (R15)F

Página 255 - 11-3

S3F80P5_UM_ REV1.00 ADDRESS SPACE REGISTER ADDRESSING The S3C8-series register architecture provides an efficient method of working register address

Página 256 - 11-4

Table of Contents Part I — Programming Model Chapter 1 Product Overview S3C8/S3F8-Series Microcontrollers...

Página 257 - 11-5

ADDRESS SPACE S3F80P5_UM_ REV1.00 FFHD0HFFHC0HSet 2CFHRP1RP0RegisterPointersC0HBFH00HSpecial-Purpose Registers General-Purpose RegistersAllAddres

Página 258 - 11-6

S3F80P5_UM_ REV1.00 ADDRESS SPACE COMMON WORKING REGISTER AREA (C0H–CFH) After a reset, register pointers RP0 and RP1 automatically select two 8-byt

Página 259 - 12 COUNTER A

ADDRESS SPACE S3F80P5_UM_ REV1.00  PROGRAMMING TIP — Addressing the Common Working Register Area As the following examples show, you should acce

Página 260 - 12-2

S3F80P5_UM_ REV1.00 ADDRESS SPACE Together they create an8-bit register addressRegister pointerprovides fivehigh-order bitsAddressOPCODESelectsRP0 o

Página 261 - 12-3

ADDRESS SPACE S3F80P5_UM_ REV1.00 8-BIT WORKING REGISTER ADDRESSING You can also use 8-bit working register addressing to access registers in a s

Página 262 - 12-4

S3F80P5_UM_ REV1.00 ADDRESS SPACE Specifies workingregister addressingRP0Selects RP1RP101 1 10 1 1001 1 1 0 0 000 1 1 1 0 0 0 0Register address (0AB

Página 263 - 12-5

ADDRESS SPACE S3F80P5_UM_ REV1.00 SYSTEM AND USER STACKS S3C8-series microcontrollers use the system stack for subroutine calls and returns and t

Página 264 - 8.795 us

S3F80P5_UM_ REV1.00 ADDRESS SPACE  PROGRAMMING TIP — Standard Stack Operations Using PUSH and POP The following example shows you how to perform s

Página 265

ADDRESS SPACE S3F80P5_UM_ REV1.00 NOTES 2-22

Página 266 - 12-8

S3F80P5_UM_ REV1.00 ADDRESSING MODES 3 ADDRESSING MODES OVERVIEW The program counter is used to fetch instructions that are stored in program memor

Página 267 - 13 TIMER 2

Table of Contents (Continued) Chapter 3 Addressing Modes Overview ...

Página 268 - 13-2

ADDRESSING MODES S3F80P5_UM_ REV1.00 REGISTER ADDRESSING MODE (R) In Register addressing mode, the operand is the content of a specified register

Página 269 - 13-3

S3F80P5_UM_ REV1.00 ADDRESSING MODES INDIRECT REGISTER ADDRESSING MODE (IR) In Indirect Register (IR) addressing mode, the content of the specified

Página 270 - 13-4

ADDRESSING MODES S3F80P5_UM_ REV1.00 INDIRECT REGISTER ADDRESSING MODE (Continued) dstOPCODEPoints toRegister PairExampleInstructionReferencesPro

Página 271 - 13-5

S3F80P5_UM_ REV1.00 ADDRESSING MODES INDIRECT REGISTER ADDRESSING MODE (Continued) dstOPCODEADDRESS4-bitWorkingRegisterAddressPoint to theWoking Re

Página 272 - 13-6

ADDRESSING MODES S3F80P5_UM_ REV1.00 INDIRECT REGISTER ADDRESSING MODE (Continued) dstOPCODE4-bit WorkingRegister AddressSample Instructions:LCD

Página 273 - OVERVIEW

S3F80P5_UM_ REV1.00 ADDRESSING MODES INDEXED ADDRESSING MODE (X) Indexed (X) addressing mode adds an offset value to a base address during instruct

Página 274

ADDRESSING MODES S3F80P5_UM_ REV1.00 INDEXED ADDRESSING MODE (Continued) Register FileOPERANDProgram MemoryorData MemoryPoint to WorkingRegister

Página 275

S3F80P5_UM_ REV1.00 ADDRESSING MODES INDEXED ADDRESSING MODE (Continued) Register FileOPERANDProgram MemoryorData MemoryPoint to WorkingRegister Pa

Página 276

ADDRESSING MODES S3F80P5_UM_ REV1.00 DIRECT ADDRESS MODE (DA) In Direct Address (DA) mode, the instruction provides the operand's 16-bit mem

Página 277 - 14-5

S3F80P5_UM_ REV1.00 ADDRESSING MODES DIRECT ADDRESS MODE (Continued) OPCODEProgram MemoryLower Address ByteProgramMemoryAddressUsedUpper Address By

Página 278 - 14-6

Table of Contents(Continued) Chapter 6 Instruction Set Overview...

Página 279 - SECTOR ERASE

ADDRESSING MODES S3F80P5_UM_ REV1.00 INDIRECT ADDRESS MODE (IA) In Indirect Address (IA) mode, the instruction specifies an address located in th

Página 280 - 14-8

S3F80P5_UM_ REV1.00 ADDRESSING MODES RELATIVE ADDRESS MODE (RA) In Relative Address (RA) mode, a two's-complement signed displacement between

Página 281 - 14-9

ADDRESSING MODES S3F80P5_UM_ REV1.00 IMMEDIATE MODE (IM) In Immediate (IM) mode, the operand value used in the instruction is the value supplied

Página 282 - 14-10

S3F80P5_UM_ REV1.00 CONTROL REGISTERS 4 CONTROL REGISTERS OVERVIEW In this section, detailed descriptions of the S3F80P5 control registers are pres

Página 283 - PROGRAMMING

CONTROL REGISTERS S3F80P5_UM_ REV1.00 Table 4-1. Mapped Registers (Bank0, Set1) Register Name Mnemonic Decimal Hex R/W Timer 0 Counter T0CNT 2

Página 284 - 14-12

S3F80P5_UM_ REV1.00 CONTROL REGISTERS Table 4-1. Mapped Registers (Continued) Register Name Mnemonic Decimal Hex R/W Counter A Control Register

Página 285 - 14-13

CONTROL REGISTERS S3F80P5_UM_ REV1.00 Table 4-2. Mapped Registers (Bank1, Set1) Register Name Mnemonic Decimal Hex R/W LVD Control Register LVD

Página 286 - 14-14

S3F80P5_UM_ REV1.00 CONTROL REGISTERS FLAGS - System Flags RegisterBit IdentifierReset ValueRead/WriteR = Read-onlyW = Write-onlyR/W = Read/write&a

Página 287 - 14-15

CONTROL REGISTERS S3F80P5_UM_ REV1.00 BTCON — Basic Timer Control Register D3H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset

Página 288 - READING

S3F80P5_UM_ REV1.00 CONTROL REGISTERS CACON — Counter A Control Register F3H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Va

Página 289 - HARD LOCK PROTECTION

Table of Contents (Continued) Part II Hardware Descriptions Chapter 9 I/O Ports Overview ...

Página 290 - 14-18

CONTROL REGISTERS S3F80P5_UM_ REV1.00 CLKCON — System Clock Control Register D4H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset

Página 291 - 15 LOW VOLTAGE DETECTOR

S3F80P5_UM_ REV1.00 CONTROL REGISTERS EMT — External Memory Timing Register (NOTE) FEH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Res

Página 292 - Resistor String

CONTROL REGISTERS S3F80P5_UM_ REV1.00 FLAGS — System Flags Register D5H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Value x x x

Página 293 - 15-3

S3F80P5_UM_ REV1.00 CONTROL REGISTERS FMCON — Flash Memory Control Register EFH Set1 Bank1 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Re

Página 294 - 16 ELECTRICAL DATA

CONTROL REGISTERS S3F80P5_UM_ REV1.00 FMSECH — Flash Memory Sector Address Register(High Byte) ECH Set1 Bank1 Bit Identifier .7 .6 .5 .4 .3

Página 295

S3F80P5_UM_ REV1.00 CONTROL REGISTERS IMR — Interrupt Mask Register DDH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Value x x x

Página 296

CONTROL REGISTERS S3F80P5_UM_ REV1.00 IPH — Instruction Pointer (High Byte) DAH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset

Página 297

S3F80P5_UM_ REV1.00 CONTROL REGISTERS IPR — Interrupt Priority Register FFH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Value x

Página 298

CONTROL REGISTERS S3F80P5_UM_ REV1.00 IRQ — Interrupt Request Register DCH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Value 0 0

Página 299 - 16-6

S3F80P5_UM_ REV1.00 CONTROL REGISTERS LVDCON — LVD Control Register E0H Set1 Bank1 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Value −

Página 300 - 0 V, unmeasured pins

Table of Contents (Continued) Chapter 12 Counter A Overview...

Página 301 - 16-8

CONTROL REGISTERS S3F80P5_UM_ REV1.00 LVDSEL — LVD Flag Level Selection Register F1H Set1 Bank1 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Res

Página 302

S3F80P5_UM_ REV1.00 CONTROL REGISTERS P0CONH — Port 0 Control Register (High Byte) E8H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1

Página 303

CONTROL REGISTERS S3F80P5_UM_ REV1.00 P0CONL — Port 0 Control Register (Low Byte) E9H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Re

Página 304

S3F80P5_UM_ REV1.00 CONTROL REGISTERS P0INT — Port 0 External Interrupt Enable Register F1H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1

Página 305 - 16-12

CONTROL REGISTERS S3F80P5_UM_ REV1.00 P0PND — Port 0 External Interrupt Pending Register F2H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1

Página 306 - 17 MECHANICAL DATA

S3F80P5_UM_ REV1.00 CONTROL REGISTERS P0PUR — Port 0 Pull-up Resistor Enable Register E7H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0

Página 307 - 24-SDIP-300

CONTROL REGISTERS S3F80P5_UM_ REV1.00 P1CONH — Port 1 Control Register (High Byte) EAH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Re

Página 308 - 18 S3F80P5 FLASH MCU

S3F80P5_UM_ REV1.00 CONTROL REGISTERS P1CONL — Port 1 Control Register (Low Byte) EBH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Res

Página 309 - 18-2

CONTROL REGISTERS S3F80P5_UM_ REV1.00 P1OUTPU — Port 1 Output Pull-up Resistor Enable Register F2H Set1 Bank1 Bit Identifier .7 .6 .5 .

Página 310

S3F80P5_UM_ REV1.00 CONTROL REGISTERS P2CONL — Port 2 Control Register (Low Byte) EDH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Res

Página 311 - 18-4

Table of Contents (Conclude) Chapter 15 Lower Voltage Detector Overview ...

Página 312 - 19 DEVELOPMENT TOOLS

CONTROL REGISTERS S3F80P5_UM_ REV1.00 P2INT — Port 2 External Interrupt Enable Register E5H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1

Página 313 - 19-2

S3F80P5_UM_ REV1.00 CONTROL REGISTERS P2OUTMD — Port 2 Output Mode Selection Register F3H Set1 Bank1 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 R

Página 314 - TB80PB Rev1

CONTROL REGISTERS S3F80P5_UM_ REV1.00 P2PND — Port 2 External Interrupt Pending Register E6H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1

Página 315

S3F80P5_UM_ REV1.00 CONTROL REGISTERS P2PUR — Port 2 Pull-up Resistor Enable Register EEH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0

Página 316 - – STOP LED

CONTROL REGISTERS S3F80P5_UM_ REV1.00 P3CON — Port 3 Control Register EFH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Valu

Página 317 - 19-6

S3F80P5_UM_ REV1.00 CONTROL REGISTERS NOTES: 1. The port 3 data register, P3, at location E3H, set1, bank0, contains seven bit values which corres

Página 318 - 19-7

CONTROL REGISTERS S3F80P5_UM_ REV1.00 P3OUTPU — Port 3 Output Pull-up Resistor Enable Register F4H Set1 Bank1 Bit Identifier .7 .6 .5 .4 .3 .2

Página 319 - SPW-uni

S3F80P5_UM_ REV1.00 CONTROL REGISTERS PP — Register Page Pointer DFH Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Value 0 0 0 0

Página 320 - GW-PRO2

CONTROL REGISTERS S3F80P5_UM_ REV1.00 RESETID — Reset Source Indicating Register F0H Set1 Bank1 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Rea

Página 321 - 19-10

S3F80P5_UM_ REV1.00 CONTROL REGISTERS RP0 — Register Pointer 0 D6H Set1 Bank0 Bit Identifier .7 .6 .5 .4 .3 .2 .1 .0 Reset Value 1 1 0 0 0

Comentários a estes Manuais

Sem comentários