Ez8 CPU User Manual
Total Page:16
File Type:pdf, Size:1020Kb
Z8® Microcontrollers Z8 LXM CPU Core User Manual UM018304-0707 Copyright © 2007 by Zilog®, Inc. All rights reserved. www.zilog.com Z8 LXM CPU Core User Manual ii Warning: DO NOT USE IN LIFE SUPPORT LIFE SUPPORT POLICY ZILOG'S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS PRIOR WRITTEN APPROVAL OF THE PRESIDENT AND GENERAL COUNSEL OF ZILOG CORPORATION. As used herein Life support devices or systems are devices which (a) are intended for surgical implant into the body, or (b) support or sustain life and whose failure to perform when properly used in accordance with instructions for use provided in the labeling can be reasonably expected to result in a significant injury to the user. A critical component is any component in a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system or to affect its safety or effectiveness. Document Disclaimer ©2007 by Zilog, Inc. All rights reserved. Information in this publication concerning the devices, applications, or technology described is intended to suggest possible uses and may be superseded. ZILOG, INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY OF THE INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS DOCUMENT. ZILOG ALSO DOES NOT ASSUME LIABILITY FOR INTELLECTUAL PROPERTY INFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED HEREIN OR OTHERWISE. The information contained within this document has been verified according to the general principles of electrical and mechanical engineering. Z8, Z8 Encore!, Z8 Encore! XP, Z8 Encore! MC, Crimzon, eZ80, and ZNEO are trademarks or registered trademarks of Zilog, Inc. All other product or service names are the property of their respective owners. UM018304-0707 Z8 LXM CPU Core User Manual iii Revision History Each instance in Revision History reflects a change to this document from its previous revision. For more detail, refer to the corresponding pages or appropriate links given in the table below. Revision Date Level Description Page No July 2007 04 Implemented Style Guide and updated disclaimer All section. August 2006 03 TM symbol removed from all instances with the All LXM core. November 2005 02 Updated the document, revision number, and xiv, 7, date. 25, 142. August 2005 01 Initial release. All UM018304-0707 Revision History Z8 LXM CPU Core User Manual iv Table of Contents Introduction . viii About This Manual . viii Intended Audience . viii Manual Organization . viii Manual Conventions . ix Safeguards . .x Architectural Overview . 1 Processor Description . 1 Fetch Unit . 2 Execution Unit . 2 Instruction Cycle Time . 2 Program Counter . 3 Z8 LXM CPU Control Registers . 3 Stack Pointer Register . 4 User Data Register . 5 Register Pointer . 5 Flags Register . 6 Interrupt Mask Register . 8 Interrupt Request Register . 8 Interrupt Priority Register . 9 Port 0 Mode Register . 10 Port 3 Mode Register . 11 Port 2 Mode Register . 12 Program/Constant Memory Page Register . 12 Address Space . 14 Register File . 14 Register File Maps . 15 Setting the Active Bank and Working Register Group . 18 16-Bit Register Pairs . 19 Byte Ordering . 20 Bit Addressing . 20 CPU Control Registers . 20 Stack . 21 Program/Constant Memory . 22 Addressing Modes . 24 Register Addressing . 24 Register Addressing Using 4-Bit Addresses . 24 UM018304-0707 Table of Contents Z8 LXM CPU Core User Manual v Register Addressing Using 8-Bit Addresses . 25 Escaped Mode Addressing . 26 Indirect Register Addressing . 27 Indexed Addressing . 29 Direct Addressing . 30 Relative Addressing . 31 Immediate Data Addressing . 32 Interrupts . 34 Interrupt Enable and Disable . 34 Interrupt Priority . 34 Vectored Interrupt Processing . 34 Interrupt Latency . 36 Nesting of Vectored Interrupts . 37 Generating Vectored Interrupts from Software . 37 Polled Interrupt Processing . 37 Processor Flags . 39 Carry Flag . 40 Zero Flag . 40 Sign Flag . 40 Overflow Flag . 40 Decimal Adjust Flag . 41 Half Carry Flag . 41 Condition Codes . 41 Z8 LXM CPU Instruction Set Summary . 43 Assembly Language Source Program Example . 43 Operand Ordering . 44 Z8 LXM CPU Instruction Notation . 44 Z8 LXM CPU Instruction Classes . 47 Z8 LXM CPU Instruction Summary . ..