Document Outline
- COVER
- INTRODUCTION
- CHAPTER 1 GENERAL
- 1.1 FUNCTION LIST
- 1.2 ORDERING INFORMATION
- 1.3 BLOCK DIAGRAM
- 1.4 PIN CONFIGURATION (Top View)
- CHAPTER 2 PIN FUNCTIONS
- 2.1 PIN FUNCTIONS
- 2.1.1 Pins in Normal Operation Mode
- 2.1.2 Pins in Program Memory Write/Verify Mode ... uPD17P132, 17P133 only
- 2.2 PIN INPUT/OUTPUT CIRCUIT
- 2.3 HANDLING UNUSED PINS
- 2.4 CAUTIONS ON USE OF THE RESET# AND INT PINS (in Normal Operation Mode only)
- 2.1 PIN FUNCTIONS
- CHAPTER 3 PROGRAM COUNTER (PC)
- 3.1 PROGRAM COUNTER CONFIGURATION
- 3.2 PROGRAM COUNTER OPERATION
- 3.2.1 Program Counter at Reset
- 3.2.2 Program Counter during Execution of the Branch Instruction (BR)
- 3.2.3 Program Counter during Execution of Subroutine Calls (CALL)
- 3.2.4 Program Counter during Execution of Return Instructions (RET, RETSK, RETI)
- 3.2.5 Program Counter during Table Reference (MOVT)
- 3.2.6 Program Counter during Execution of Skip Instructions (SKE, SKGE, SKLT, SKNE, SKT SKF)
- 3.2.7 Program Counter When an Interrupt Is Received
- 3.3 CAUTIONS ON PROGRAM COUNTER OPERATION
- CHAPTER 4 PROGRAM MEMORY (ROM)
- 4.1 PROGRAM MEMORY CONFIGURATION
- 4.2 PROGRAM MEMORY USAGE
- 4.2.1 Flow of the Program
- 4.2.2 Table Reference
- CHAPTER 5 DATA MEMORY (RAM)
- 5.1 DATA MEMORY CONFIGURATION
- 5.1.1 System Register (SYSREG)
- 5.1.2 Data Buffer (DBF)
- 5.1.3 General Register (GR)
- 5.1.4 Port Registers
- 5.1.5 General Data Memory
- 5.1.6 Uninstalled Data Memory
- 5.1 DATA MEMORY CONFIGURATION
- CHAPTER 6 STACK
- 6.1 STACK CONFIGURATION
- 6.2 FUNCTIONS OF THE STACK
- 6.3 ADDRESS STACK REGISTER
- 6.4 INTERRUPT STACK REGISTER
- 6.5 STACK POINTER (SP) AND INTERRUPT STACK REGISTER
- 6.6 STACK OPERATION DURING SUBROUTINES, TABLE REFERENCES, AND INTERRUPTS
- 6.6.1 Stack Operation during Subroutine Calls (CALL) and Returns (RET, RETSK)
- 6.6.2 Stack Operation during Table Reference (MOVT DBF, @AR)
- 6.6.3 Executing RETI Instruction
- 6.7 STACK NESTING LEVELS AND THE PUSH AND POP INSTRUCTIONS
- CHAPTER 7 SYSTEM REGISTER (SYSREG)
- 7.1 SYSTEM REGISTER CONFIGURATION
- 7.2 ADDRESS REGISTER (AR)
- 7.2.1 Address Register Configuration
- 7.2.2 Address Register Functions
- 7.3 WINDOW REGISTER (WR)
- 7.3.1 Window Register Configuration
- 7.3.2 Window Register Functions
- 7.4 BANK REGISTER (BANK)
- 7.5 INDEX REGISTER (IX) AND DATA MEMORY ROW ADDRESS POINTER (Memory Pointer: MP)
- 7.5.1 Index Register (IX)
- 7.5.2 Data Memory Row Address Pointer (Memory Pointer: MP)
- 7.5.3 MPE=0 and IXE=0 (No Data Memory Modification)
- 7.5.4 MPE=1 and IXE=0 (Diagonal Indirect Data Transfer)
- 7.5.5 MPE=0 and IXE=1 (Index Modification)
- 7.6 GENERAL REGISTER POINTER (RP)
- 7.6.1 General Register Pointer Configuration
- 7.6.2 Functions of the General Register Pointer
- 7.7 PROGRAM STATUS WORD (PSWORD)
- 7.7.1 Program Status Word Configuration
- 7.7.2 Functions of the Program Status Word
- 7.7.3 Index Enable Flag (IXE)
- 7.7.4 Zero Flag (Z) and Compare Flag (CMP)
- 7.7.5 Carry Flag (CY)
- 7.7.6 Binary-Coded Decimal Flag (BCD)
- 7.7.7 Caution on Use of Arithmetic Operations on the Program Status Word
- 7.8 CAUTIONS ON USE OF THE SYSTEM REGISTER
- 7.8.1 Reserved Words for Use with the System Register
- 7.8.2 Handling of System Register Addresses Fixed at 0
- CHAPTER 8 GENERAL REGISTER (GR)
- 8.1 GENERAL REGISTER CONFIGURATION
- 8.2 FUNCTIONS OF THE GENERAL REGISTER
- CHAPTER 9 REGISTER FILE (RF)
- 9.1 REGISTER FILE CONFIGURATION
- 9.1.1 Configuration of the Register File
- 9.1.2 Relationship between the Register File and Data Memory
- 9.2 FUNCTIONS OF THE REGISTER FILE
- 9.2.1 Functions of the Register File
- 9.2.2 Control Register Functions
- 9.2.3 Register File Manipulation Instructions
- 9.3 CONTROL REGISTER
- 9.4 CAUTIONS ON USING THE REGISTER FILE
- 9.4.1 Concerning Operation of the Control Register (Read-Only and Unused Registers)
- 9.4.2 Register File Symbol Definitions and Reserved Words
- 9.1 REGISTER FILE CONFIGURATION
- CHAPTER 10 DATA BUFFER (DBF)
- 10.1 DATA BUFFER CONFIGURATION
- 10.2 FUNCTIONS OF THE DATA BUFFER
- 10.2.1 Data Buffer and Peripheral Hardware
- 10.2.2 Data Transfer with Peripheral Hardware
- 10.2.3 Table Reference
- CHAPTER 11 ARITHMETIC AND LOGIC UNIT
- 11.1 ALU BLOCK CONFIGURATION
- 11.2 FUNCTIONS OF THE ALU BLOCK
- 11.2.1 Functions of the ALU
- 11.2.2 Functions of Temporary Registers A and B
- 11.2.3 Functions of the Status Flip-flop
- 11.2.4 Performing Operations in 4-Bit Binary
- 11.2.5 Performing Operations in BCD
- 11.2.6 Performing Operations in the ALU Block
- 11.3 ARITHMETIC OPERATIONS (ADDITION AND SUBTRACTION IN 4-BIT BINARY AND BCD)
- 11.3.1 Addition and Subtraction When CMP=0 and BCD=0
- 11.3.2 Addition and Subtraction When CMP=1 and BCD=0
- 11.3.3 Addition and Subtraction When CMP=0 and BCD=1
- 11.3.4 Addition and Subtraction When CMP=1 and BCD=1
- 11.3.5 Cautions on Use of Arithmetic Operations
- 11.4 LOGICAL OPERATIONS
- 11.5 BIT JUDGEMENT
- 11.5.1 TRUE (1) Bit Judgement
- 11.5.2 FALSE (0) Bit Judgement
- 11.6 COMPARISON JUDGEMENT
- 11.6.1 "Equal to" Judgement
- 11.6.2 "Not Equal to" Judgement
- 11.6.3 "Greater Than or Equal to" Judgement
- 11.6.4 "Less Than" Judgement
- 11.7 ROTATIONS
- 11.7.1 Rotation to the Right
- 11.7.2 Rotation to the Left
- CHAPTER 12 PORTS
- 12.1 PORT 0A (P0A0, P0A1, P0A2, P0A3)
- 12.2 PORT 0B (P0B0, P0B1, P0B2, P0B3)
- 12.3 PORT 0C (P0C0, P0C1, P0C2, P0C3) ... in the case of the uPD17120 and 17121
- 12.4 PORT 0C (P0C0/Cin0, P0C1/Cin1, P0C2/Cin2, P0C3/Cin3) ... in the case of the uPD17132, 17133, 17P132, and 17P133
- 12.5 PORT 0D (P0D0/SCK#, P0D1/SO, P0D2/SI, P0D3/TMOUT#)
- 12.6 PORT 0E (P0E0, P0E1/Vref) ... Vref; uPD17132, 17133, 17P132, and 17P133 only
- 12.6.1 Cautions when Operating Port Registers
- 12.7 PORT CONTROL REGISTER
- 12.7.1 Input/Output Switching by Group I/O
- 12.7.2 Input/Output Switching by Bit I/O
- CHAPTER 13 PERIPHERAL HARDWARE
- 13.1 8-BIT TIMER COUNTER (TM)
- 13.1.1 8-Bit Timer Counter Configuration
- 13.1.2 8-bit Timer Counter Control Register
- 13.1.3 Operation of 8-bit Timer Counters
- 13.1.4 Selecting Count Pulse
- 13.1.5 Setting a Count Value in Modulo Register and Calculation Method
- 13.1.6 Margin of Error of Interval Time
- 13.1.7 Reading Count Register Values
- 13.1.8 Timer Output
- 13.1.9 Timer Resolution and Maximum Setting Time
- 13.2 COMPARATOR (uPD17132, 17133, 17P132, AND 17P133 ONLY)
- 13.2.1 Configuration of Comparator
- 13.2.2 Functions of Comparator
- 13.3 SERIAL INTERFACE (SIO)
- 13.3.1 Functions of the Serial Interface
- 13.3.2 3-wire Serial Interface Operation Modes
- 13.3.3 Setting Values in the Shift Register
- 13.3.4 Reading Values from the Shift Register
- 13.3.5 Program Example of Serial Interface
- 13.1 8-BIT TIMER COUNTER (TM)
- CHAPTER 14 INTERRUPT FUNCTIONS
- 14.1 INTERRUPT SOURCES AND VECTOR ADDRESS
- 14.2 HARDWARE COMPONENTS OF THE INTERRUPT CONTROL CIRCUIT
- 14.2.1 Interrupt Request Flag (IRQxxx) and the Interrupt Enable Flag (IPxxx)
- 14.2.2 EI/DI Instruction
- 14.3 INTERRUPT SEQUENCE
- 14.3.1 Acceptance of Interrupts
- 14.3.2 Return from the Interrupt Routine
- 14.3.3 Interrupt Acceptance Timing
- 14.4 PROGRAM EXAMPLE OF INTERRUPT
- CHAPTER 15 STANDBY FUNCTIONS
- 15.1 OUTLINE OF STANDBY FUNCTION
- 15.2 HALT MODE
- 15.2.1 HALT Mode Setting
- 15.2.2 Start Address after HALT Mode is Canceled
- 15.2.3 HALT Setting Condition
- 15.3 STOP MODE
- 15.3.1 STOP Mode Setting
- 15.3.2 Start Address after STOP Mode Cancellation
- 15.3.3 STOP Setting Condition
- CHAPTER 16 RESET
- 16.1 RESET FUNCTIONS
- 16.2 RESETTING
- 16.3 POWER-ON/POWER-DOWN RESET FUNCTION
- 16.3.1 Conditions Required to Enable the Power-On Reset Function
- 16.3.2 Description and Operation of the Power-On Reset Function
- 16.3.3 Condition Required for Use of the Power-Down Reset Function
- 16.3.4 Description and Operation of the Power-Down Reset Function
- CHAPTER 17 ONE-TIME PROM WRITING/VERIFYING
- 17.1 DIFFERENCES BETWEEN MASK ROM VERSION AND ONE-TIME PROM VERSION
- 17.2 OPERATING MODE IN PROGRAM MEMORY WRITING/VERIFYING
- 17.3 WRITING PROCEDURE OF PROGRAM MEMORY
- 17.4 READING PROCEDURE OF PROGRAM MEMORY
- CHAPTER 18 INSTRUCTION SET
- 18.1 OVERVIEW OF THE INSTRUCTION SET
- 18.2 LEGEND
- 18.3 LIST OF THE INSTRUCTION SET
- 18.4 ASSEMBLER (AS17K) MACRO INSTRUCTIONS
- 18.5 INSTRUCTIONS
- 18.5.1 Addition Instructions
- 18.5.2 Subtraction Instructions
- 18.5.3 Logical Operation Instructions
- 18.5.4 Judgment Instruction
- 18.5.5 Comparison Instructions
- 18.5.6 Rotation Instructions
- 18.5.7 Transfer Instructions
- 18.5.8 Branch Instructions
- 18.5.9 Subroutine Instructions
- 18.5.10 Interrupt Instructions
- 18.5.11 Other Instructions
- CHAPTER 19 ASSEMBLER RESERVED WORDS
- 19.1 MASK OPTION PSEUDO INSTRUCTIONS
- 19.1.1 OPTION and ENDOP Pseudo Instructions
- 19.1.2 Mask Option Definition Pseudo Instructions
- 19.2 RESERVED SYMBOLS
- 19.2.1 List of Reserved Symbols (uPD17120, 17121)
- 19.2.2 List of Reserved Symbols (uPD17132, 17133, 17P132, 17P133)
- 19.1 MASK OPTION PSEUDO INSTRUCTIONS
- APPENDIX A DEVELOPMENT TOOLS
- APPENDIX B ORDERING MASK ROM
- APPENDIX C CAUTIONS TO TAKE IN SYSTEM CLOCK OSCILLATION CIRCUIT CONFIGURATIONS
- APPENDIX D INSTRUCTION LIST
(O. D. No. IEU-835A)
Date Published July 1995 P
Printed in Japan
export of this product from a country other than Japan may also be prohibited without a license from that country.
No part of this document may be copied or reproduced in any form or by any means without the prior written
consent of NEC Corporation. NEC Corporation assumes no responsibility for any errors which may appear in
this document.
NEC Corporation does not assume any liability for infringement of patents, copyrights or other intellectual
property rights of third parties by or arising from use of a device described herein or any other liability arising
from use of such device. No license, either express, implied or otherwise, is granted under any patents,
copyrights or other intellectual property rights of NEC Corporation or others.
While NEC Corporation has been making continuous effort to enhance the reliability of its semiconductor devices,
the possibility of defects cannot be eliminated entirely. To minimize risks of damage or injury to persons or
property arising from a defect in an NEC semiconductor device, customer must incorporate sufficient safety
measures in its design, such as redundancy, fire-containment, and anti-failure features.
NEC devices are classified into the following three quality grades:
"Standard", "Special", and "Specific". The Specific quality grade applies only to devices developed based on
a customer designated "quality assurance program" for a specific application. The recommended applications
of a device depend on its quality grade, as indicated below. Customers must check the quality grade of each
device before using it in a particular application.
equipment and industrial robots
systems, anti-crime systems, safety equipment and medical equipment (not specifically designed
for life support)
If customers intend to use NEC devices for applications other than those specified for Standard quality grade,
they should contact NEC Sales Representative in advance.
Anti-radioactive design is not implemented in this product.
