
COP8™ MICROCONTROLLER COP8SAx Designer’s Guide Literature Number 620894-001 January 1997 REVISION RECORD RELEASE REVISION SUMMARY OF CHANGES DATE -001 1/97 First Release ii PREFACE This manual is written with the intention to serve as a Designer’s Guide for those who are considering to use a microcontroller from National’s COP8SAx family of devices. Chapter 1, MICROCONTROLLER BASICS, reviews microcontroller basics, including definitions, building blocks, operation, applications, and programming. Those who are al- ready familiar with microcontrollers can skip this chapter. Chapter 2, COP8SAx FAMILY, provides a detailed overview of the COP8SAx family of devices. It describes the features, architecture, instruction set, and electrical character- istics. For more detailed information, refer to the COP8 Feature Family User’s Manual. Chapter 3, DEVELOPMENT TOOLS, describes the range of development tools that are available for developing and testing application software that is run on the COP8SAx mi- crocontroller. Chapter 4, COP8SAx APPLICATION IDEAS, provides an overview of some design exam- ples using the COP8SAx microcontroller. Within these examples, the users can find ap- plication hints that may be useful in implementing a design. The information contained in this manual is for reference only and is subject to change without notice. No part of this document may be reproduced in any form or by any means without the prior written consent of National Semiconductor Corporation. COP8, MICROWIRE/PLUS and WATCHDOG are trademarks of National Semiconductor Corporation. iii iv CONTENTS Chapter 1 MICROCONTROLLER BASICS 1.1 WHAT IS A MICROCONTROLLER? . 1-1 1.1.1 CPU . 1-1 1.1.2 Program Memory . 1-1 1.1.3 Data Memory . 1-1 1.1.4 Timing . 1-1 1.1.5 Inputs/Outputs . 1-1 1.2 WHAT DOES A MICROCONTROLLER REPLACE? . 1-2 1.3 WHAT ARE MICROCONTROLLER APPLICATIONS? . 1-3 1.4 WHAT IS THE DIFFERENCE BETWEEN A MICROCONTROLLER AND A MICROPROCESSOR? . 1-6 1.5 WHAT IS THE ARCHITECTURE OF A MICROCONTROLLER. 1-6 1.5.1 Von Neumann Architecture . 1-6 1.5.2 Harvard Architecture . 1-7 1.6 HOW DOES A MICROCONTROLLER OPERATE? . 1-7 1.7 DESCRIPTION OF MICROCONTROLLER BUILDING BLOCKS . 1-9 1.7.1 Program Memory . 1-9 1.7.2 Data Memory . 1-10 1.7.3 Microcontroller CPU . 1-12 1.7.4 Timing . 1-15 1.7.5 Oscillator Circuits . 1-16 1.7.6 Instruction Set . 1-19 1.7.7 Programming . 1-20 Chapter 2 COP8SAx7 MICROCONTROLLER 2.1 INTRODUCTION . 2-1 2.2 KEY FEATURES . 2-1 2.2.1 CPU Features . 2-2 2.2.2 Peripheral Features . 2-3 2.2.3 I/O Features . 2-3 2.2.4 Fully Static CMOS Design . 2-3 2.2.5 Temperature Ranges . 2-3 2.2.6 Development Support . 2-3 2.3 BLOCK DIAGRAM. 2-4 2.4 ARCHITECTURE. 2-4 2.5 PACKAGING/PIN EFFICIENCY . 2-4 2.6 CONNECTION DIAGRAMS . 2-5 2.6.1 ORDERING INFORMATION . 2-7 2.7 PIN DESCRIPTIONS. 2-8 2.8 FUNCTIONAL DESCRIPTION. 2-11 2.8.1 CPU Registers . 2-11 2.8.2 Program Memory . 2-12 2.8.3 Data Memory . 2-12 2.8.4 ECON (EPROM Configuration) Register . 2-13 2.8.5 User Storage Space In EPROM . 2-13 2.8.6 OTP Security . 2-14 CONTENTS v 2.8.7 Reset . 2-15 2.8.8 Oscillator Circuits . 2-19 2.8.9 Control Registers . 2-21 2.9 TIMERS. 2-23 2.9.1 Timer T0 (IDLE Timer) . 2-23 2.9.2 Timer T1 . 2-23 2.10 TIMER CONTROL FLAGS . 2-27 2.11 POWER SAVING FEATURES . 2-28 2.11.1 HALT Mode . 2-28 2.11.2 IDLE Mode . 2-29 2.12 MULTI-INPUT WAKEUP . 2-31 2.13 INTERRUPTS. 2-33 2.13.1 Introduction . 2-33 2.13.2 Maskable Interrupts . 2-34 2.13.3 VIS Instruction . 2-36 2.13.4 Non-maskable Interrupt . 2-41 2.13.5 Port L Interrupts . 2-42 2.13.6 Interrupt Summary . 2-42 2.14 WATCHDOG/CLOCK MONITOR . 2-43 2.14.1 Clock Monitor . 2-44 2.14.2 WATCHDOG/Clock Monitor Operation . 2-44 2.14.3 WATCHDOG and Clock Monitor Summary . 2-45 2.14.4 Detection of Illegal Conditions . 2-46 2.15 MICROWIRE/PLUS . 2-47 2.15.1 MICROWIRE/PLUS Operation . 2-48 2.16 MEMORY MAP. 2-52 2.17 INSTRUCTION SET . 2-54 2.17.1 Introduction . 2-54 2.17.2 Instruction Features . 2-54 2.17.3 Addressing Modes . 2-54 2.17.4 Instruction Types . 2-60 2.18 DETAILED FUNCTIONAL DESCRIPTIONS OF INSTRUCTIONS . 2-62 2.18.1 ADC— Add with Carry . 2-64 2.18.2 ADD — Add . 2-65 2.18.3 AND — And . 2-66 2.18.4 ANDSZ — And, Skip if Zero . 2-67 2.18.5 CLR — Clear Accumulator . 2-68 2.18.6 DCOR — Decimal Correct . 2-69 2.18.7 DEC — Decrement Accumulator . 2-70 2.18.8 DRSZ REG# — Decrement Register and Skip if Result is Zero . 2-71 2.18.9 IFBIT — Test Bit . 2-72 2.18.10 IFBNE # — If B Pointer Not Equal . 2-73 2.18.11 IFC — Test if Carry . 2-74 2.18.12 IFEQ — Test if Equal . 2-75 2.18.13 IFGT — Test if Greater Than . 2-76 2.18.14 IFNC — Test If No Carry . 2-77 2.18.15 IFNE — Test If Not Equal . 2-78 2.18.16 INC — Increment Accumulator . 2-79 2.18.17 INTR.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages254 Page
-
File Size-