J6-BIT V-SERIES MICROPROCESSOR DATA BOOK NEe NEe Electronics Inc. NEe 1991 16-Bit V-Series Microprocessor Data Book May 1991 Document No. 50054-1 ©1991 NEG Electronics Inc./Printed in the U.S.A. No part of this document may be copied or reproduced in any form or by any means without the prior written consent of NEC Electronics Inc. The information in this document is subject to change without notice. Devices sold by NEC Electronics Inc. are covered by the warranty and patent indemnification provisions appearing in NEC Electronics Inc. Terms and Conditions of Sale only. NEC Electronics Inc. makes no warranty, express, statutory, implied, or by description, regarding the information set forth herein or regarding the freedom of the described devices from patent infringement. NEC Electronics Inc. makes no warranty of merchantability or fitness for any purpose. NEC Electronics Inc. assumes no responsibility for any errors that may appear in this document. NEC Electronics Inc. makes no commitment to update or to keep current the information contained in this document. NEe ii NEe Selection Guides II Reliability and Quality Control B i6-Bit CPUs i6-Bit Microcomputers Peripherals for CPUs Development Tools Package Drawings II iii NEe iv NEe Contents Section 1 Section 2 Selection Guides Reliability and Quality Control (cont) Single-Chip Microcomputers 1-3 Figure 6. NEC Quality and Reliability Targets 2-10 V-Series and RISC Microprocessors and 1-9 Appendix 1. Typical QC Flow 2-12 Peripherals Appendix 2. Typical Reliability Assurance 2-15 Intelligent Peripheral Devices (IPD) 1-11 Tests DSP and Speech Products 1-13 Appendix 3. New Product/Process Change 2-16 Development Tools for Micro Products Tests V-Series Microprocessors 1-15 Appendix 4. Failure Analysis Flowchart 2-17 75xxSeries Single-Chip Microcomputers 1-19 75xxx Series Single-Chip Microcomputers 1-21 78xx Series Single-Chip Microcomputers 1-24 Section 3 782xx Series Single-Chip Microcomputers 1-26 16-Bit CPUs 783xx Series Single-Chip Microcomputers 1-28 "PD70108 (V20), 70108H (V20H) 3a DSP and Speech Products 1-30 16-Bit Microprocessor: PG-1500 Programming Adapters 1-32 High-Performance, ,CMOS "PD70116 (V30), 70116H (V30H) 3b 16-Bit Microprocessor: Section 2 High-Performance, CMOS Reliability and Quality Control "PD70208 (V40) 3c Introduction 2-3 8/16-Bit Microprocessor: Built-In Quality and Reliability 2-3 High-Integration, CMOS Technology Description 2-3 "PD70216 (V50) 3d 16-Bit Microprocessor: Approaches to Total Quality Control 2-3 High-Integration, CMOS Implementation of Quality Control 2..,5 "PD70136 (V33) 3e Reliability Testing 2-7 16-Bit Microprocessor: Life Distribution 2-7 High-Speed, CMOS Failure Distribution at NEC 2-7 "PD70236 (V53) 3f 16-Bit Microprocessor: Infant Mortality Failure'Screening 2-8 High-Speed, High-Integration, CMOS Long-Term Failure Rate 2-8 Accelerated Reliability Testing 2-8 Section 4 Failure Rate Calculation/Prediction 2-9 16-Bit Microcomputers Product/Process Changes 2-10 "PD70320/70322 (V25) 4a Failure Analysis 2-10 16-Bit Microcomputers: Single-Chip, CMOS NECs Goals on Failure Rates 2-10 "PD70330/70332 (V35) 4b Summary and Conclusion 2-10 16-Bit Microcomputers: Figure 1. Quality Control System .Flowchart 2-5 Advanced, Single-Chip, CMOS Figure 2. New Product Development Flow 2-6 "PD70P322 4c 16-Bit Microcomputer: Figure 3. Electrical Testing and Screening 2-6 Single-Chip, CMOS, Figure 4. Reliability Life (Bathtub) Curve 2-7 With EPROM for V25N35 Modes Figure 5. Typical Reliability Test Results 2-9 v Contents NEe Section 4 Section 5 16-Bit Microcomputers (cont) Peripherals for CPUs (cont) I'PD70325 (V25 Plus) 4d I'PD71 086, 71087 5j 16-Bit Microcomputer: 8-Bit Bus Buffer/Drivers High-Speed DMA, Single-Chip, CMOS I'PD71 088 5k I'PD70335 (V35 Plus) 4e System Bus Controller 16-Bit Microcomputer: I'PD71641 51 Advanced, High-Speed DMA, Cache Memory Controller Single-Chip, CMOS I'PD70327 (V25 Software Guard) 4f 16-Bit Microcomputer: Section 6 Software-Secure, Single-Chip, CMOS Development Tools I'PD70337 (V35 Software Guard) 49 CC70116 6a 16-Bit Microcomputer: V-Series C Compi ler Software-Secure, Single-Chip, CMOS DDK-70320 6b I'PD79011 4h Evaluation Board for V25 Microcomputer 16-Bit Microcomputer: DDK-70330 6c Single-Chip, CMOS, With Bui It-In RTOS Evaluation Board for V35 Microcomputer I'PD79021 4i IE-70136 6d 16-Bit Microcomputer: In-Circuit Emulator for pPD70136 (V33) Single-Chip, CMOS, With Built-In RTOS Microprocessor IE-70136-PC 6e ,Section 5 In-Circuit Emulator for pPD70136 (V33) Peripherals for CPUs Microprocessor I'PD71 011 5a IE-70208, IE-70216 6f Clock Pulse Generator/Driver In~Circuit Emulators for pPD70208 (V40) and pPD70216 (V50) Microprocessors "PD71 037 5b Direct Memory Access (DMA) Controller IE-70320 69 In-Circuit Emulator for pPD70320/70322 (V25) I'PD71 051 5c Microcomputers Serial Control Unit IE-70330 6h I'PD71 054 5d In-Circuit Emulator for pPD70330/70332 (V35) Programmable Timer/Counter Microcomputers I'PD71 055 5e RA70116 6i Parallel Interface Unit Relocatable Assembler Package for V20-V50 I'PD71 059 5f Microprocessors Interrupt Control Unit RA70136 6j I'PD71 071 59 Relocatable Assembler Package for V33 DMA Controller Microprocessor I'PD71 082, 71083 5h RA70320 6k 8-Bit Latches Relocatable Assembler Package for V25N35 I'PD71 084 5i Microcomputers Clock Pulse Generator/Driver V25N35 MINI-IE Plus 61 In-Circuit Emulator V40N50 MINI-IE 6m In-Circuit Emulator vi NEe Contents Section 7 Numerical Index Package Drawings Device, I'PD Section Package/Device Cross-Reference 7-3 70108, 70108H 3a 18-Pin Plastic DIP 7-5 70116, 70116H 3b 20-Pin Plastic DIP (300 mil) 7-5 70136 3e 20-Pin Plastic SOP (300 mil) 7-6 70208 3c 70216 3d 24-Pin Plastic DIP (600 mil) 7-6 70236 3f 28-Pin Plastic DIP (600 mil) 7-7 70320 4a 28-Pin PLCC 7-8 70322 4a 70325 4d 40-Pin Plastic DIP (600 mil) 7-8 70327 4f 44-Pin Plastic QFP (P44G-80-22) 7-9 70330 4b 44-Pin Plastic QFP (P44GB-80-3B4) 7-9 70332 4b 44-Pin PLCC 7-10 70335 4e 70337 49 48-Pin Plastic DIP 7-11 70P322 4c 52-Pin Plastic QFP 7-12 71011 5a 52-Pin PLCC 7-13 71037 5b 68-Pin PLCC 7-14 71051 5c 68-Pin Ceramic PGA 7-15 71054 5d 71055 5e 74-Pin Plastic QFP 7-16 71059 5f 80-Pin Plastic QFP 7-17 71071 59 84-Pin PLCC 7-18 71082 5h 71083 5h 84-Pin Ceramic LCC 7-19 71084 5i 94-Pin Plastic QFP 7-20 71086 5j 120-Pin Plastic QFP 7-21 71087 5j 132-Pin Ceramic PGA 7-22 71088 5k 71641 51 79011 4h Addenda 79021 4i I'PD70236 (V53) Addendum 1 V20, V20H 3a 16-Bit Microprocessor: (April 1991) V25 4a High-Speed, High-Integration, V25 Plus 4d CMOS V25 Software Guard 4f V30, V30H 3b V33 3e V35 4b V35 Plus 4e V35 Software Guard 49 V40 3c V50 3d V53 3f vii Contents NEe viii fttfEC Selection Guides II 1-1 Selection Gu ides NEe Section 1 Part Numbering System Selection Guides Single-Chip Microcomputers 1-3 I'PD72001 L Typical microdevice part number I'P NEC monolithic si licon integrated circuit V-Series and RISC Microprocessors and 1-9 Peripherals o Device type (D = digital MOS) Intelligent Peripheral Devices (IPD) 1-11 72001 Device identifier (alphanumeric) L Package type (L = PLCC) DSP and Speech Products 1-13 Development Tools for Micro Products A part number may include an alphanumeric suffix V-Series Microprocessors 1-15 that identifies special device characteristics; for 75xx Series Single-Chip Microcomputers 1-19 example, J.lPD72001L-11 has an 11-MHz CPU clock 75xxx Series Single-Chip Microcomputers 1-21 rating. 78xx Series Single-Chip Microcomputers 1-24 782xx Series Single-Chip Microcomputers 1-26 783xx Series Single-Chip Microcomputers 1-28 DSP and Speech Products 1-30 PG-1500 Programming Adapters 1-32 1-2 NEe Single-Chip Microcomputers 4-Bit, Single-Chip CMOS Microcomputers; 75xx Series Device Clock Supply (,uPD) Features (MHz) Voltage (V) ROM (X8) RAM (X4) I/O Package t Pins 7502(l502A LCD controller/driver 0.41 2.5 to 6.0 2K 128 23 QFP 64 7503(l503A LCD controller/driver 0.41 2.5 to 6.0 4K 224 23 QFP 64 7507 General-purpose 0.41 2.5 to 6.0 2K 128 32 DIP 40 SDIP 40 II QFP 52 75078 General-purpose 0.5 2.2 to 6.0 2K 128 32 SDIP 40 QFP 44 7507H General-purpose 4.19 2.7 to 6.0 2K 128 32 DIP 40 SDIP 40 QFP 52 7508 General-purpose 0.41 2.5 to 6.0 4K 224 32 DIP 40 SDIP 40 QFP 52 75088 General-purpose 0.5 2.2 to 6.0 4K 224 32 SDIP 40 QFP 44 7508H General-purpose 4.19 2.7 to 6.0 4K 224 32 DIP 40 SDIP 40 QFP 52 75CG08 Piggyback EPROM 0.41 4.5 to 5.5 2K or4K 224 32 Ceramic DIP 40 75CG08H Piggyback EPROM 4.19 4.5 to 5.5 2K or4K 224 32 Ceramic DIP 40 7027A FIP controller/driver 0.61 2.7 to 6.0 2K 128 35 DIP 42 SDIP 42 7528A FIP controller/driver 0.61 2.7 to 6.0 4K 160 35 DIP 42 SDIP 42 75CG28 Piggyback EPROM; FIP 0.5 4.5 to 5.5 4K 160 35 Ceramic DIP 42 controller/driver 7533 ND converter 0.51 2.7 to 6.0 4K 160 30 DIP 42 SDIP 42 QFP 44 75CG33 Piggyback EPROM; ND 0.51 4.5 to 5.5 4K 160 30 Ceramic DIP 42 converter 7537A FIP controller/driver 0.61 2.7 to 6.0 2K 128 35 DIP 42 SDIP 42 7538A FIP controller/driver 0.61 2.7 to 6.0 4K 160 35 DIP 42 SDIP 42 75CG38 Piggyback EPROM; FIP 0.5 4.5 to 5.5 4K 160 35 Ceramic DIP 42 controller/driver 7554 Serial I/O; external 0.71 2.5 to 6.0 1K 64 16 SDIP 20 clock or RC oscillator SOP 20 7554A Serial I/O; external 0.71 2.0 to 6.0 1K 64 16 SDIP 20 clock or RC oscillator SOP 20 75P54 Serial I/O; external 0.71 4.5 to 6.0 1KOTPROM 64 16 SDIP 20 clock or RC oscillator SOP 20 t Plastic unless ceramic (or cerdip) is specified. 1-3 Sing le'Ch i,p 'Microcomputers NEC "',:(;' ',' "':::_,'i~'~:~ 4-Bit, Single-Chip CMOS Microcomputers; 75xxSeries : :i . ~. ~ Device Clock Supply (poP D) " " Features (MHz) Voltage',(V) ROM,{X8), RAM (X4) I/O Package t Pins 7564j7564A Serial I/O; ceram ic ' 0.71 2.7 to 6.0 1K ,64 15 ' SOIP 20 oscillator SOP 20 75P64 Serial I/O; ceramic 0.71 4.5 to'6.0 1KOTPROM 64 15 SDIP 20" osciHator SOP 20: 7556 Comparator; external 0.71 2.5 to 6.0 1K 64 20 SDIP 24 clock or RC oscillator SOP 24 7556A Comparator; external 0.71 2.0 to 6.0 1K 64 20 SDIP 24 clock or RC oscillator SOP 24 75P56 Comparator; external 0.71 4.5 to 6.0 1KOTPROM 64 20 SDIP 24 clock or RC oscillator SOP 24 7566j7566A Comparator; ceramic 0.71 2.7 to 6.0 1K 64 19 SDIP 24 oscillator SOP 24 75P66 Comparator; ceramic 0.71. 4.,5 ,to 6.0 1KOTPFlOM 64 19 SDIP 24 oscillator SOP," ,24 t Plastic unless ceramic (or cerdip) is specified. 4-Bit, Sing Ie-Chip CMOS Microcomputers; 75xxx Series Clock Supply Device (p.PD) Features (MHz) Voltage (V) ROM (X8) RAM (X4) 1/0 Package t· , Pins 75004 General-purpose 4.19 2.7 to 6.0 4K 512 34 SDIP 42 QFP 44 75006 General-purpose 4.19 2.7 to 6.0 6K 512 34 -SDIP 42 QFP' 44 75008 General-purpose 4.19 2.7 to 6.0 8K 512 34 ' SDIP 42 , QFP 44 75P008 General-purpose; on- 4.19 4.5 to 5.5 8KOTPROM 512 34 SDIP 42 chip OTPROM QFP 44 75028 A/D c,onverter 4.19 2.7 to 6.0 8K 512 48 SDIP 64 QFP 64 75P036 A/D converter; on-chip 4.19 2.7 to 6.0 16KOTPROM 1024 48 SDIP 64 OTPROM QFP 64 75048 A/D converter; 1K x 4 4.19 2.7 to 6.0 8K 512 48 SDIP 64 EEPROM QFP 64 75P056 * A/D converter; 1K x 4 4.19 2.7 to 6.0 16K OTPROM 1024 48 SDIP 64 EEPROM; on-chip QFP 64 OTPROM * Under development; consult your NEC Sales Office for availability. 75104 High-end with 8-bit 4.19 2.7 to 6.0 4K 320 "52 SDIP 64 instruction QFP 64 75104A High-end with 8-bit 4.19 2.7 to 6.0 4K 320 52 ,QFP 64 instruction 75106 High-end with 8-bit 4.19 2.7 to 6.0 6K 320 52 SDIP 64 instruction QFP 64 75108 High-end with 8-bit 4.19 2.7 to 6.0 8K 512 52 SDIP 64 instruction QFP 64 75108A High-end with 8-bit 4.19 2.7 to 6.0 8K 512 52 QFP 64 instruction 1-4 NEe J, .. : ,:.' Sing1e-Ch ip Microcompu~ers 4-Bit, Single-Chip CMOS Microcomputers; 75XXX Series (cont) Clock Supply Device (~PD) Features ' ,. (MHz) Voltage (V)' ROM(X8) RAM (X4) I/O Package t Pins 75P108 High-end with 8-bit A.19 4.5 to 5.5 8KOTPROM 512 52 SDIP 64 instruction; on-chip QFP. 64 OTPROM or UVEPAOM 8K UVEPROM 512 52 Shrink cerdip 64 75P1088 High-end with 8-bit 4.19 2.7 to 6.0 8KOTPROM 512 52 SDIP 64 II instruction; on-chip QFP 64 OTPROM 75112 High-end with 8-bit 4.19 2.7 to 6.0 12K 512 52 SDIP 64 instruction QFP 64 75116 High-end with 8-bit 4.19 2.7 to 6.0 16K 512 52 SDIP 64 instruction QFP 64 75P116 High-end with 8-bit 4.19 4.5 to 5.5 16KOTPROM 512 52 SDIP 64 instruction; on-chip QFP 64 OTPROM 75206 FIP controller/driver 4.19 2.7 to 6.0 6K 369 28 SDIP 64 QFP 64 75208 FIP controller/driver 4.19 2.7 to 6.0 8K 497 28 SDIP 64 QFP 64 75CG208 FIP controller/driver; 4.19 4.5 to 5.5 8K 512 28 Ceramic SDIP 64 piggyback EPROM Ceramic QFP 64 75212A FIP controller/driver 4.19 2.7 to 6.0 12K 512 28 SDIP 64 Q,FP 64 75216A FIP controller/driver; 4.19 2.7 to 6.0 16K 512 28 SDIP 64 on-chip OTPAOM QFP 64 75CG216A FIP c<>ntroller/driver; 4.19 4.5 to 5.5 16K 512 28 Ceramic SDIP 64 piggYQack EPROM Ceramic QFP 64 75P216A FIP controller/driver; 4.19 4.5 to 5.5 16KOTPROM 512 28 SDIP 64 on-chip OTPROM 75217 FIP controller/driver 4.19 2.7 to 6.0 24K 768 28 SDIP 64 QFP 64 75P218 FIP cOntroller/driver; 4.19 2.7 to 6.0 ?2KOTPROM 1024 28 SDIP 64 on-chip OTPROM or QFP 64 UVEPROM 32KUVEPROM 1024 28 Ceramic LCC 64 75268 FIP controller/driver 4.19 2.7 to 6.0 8K 512 28 SDIP 64 QFP 64 75304 LCD controller/driver 4.19 2.7 to 6.0 4K 512 32 QFP 80 75306 LCD controller/driver 4.19 2.7 to 6.0 6K 512 32 QFP 80 75308 LCD controller/driver 4.19 2.7 to 6.0 8K 512 32 QFP 80 75P308 LCD controller/driver; 4.19 4.75 to 5.25 8KOTPROM 512 32 QFP 80 on-chip OTPROM or 8K UVEPROM 512 32 Ceramic LCC 80 UVEPROM 75312 LCD controller/driver 4.19 2.7 to 6.0 12K 512 32 QFP 80 75316 LCD controller/driver 4.19 2.7 to 6.0 16K 512 32 QFP 80 75P316 LCD controller/driver; 4.19 4.75 "to 5.25 16KOTPROM 512 32 QFP 80 on-chip OTPROM 75P316A LCD controller/driver; 4.19 2.7 to 6.0 16KOTPROM 512 32 QFP 80 on-chip OTPROM or 16K UVEPROM 512 32 Ceramic LCC 80 UVEPROM 1-5 Single.. Chip Microcomputers NEe 4-Bit, Single-Chip CMOS Microcomputers; 75xxx Series (cont) Clock Supply Device (~PD) Features (MHz) Voltage (V) ROM (X8) RAM (X4) I/O Package t Pins 75328 LCD controller/driver; 4.19 2.7 to 6.0 8K 512 36 QFP 80 AID converter 75P328 LCD controller/driver; 4.19 4.5 to 5.5 8KOTPROM 512 36 QFP 80 AID converter; on-chip OTPROM 75402A Low-end 4.19 2.7 to 6.0 2K 64 22 DIP 28 SDIP 28 QFP 44 75P402 Low-end; on-chip 4.19 4.5 to 5.5 2KOTPROM 64 22 DIP 28 OTPROM SDIP 28 QFP 44 75512 High-end; AID 4.19 2.7 to 6.0 12K 512 64 QFP 80 converter 75516 High-end; AID 4.19 2.7 to 6.0 16K 512 64 QFP 80 converter 75P516 High-end; AID 4.19 4.75 to 5.5 16KOTPROM . 512 64 QFP 80 converter; on-chip 16KUVEPROM 512 64 Ceramic LCC 80 OTPROM or UVEPROM t Plastic unless ceramic (or cerdip) is specified. a-Bit, Sing le-Chip CMOS Microcomputers; 78xx Series Clock Supply Device (~PD) Features (MHz) Voltage (V) ROM (X8) RAM (X4) 1/0 Package t Pins 78C10178C10A CMOS; AID converter 15 4.5 to 5.5 External 256 32 QUIP 64 SDIP 64 QFP 64 PLCC 68 78C11178C11A CMOS; AID converter 15 4.5 to 5.5 4K 256 40 QUIP 64 SDIP 64 QFP 64 PLCC 68 78C12A CMOS; AID converter 15 4.5 to 5.5 8K 256 40 QUIP 64 SDIP 64 QFP 64 PLCC 68 78C14178C14A CMOS; AID converter 15 4.5 to 5.5 16K 256 40 QUIP 64 SDIP 64 QFP 64 PLCC 68 78CP14 CMOS; A/D converter; 15 4.75 to 5.25 16KOTPROM 256 40 QUIP 64 on-chip OTPROM or SDIP 64 UVEPROM QFP 64 PLCC 68 16KUVEPROM 256 40 Ceramic QUIP 64 Shrink cerdip 64 78CG14 CMOS; AID converter; 15 4.5 to 5.5 4K, 81<, or 16K 256 40 Ceramic QUIP 64 piggyback EPROM 78C17 CMOS; AID converter 15 4.5 to 5.5 External 1024 40 QUIP 64 SDIP 64 QFP 64 1-6 NEe Single-Chip Microcomputers a-Bit, Single-Chip CMOS Microcomputers; 78xx Series (cont) Clock Supply Device (l'PD) Features (MHz) Voltage (V) ROM (X8) RAM (X4) 1/0 Package t Pins 78C18 CMOS; AID converter 15 4.5 to 5.5 32K 1024 40 QUIP 64 SDIP 64 .. QFP 64 78CP18 CMOS; AID converter; 15 4.75 to 5.25 32KOTPROM 1024 40 QUIP 64 on-chip OTPROM or SDIP 64 UVEPROM QFP 64 32K UVEPROM 1024 40 Ceramic LCC 64 t Plastic unless cerami.c (or cerdip) is specified. 8-Bit, Single-Chip CMOS Microcomputers; 782xx (K2) Series Clock Supply Device (l'PD) Features (MHz) Voltage (V) ROM (X8) RAM (X4) 1/0 Package t Pins 78212 CMOS; AID converter; 12 4.5 to 5.5 8K 384 54 SDIP 64 advanced peripherals QUIP 64 QFP 64 QFP 74 PLCC 68 78213 CMOS; AID converter; 12 4.5 to 5.5 External 512 54 SDIP 64 advanced peripherals QUIP 64 QFP 64 QFP 74 PLCC 68 78214 CMOS; AID converter; 12 4.5 to 5.5 16K 512 54 SDIP 64 advanced peripherals QUIP 64 QFP 64 QFP 74 PLCC 68 78P214 CMOS; AID converter; 12 4.5 to 5.5 16KOTPROM 512 54 SDIP 64 advanced peripherals QUIP 64 QFP 64 QFP 74 PLCC 68 16K UVEPROM 512 54 Shrink cerdip 64 78220 CMOS; analog 12 4.5 to 5.5 External 640 71 PLCC 84 comparator; large I/O QFP 94 78224 CMOS; analog 12 4.5 to 5.5 16K 640 71 PLCC 84 comparator; large 110 QFP 94 78P224 CMOS; analog 12 4.5 to 5.5 16KOTPROM 640 71 PLCC 84 comparator; large 110 QFP 94 78233 CMOS; real-time 12 4.5 to 5.5 External 640 64 QFP 80 outputs; AID and DIA QFP 94 converters PLCC 84 78234 CMOS; real-time 12 4.5 to 5.5 16K 640 64 QFP 80 outputs; AID and DIA QFP 94 converters PLCC 84 78237 CMOS; real-time 12 4.5 to 5.5 External 1024 64 QFP 80 outputs; AID and DIA QFP 94 converters PLCC 84 1-7 Single-Chip Microcomputers NEe 8-Bit, Single-Chip CMOS Microcomputers; 782xx (K2) Series (cont) Clock Supply Device ("PD) Features (MHz) Voltage (V) ROM (X8) RAM (X4) 1/0 Package t Pins 78238 CMOS; real-time 12 4.5 to 5.5 32K 1024 64 QFR 80 outputs; AID and D/A QFP 94 converters PLCC 84 78P238 CMOS; real-time 12 4.5 to 5.5 32KOTPROM 1024 64 QFP 80 outputs; AID and D/A QFP 94 converters PLCC 84 32K UVEPROM 1024 64 Ceramic LCC 94 78243 CMOS; AID converter; 12 4.5 to 5.5 External 512 54 SDIP 64 EEPROM 512 QFP 64 EEPROM PLCC 68 78244 CMOS; AID converter; 12 4.5 to 5.5 16K 512 54 SDIP 64 EEPROM 512 QFP 64 EEPROM PLCC 68 t Plastic unless ceramic (or cerdip) is specified. 8/16-Bit, Sing Ie-Chip CMOS Microcomputers; 783xx (K3) Series Device Clock Supply (!1PD) Features (MHz) Voltage (V) ROM (X8) RAM (X4) 1/0 Package t Pins 78310A Real-time motor control 12 4.5 to 5.5 External 256 48 SDIP 64 QUIP 64 QFP 64 PLCC 68 78312A Real-time motor control 12 4.5 to 5.5 8K 256 48 SDIP 64 QUIP 64 QFP 64 PLCC 68 78P312A Real-time motor control 12 4.5 to 5.5 8K UVEPROM 256 48 Shrink cerdip 64 Ceramic QUIP 64 8K OTPROM 256 48 SDIP 64 QUIP 64 QFP 64 PLCC 68 78320 High-end; advanced 16 4.5 to 5.5 External 640 55 QFP 74 analog and digital PLCC 68 peripherals 78322 High-end; advanced 16 4.5 to 5.5 16K 640 55 QFP 74 analog and digital PLCC 68 peripherals 78P322 High-end; advanced 16 4.5 to 5.5 16KOTPROM 640 55 QFP 74 analog and digital PLCC 68 peripherals 16K UVEPROM 640 55 Ceramic LCC 68 Ceramic LCC 74 78330 CMOS; real-time pulse 16 4.5 to 5.5 External 768 70 QFP 94 unit PLCC 84 78334 CMOS; real-time pulse 16 4.5 to 5 ..5 32K 768 70 QFP 94 unit PLCC 84 78P334 CMOS; real-time pulse 16 4.5 to 5.5 32KOTPROM 768 70 QFP 94 unit PLCC 84 32K UVEPROM 768 70 Ceramic LCC 84 1-8 NEe V-Series and RiSe Microprocessors and Peripherals V-Series CMOS Microprocessors Device, poPD Features Data Bits Clock (MHz) Packaget Pins 70108 (V20) 8088 compatible; enhanced 8/16 8 or 10 DIP 40 Ceramic DIP 40 QFP 52 PLCC 44 70108H (V20H) Fully static; pin compatible with 80C88 enhanced microprocessor 8/16 10,12,16 DIP QFP PLCC 40 52 44 II 70116 (V30) 8086 compatible; enhanced 16 8 or 10 DIP 40 Ceramic DIP 40 QFP 52 PLCC 44 70116H (V30H) Fully static; pin compatible with 80C86 16 10,12,16 DIP 40 enhanced microprocessor QFP 52 PLCC 44 70208 (V40) MS-DOS, V20 compatible CPU with peripherals 8/16 8 or 10 Ceramic PGA 68 PLCC 68 QFP 80 70208H (V 40H) Fully static; low power; 80C88 compatible CPU 8/16 10,12,16 Ceramic PGA 68 plus peripherals PLCC 68 QFP 80 70216 (V50) MS-DOS, V30 compatible CPU with peripherals 16/16 8 or 10 PGA 68 PLCC 68 QFP 80 70216H (V50H) Fully static; low power; 80C88 compatible CPU 16 10,12,16 Ceramic PGA 68 plus peripherals PLCC 68 QFP 80 70136 (V33) Hardwired, enhanced V30 8 and 16 12 or 16 PGA 68 dynamic PLCC 68 70236 (V53) V33 core-based; high-integration; DMA, serial 8 and 16 10,12,16 Ceramic PGA 132 I/O, interrupt controller, etc. dynamic QFP 120 70320 (V25) MS-DOS compatible microcontroller; high- 8/16 50r8 PLCC 84 integration; DMA, serial I/O, interrupt controller, QFP 94 etc. 70330 (V35) MS-DOS compatible microcontroller; high- 16 8 PLCC 84 integration; DMA, serial I/O, interrupt controller, QFP 94 etc. 70325 (V25 Plus) MS-DOS compatible microcontroller; high- 8/16 8 or 10 PLCC 84 integration; high-speed DMA QFP 94 70335 (V35 Plus) MS-DOS compatible microcontrol/er; high- 16 8 or 10 PLCC 84 integration; high-speed DMA QFP 94 70327 (V25 MS-DOS compatible microcontrol/er; high- 8/16 8 PLCC 84 Software Guard) integration; software protection QFP 94 70337 (V35 MS-DOS compatible microcontroller; high- 16 8 PLCC 84 Software Guard) integration; software protection QFP 94 70423 (V55 SC) V25 upward-compatible, high-integration 8 and 16 ·12.5 Ceramic PGA 132 microcontroller with full synchronous serial dynamic PPGA 132 support and buffer management QFP 120 t Plastic unless ceramic (or cerdip) is specified. 1-9 V -Series and RiSe Microprocessors and Peripherals NEe V-Series CMOS System Support Products Device, ~PD Features Data Bits Clock (MHz) Packaget Pins 71011 Clock Pulse Generator/Driver 20 DIP 18 SOP 20 71037 Programmable DMA Controller 8 10 DIP 40 QFP 40 PLCC 44 71051 Serial Control Unit 8 8/10 DIP 28 QFP 44 PLCC 28 71054 Programmable Timer/Controller 8 8/10 DIP 24 QFP 44 PLCC 28 71055 Parallel Interface Unit 8 8/10 DIP 40 QFP 44 PLCC 44 71059 Interrupt Control Unit 8 8/10 DIP 28 QFP 44 PLCC 28 71071 DMA Controller 8/16 8/10 DIP 48 Ceramic DIP 48 QFP 52 PLCC 52 71082 Transparent Latch 8 8 DIP 20 SOP 20 71083 Transparent Latch 8 8 DIP 20 SOP 20 71084 Clock Pulse Generator/Driver 25 DIP 18 SOP 20 71086 Bus Buffer/Driver 8 8 DIP 18 SOP 20 71087 Bus Buffer/Driver 8 8 DIP 20 SOP 20 71088 System Bus Controller 8/10 DIP 20 SOP 20 71101 Complex Peripheral Unit; serial, parallel, timer, 8 10 QFP 120 interrupt 71641 Cache Memory Controller 8/16/32 25 PGA 132 72291 Floating Point Coprocessor for V33/V53 16 16 PGA 68 9335 Numeric Interface Adapter for V40/V50 ... i8087 8 DIP 20 t Plastic unless ceramic (or cerdip) is specified. RISC Microprocessors and Peripherals Device Name Clock Package Pins pPD30310 (VR3000A) RISC Microprocessor 25, 33, 40 MHz PGA 175 pPD30311 (VR3010A) Floating-Point Processor 25, 33, 40 MHz PGA 84 pPD31311 Bus Interface Unit 25,33 MHz PGA 208 pPD46710 16K x 10-Bit x 2 SRAM Access time: 12,15 20 ns PLCC 52 pPD46741 8K x 20-Bit x 2 SRAM Access time: 12, 15, 20 ns PLCC 68 pPD30360 (V R3600) RISC Microprocessor 25,33 MHz PGA 189 1-10 NEe Intelligent Peripheral Devices (IPD) Communications Controllers Device, Maximum ~PD Name Description Data Rate Packaget Pins 7201 A Multiprotocol Serial Dual full-duplex serial channels; four DMA 1 Mb/s DIP 40 Communications channels; programmable interrupt vectors; Controller asychronous COP and BOP support; NMOS 72001-11 CMOS, Advanced Functional superset of 8530; 8086/V30 2.5 Mb/s DIP 40 Multiprotocol Serial Communications Controller interface; two full-duplex serial channels; two DPLLs; two baud-rate generators per channel; loop back test mode; short frame and mark idle detection; 12.5-MHz max clock QFP PLCC 52 52 II 72002 CMOS, Advanced Low-cost, single-channel version of 72001 ; 2.5 Mb/s DIP 40 Multiprotocol Serial software compatible; direct interface to 71071/ QFP 44 Communications 8237 DMA controllers; 12.5-MHz max clock PLCC 44 Controller 72103 CMOS, HDLC Controller Single full-duplex serial channel; on-chip DMA 4 Mb/s SDIP 64 controller PLCC 68 QFP 80 Graphics Controllers Device, Maximum ~PD Name Description Drawing Rate Package t Pins 7220A Hig h-Per fo rm ance General-purpose, high-integration controller; 500 ns/dot Ceramic DIP 40 Graphics Display hardwired support for lines, arc/circles, Controller rectangles, and graphics characters; 1024x1024 pixel display with four planes 72020 Graphics Display CMOS 7220A with 2M video memory; dual-port 500 ns/dot DIP 40 Controller RAM control; write-masking on any bit; QFP 52 enhanced external sync 72120 Advanced Graphics High-speed graphics operations including paint, 500 ns/dot PLCC 84 Display Controller area fill, slant, arbitrary angle rotate, up to 16x QFP 94 enlargement and reduction; dual-port RAM control; CMOS 72123 Advanced Graphics Enhanced 72120; expanded command set; 400 ns/dot PLCC 84 Display Controller II improved painting performance; laser printer QFP 94 interface controls; CMOS Advanced Compression/Expansion Engine Device, ~PD Name Description Package t Pins 72185 Advanced Compression/ High-speed CC ITT Group 3/4 bit-map image compression/expansion SDIP 64 Expansion Engine (A4 test chart, 400 PPI x 400 LPI in under 1 second); 32K-pixelline PLCC 68 length; 32-megabyte image memory; on-chip DMA and refresh timing QFP 80 generator; CMOS t Plastic unless ceramic (or cerdip) is specified. 1-11 Intelligent Peripheral Devices (IPO) NEe Floppy-Disk Controllers Maximum Device, Transfer "PO Name Description Rate Package t Pins 765A!B Floppy-Disk Controller Industry-standard controller supporting IBM 500 kb/s DIP 40 3740 and IBM System 34 double-density format; enhanced 765B supports multitasking applications 71065/66 Floppy-Disk Interface Compatible with 765-family controllers and 500 kb/s SOP 28 others; supports multiple data rates from 125 to SDIP 30 500 kb/s 72064 Floppy-Disk Controller CMOS. All features of 72068 with complete AT 500 kb/s PLCC 44 register set and 48-mA drivers. Pin compatible QFP 52 with WD 37C65/A/B but with higher performance DPLL and reliable multitasking operation 72065/65B CMOS Floppy-Disk Controller 100% 765NB microcode compatible; 500 kb/s DIP 40 compatible with 808x microprocessor families PLCC 44 QFP 52 72067 Floppy-Disk Controller CMOS; 765A/B microcode compatible clock 500 kb/s DIP 48 generation/switching circuitry; selectable write PLCC 52 precompensation; digital phase-locked loop QFP 52 72068 Floppy-Disk Controller All features of the 72067 plus IBM-PC, PC/XT, 600 kb/s QFP 80 PC/AT, or PS/2 style registers; high-current PLCC 84 drivers 72069 Floppy-Disk Controller All features of the 72067/68 with substitution of 1 Mb/s PLCC 84 high-performance analog phase-locked loop for QFP 100 digital PLL Hard-Disk Controllers Maximum Device, Read/Write "PO Name Description Clock Package t Pins 7261A!B Hard-Disk Controller Supports eight drives in SMD mode, four drives 23 MHz Ceramic DIP 40 in ST506 mode; error correction and detection 7262 Enhanced Small-Disk Serial-mode ESDI compatible; controls up to 18 MHz Ceramic DIP 40 Interface (ESDI) seven drives; supports up to 80 heads; hard Controller and soft-sector interfacing 72061 CMOS Hard-Disk Supports SMD/SMD-E and ST506/412 type 24 MHz DIP 40 Controller drives QFP 52 PLCC 52 72111 Small Computer System Selectable 8/16 data bus width; 16 high-level 16 MHz SDIP 64 Interface (SCSI) commands including multiphase commands for PLCC 68 Controller reduced CPU load; 5-Mb sync/async; CMOS QFP 74 t Plastic unless ceramic (or cerdip) is specified. 1-12 NEe DSP and Speech Products Digital Signal Processors Device, Instruction Instruction Data ROM Data RAM ~PD Description Cycle (ns) ROM (Bits) (Bits) (Bits) Package t Pins 77C20A 16-bit, fixed-point DSP; CMOS 244 512 x 23 510x 13 128 x 16 DIP 28 PLCC 28 SOP 32 PLCC 44 77P20 77C25 16-bit, fixed-point DSP; CMOS 16-bit, fixed-point DSP; CMOS 244 122/100 512 x 23 UVEPROM 2048 x 24 510x 13 UVEPROM 1024 x 16 128 x 16 256 x 16 Cerdip DIP 28 28 II PLCC 28 SOP 32 PLCC 44 77P25 16-bit, fixed-point DSP; CMOS 122/100 2048 x 24 1024 x 16 256 x 16 DIP 28 OTPROM OTPROM SOP 32 PLCC 44 2048 x 24 1024 x 16 256 x 16 Cerdip 28 UVEPROM UVEPROM 77220 24-bit, fixed-point DSP; CMOS 122/100 2048 x 32 1024 x 24 512 x 24 Ceramic PGA 68 PLCC 68 77P220L 24-bit, fixed-point DSP; CMOS 122/100 2048 x 32 1024 x 24 512 x 24 PLCC 68 OTPROM OTPROM 77P220R 24-bit, fixed-point DSP; CMOS 122/100 2048 x 32 1024 x 24 512 x 24 Ceramic PGA 68 UVEPROM UVEPROM 77230AR 32-bit, floating-point DSP; CMOS 150 2048 x 32 1024 x 32 1024 x 32 Ceramic PGA 68 77230AR-003 32-bit, floating-point DSP; CMOS; 150 n/a n/a n/a Ceramic PGA 68 standard library software 77P230R 32-bit, floating-point DSP; CMOS 150 2048 x 32 1024 x 32 1024 x 32 Ceramic PGA 68 UVEPROM UVEPROM 77240 32-bit, advanced, floating-point 90 64Kx 32 n/a 16M x32 PGA 132 DSP; CMOS external external 77810 16-bit fixed-point modem DSP; 181 2048 x 24 1024 x 16 256 x 16 Ceramic PGA 68 CMOS PLCC 68 77811 Analog front end for 2400-b/s full- n/a n/a n/a n/a PLCC 44 duplex modem 77812 2400-b/s full-duplex modem 181 n/a n/a 256 x 16 PLCC 68 controller QFP 74 7281 Image pipelined processor; NMOS 5-MHz clock n/a n/a 512 x 18 Ceramic DIP 40 72181 Image pipelined processor; CMOS 10-MHz clock n/a n/a 512 x 18 DIP 40 QFP 68 9305 Support device for JlPD7281 10-MHz clock n/a n/a n/a Ceramic PGA 132 processors; CMOS t Plastic unless ceramic (or cerdip) is specified. 1-13 DSP and Speech Products NEe Speech Processors Device, Name Technology Bit Rate Data ROM Packaget Pins ~PD (kb/s) (Bits) 77C30 ADPCM Speech Encoder/Decoder NMOS 32 DIP 28 PLCC 44 7755 ADPCM Speech Synthesizer CMOS 16, 20, 24, 32 96K DIP 18 SOP 24 7756 ADPCM Speech Synthesizer CMOS 16,20,24,32 256K DIP 18 SOP 24 77P56 ADPCM Speech Synthesizer CMOS 16,20,24,32 256K DIP 20 OTPROM SOP 24 7757 ADPCM Speech Synthesizer CMOS 16,20,24,32 512K DIP 18 SOP 24 7759 ADPCM Speech Synthesizer CMOS 16, 20, 24, 32 1024K DIP 40 external RAM QFP 52 77501 Speech Recording and Reproducing LSI CMOS 12,18,24 16M QFP 80 external RAM t Plastic unless ceramic (or cerdip) is specified. 1-14 NEe Development Tools for Micro Products V-Series Microprocessors Full Relocatable Device Full Emulator Mini-IE Mini-IE Evaluation EPROM Assembler C Complier (Note 1) Emulator Probe Emulator Probe Boards Device (Note 13) (Note 14) pPD70136GJ- IE-70136- EP-70136L-A IE-70136-PC EP-70136L-PC DDK-70136 RA70136 CC70136 12 A016 (Note 2) (Note 2) pPD70136GJ- IE-70136- EP-70136L-A IE-70136-PC EP-70136L-PC DDK-70136 RA70136 CC70136 16 pPD70136L-16 A016 IE-70136- A016 (Note 2) EP-70136L-A IE-70136-PC (Note 2) EP-70136L-PC DDK-70136 RA70136 CC70136 II pPD70136L-12 IE-70136- EP-70136L-A IE-70136-PC EP-70136L-PC DDK-70136 RA70136 CC70136 A016 pPD70136R-12 IE-70136- EP-70136L-A IE-70136-PC EP-70136L-PC DDK-70136 RA70136 CC70136 A016 (Note 3) (Note 3) pPD70136R-16 IE-70136- EP-70136L-A IE-70136-PC EP-70136L-PC DDK-70136 RA70136 CC70136 A016 (Note 3) (Note 3) pPD70208GF- IE-7020B- (Note 12) EB-V40MINI- EB-7020B RA70116 CC70116 B A010 IE pPD70208GF- IE-70208- (Note 12) EB-V40MINI- EB-70208 RA70116 CC70116 10 A010 IE pPD70208L-8 IE-70208- IE-70000- EB-V40MINI- ADAPT68PGA EB-70208 RA70116 CC70116 A010 2958 IE 68PLCC (Note 4) pPD70208L-10 IE-70208- IE-70000- EB-V40MINI- ADAPT68PGA EB-70208 RA70116 CC70116 A010 2958 IE 6BPLCC (Note 4) pPD70208R-8 IE-70208- IE-70000- EB-V40MINI- (Note 4) EB-70208 RA70116 CC70116 A010 2959 IE pPD70208R-10 IE-70208- IE-70000- EB-V40MINI- (Note 4) EB-70208 RA70116 CC70116 A010 2959 IE pPD70216GF- IE-70216- EP-70320J EB-V50MINI- EB70216 RA70116 CC70116 8 A010 (Note 12) IE pPD70216GF- IE-70216- EP-70320J EB-V50MINI- EB70216 RA70116 CC70116 10 A010 (Note 12) IE pPD70216L-8 IE-70216- IE-70000- EB-V50M INI- ADAPT68PGA EB70216 RA70116 CC70116 A010 2958 IE 68PLCC (Note 4) pPD70216L-10 IE-70216- IE-70000- EB-V50MINI- ADAPT68PGA EB70216 RA70116 CC70116 A010 2958 IE 6BPLCC (Note 4) pPD70216R-B IE-70216- IE-70000- EB-V50MINI- (Note 4) EB70216 RA70116 CC70116 A010 2959 IE pPD70216R-10 IE-70216- IE-70000- EB-V50MINI- (Note 4) EB70216 RA70116 CC70116 A010 2959 IE pPD70236GD- IE-70236-BX EV-9500GD- DDK-70236 RA70136 CC70136 10 120 (Note 1B) pPD70236GD- IE-70236-BX EV-9500GD- DDK-70236 RA70136 CC70136 12 120 (Note 18) 1-15 Deve;lopment Tools for Micro Products ttiEC V-Series Microprocessors (cont) Full Relocatable Device Full Emulator Mini-IE Mini-IE Evaluation EPROM Assembler C Complier (Note 1)' Emulator Probe' Emulator Probe Boards Device (Note 13) (Note 14) pPD70236GD- IE-70236-BX EV-9$00GD. DDK-70236 RA70136 CC70136 16 120 (Note 1S) pPD70236A-10 IE-70236-BX (Note 17) DDK-70236 RA70136 CC70136 pPD70236A· IE-70236-BX (Note 17) DDK-70236 RA70136 CC70136 12 pPD70236A-16 IE-70236-BX (Note 17) DDK-70236 RA70136 CC70136 pPD70320GJ IE-70320- Ep-70320GJ EB-V25MINI~ EP-70320GJ DDK-70320 RA70320 CC70116 AOOS (Note 5) IE-P (Note 6) pPD70320GJ- IE-70320· EP-70320GJ EB-V25MINI· EP-70320GJ DDK-70320 RA70320 CC70116 S AOOS (Note 5) IE-P (Note 6) pPD70320L IE~70320~ EP-70320L EB-V25MINI· (Note 7) DDK-70320 RA70320 CC70116 AOOS IE-P pPD70320L·S IE-70320- EP-70320L EB-V25MINI- (Note 7) DDK-70320 RA70320 CC70116 AOOS IE-P pPD70322GJ IE-70320~ EV-9500GJ- EB-V25MINI- EP-70320GJ DDK"70320 RA70320 CC70116 AOOS 94 IE-P (Note 6) (Note 16) pPD70322GJ- IE-70320· EP-70320GJ EB-V25MINI- EP-70320GJ DDK-70320 RA70320 CC70116 S AO.OS IE-P pPD70322L IE-70320- (Note 15) EB-V25MINI~ (Note 7) DDK~70320 70P322K RA70320 CC70116 AOOS IE-P (Note 10) pPD70322L-S IE-70320- (Note 15) EB·V25MINI- (Note 7) DDK-70320 70P322K RA70320 CC70116 AOOS IE-P (Note 10) pPD70325GJ· IE-70325-BX EV-9500GJ- EB-V25MINI- EP-70320GJ DDK-70325 RA70320 CC70116 S 94 IE-P (Note 6) . (Note 16) pPD70325GJ· IE-70325-BX EV-9500GJ· EB-V25MINI- EP-70320GJ DDK·70325 RA70320 CC70116 10 (Note S) 94 IE-P (Note 6) (Note 16) pPD70325L-S IE-70325-BX (Note 15) EB-V25MINI- EP-70320GJ DDK-70325 RA70320 CC70116 IE-P ,(Note 6) pPD70325L-10 IE-70325-BX (Note 15) EB-V25MINI- EP-70320GJ DDK-70325 RA70320 CC70116 (Note S) IE-P (Note 6) pPD7032iGJ- IE-70320- EP-70320GJ EB-V25MINI- EP-70320GJ RA70320 CC70116 S (Note 9) AOOS (Note 5) IE-P (Note 6) pPD70327L~S IE-70230- EP-70320L EB-V25MINI- (Note 7) RA70320 CC70116 (Note 9) AOOS IE-P pPD70330GJ~ IE-70330- EP-70320GJ EB-V35MINI- i::P-70320GJ DDK-70330 RA70320 CC70116 S AOOS (Note 5) IE-P (Note 6) pPD70330L-8 IE-70330- EP-70320L EB-V35MINI· (Note 7) DDK-70330 RA70320 CC70116 AOOS IE-P pPD70332GJ- IE-70330- EP-70320GJ EB-V35MINI· EP-70320GJ DDK-70330 RA70320 CC70116 S AOOS (Note 5) IE-P (Note 6) pPD70332L-8 IE-70330- EP-70320L EB-V35MINI- (Note 7) DDK-70330 70P322K RA70320 CC70116 AOOS IE-P (Note. 10) 1-16 ~EC Development. Tools for Micro Products V-Series Microprocessors (cont) Full Relocatable Device Full Emulator Mini-IE Mini-IE EV,aluation EPROM Assembler C Compiler (Note 1) Emulator Probe Emulator Probe Boards Device (Note 13) (Note 14) pPD70335GJ- IE-70335-BX EV-9500GJ- EB-V35MINI- EP-70320GJ DDK-70330 RA70320 CC70116 .. B 94 IE-P (Note 6) (Note 16) pPD70335GJ- IE-70335-BX EV-9500GJ- EP-V35MINI- EP-70320GJ DDK-70330 RA70320 CC70116 10 (Note B)EV- 94 IE-P (Note 6) 9500GJ-94 (Note 16) (Note 16) pPD70335L-B IE-70335-BX (Note 15) EB-V35MINI- EP-70320GJ DDK-70330 RA70320 CC70116 IE-P (Note 6) pPD70335L-10 IE-70335-BX (Note 15) EB-V35MINI- EP-70320GJ DDK-70330 RA70320 CC70116 (Note 8) IE-P (Note 6) pPD70337GJ- IE-70330- EP-70320GJ EB-V35MINI- EP-70320GJ RA70320 CC70116 B (Note 9) ACOB (Note 5) IE-P (Note 6) pPD70337L-B IE-70330- EP-70320L EB-V35MINI- (Note 7) RA70320 CC70116 (Note 9) ACOB IE-P pPD79011 GJ- IE-70320- EP-70320GJ (Note 12) (Note 12) RA70320 CC70116 B (Note 11) ACOB (Note 5) pPD79011 L-B IE-70320- EP-70320L) (Note 12) (Note 12) RA70320 CC70116 (Note 11) ACOB + IE-70320- RTOS pPD79021 L-B IE-70330- EP-70320L (Note 12) (Note 12) RA70320 CC70116 (Note 11) A008 + IE-70330- RTOS Notes: (1) Packages: (6) The EP-70320GJ adapter can be used to convert the supplied GF BO-pin plastic QFP 84-pin PLCC cable of the EB-V25 MINI-IE-P or EB-V35 MINI-IE-P GJ 74-pin or 94-pin plastic QFP to a 94-pin QFP. K B4-pin ceramic LCC with window (7) The EB-V25 MINI-IE-P and EB-V35 MINI-IE-P are supplied with an L 6B-pin or B4-pin plastic LCC 84-pin PLCC cable. R 6B-pin PGA (8) Contact your local NEC Sales Office for the latest information on (2) The EP-70136GL-A and EP-70136L-PC contain both a 68-pin 10-MHz emulation. PLCC probe and an adapter which converts the 68-pin PLCC probes to a 74-pin QFP footprint. (9) Development for the pPD70327 or pPD70337 can be done using the appropriate pPD70320 or pPD70330 tools; however, debug- (3) 68-pin PGA parts are supported by using the EP-70136L-A ging the programs in the Software Guard mode is not supported PLCC probe or EP-70136L-PC PLCC probe, plus a PLCC socket at this time. with a PGA-pinout. A PLCC socket of this type is supplied with the EP-70136L-A. (10) ThepPD70P322K EPROM device can be used for bothpPD70322 and pPD70332 emulation. The pPD70P322K EPROM device can (4) The EB-V40 MINI-IE and EB-V50 MINI-IE support PGA packages be programmed by using the PA-70P322L Programming Adapter directly; the ADAPT68PGA6BPLCC adapter converts the PGA- and the PG-1500 EPROM Programmer. pinout on the MINI-IE to a PLCC footprint. This adapter is supplied with the MINI-IE. (11) For emulation of pPD79011 or pPD79021 , the base emulator (IE-70320 or IE-70330) plus Real-Time Operating System soft- (5) The EP-70320GJ is an adapter to the EP-70320L, which converts ware (IE-70320-RTOS or IE-70330-RTOS) is required. B4-pin PLCC probes to a 94-pin QFP footprint. For GJ parts, both the PLCC probe and the adapter are needed. (12) This emulation option is not currently supported, but may be available in the future. Contact your local NEC Sales Office for further information. 1-17 Development Tools for Micro Products NEe (13) The following relocatable assemblers are available: RA70116-D52 For V20®N30®/ (MS-DOS@) RA70116-VVT1 V40'MN50'M (VAXNMS'M) RA70116-VXT1 (VAX/UNIX'M 4.2 BSD or Ultrix'M) RA70136-D52 (MS-DOS) RA70136-VVT1 (VAXNMS) RA70136-VXT1 (VAX/UNIX 4.2 BSD or Ultrix) RA70320-D52 (MS-DOS) RA70320-VVT1 (VAXNMS) RA70320-VXT1 (VAX/UNIX 4.2 8SD or Ultrix) (14) The following C compilers are available: CC70116-D52 For V20®N30®/ (MS-DOS) CC70116-VVT1 V40'MN50'M (VAXNMS) CC70116-VXT1 (VAX/UNIX 4.2 8SD or Ultrix) CC70136-D52 (MS-DOS) CC70136-VVT1 (VAXNMS) CC70136-VXT1 (VAX/UNIX 4.2 8SD or Ultrix) (15) 84-pin PLCC probe shipped with IE-70325-BX and IE-70335-8X. (16) The EV-9500GJ-94 is an adapter that converts the 84-pin PLCC probe to a 94-pin QFP. Target sockets must also be purchased to mate to this adapter. Target sockets are sold in packs of five as part number EV-92006-94x5. (17) The IE-70236-8X is shipped with the 132-pin PGA probe. (18) The EV-9500GD-120 is an adapter that converts the 132-pin PGA probe to a 120-pin QFP. Target sockets must also be purchased to mate to this adapter. Target sockets are sold in packs of five as part number EV-9200GD-120. 1-18 NEe Development Tools for Micro Products 75xx Series Single-Chip Microcomputers System PG·1500 Absolute Evaluation EPROM/OTP Adapter Assembler Device (Note 1) Emulator* Add-on Board* Board Device (Note 2) (Note 3) IlPD7502G·12 EVAKIT·7500B EV·7514 SE·7514·A ASM75 IlPD7502AGF·3B8 EVAKIT·7500B EV·7514 SE·7514·A ASM75 IlPD7503G·12 EVAKIT·7500B EV·7514 SE·7514·A ASM75 IlPD7503AGF·3B8 IlPD7507C IlPD7507CU EVAKIT·7500B EVAKIT·7500B EVAKIT·7500B EV·7514 SE·7514·A IlP D78CG08E ASM75 ASM75 ASM75 II IlPD7507G·00 EVAKIT·7500B ASM75 IlPD7507BCU EVAKIT·7500B ASM75 IlPD7507BG B·3B 4 EVAKIT·7500B ASM75 IlPD7507HC EVAKIT·7500B EV·7508H IlPD75CG08HE ASM75 IlPD7507HCU EVAKIT·7500B EV·7508H ASM75 IlPD7507HG·22 EVAKIT·7500B EV·7508H ASM75 IlPD7508C EVAKIT·7500B IlPD78CG08E ASM75 IlPD7508CU EVAKIT·7500B ASM75 IlPD7508G·00 EVAKIT·7500B ASM75 IlPD7508BCU EVAKIT·7500B ASM75 IlPD7508BGB·3B4 EVAKIT·7500B ASM75 IlPD75CG08E EVAKIT·7500B ASM75 IlPD7508HC EVAKIT·7500B EV·7508H IlP D78CG08HE ASM75 IlPD7508HCU EVAKIT·7500B EV·7508H ASM75 IlPD7508HG·22 EVAKIT·7500B EV·7508H ASM75 IlPD75CG08HE EVAKIT·7500B EV-750SH ASM75 IlPD7527AC EVAKIT·7500B EV·7528 IlPD78CG2SE ASM75 IlPD7527ACU EVAKIT·7500B EV-7528 ASM75 IlPD7528AC EVAKIT·7500B EV-7528 IlPD78CG28E ASM75 IlPD7528ACU EVAKIT·7500B EV·7528 ASM75 IlPD75CG28E EVAKIT·7500B EV·7528 ASM75 IlPD7533C EVAKlT·7500B EV·7533 IlPD75CG33E ASM75 IlPD7533CU EVAKIT·7500B EV-7533 ASM75 IlPD7533G-22 EVAKIT·7500B EV-7533 A~M75 IlPD75CG33E EVAKIT·7500B EV-7533 ASM75 IlPD7537AC EVAKIT·7500B EV-7528 IlP D75CG38E ASM75 IlPD7537ACU EVAKIT·7500B EV·7528 ASM75 IlPD7538AC EVAKIT·7500B EV·7528 IlP D75CG38E ASM75 IlPD7538ACU EVAKIT·7500B EV-7528 ASM75 IlPD75CG38E EVAKIT·7500B EV-7528 ASM75 * Required tools 1-19 Development Tools for Micro Products NEe 75xx Series Sing Ie-Chip Microcomputers (cant) System PG-1500 Absolute Evaluation EPROM/OlP Adapter Assembler Device (Note 1) Emulator* Add-on Board* Board Device (Note 2) (Note 3) IlPD7554CS EVAKIT-7500B EV-7554A SE-7554-A IlPD75P54CS PA-75P54CS ASM75 IlPD7554G EVAKIT-7500B EV-7554A SE-7554-A IlPD75P54G PA-75P54CS ASM75 IlPD7554ACS EVAKIT-7500B EV-7554A SE-7554-A IlPD75P54CS PA-75P54CS ASM75 IlPD7554AG EVAKIT-7500B EV-7554A SE-7554-A IlPD75P54G PA-75P54CS ASM75 . IlPD75P54CS EVAKIT-7500B EV-7554A ASM75 IlPD75P54G EVAKIT-7500B EV-7554A ASM75 IlPD7556CS EVAKIT-7500B EV-7554A SE-7554-A IlPD75P56CS PA-75P56CS ASM75 pPD7556G EVAKIT-7500B EV-7554A SE-7554-A IlPD75P56G PA-75P56CS ASM75 IlPD7556ACS EVAKIT-7500B EV-7554A SE-7554-A IlPD75P56CS PA-75P56CS ASM75 IlPD7556AG EVAKIT-7500B EV-7554A SE-7554-A IlPD75P56G PA-75P56CS ASM75 IlPD75P56CS EVAKIT-7500B EV-7554A ASM75 IlPD75P56G EVAKIT-7500B EV-7554A ASM75 IlPD7564CS EVAKIT-7500B EV-7554A SE-7554-A pPD75P64CS PA-75P54CS ASM75 IlPD7564G EVAKIT-7500B EV-7554A SE-7554-A IlPD75P64G PA-75P54CS ASM75 IlPD7564ACS EVAKIT-7500B EV-7554A SE-7554-A IlPD75P64CS PA-75P54CS ASM75 pPD7564AG EVAKIT-7500B EV-7554A SE-7554-A IlPD75P64G PA-75P54CS ASM75 IlP075P64CS EVAKIT-7500B EV-7554A ASM75 IlPD75P64G EVAKIT-7500B EV-7554A ASM75 IlPD7566CS EVAKIT-7500B EV-7554A SE-7554-A IlPD75P66CS PA-75P56CS ASM75 IlPD7566G EVAKIT-7500B EV-7554A SE-7554-A IlPD75P66G PA-75P56CS ASM75 IlP07566ACS EVAKIT-7500B EV-7554A SE-7554-A IlP D75P66CS PA-75P56CS ASM75 IlPD7566AG EVAKIT-7500B EV-7554A SE-7554-A pPD75P66G PA-75P56CS ASM75 IlPD75P66CS EVAKIT-7500B EV-7554A ASM75 IlPD75P66G EVAKIT-7500B EV-7554A ASM75 Notes: (1) Packages: (2) By using the specified adapter, the PG-1500 EPROM programmer C 40-pin plastic DIP (,uPD7507/07H/08/08H) can be used to program the OTP device. 42-pin plastic DIP (,uPD7527A/28A/33/37A/38A) (3) The ASM75 Absolute Assembler is provided to run under the CS 20-pin plastic shrink DIP MS-OOS® operating system. (ASM75-D52). (,uPD7554/54NP54/64/64A/P64) 24-pin plastic shrink DIP (,uP 07556/56A/P56/66/66A/P66) CU 40-pin plastic shrink DIP (,uP D7507/07B/07H/08/08B/08H) 42-pin plastic shrink DIP (,uP 07527A/28N33/37A/38A) E 40-pin ceramic piggy-back DIP (,uP075CG08/08H) 42-pin ceramic piggy-back DIP (,uPD75CG28/33/38) G 20-pin plastic SO (,uPD7554/54A/P54/64/64NP64) 24-pin plastic SO (J,tPD7556/56NP56/66/66A/P66) G-OO 52-pin plastic QFP G-12 64-pin plastic QFP (2.05 mm thick) (,uP07502/03) G-22 44-pin plastic QFP (1.45 mm thick) GB-3B4 44-pin plastic QFP (2.7 mm thick) GF-3B8 64-pin plastic QFP (2.7 mm thick) 1-20 NEe Development Tools for Micro Products 75xxx Series Single-Chip Microcomputers Relocatable Structured Optional Socket EPROM/OlP Assembler Assembler Device (Note 5) Emulator'" Emulation Probe'" Adapter. (Note 1) Device (Note 2) (Note 3) (Note 4) JiPD75004CU IE-75000-R EP-75008CU-R JiPD75POO8CU RA75X ST75X JiPD75004GB-3B4 IE-75000-R EP-75008GB-R EV-9200G-44 JiPD75POO8GB RA75X ST75X JiPD75006CU IE-75000-R EP-75008CU-R JiPD75POO8CU RA75X ST75X JiPD75006GB-3B4 JiPD75008CU JiPD75008GB-3B4 IE-75000-R IE-75000-R IE-75000-R EP-75008GB-R EP-75008CU-R EP-75008GB-R EV-9200G-44 EV-9200G-44 JiPD75POO8GB JiPD75POO8CU JiPD75POO8GB RA75X RA75X RA75X ST75X ST75X ST75X II JiPD75POO8CU IE-75000-R EP-75008CU-R RA75X ST75X JiPD75POO8GB IE-75000-R EP-75008GB-R EV-9200G-44 RA75X ST75X JiPD75028CW IE-75000-R EP-75028CW-R JiPD75P036CW RA75X ST75X JiPD75028GC-AB8 IE-75000-R EP-75028GC-R EV-9200GC-64 JiPD75P036GC RA75X ST75X JiPD75P036CW IE-75000-R EP-75028CW-R RA75X ST75X JiPD75P036GC-AB8 IE-75000-R EP-75028GC-R EV-9200GC-64 RA75X ST75X JiPD75048CW IE-75000-R EP-75028CW-R JiPD75P056CW RA75X ST75X JiPD75048GC-AB8 IE-75000-R EP-75028GC-R EV-9200GC-64 JiPD75P056GC RA75X ST75X JiPD75P056CW IE-75000-R EP-75028CW-R RA75X ST75X JiPD75P056GC-AB8 IE-75000-R EP-75028GC-R EV-9200GC-64 RA75X ST75X JiPD75104CW IE-75000-R EP-75108CW-R JiPD75P108CW/ RA75X ST75X DW/BCW JiPD75P116CW JiPD75104G-1 B IE-75000-R EP-75108GF-R EV-9200G-64 JiPD75P108G RA75X ST75X JiPD75P116GF JiPD75104GF-3BE IE-75000-R EP-75108GF-R EV-9200G-64 JiPD75P108G/ RA75X ST75X BGF JiPD75P116GF JiPD75104AGC-AB8 IE-75000-R EP-75108AGC-R EV-9200GC-64 RA75X ST75X JiPD75106CW IE-75000-R EP-75108CW-R JiPD75P108CW/ RA75X ST75X DW/BCW JiPD75P116CW JiPD75106G-1 B IE-75000-R EP-75108GF-R EV-9200G-64 JiPD75P108G RA75X ST75X JiPD75P116GF JiPD75106GF-3BE E-75000-R EP-75108GF-R EV-9200G-64 JiPD75P108G/ RA75X ST75X BGF JiPD75P116GF JiPD75108AG-22 IE-75000-R EP-75108AGC-R EV-9200GC-64 RA75X ST75X JiPD75108AGC-AB8 IE-75000-R EP-75108AGC-R EV -9200GC-64 RA75X ST75X JiPD75108CW IE-75000-R EP-75108CW-R JiPD75P108CW/ RA75X ST75X DW/BCW JiPD75P116CW JiPD75108G-1 B IE-75000-R EP-75108GF-R EV-9200G-64 JiPD75P108G RA75X ST75X JiPD75P116GF JiPD75108GF-3BE IE-75000-R EP-75108GF-R EV-9200G-64 JiPD75P108G/ RA75X ST75X BGF JiPD75P116GF JiPD75P108BCW IE-75000-R EP-75108CW-R RA75X ST75X JiPD75P108BGF IE-75000-R EP-75108GF-R EV-9200G-64 RA75X ST75X 1-21 Development Tools for Micro Products NEe 75xxx Series Sing Ie-Chip Microcomputers (cont) Relocatable Structured Optional Socket EPROM/OTP Assembler Assembler Device (Note 5) Emulator* Emulation Probe* Adapter (Note 1) Device (Note 2) (Note 3) (Note 4) JlPD75P108CW IE-75000-R EP-75108CW-R RA75X S175X JlPD75P108DW IE-75000-R EP-75108CW-R RA75X S175X JlPD75P108G-1 B IE-75000-R EP-75108GF-R EV-9200G-64 RA75X S175X JlPD75112CW IE-75000-R EP-75108CW-R JlPD75P116CW RA75X S175X JlPD75112GF-3BE IE-75000-R EP-75108GF-R EV-9200G-64 JlPD75P116GF RA75X S175X JlPD75116CW IE-75000-R EP-75108 CW-R JlPD75P116CW RA75X S175X JlPD75116GF-3BE IE-75000-R EP-75108GF-R EV-9200G-64 JlPD75P116GF RA75X S175X JlPD75P116CW IE-75000-R EP-75108CW-R RA75X S175X JlPD75P116GF IE-75000-R EP-75108GF-R EV-9200G-64 RA75X S175X JlPD75206CW IE-75000-R EP-75216ACW-R JlPD75P216ACW RA75X S175X JlPD75206G-1 B IE-75000-R EP-75216AGF-R EV-9200G-64 RA75X S175X JlPD75206GF-3BE IE-75000-R EP-75216AGF-R EV-9200G-64 RA75X S175X JlPD75208CW IE-75000-R EP-75216ACW-R JlPD75P216ACW RA75X S175X JlPD75208G-1 B IE-75000-R EP-75216AGF-R EV-9200G-64 RA75X S175X JlPD75208GF-3BE IE-75000-R EP-75216AGF-R EV-9200G-64 RA75X S175X JlPD75CG208E IE-75000-R EP-75216ACW-R RA75X S175X JlPD75CG208EA IE-75000-R EP-75216AGF-R EV-9200G-64 RA75X S175X JlPD75212ACW IE-75000-R EP-75216ACW-R JlPD75P216ACW RA75X S175X JlPD75212AGF-3BE IE-75000-R EP-75216AGF-R EV-9200G-64 RA75X S175X JlPD75216ACW IE-75000-R EP-75216ACW-R JlPD75P216ACW RA75X S175X JlPD75216AGF IE-75000-R EP-75216AGF-R EV-9200G-64 RA75X S175X JlPD75CG216AE IE-75000-R EP-75216ACW-R RA75X S175X JlPD75CG216AEA IE-75000-R EP-75216AGF-R EV-9200G-64 RA75X S175X JlPD75P216ACW IE-75000-R EP-75216ACW-R JlPD75P216ACW RA75X S175X JlPD75217CW IE-75000-R EP-75216ACW-R JlPD75P218CW RA75X S175X JlPD75217GF-3BE IE-75000-R EP-75216AGF-R EV-9200G-64 JlPD75P218GF /KB RA75X S175X JlPD75P218CW IE-75000-R EP-75216ACW-R RA75X S175X JlPD75P218GF-3BE IE-75000-R EP-75216AGF-R EV-9200G-64 RA75X S175X JlPD75P218KB IE-75000-R EP-75216AGF-R EV-9200G-64 RA75X S175X JlPD75268CW IE-75000-R EP-75216ACW-R JlPD75P216ACW RA75X S175X JiPD75268GF-3BE IE-75000-R EP-75216AGF-R EV-9200G-64 RA75X S175X JlPD75304GF-3B9 IE-75000-R EP-75308GF-R EV-9200G-80 JlPD75P308GF/K RA75X S175X JlPD75306GF-3B9 IE-75000-R EP-75308GF-R EV -9200G-80 JlPD75P308GF/K RA75X S175X JlPD75308GF-3B9 IE-75000-R EP-75308GF-R EV -9200G-80 JlPD75P308G F/K RA75X S175X JlPD75P308GF IE-75000-R EP-75308GF-R EV -9200G-80 RA75X S175X JlPD75P308K IE-75000-R EP-75308GF-R EV-9200G-80 RA75X S175X JlPD75312GF-3B9 IE-75000-R EP-75308GF-R EV-9200G-80 JlPD75P316GF/ RA75X S175X AGF/AK JlPD75316GF-3B9 IE-75000-R EP-75308GF-R EV-9200G-80 JlPD75P316GF/ RA75X S175X AGF/AK 1-22 NEe Development Tools for Micro Products 75xxx Series Single-Chip Microcomputers (cont) Relocatable Structured Optional Socket EPROM/OTP Assembler Assembler Device (Note 5) Emulator* Emulation Probe* Adapter (Note 1) Device (Note 2) (Note 3) (Note 4) IlPD75P316GF IE-75000-R EP-75308GF-R EV-9200G-80 RA75X ST75X IlPD75P316AGF IE-75000-R EP-75308GF-R EV-9200G-80 RA75X ST75X IlPD75P316AK IE-75000-R EP-75308GF-R EV-9200G-80 RA75X ST75X IlPD75328GC-3B9 IlPD75P328GC-3B9 IlPD75402AC IE-75000-R IE-75000-R IE-75000-R EP-75328GC-R EP-75328GC-R EP-75402C-R EV-9200GC-80 EV-9200GC-80 IlPD75P328GC IlPD75P402C RA75X RA75X RA75X ST75X ST75X ST75X II IlPD75402ACT IE-75000-R EP-75402C-R IlPD75P402CT RA75X ST75X IlPD75402AGB-3B4 IE-75000-R EP-75402GB-R EV-9200G-44 IlPD75P402GB RA75X ST75X IlPD75P402C IE-75000-R EP-75402C-R RA75X ST75X IlPD75P402CT IE-75000-R EP-75402C-R RA75X ST75X IlPD75P402GB-3B4 IE-75000-R EP-75402GB-R EV-9200G-44 RA75X ST75X IlPD75512GF-3B9 IE-75000-R EP-75516GF-R EV-9200G-80 IlPD75P516GF/K RA75X ST75X IlPD75516GF-3B9 IE-75000-R EP-75516GF-R EV-9200G-80 IlPD75P516GF/K RA75X ST75X IlPD75P516GF IE-75000-R EP-75516GF-R EV-9200G-80 RA75X ST75X IlPD75P516K IE-75000-R EP-75516GF-R EV-9200G-80 Notes: (1) The EV-9200G-XX is an LCC socket with the footprint of the flat package. One unit is supp lied with the probe. Additional units are available as replacement parts in sets of five. (2) All EPROM/OTP devices can be programmed using the NEC PG-1500. Refer to the PG-1500 Programming Socket Adapter Selection Guide for the appropriate socket adapter. (3) The RA75X relocatable assembler package is provided for the following operating system: RA75X-D52 (MS-DOS@) (4) The ST75X structured assembler preprocessor is provided with RA75X. (5) Packages: C 28-pin plastic DIP CT 28-pin plastic shrink DIP CU 42-pin plastic shrink DIP CW 64-pin plastic shrink DIP OW 64-pin ceramic shrink DIP with window E 64-pin ceramic piggy-back shrink DIP EA 64-pin ceramic piggy-back QFP G-1B 64-pin plastic QFP (2.05 mm thick) G-22 54-pin plastic QFP (1.55 mm thick) GB-3B4 44-pin plastic QFP GC-AB8 54-pin plastic QFP (2.55 mm thick) GC-3B9 80-pin plastic QFP GF-3BE 54-pin plastic QFP (2.77 mm thick) GF-3B9 80-pin plastic QFP K 80-pin ceramic LCC KB 54-pin ceram ic LCC * Requ ired tools. 1-23 De"elopment Tools for Micro Products NEe 78xx Series Single-Chip Microcomputers Relocatable PG·1500 Assembler C Complier Device (Note 1) t Emulator* Emulation Probe* EPROM/OTP Device Adapter (Note 2) (Note 9) (Note 9) JlPD78C10CW IE·78C11·M EV·9001·64 RA87 CG87 (Note 3) JlPD78C10G18 IE·78C11·M (Note 5) RA87 CC87 JlPD78C10GF·38E IE·78C11·M (Note 5) RA87 CC87 . JlPD78C10L IE·78C11·M (Note 7) RA87 CC87 JlPD78C10ACW IE·78C11·M EV·9001·64 RA87 CC87 (Note 3) JlPD78C10AGQ36 IE·78C11·M (Note 4) RA87 CC87 JlPD78C10AGF IE·78C11·M (Note 5) RA87 CC87 JlPD78C10AL IE·78C11·M (Note 7) RA87 CC87 JlPD78C11 CW . IE·78C11·M EV·9001·64 JlPD78CP14CW/DW PA·78CP14CW RA87 CC87 (Note 3) JlPD78C11 G·36 IE·78C11·M {Note 4) JlPD78CP14G36/R PA·78CP14GQ RA87 CC87 JlPD78CP14E JlPD78C11G·18 IE·78C11·M (Note 5) JlPD78CP14GF PA·78CP14GF RA87 CC87 JlPD78C11 GF·38E IE·78C11·M (Note 5) JlPD78CP14GF PA·78CP14GF RA87 CC87 JlPD78C11L IE·78C11·M (Note 7) JlPD78CP14L PA<78CP14L RA87 CC87 JlPD78C11ACW IE·78C11·M EV·9001·64 JlPD78CP14CW/DW PA·78CP14CW RA87 CC87 (Note 3) (Note 6) JlPD78C11AGQ·36 IE·78C11·M (Note 4) JlPD78CP14G36/R PA·78CP14GQ RA87 CC87 (Note 6) JlPD78C11AGF·38E IE·78C11·M (Note 5) JlPD78CP14GF pA·78CP14GF RA87 CC87 (Note 6) JlPD78C11AL IE·78C11·M (Note 7) JlPD78CP14L PA·78CP14L RA87 CC87 (Note 6) JlPD78C12ACW IE·78C11·M EV·9001·64 JlPD78CP14CW/DW PA·78CP14CW RA87 CC87 (Note 3) (Note 6) JlPD78C12AGQ IE·78C11·M (Note 4) JlP D78CP14G36/R PA·78CP14GQ RA87 CC87 (Note 6) JlPD78C12AGF IE·78C11·M (Note 5) JlPD78CP14GF PA·78CP14GF RA87 CC87 (Note 6) JlPD78C12AL IE·78C11·M (Note 7) JlPD78CP14L PA·78CP14L RA87 CC87 (Note 6) JlPD78C14CW IE·78C11·M EV·9001·64 JlPD78CP14CW/DW PA·78CP14CW RA87 CC87 (Note 3) JlPD78C14G·36 IE·78C11·M (Note 4) JlP D78CP14G36/R PA·78CP14GQ RA87 CC87 JlPD78CG14E JlPD78C14G·18 IE·78C11·M (Note 5) JlPD78CP14GF PA·78CP14GF RA87 CC87 JlPD78C14GF IE·78C11·M (Note 5) JlPD78CP14GF PA·78CP14GF RA87 CC87 JlPD78C14L IE·78C11·M (Note 7) JlPD78CP14L PA·78CP14L RA87 CC87 JlPD78C14AG·A88 IE·78C11·M (Note 5) RA87 CC87 JlPD78CG14E IE·78C11-M (Note 4) RA87 CC87 (Note 8) JlPD78CP14CW IE-78C11-M EV·9001·64 PA·78CP14CW RA87 CC87 (Note 3) 1·24 NEe Development Tools for Micro Products 78xx Series Single-Chip Microcomputers (cant) Relocatable PG-1S00 Assembler C Compiler Device (Note 1) t Emulator* Emulation Probe* EPROM/OTP Device Adapter (Note 2) (Note 9) (Note 9) pPD78CP14DW IE-78C11-M EV-9001-64 PA-78CP14CW RA87 CC87 (Note 3) pPD78CP14G36 IE-78C11-M (Note 4) PA-78CP14GQ RA87 CC87 II pPD78CP14GF IE-78C11-M (Note 5) PA-78CP14GF RA87 CC87 pPD78CP14L IE-78C11-M (Note 7) PA-78CP14L RA87 CC87 pPD78CP14R IE-78C11-M (Note 4) PA-78CP14GQ RA87 CC87 pPD78C17CW IE-78C11-M EV-9001-64 RA87 CC87 (Note 3) pPD78C17GQ36 IE-78C11-M (Note 4) RA87 CC87 pPD78C17GF IE-78C11-M (Note 5) RA87 CC87 pPD78C18CW IE-78C11-M EV-9001-64 pPD78CP18CW PA-78CP14CW RA87 CC87 (Note 3) (Note 6) pPD78C18GQ IE-78C11-M (Note 4) pPD78CP18GQ PA-78CP14GQ RA87 CC87 (Note 6) pPD78C18GF IE-78C11-M (Note 5) pPD78CP18GF PA-78CP14GF RA87 CC87 (Note 6) pPD78CP18KB PA-78CP14KB (Note 6) pPD78CP18CW IE-78C11-M EV-9001-64 PA-78CP14CW RA87 CC87 (Note 3) pPD78CP18GQ IE-78C11-M (Note 4) PA-78CP14GQ RA87 CC87 pPD78CP18GF IE-78C11-M (Note 5) PA-78CP14GF RA87 CC87· pPD78CP18KB IE-78C11-M (Note 5) PA-78CP14KB RA87 CC87 * Required tools t For a" pPDC1 X devices, you may use the DDK-78C10 for evaluation purposes. Notes: (5) No emulation probe available. (1) Packages: (6) The pPD78CP14/CP18 EPROM/OTP devices do not have pull-up CW 64-pin plastic shrink DIP resistors on ports A, -8, and C. DW 64-pin ceramic shrink DIP with window (7) The optional AS-QIP-PCC-D781X QUIP-to-PLCC adapter can be E 64-pin ceramic piggyback QUIP used with the EP-7811 HGQ emulation probe .supplied with each G-1 B 64-pin plasticQFP (resin thickness 2.05 mm) IE. G-36 64-pin plastic QUIP G-AB8 64-pin plastic QFP (interpin pitch 0.8 mm) (8) The pPD78CG14E is a piggyback EPROM device in a ceramic GF-3BE 64-pin plastic QFP (resin thickness 2.7 mm) QUIP package. It accepts 27C256 and 27C256A EPROMs. GQ-36 64-pin plastic QUIP (9) The fo"owi.ng relocatable assemblers and C compilers are avail- KB 64-pin ceramic LCC with window able: L 68-pin PLCC RA87-D52 (MS-DOS®) Relocatable assem- R 64-pin ceramic QUIP with window RAB7-VVn 01AX/VMS~ blers for 78XX (2) By using the specified adapter, the PG-1500 EPROM programmer series can be used to program the EPROM/OTP device. CCMSD-15DD-87 (MS-DOS) C Compilers for (3) 64-pin shrink DIP adapter which plugs into the EP-7811 HGQ CCMSD-15DD-87-16 (MS-DOS; 78XX Series emulation probe supplied with each IE. extended memory) CCVMS-OT16-87 01AX/VMS) (4) The emulation probe for the 64-pin QUIP package (EP-7811 HGQ) CCUNX-OT16-87 01AX/UNIXTM; is supplied with the IE. 4.2 BSD or UltrixOi) 1-25 Development Tools for Micro Products NEe 782xx Series Single-Chip Microcomputers Evaluation Designer Emulator Device Kit Kit Kit Low-End Emulation Emulation EPROM/OTP (Notes 1; 2) (Note 3) (Note 4) . (Note 5) Emulator System Probe Device (Note 6) IlPD78212CW EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240CW-R IlPD78P214CW/DW 21XCW 21XCW IlPD78212GC EK-78K2-21X DI<,.78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240GC-R IlPD78P214GC 21XGC 21XGC (Note 9) IlPD78212GJ EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240GJ-R IlPD78P214GJ 21XGJ 21XGJ (Note 7) IlPD78212GQ EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240GQ-R IlPD78P214GQ 21XGQ 21XGQ IlPD78212L EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240LP-R IlPD78P214L 21XL 21XL IlPD78213CW EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240CW-R 21XCW 21XCW IlPD78213GC EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240GC-R 21XGC 21XGC (Note 9) IlPD78213GJ EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240GJ-R 21XGJ 21XGJ (Note 7) IlPD78213G36 EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240GQ-R 21XGQ 21XGQ IlPD78213L EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240LP-R 21XL 21XL IlPD78214CW EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240CW-R IlPD78P214CW/DW 21XCW 21XCW IlPD78214GC EK-78K2-21X DK-78K2- . IK-78K2- EB-78210-PC IE-78240-R EP-78240GC-R IlPD78P214GC 21XGC 21XGC (Note 9) IlPD78214GJ EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240GJ-R IlPD78P214GJ 21XGJ 21XGJ (Note 7) IlPD78214G36 EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240GQ-R IlPD78P214GQ 21XGQ 21XGQ IlPD78214L EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240LP-R IlPD78P214L 21XL 21XL IlPD78P214CW EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240CW-R 21XCW 21XCW IlPD78P214DW EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240CW-R 21XCW 21XCW IlPD78P214GC EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240GC-R 21XGC 21XGC (Note 9) IlPD78P214GJ EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240GJ-R 21XGJ 21XGJ (Note 7) IlPD78P214GQ EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240GQ-R 21XGQ 21XGQ IlPD78P214L EK-78K2-21X DK-78K2- IK-78K2- EB-78210-PC IE-78240-R EP-78240LP-R 21XL 21XL IlPD78220GJ EK-78K2-22X DK-78K2- IK-78K2- EB-78220-PC IE-78230-R EP-78230GJ-R 22XGJ 22XGJ (Note 8) IlPD78220L EK-78K2-22X DK-78K2- IK-78K2- EB-78220-PC IE-78230-R EP-78230LQ-R 22XL 22XL IlPD78224GJ EK-78K2-22X DK-78K2- IK-78K2- EB-78220-PC IE-78230-R EP-78230GJ-R IlPD78P224GJ 22XGJ 22XGJ (Note 8) 1-26 NEe Development Tools for Micro Products 782xx Series Sing Ie-Chip Microcomputers (cont) Evaluation Designer Emulator Device Kit Kit Kit Low-End Emulation Emulation EPROM/OTP (Notes 1,2) (Note 3) (Note 4) (Note 5) Emulator System Probe Device (Note 6) pPD78224L EK-78K2-22X DK-78K2- IK-78K2- EB-78220-PC IE-78230-R EP-78230LQ-R pPD78P224L .. 22XL 22XL pPD78P224GJ EK-78K2-22X DK-78K2- IK-78K2- EB-78220-PC IE-78230-R EP-78230GJ-R 22XGJ 22XGJ (Note 8) pPD78P224L EK-78K2-22X DK-78K2- IK-78K2- EB-78220-PC IE-78230-R EP-78230LQ-R 22XL 22XL pPD78233GC EK-78K2~23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R EP-78230GC-R 23XGC 23XGC (Note 10) pPD78233GJ EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R EP-78230GJ-R 23XGJ 23XGJ (Note 8) pPD78233LQ EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R EP-78230LQ-R 23XL 23XL pPD78234GC EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R EP-78230GC-R pPD78P238GC 23XGC 23XGC (Note 10) pPD78234GJ EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R EP-78230GJ-R pPD78P238GJ/KF 23XGJ 23XGJ (Note 8) pPD78234LQ EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R EP-78230LQ-R pPD78P238LQ 23XL 23XL pPD78237GC EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R EP-78230GC-R 23XGC 23XGC (Note 10) pPD78237GJ EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R EP-78230GJ-R 23XGJ 23XGJ (Note 8) pPD78237LQ EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R EP-78230LQ-R 23XLQ 23XLQ pPD78238GC EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R EP-78230GC-R pPD78P238GC 23XGC 23XGC (Note 10) pPD78238GJ EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R EP-78230GJ·R pPD78P238GJ/KF 23XGJ 23XGJ (Note 8) pPD78238LQ EK·78K2-23X DK-78K2· IK-78K2- EB-78230-PC IE-78230-R EP-78230LQ·R pPD78P238LQ 23XLQ 23XLQ pPD78P238GC EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R Ep·78230GC-R 23XGC 23XGC (Note 10) pPD78P238GJ EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE·78230-R Ep·78230GJ·R 23XGJ 23XGJ (Note 8) pPD78P238KF EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230-R EP-78230GJ·R 23XGJ 23XGJ (Note 8) pPD78P238LQ EK-78K2-23X DK-78K2- IK-78K2- EB-78230-PC IE-78230·R EP-78230LQ·R 23XL 23XL pPD78243CW EK-78K2-24X DK-78K2- IK-78K2- EB-78240-PC IE-78240-R Ep·78240CW-R 24XCW 24XCW pPD78243GC- EK-78K2-24X DK-78K2- IK-78K2- EB-78240-PC IE-78240-R EP-78240GC·R AB8 24XGC 24XGC (Note 9) pPD78243LP EK-78K2-24X DK-78K2- IK-78K2- EB-78240-PC IE-78240-R EP-78240LP-R 24XLP 24XLP pPD78244CW EK-78K2·24X DK-78K2- IK-78K2- EB-78240-PC IE-78240-R EP·78240CW-R 24XCW 24XCW pPD78244GC EK-78K2-24X DK-78K2- IK-78K2- EB-78240-PC IE-78240·R EP-78240GC·R 24XGC 24XGC (Note 9) 1-27 Development Tools for Micro Products NEe 782xx Series Sing Ie-Chip Microcomput~rs (cont) Evaluation Designer Emulator Device Kit Kit Kit Low-End Emulation Emulation EPROM/OTP (Notes 1,2) (Note 3) (Note 4) (Note 5) Emulator 'System Probe Device (Not& 6) JiPD78244L EK-78K2-24X DK-78K2- IK-78K2- EB-78240-PC IE-78240-R EP-78240LP-R 24XLP 24XLP Notes: (4) The JiPD782xx Designer Kit contains the approp'riate EB~ (1) The following software packages are available for the 782xx 782xx-PC low-end emulator and emulation probe for the part selected" the RA78K2 Relocatable Assembler Package, and the Series. ST78K2 Structured Assembler Preprocessor. RA78K2 Relocatable Assembler Package: RA78K2-D52 (MS-DOS®) (5) The JiPD782xx Emulator Kit contains the appropriate IE-782xx ST78K2 Structured Assembler Preprocessor: provided with system and emulation probe for the part selected, the RA78K2 RA78K2 Relocatable Assembler Package, and the ST78K2 Structured CC78K2 C-Compiler package: CC78K2-D52 (MS-DOS) Assembler Preprocessor. (2) Packages: (6) All EPROM/OTP devices can be programmed using the NEC CW 64-pin plastic shrink DIP PG-1500. Refer to the PG~1500 Programming Socket Adapter DW 64-pin ceramic shrink DIP with window Selection Guide for the appropriate programming adapter. G36 64-pin plastic QUIP (uPD78213/214) (7) The EP-78240GJ-R Emulation Probe is shipped with one EV- GC 64-pin plastic QFP (uPD78212/213/214/P214/244) 9200G-74, a 74-pin LCC'socket with the footprint of the OFP GG 80-pin plastic QFP (uPD78233/234/237/238/P238) package. Additional s,ockets are available as replacement parts GC-ABS 64-pin plastic QFP in sets of five. ' GJ 94-pin plastic QFP (uPD78220/224/P224/233/234/ 237/238/P238) (8) The EP-78230GJ-R Emulation Probe is shipped with one EV- GJ 74-pin plastic QFP (uPD78212/213/214/P214) 9200G-94, a 94-pin LCC socket with the footprint of the OFP GQ 64-pin plastic QUIP (uPD78212/P214) package. Additional sockets are available as r,eplacement parts KF 94-pin ceramic LCC with window in sets of five. L 68-pin PLCC (uPD78213/214/P214L) (9) The EP-78240GC-R Emulation Probe is shipped with one EV- 84-pin PLCC (uPD78220/224/P224L) 9200GC-64, a 64-pin LCC socket with the footprint of the OFP LP 68-pin PLCC package. Additional sockets are available as replacement parts LQ 84-pin PLCC in set$ Of five. (3) The JiPD782xx Evaluation Kit contains the appropriate DDB- (10) The EP-78230GC-R Emulation Probe is shipped with one EV- 78K2-2xx Evaluation Board for the part selected, the RA78K2 9200GC-80, an 80-pin LCC socket with the footprint of the OFP Relocatable Assembler Package, and the ST78K2 Structured package: Additional sockets are available as:replacement parts Assembler Preprocessor. in sets of five. 783xx Series Single-Chip Microcomputers Evaluation Kit Emulator Kit Evaluation Emulation EPROM/OTP Device (Notes 1, 2) (Note 3) (Note 4) Board Syste", Emulation Probe Device (Note 5) JiPD78310ACW IK-78K3-31 XACW DDK-78310A IE-78310A-R EP-7'8310CW (Note 6) (Note 7) JiPD78310AGF 3BE IK-78K3-31 XAGF DDK-78310A IE-78310A-R EP-78310GF (Note 8) JiPD78310AGO-36 IK-78K3-31XACW DDK-78310A IE-7831OA-R EP-78310GO (Note 6) (Note 9) JiPD78310AL IK-78K3-31 XAL DDK-78310A IE-78310A-R EP-78310L JiPD78312ACW IK-7SK3-31XACW DDK-78310A IE-78310A-R EP-78310CW JiPD78P312ACW/DW (Note 6) (Note '7) JiPD78312AGF IK-78K3-31XAGF DDK-78310A IE-78310A-R EP-78310GF (Note 8) JiPD78P312AGF JiPD78312AGO IK-78K3-31XACW DDK-78310A IE-78310A-R EP-78310GO JiPD78P312AGO/RQ (Note 6) (Note 9) JiPD78312AL IK-78K3-31 XAL DDK-78310A IE-18310A-R EP-78310L JiPD78P312AL JiPD78P312ACW IK-78K3-31XACW DDK-78310A IE-78310A-R EP-78310CW (Note 6) (Note 7) JiPD78P312ADW IK-78K3-31XACW DDK-78310A IE-78310A-R EP-78310CW (Note 6) . (N,01~ i) 1-28 NEe Development Tools for Micro Products 783xx Series Single-Chip Microcomputers (cont) Eval uation Kit Emulator Kit Evaluation Emulation EPROM/OTP Device (Notes 1, 2) (Note 3) (Note 4) Board System Emulation Probe Device (Note 5) pPD78P312AGF IK-78K3-31 XAGF DDK-78310A IE-78310A-R EP-78310GF (Note 8) pPD78P312AGQ-36 IK-78K3-31 XACW DDK-78310A IE-78310A-R EP-78310GQ (Note 6) (Note 9) pPD78P312AL IK-78K3-31 XAL DDK-78310A IE-78310A-R EP-78310L /.tPD78P312ARQ IK-78K3~31XACW (Note 6) DDK-78310A IE-78310A-R EP-78310GQ (Note 9) II j.lPD78320GJ EK-78K3-32X IK-78K3-32XGJ EB-78320- IE-78327-R EP-78320GJ-R PC (Note 10) pPD78320L EK-78K3-32X IK-78K3-32XL EB-78320- IE-78327-R EP-78320L-R PC pPD78322GJ EK-78K3-32X IK-78K3-32XGJ EB-78320- IE-78327-R EP-78320GJ-R pPD78P322GJ/KD PC (Note 10) pPD78322L EK-78K3-32X IK-78K3-32XL EB-78320- IE-78327-R EP-78320L-R pPD78P322L/KC PC pPD78P322GJ EK-78K3-32X IK-78K3-32XGJ EB-78320- IE-78327-R EP-78320GJ-R PC (Note 10) pPD78P322KC EK-78K3-32X IK-78K3-32XL EB-78320- IE-78327-R EP-78320L-R PC pPD783P322KD EK-78K3-32X IK-78K3-32XGJ EB~78320- IE-78327-R EP-78320GJ-R PC (Note 10) pPD78P322L EK-78K3-32X IK-78K3-32XL EB-78320- IE-78327-R EP-78320L-R PC pPD78330GJ EK-78K3-33X IK-78K3-33XGJ EB-78330- IE-78330-R EP-78330GJ-R PC (Note 11) pPD78330LQ EK-78K3-33X IK-78K3-33XLQ EB-78330- IE-78330-R EP-78330LQ-R PC pPD78334GJ EK-78K3-33X IK-78K3-33XGJ EB-78330- IE-78330-R EP-78330GJ-R pPD78P334GJ PC (Note 11) pPD78334LQ EK-78K3-33X IK-78K3-33XLQ EB-78330- IE-78330-R EP-78330LQ-R pPD78P334LQ/KE PC pPD78P334GJ EK-78K3-33X IK-78K3-33XGJ EB-78330- IE-78330-R EP-78330GJ-R PC (Note 11) pPD78P334KE EK-78K3-33X IK-78K3-33XLQ EB-78330- IE-78330-R EP-78330LQ-R PC pPD78P334LQ EK-78K3-33X IK-78K3-33XLQ EB-78330- IE-78330-R EP-78330LQ-R PC Notes: (1) The following software packages are available. for the pPD783xx series: RA78K3 Relocatable Assembler Package: RA78K3-D52 (MS-DOS@} ST78K3 Structured Assembler Preprocessor: provided with RA78K3 CC78K3 C-Compiler Package: CC78K3-D52 (MS-DOS) 1-29 Development Tools for Micro Products NEe (2) Packages: (5) All EPROM/OTP devices can be programmed using the NEC CW 64-pin plastic shrink DIP PG-1500. Refer to the PG-1500 Programming Socket Adapter DW 64-pin ceramic shrink DIP with window Selection Guide for the appropriate programming adapter. GF-3BE . 64-pin plastic QFP (resin thickness 2.7 mm) (6) The IK-78K3-31XACW is shipped with the emulation probes for GJ-58G 94-pin plastic QFP both the 64-pin shrink DIP and 64-pin QUIP packages. GJ-58J 74-pin plastic QFP (20 mm x 20 mm) GQ-36 64-pin plastic QUIP (7) The emulation probe -for the 64-pin shrink DIP package (EP- KC 68-pin ceramic LCC with window 78310CW) is supplied with the IE. KD 74-pin ceramic LCC with window (8) The EP-78310GF Emulation Probe is shipped with one EV-9200G- KE 84-pin ceramic LCC with window 64, a 64-pin LCC socket with the footprint of the QFP package. L 44-pin PLCC (pPD71 P301 L) Additional sockets are available as replacement parts in sets of 68-pin PLCC five. (pP D7831 OA/312A/P312A L, IlPD78320/322L) LQ 84-pin PLCC (9) The emulation probe for the 64-pin QUIP package (EP-78310GQ) is supplied with the IE. R 64-pin ceramic QUIP with window (3) The IlPD783xx Evaluation Kit contains the appropriate EB- (10) The EP-78320GJ-R Emulation Probe is shipped with one EV- 783xx-PC evaluation board for the part selected, the RA78K3 9200G-74, a 74-pin LCC socket with the footprint of the OFP Relocatable Assembler Package, and the ST78K3 Structured package. Additional sockets are available as replacement parts in sets of five. Assembler Preprocessor. (11) The EP-78330GJ-R Emulation Probe is shipped with one EV- (4) The IlPD783xx Emulator Kit contains the appropriate IE-783xx 9200G-94, a 94-pin LCC socket with the footprint of the OFP and Emulation Probe for the part selected, the RA78K3 Relocat- able Assembler Package, and the ST78K3 Structured Assembler package. Additional sockets are available as replacement parts Preprocessor. in sets of five. DSP and Speech Products Device Evaluation Assembler Simulator EPROM/OTP PG-1S00 Adapter (Note 7) Emulator Board (Note 1) (Note 2) Device (Note 3) IlPD77P20D EVAKIT-77208 ASM77 SM77C25 IlPD77C20AC EVAKIT-77208 ASM77 SM77C25 pPD77P20D (Note 5) IlPD77C20AGW EVAKIT-77208 ASM77 SM77C25 pPD77P20D IlPD77C20AL EVAKIT-77208 ASM77 SM77C25 IlPD77C20ALK EVAKIT-77208 ASM77 SM77C25 IlPD77220L EVAKIT-77230 RA77230 SM77230, SIM77230 IlPD77220R EVAKIT-77230 DDK-77220 RA77230 SM77230, IlPD77P220R (EPROM) PA-77P230R (Note 8) SIM77230 IlPD77P220L (OTP) IlPD77P220L EVAKIT-77230 RA77230 SM77230 PA-77P220L SIM77230 IlPD77P220R EVAKIT-77230 DDK-77220 RA77230 SM77230, PA-77P230R (Note 8) SIM77230 IlPD77230AR EVAKIT-77230 RA77230 SM77230, IlPD77P230R PA-77P230R S.IM77230 IlPD77230AR-003 EVAKIT-77230 DDK-77230 RA77230 SM77230, pPD77P230R PA-77P230R SIM77230 IlPD77P230AR EVAKIT-77230 DDK-77230 RA77230 SM77230, IlPD77P230R PA-77P230R SIM77230 pPD77240R IE-77240 IE-77240 RA77240 SIM77240 pPD77C25C EVAKIT-77C25 RA77C25 SM77C25 pPD77P25C/D PA~77P25C IlPD77C25GW EVAKIT-77C25 RA77C25 SM77C25 pPD77P25GW pPD77C25L EVAKIT-77C25 RA77C25 SM77C25 IlPD77P25L PA-77P25L pPD77P25C EVAKIT-77C25 RA77C25 SM77C25 PA-77P25C pPD77P25D EVAKIT-77C25 RA77C25 SM77C25 PA-77P25C pPD77P25GW EVAKIT-77C25 RA77C25 SM77C25 PA-77P25GW 1-30 NEe Development Tools for Micro Products DSP and Speech Products (cont) Device Evaluation Assembler Simulator EPROM/OTP PG-1500 Adapter (Note 7) Emulator Board (Note 1) (Note 2) Device (Note 3) IlPD77P25L EVAKIT-77C25 RA77C25 SM77C25 PA-77P25L IlPD7755C NV-300 System EB-7759 IlPD77P56CR PA-77P56C (Note 9) IlPD7755G NV-300 System EB-775/NV-310 IlPD77P56G PA-77P56C II (Note 9) (Note 6) (Note 10) IlPD7756C NV-300 System EB-775/NV -310 IlPD77P56CR PA-77P56C (Note 9) (Note 10) IlPD7756G NV-300 System EB-775/NV-310 IlPD77P56G PA-77P56C (Note 9) (Note 6) (Note 10) JlPD77P56CR NV-300 System EB-775/NV-310 PA-77P56C (Note 9) JlPD77P56G NV-300 System EB-775/NV-310 PA-77P56C (Note 9) (Note 6) JlPD7757C NV-300 System EB-775/NV-310 (Note 9) JlPD7757G NV-300 System EB-775/NV-310 (Note 9) (Note 6) JlPD7759C NV-300 System EB-775/NV-310 (Note 9) JlPD7759GC NV-300 System EB-775/NV-310 (Note 9) JlPD77501 GC NV-300 System (Note 9) IlP D7781 OL IE-77810 RA7781 0 IlPD77810R IE-77810 RA7781 0 Notes: (1) The following assemblers are available: (5) The IlPD77P20D can be programmed using the EVAKIT-7720B. ASM77-D52 Assembler for 7720 (MS-DOS@) (6) The EB-775 comes with an emulation probe for only the 18-pin RA77C25-D52 Assembler for 77C25 (MS-DOS) DIP. RA77C 25-VV T1 Assembler for 77C25 (VAXNMsn') RA77230-D52 Assembler for 77230 (MS-DOS) (7) Packages: RA77230-VVT1 Assembler for 77230 (VAXNMS) C 18, 28, or 40-pin plastic DIP RA77230-VXT1 Assembler for 77230 (VAX/UNIXTM 4.2 BSD or D 28-pin ceramic DIP UltrixTM) G 24-pin plastic SOP GC 52-pin plastic QFP (2) The following simulators are available: L 44-or 68-pin PLCC SIM77230-VVT1 Simulator for 77230 (VAX/UNIX) LK 28-pin PLCC SIM77230-VXT1 Simulator for 77230 (VAX/UNIX TI• 4.2 BSD or R 68-pin ceramic PGA Ultrix) GW 32-pin SOP SM77C25 Simulator for 77C25 (IBM-PC) SM77230 Simulator for 77220, 77230 (IBM-PC) (8) DDK-77220 is supported by Hypersignal Workstation/Window, a SIM77240 Simulator for 77240 (IBM-PC) DSP software platform from Hyperception. (3) By using the specified adapter, the NEC PG-1500 EPROM (9) The NV-300 current version is Version 3.0. An upgrade from programmer can be used to program the EPROM/OTP device. previous versions (hardware and software) is available under the designation NV-301. (4) Please check with your NEC Sales Representative on the avail- ability of a PLCC emulation probe. (10) The NV-310 emulation board includes a simple 77P56 program- mer module. 1-31 Development Tools for Micro Products NEe PG-1500 Programming Adapters Socket Adapter Adapter Module Socket Adapter Adapter Module Target Chip (Note 1) (Note 2) Target Chip (Note 1) (Note 2) Standard 27xxx EPROM Devices IlPD78CP14GF PA-78CP14GF 027A Board IlPD78CP14L PA-78CP14L 027A Board IlPD27256 (21 V) 027A Board IlPD78CP14R PA-78CP14GQ 027A Board IlPD27256A (12.5 V) 027A Board IlPD27C256 (21 V) 027A Board IlPD78CP18CW PA-78CP14CW 027A Board IlPD78CP18GQ PA-78CP14GQ 027A Board IlPD27C256A (12.5 V) 027A Board IlPD78CP18GF PA-78CP14GF 027A Board IlPD27C512 027A Board IlPD27C1000 027A Board IlPD78CP18KB PA-78CP14KB 027A Board IlPD27C1001 027A Board 782xx Series Devices IlPD27C1024 027A Board IlPD78P214CW PA-78P214CW 027A Board 75xx Series Devices IlPD78P214GC PA-78P214GC 027A Board IlPD78P214GJ PA-78P214GJ 027A Board IlPD75P54CS PA-75P54CS 04A Board IlPD75P54G PA-75P54CS 04A Board IlPD78P214GQ PA-78P214GQ 027A Board IlPD75P56CS PA-75P56CS 04A Board IlPD78P214L PA-78P214L 027A Board IlPD78P224GJ PA-78P224GJ 027A Board IlPD75P56G PA-75P56CS 04A Board IlPD75P64CS PA-75P54CS 04A Board IlPD78P224L PA-78P224L 027A Board IlPD75P64G PA-75P54CS 04A Board IlPD78P238GC PA-78P238GC 027A Board IlPD78P238GJ PA-78P238GJ 027A Board IlPD75P66CS PA-75P56CS 04A Board IlPD75P66G PA-75P56CS 04A Board IlPD78P238KF PA-78P238KF 027A Board IlPD78P238LQ PA-78P238LQ 027A Board 75xxx Series Devices 783xx Series Devices IlPD75POO8CU PA-75POO8CU 04A Board IlPD75POO8GB PA-75POO8CU 04A Board IlPD78P312ACW PA-78P312CW 027A Board IlPD75P036CW PA-75P036CW 04A Board IlPD78P312ADW PA-78P312CW 027A Board IlPD78P312AGF PA-78P312GF 027A Board IlPD75P036GC PA-75P036GC 04A Board IlPD75P108BCW PA-75P108CW 04A Board IlPD78P312AGQ PA-78P312GQ 027A Board IlPD75P108CW PA-75P108CW 04A Board IlPD78P312AL PA-78P312L 027A Board IlPD78P312ARQ PA-78P312GQ 027A Board IlPD75P108DW PA-75P108CW 04A Board IlPD75P108BGF PA-75P116GF 04A Board IlPD78P322GJ PA-78P322GJ 027A Board IlPD75P108G PA-75P108G 04A Board IlPD78P322KC PA-78P322KC 027A Board IlPD78P322KD PA-78P322KD 027A Board IlPD75P116CW PA-75P108CW 04A Board IlPD75P116GF PA-75P116GF 04A Board IlPD78P322L PA-78P322L 027A Board IlPD75P216ACW PA-75P216ACW 04A Board IlPD78P334GJ PA-78P334GJ 027A Board IlPD78P334KE PA-78P334KE 027A Board IlPD75P218CW PA-75P216ACW 04A Board IlPD75P218GF PA-75P218GF 04A Board IlPD78P334LQ PA-78P334LQ 027A Board IlPD75P218KB PA-75P218KB 04A Board V-Series Devices IlPD75P308GF PA-75P308GF 04A Board IlPD70P322K PA-70P322L 027A Board IlPD75P308K PA-75P308K 04A Board IlPD75P316GF PA-75P308GF 04A Board Digital Signal Processors IlPD75P316AGF PA-75P308GF 04A Board IlPD77P56CR PA-77P56C 04A Board IlPD75P316AK PA-75P308K 04A Board IlPD77P56G PA-77P56C 04A Board IlPD75P328GC PA-75P328GC 04A Board IlPD77P25C PA-77P25C 027A Board IlPD75P402C (Note 3) 027A Board IlPD77P25D PA-77P25C 027A Board IlPD75P402CT PA-75P402CT 027A Board IlPD77P220R PA-77P230R 027A Board IlPD75P402GB PA-75P402GB 027A Board IlPD77P230R PA-77P230R 027A Board IlPD75P516GF PA-75P516GF 04A Board IlPD75P516K PA-75P516K 04A Board Notes: 78xx Series Devices (1) Adapters must be purchased separately. (2) The 27A and 04A Adapter Modules are shipped with the PG-1500. IlPD78CP14CW PA-78CP14CW 027A Board IlPD78CP14DW PA-78CP14CW 027A Board (3) The IlPD75P402C does not require a programming socket IlPD78CP14G36 PA-78CP14GQ 027A Board adapter. It can be plugged directly into the 027A board. 1-32 NEe Reliability and Quality Control IJ 'L1 Reli abi lity and Quality Control NEe Section 2 Reliability and Quality Control Introduction 2-3 Built-In Quality and Reliability 2-3 Technology Description 2-3 Approaches to Total Quality Control 2-3 Implementation of Quality Control 2-5 Reliability Testing 2-7 Life Distribution 2-7 Failure Distribution at NEC 2-7 Infant Mortality Failure Screening 2-8 Long-Term Failure Rate 2-8 Accelerated Reliability Testing 2-8 Failure Rate Calculation/Prediction 2-9 Product/Process Changes 2-10 Failure Analysis 2-10 NEC's Goals on Failure Rates 2-10 Summary and Conclusion 2-10 Figure 1. Quality Control System Flowchart 2-5 Figure 2. New Product Development Flow 2-6 Figure 3. Electrical Testing and Screening 2-6 Figure 4. Reliability Life (Bathtub) Curve 2-7 Figure 5. Typical Reliability Test Results 2-9 Figure 6. NEC Quality and Reliability Targets 2-10 Appendix 1. Typical QC Flow 2-12 Appendix 2. Typical Reliability Assurance Tests 2-15 Appendix 3. New Product/Process Change 2-16 Tests Appendix 4. Failure Analysis Flowchart 2-17 ?? NEe Reliability and Quality Control Introduction Approaches to Total Quality Control As large-scale integration reaches a higher level of den- TOC activities are geared towards total satisfaction of the sity, the reliability of individual devices imposes a more customer. The success of these activities is dependent profound impact on system reliability. Great emphasiS has upon the total commitment of management to enhancing thus been placed on assuring device reliability. employee development, maintaining a customer-first atti- tude, and fulfilling community responsibilities. Conventionally, performing reliability tests and attaining feedback from the field are the only methods by which First, the quality control function is embedded into each reliability has been monitored and measured. At these process. This method enables early detection of possible higher levels of LSI density, however, it is increasingly causes of failure and immediate feedback. difficult to activate all of the internal circuit elements in a device, moreover, to detect the degradation of those Second, the reliability and quality assurance policy reflects 2 the beliefs and practices of the entire organization. This elements by measuring characteristics across external enables companywide quality control activities: at NEC, terminals. As a result, testing alone may not provide everyone is involved with the concept and methodology of enough information to insure today's demanding reliability total quality control. requirements. A different philosophy and methodology is needed for reliability assurance. Third, there is an ongoing research and development effort to set even higher standards of device quality and reliability. In orderto guarantee and improve a high level of reliability for large-scale integrated circuits, it is essential to build Fourth, extensive failure analysis is performed periodically quality and reliability into the product. Then, conventional and appropriate corrective actions are taken as preventa- testing can be performed to confirm that the product tive measures. Process control is based on statistical data demonstrates acceptable reliability. gathered from this analysis. The new standard is continuously upgraded, and the Built-In Quality and Reliability iterative process continues. The goal is to maintain the NEC has introduced the concept of total quality control superior product quality and reliability that has become (TOC) across its entire semiconductor product line for synonymous with the NEC name. implementing this philosophy. Rather than performing Zero Defect Activities. One of the activities that involves only a few simple quality inspections, quality control is every level of the NEC staff in quality control is the Zero distributed into each process step and then summed to Defects (ZD) Program. As the name implies, the purpose form a consolidated system. TOC involves workers, engi- of the ZD program is to minimize, if not eradicate, defects neers, quality control staffs, and all levels of manage- due to controllable causes. Such activities must involve ment in company-wide activities. Please see Figure 1 for each and every worker and can be most effective when the quality control system flowchart. Through TOC, NEC pursued by groups of workers. The groups of workers are builds quality into the product and thus can assure high organized by consideration of the following: reliability. Additionally, NEC has introduced a pre-screening method into the production line for eliminating potentially • A group must have a target to pursue defective units. This combination of building quality in and screening projected early failures out has resulted in • Several groups can be organized to pursue the com- superior quality and excellent reliability. mon target Technology Description • Each group must have a responsible person Most large-scale integrated circuits utilize high density • Each group is well supported MOS technology. State-of-the-art high performance has been achieved by improving fine-line generation tech- niques. By reducing physical parameters, circuit density The item of the group target is to be selected among items and performance increase while active circuit power dissi- relating to specifications, inspections, operation standards, pation decreases. The data presented here shows thatthis and so forth. When data made in the past is available, it is advanced technology, combined with the practice of TOC, used to make a Pareto diagram which is reviewed for yields products as reliable as those from previous tech- selection ofthe item most conducive to quality improvement. nologies. Records are analyzed and compared with the target, in order to compute the numerical equivalents of the defects. Action is then taken to control these defects as required. 10002 2-3 Reliability and Quality Control NEe Figure 1. Quality Control System Flowchart Manufacturing Facility Dapt (Inspection) (Manufacturing) 11 E Q. o I c o 8 "0 e Q. iii 'C I- "0 C I'CI C Cl Daslgn Ravlaw 'cii Spac/Eng Support c Confarenca on Mass Productlon/Sales o ~ "e Q. ZII'CI Praparatlon of Spac for ::E ManufacturlngfTestlQA In·Procass Quality Monitoring; Complaint (Field Data) In·Procass Inspection; Environment and Equipment Control/Calibration; Lot Control; Corrective Actions; Data Analyslsl Feedback; Etc. 83vO-6934B 2-4 NEe Reliability and Quality Control Statistical Approach. Another approach to quality control Figure 2. New Product Development Flow is the use of statistical analysis. NEC has been utilizing statistical analysis at each stage of LSI production devel- opment, trial runs, and mass production in order to build and maintain product quality. Some of the methods for • Circuit Design • Mask Pattern Layout implementing this statistical approach are: • Design of experiments Manufacturing - - - - . . .--'~--~----~ • Control charts • Package Design • Data analysis: Variance, correlation, regression, multivariance, etc. • Cp, Cpk study: VClriables and attributes data (Normally, study is done on a monthly basis) Process control sheets and other QC tools are used to monitor various important parameters such as Cp, Cpk, X, X, X-R, electrical parameters, pattern dimensions, bond strength, test percentage defects, etc. The results ofthese studies are watched by the production staff, QC Engineers, and other responsible engineers. If any out-of-control or out-of-specification limit is observed, quick action is taken in accordance with corrective action procedures. Implementation of Quality Control Building quality into a product requires early detection of possible causes of failure at each process step, then immediate feedback to remove these causes. A fixed station quality inspection is often lacking in immediate feedback; it is therefore necessary to distribute quality control functions to each process step-including the conceptual stage. Following is a breakdown of the signifi- cant steps at which NEC has implemented these func- tions: • Product development • Incoming material inspection • Wafer processing • Chip mounting and packaging • Electrical testing and thermal aging • Outgoing material inspection • Reliability testing • Process/product changes New Product Development Phase. The product devel- opment phase includes conception of a product, review of the device proposal, physical element design and organi- zation, engineering evaluation, and finally, transfer of the product to manufacturing. Quality and reliability are con- sidered at every step. The new product development flow 83vO-6935A is shown in Figure 2. 2-5 Reliability and Quality Control NEe Design. Design plays an extremely important role in modes. The results of these inspections are used to rate determining the product quality and reliability. NEC be- the vendors for future purchasing. lieves thatthe foundation of device quality is determined at In-process Quality Inspections. Typical in-process the design stage. The four steps involved in the design of quality inspections done at the wafer fabrication, chip LSI devices are circuit design, mask pattern layout, proc- mounting and packaging, and device testing stage are ess and product manufacturing, and package design. listed in Appendix 1. Design standards and the standardization of design steps have been established to maximize quality and reliability. Electrical Testing and Screening. A flowchart of the typical infant mortality screening (when required) and Design Review. After completion of the design, a design electrical testing is depicted in Figure 3. review is performed. In this review, the design is compared with design standards and other factors which influence At the first electrical test, DC parameters are tested ac- the reliability and quality. If necessary, modification or cording to the electrical specifications on 1 00% of each lot. redesign is then performed. NEC believes that the design This is a prescreening prior to any infant mortality test. At review is very essential for not only newly designed prod- the second electrical test, AC functional tests as well as DC ucts but also for product modifications. parameter tests are performed on 100% of each lot. If the percentage of defective units exceeds the limit, the lot is Trial Production/Evaluation/Mass Production. When subjected to rescreen. During this time, the defective units the design passes the design review successfully, a trial undergo failure analysis, the results of which are fed back run is carried out. The trial run is evaluated forthe products' into the process through corrective actions. characteristics and quality/reliability. Figure 3. Electrical Testing and Screening Thorough evaluation is carried out by generating samples in which process conditions-ones that cause character- istic factors to change in mass production-are varied DC Parameters deliberately. In addition, reliability tests are conducted for (Full AC/DC Testing durability, stress resistance, etc., to insure sufficient qual- .------~~==:;r'"----' If No 100% Burn-In) ity and reliability. If no problems are found at this stage, the product is *Whenever Required approved, after which mass production is possible. Prior to the transfer, the production Design Department prepares a production schedule, including the reliability and quality control steps relating to the production. Even DC Parameters, after the mass-production has started, the standards for AC Functional those production and control steps are always reexamined for improvements. Incoming Material Inspection. NEC has various pro- No grams to control incoming materials. Some are: • Vendor/material qualification system • Purchasing specifications for materials Electrical, • Incoming materials inspection Appearance, and • Inspection data feedback '-------,r--"'-~ Dimensions • Quality meetings with vendor • Vendor audits If any parts or materials are rejected at incoming inspec- tion, they are returned to the vendor with a rejection 83vO·6936A notification form which specifies the failure items and 2-6 ~EC Reliability and Quality Control Outgol~g Inspection. Prior to warehouse storage, lots FIgure 4. ReliabIlity LIfe (Bathtub) Curve are subjected to an outgoing inspection according to the following sampling plan. . • Electrical test: DC parameters LTPD 3% Functional test LTPD 3% • Appearance: Major LTPD 3% Minor LTPD 7% Reliability Assurance Tests. Samples are continually taken prior to shipment and subjected to monitoring relia- Wearout bility tests. They are tak~nfrom similar process groups, so Period it may be assumed that the samples' reliability is represen- Random Failure Period tative of the reliability of the group. Tlme-... Reliability Testing 83vO·6937A Reliability is defined as the characteristics of an item expressed by the probability that it will perform a required Infant mortality, as the name implies, represents the early- function understated conditions fora stated period of time. life failures of devices. These failures are usually associ- This involves the concepts of probability, the definition of ated with one or more manufacturing defects. required function(s), and the critical time used in defining the reliability. After some period of time, the failure rate reaches a low value. This is the random failure portion of the curve, Definition of a required function, by implication, treats the representing the useful portion of the life of a device. definition of a failure. Failure is defined as the termination During this random failure period, there is a decline in the of the ability of a device to perform its required function. A failure rate due to the depletion of potential random failures device is said to have failed if it shows the inability to from the general population. ' perform within guaranteed parameters as given in an electrical specification. Thewearoutfailures occur atthe end ofthe device's useful life. They are characterized by a rapidly rising failure rate Discussion of reliability and failure can be approached in over time as devices wear out both physically and electri- two ways: with respect to systems or to individual devices. cally. Important considerations are the constant failure period, the early failure (infant mortality) period, and overall relia- Thus, for a device that has a very long life expectancy bility level. compared to the system which contains it, the areas of concern will be the infant mortality and the random failure With regard to individual devices, areas of prime interest portions of the ,bathtub curve. include specific failur~ mechanisms, failures in acceler- ated tests, and failures in screening tests. Failure Distribution at NEe The accu mu lation of normal device failure rates constitutes In an effort to eliminate infant mortality failures, NEC the expected failure rate of the system hardware: the subjects its products to production burn-in whenever nec- probability that no device failures will occur in a system is essary. This burn-in is performed at an elevated tempera- the product of each device's probability that it will not fail. ture for 100 percent of the lots involved and is designed to , The failure rate of system hardware is then the sum of the remove the potentially defective units. failure rates of the components used to construct the system. To study the random failure population, integrated circuits returned to NEC from the field undergo extensive failure Life Distribution analysis at respective NEC Manufacturing Divisions. Fail- ure mechanisms are identified and data fed back to cogni- The fundamental prinCiples of reliability engineering pre- zant Production and Engineering groups. dict that the failure rate of a group of devices will follow the well-known bathtub curve in Figure 4. The curve is divided This data coupled with in~line dataisthen usedto introduce into three regions: infant mortality, random failures, and corrective actions and quality improvement measures. wearout failures. 2-7 Reliability and Quality Control NEe After elimination of early device.failure·s, a system will be Long-Term Failure Rate left to the random failure rate of its components. Thus, in ; , order to make proper projections of the failure rate of the NEG's long-term failure rate goal, pased on the mask and system in the operating environment, failure rates must be process design, is confirmed by life testing using the predicted for the system's components. following conditions: • A minimum of 1.2 million device hours (= sample size x Infant Mortality Failure Screening test period) at 125°G should be accumulated to obtain Establishing infant mortality screening requires knowl- the accuracy necessary for predicting a failure rate of edge of the likely failure mechanisms and their associated 0.02% per 1000 hours at 55°G with a 60% ponfidence activation energies. The most likely problems associated level. with infant mortality failures are generally manufacturing defects and process anomalies. These defeqs and anoma- • A minimumof3 million device hours at 125°G should be lies generally consist of contamination, cracked chips, accumulated to obtain the accuracy necessary for wire bond shorts, or bad wire bonds. Since these describe predicting a failure rate of 0.01% per 1000 hours at 55°G a number of possible mechanisms, anyone of which might with a 60% confidence level. predominate at a given time, the activation energy for infant mortality varies considerably. Accelerated Reliability Testing Correspondingly, the effectiveness of a screening condi- NEG performs extensive reliability testing both at, pre- tion-preferably at some stress level in order to shorten production and post-production levels to insure that its the screening time-varies greatly with the failure mecha- products meet the minimum expectations set by NEG. nism. For example, failures due to ionic contamination Accelerated reliability testing results are then used to have an activation energy of approximately 1.0 eV. There- quantitatively monitor the reliability. fore, a 15-hou r stress at 125°G ju nctio n te mpe rature would As an example, assume that an electronic system contai ns be the equivalent of approximately 314 days of operation 1000 integrated circuits and can tolerate 1 percent system at a junction temperature of 55°G. On the other hand, failures per month. The failure rate per component is: failures due to oxide defects hav~ an activation energy of approximately 0.3 eV, and a 15-hour stress at 125°G 1% Failures = .0014 % Failures junction temperature would be the equivalent of approxi- 720 Hours x 1000 Pcs. 1000 Hrs mately four day's operation at 55°Gjunction temperature. or 14 FITs As indicated by this situation, the conditions and duration To demonstrate this failure rate, note that 14 FITs corre- of infant mortality screening must be strongly dependent spond to one failure in about 85 devices during an operat- on the allowable component, hence system, failures in the ing test of 10,000 hours. It is quickly apparent that a test field,as well as the ebonomic factors involved. condition is required to accelerate the time-to-failure in a Empirical data gathered at NEG indicates that early fail- predictable and understandable way. The i~plicit require- ures (if any) occur after less than 4hours of stress at 125°G ment for the accelerated stress test is that the relationship ambient temperature. This fact is supported by the bathtub between the accelerated stress testing condition and the curve created from the life test results ofthe same lots, condition of actual use be known. where the failure rate shows a random distribution as op- A most common time-to-failure relationship involves the posed to a decreasing failure rpte that runs into the random effect of temperature, which accelerates many physio- failure region. chemical reactions which may lead to device failure. Other Whenever necessary, NEG has adopted this initial infant environmental conditions are voltage, current, humidity, mortality burn-in at 125°G as a standard production screen- vibration, or some combination of these. Appendix 2 lists ing proce.dure. As a result, th.e field reliability of NEG typical reliability assurance tests performed at NEG for devices is an order of magnitude higher than the goal set molded integrated circuits. Figure 5 shows the results of for NEG's integrated circuit products. some of these tests for various process,types. NEG believes it is imperative thaUailure modes associated High-Temperature Operating Life Test. This test is used with infant mortality screens be understood and fixed atthe to accelerate failure mechanisms by operatir:tg devices at manufacturing level. If such failures can be minimized or an elevated temperature of ·125°G. The data ()btained is eliminated, and countermeasures appropriately monitored, translated to a lower temperature by using the Arrhenius then such screens can be eliminated. relationship. 2-8 ttiEC Reliability and. Quality Control Figure 5. Typical Reliability Test Results In some cases, an average activation energy is assumed in order to accomplish, a quick first order approximation. HTB T/H PCT TIC NEC assumes an average activation energy of 0.7 eV for Micro: 1 such approximations. This average value has been as- NMOS 7/19113 15/9315 0/11752 sessed from extensive reliability test results and yields a (15 FIT) conservative failure rate. CMOS 3/11892 . 217293 8/9476 Since most semiconductor failures are temperature de- (5.4 FIT) pendent, the Arrhenius relationship is used to normalize failure rate predictions at a system operation temperature Memory: [HTOl) of 55°C. It assumes that temperature dependence is an DRAM2 10/10052 0/9958 0/5880 1/2995 exponential function that defines the probability of occur-a (19 FIT) rence, and that the degradation of a performance parame- ter is linear with time. The Arrhenius model includes the SRAM3 1/10421 218142 0/8768 effects of temperature and activation energies of the 1 MEG DRAM4 38/14300 0/3634 1/3060 1/1780 failure mechanisms in the following Arrhenius equation: . (115 FIT) A = exp -EA (TJl - TJ2 ) Asic: 5 k(TJ1 ) (TJ2 ) CMOS 213506 1/1111 1/4764· 4/2680 (33 FIT) Where: A = Acceleration factor ECl 0/1080 0/141 (8.4 FIT) EA = Activation energy TJl = Junction temperature (in K) BiCMOS 1/895 0/1073 0/935 0/1781 (18 FIT) at TAl = 55°C TJ2 = Junction temperature (in K) Information has been extracted from NEC Report Numbers: 1 TRQ-89-05-0030 2TRQ-89-01-0021 at TA2 = 125°C 3TRQ-88-09-0008 4TRQ-89-01-0020 k = Boltzmann's constant 5 TRQ-89-04-0025 = 8.62 x 10-5 eV/K. High-Temperature and High-Humidity Test. Semicon- Because the thermal resistance and power dissipation of ductor integrated circuits are highly sensitive to the effect a particular device type cannot be ignored, junction of humidity causing electrolytic corrosion between biased temperatures (TJl and TJ2) are used instead of ambient lines. The high-temperature and high-humidity testis per- temperatures (TAl and T A2). We calculate junction formed to detect failure mechanisms that are accelerated temperatures using the following formula: by these conditions, such as leakage-related problems and drifts in device parameters due to process instability. TJ = TA + (T~ermal Resistance) (Power Diss. at TA ) High-Temperature Storage Test. Another common test In orderto estimate long ferm failure rate, the acceleration is the high-temperature storage test, in which devices are factor must be used to determine the simulated test time. subjected to elevated temperatures with no applied bias. From the high temperature operating life test results, This test is used to detect proces.s instability and stress . failure rates can then be predicted at a 60% confidence migration problems. ' level using the following equation: Environmental Tests. Other environmental tests are per- X2 105 L = 2T formed to detect problems related to the package, mate- rial, susceptibility to extremes in environment, and prob- Where: lems related to usage of the devices. L = Failure rate in %/1000 hours Failure Rate Calculation/prediction *X2 = The tabular value of chi-squared distribution at a When predicting the failure rate at a certain temperature given confidence level and calculated degrees of from accelerated life test data, the activation energies of freedom (2f + 2, where f = number of failures) the failure mechanisms involved should be considered. T = # of equivalent device hours This is done whenever the exact cause of failures is known (# of devices) x (# of test hours) through failure analyses results. x (acceleration factor) 2-9 Reliability and Quality Control NEe *Since the failures of concern here are the random, not the Product/Process Changes infant mortality failures (that is, the end of the downward slope and the middle-constant-section ofthe bathtub curve As mentioned previously, a design review is performed for in Figure 4), X2 is determined assuming a one-sided, fixed product modifications or changes. Once the design is time test. approved, and processes altered (if necessary) for maxi- mum quality, the device goes through qualification testing Another method of expressing failures is in FITs (failures to check the reliability. If the test results are acceptable, in time). One FIT is equal to one failure in 109 hours. Since the product is released for mass production. L is already expressed as %/1000 hours (10-5 failure/hr) , an easy conversion from %/1000 hours to FIT would be to Testing is also performed when only a process modifica- multiply the value of L by 104 • tion or change is made. The typical qualification/process change tests are listed in EXAMPLE: A sample of 960 pieces was subjected to Appendix 3. 1000 hours 125°C burn-in. One reject was observed. Given that the acceleration factor was calculated to be Failure Analysis 34.6 using the Arrhenius equation, what is the failure rate normalized to 55°C using a confidence level of 60%? At NEC, failure analysis is performed not only on field fail- Express the failure rate in FIT: ures, but also routinely on products which exhibit defects during the production process. This data is closely checked Solution: for correlation with the production process quality informa- For n =2f + 2 = 2(1) + 2 = 4, X2 = 4.046. tion, inspection results, and reliability test data. Informa- tion derived from these failure analyses is used to improve X2 105 Then L = 2T (%/1000 hour) product quality. As there are a lot of failure mechanisms of LSI devices, X2 105 (%/1000 hr) highly advanced analytical technologies are required to 2 (# of dev.) (# of test hrs.) (acel. factor) investigate such failures in detail. The standard failure 5 analysis flowchart relating to the returned products from (4.046) 10 = 0.0061 (%/1000 hr) customers is shown in Appendix 4. 2(960) (1000) (34.6) Therefore, FIT = 0.0061 • (104 ) = 61 NEe's Goals on Failure Rates The reject rate at customer's incoming inspection, the infant mortality rate, and the long term reliability, are all monitored and checked against NEC's quality and reliability targets (listed in Figure 6). Figure 6. NEe Quality and Reliability Targets Reject Rate at Customer's Long Term Reliability (AT) Infant Mortality (RT) Incoming Electrical Inspection (PPM) ... Memory J1COM Gate Arrays Memory J1COM Gate Arrays . Memory J1COM Gale Arrays Year EClRAM MOS BICMOS ECl CMOS EClRAM MOS BiCMOS ECl CMOS EClRAM MOS BiCMOS Eel CMOS 1988 150 50 100 1000 300 300 100 50 100 1000 300 150 100 100 150 1000 300 400 1990 100 50 100 500 200 150 80 50 80 500 250 100 80 100 150 500 250 300 2-10 NEe Reliability and Quality Control Summary and Conclusion The combination of building quality into products, effective prescreening of potential failures, and monitoring of relia- As has been discussed, building quality and reliability into bility through extensive testing, has established a singu- products is the most efficient way to ensure product larly high standard of quality and reliability for NEC's large- success. NEC's approach of distributing quality control scale integrated circuits. functions to process steps, then forming a total quality control system, has produced superior quality and excel- Through a companywide quality control program, continu- lent reliability. ous research and development activities, extensive failure analysis, and process improvements, this higher standard Prescreening, whenever necessary, has been a major of quality and reliability will continuously be set and main- factor in improving reliability. In addition, monthly reliabil- tained. ity assurance tests have ensured high outgoing quality levels. 2-11 Reliability and Quality Control NEe Appendix 1 Typical QC Flow for CMOS Fabrication WAFER FABRICATION PROCESS QC FLOW (CMOS) FLOW PROCESS MATERIAL IN-PROCESS INSPECTION/QUALITY MONITOR Silicon Wafer Resistivity (sampling by lot) Incoming Dimension (sampling by lot) Inspection Visual (sampling by lot) Wall Formation Oxidation Oxide Thickness (sampling by lot) Photo LIthography Alignment and Etching Accuracy (sampling by lot) Layer Resistance (sampling by day) Ion Implantation Field Formation Deposition Deposit Thickness (sampling by lot) Photo Lithography Alignment and Etching Accuracy (sampling by lot) Oxide Thickness (sampling by lot) Oxidation Channel Stopper Formation Photo Lithography Alignment and Etching Accuracy (sampling by lot) Layer Resistance (sampling by lot Ion Implantation Oxide Thickness (sampling by lot) Oxidation Gate Formation Deposition Deposit Thickness (sampling by lot) Doping Layer Resistance (sampling by lot) Photo LIthography Alignment and Etching Accuracy (sampling by lot) Gate Electrode Width (sampling by lot) pIn SD Formation Photo Lithography Alignment and Etching Accuracy (sampling by lot) Layer Resistance (sampling by lot) Ion Implantation Anneal Contact Hole Deposition Deposit Thickness (sampling by lot) Photo Lithography Alignment and Etching Accuracy (sampling by lot) Metallization Metal Deposition Metal Thickness (sampling by run) Photo Lithography Alignment and Etching Accuracy (sampling by lot) Parametric Test (sampling by lot) Alloy Passivation Deposition Deposit Thickness (sampling by lot) Photo Lithography Alignment and Etching Accuracy (sampling by lot) Wafer Sort Contact Hoie and Metallization Steps are Repeated Twice 83vQ-69398 2-12 NEe Reliability and Quality Control Appendix 1 Typical QC Flow for PLCC Assemblyffest The Check of Manufacturing Conditions The Check of Manufacturing Qualities Process/Materials Check Checked Check Checked Frequency Instrument Frequency Instrument Items By Item By 1 Sorted Wafers 2 Wafer Visual Wafer Visual 100% (Naked Eye) Operator Table Speed Every Indicators P.C. Sawing Before Microscope Operator 3 Dicing DIWater Shift Gauges Dimensions Running with Filter Blade Height Eyepiece 4 Break and Expand Wafer Break Conditions Wafer Expand Conditions Every Shift Indicators Gauges P.C. Wafer Visual 100% (Naked Eye) Operator II Die Every Lot Microscope Operator 5 Die Visual Inspection Visual Sampling (Or 100%) 6 Lead Frames DieAltached Every Indicators P.C. Die Visual Every (Naked Eye) Operator Conditions Shift Thermocouple, Epoxy Magazine Potentiometer Coverage 7 Die Attached Temperature Every Shift Microscope Epoxy Cure Heat Every Indicators P.C. Shear Every Dynamometer Operator 8 (Not Done for Gold Temperature Shift Gauges Strength Shift Die Attached product) N 2 Flow ~ Fine Wire Bonding Conditions Every Shift Indicators P.C. Visual Every Magazine Microscope Operator 10 Wire Bonding Temperature Every Thermocouple P.C. Wire Pull Every Tension Operator Week and Test Shift Gauge Potentiometer Die Every Lot Microscope Inspector Pre-Seal Visual 11 Visual Sampling Inspection (or 100%) ~ Temperature Every Thermocouple P.C. Molding Compound of Pellet, Shift Expiration Date 13 Molding Temperature Every Shift Thermocou pie, P.C. Visual 100% (Naked Eye) Operator Profile of Potentiometer Die Set Preheat Temperatue Pressure Cure Time 14 Mold Aging Temperature Every Shift Indicator P.C. 15 Deflashing Deflashing Every Shift Indicators P.C. Visual Every Lot (Naked Eye) Operator Conditions Concentration Every Week Titration Tech. Density Every Week Density Meter Tech. Water Jet Pressure Every Day Gauge Tech. Plating 0 Every Day Indicators P.C. Plating Conditions Concentration Every Week Titration Tech. 83VQ-6914OB 2-13 Reliability and Quality Control NEe Appendix 1 Typical QC Flow for PLCC Assemblynest (Cont.) The Check of Manufacturing Conditions The Check of Manufacturing Qualities Process/Materials Check Checked Check Checked Frequency Instrument Frequency Instrument Items By Item By G Plating Inspection Visual Plating Thickness Every Lot Every Lot (Naked Eye) X-ray Technician Technician Composition Every Lot X-ray Technician Solderability Once/Day (Naked Eye) Technician ~ Marking Ink Marking Conditions Every Shift Indicators P.C. Visual Every Lot (Naked Eye) Operator 19 Marking Temperature Every Thermocouple P.C. Marking Twice/Shift Automatic Operator 20 Mark Cure Shift Permanency Tester Dimensions Every Shift Test Jig. Operator Visual Every lot (Naked Eye) 'Operator 21 Lead Forming (Before Caliper Running) Visual Every Lot Magnifying Operator 22 Final Assembly Inspection Lamp P.M. Check Every Day P.M. Jig. Operator 23 1st Electrical Sorting Sample Before Test Operator Electrical 100% ICTester Operator Check Testing Samples Characteristics 24 Burn-In Every Indicator P.C. Burn-In (Whenever Necessary) Conditions Batch Every Day P.M. Jig. Operator 25 1st Electrical Sorting Before Test Operator Electrical 100% ICTester Operator Testing Samples Characteristics Every 26 Reliability Assu.rance Test Month Every Day P.M. Jig. Electrical Every Lot ICTester Inspector Before Test Characteristics Testing Samples Visual (Major) Every Lot (Naked Eye) Inspector 27 In-Warehouse Inspection and Microscope Visual (Minor) Every Lot (Naked Eye) Inspector 28 Warehousing 83vQ-69416 2-14 NEe Reliability' and Quality Control Appendix 2 Typical Reliability Assurance Tests The life tests performed by NEC consistof high temperature mechanical tests are performed. The table below shows bias life (HTB), high temperature storage life (HTSL), high the conditions of the various life tests, envi ro nmental tests, temperature/high humidity (T/H) , and high humidity storage and mechanical tests. life (HHSL) tests. Additionally, various environmental and MIL·STD·883C Test Item Symbol Method Condition Remarks High Temperature HTB 1005 TA = 125"C, Voo specified per device type. (Note 1) Bias Life High Temperature Storage Life HTSL 1008 TA = 150"C. (Note 1) II High Temperaturel TIH TA =85"C, RH =85%, Voo =5.5 V. (Note 1) High Humidity High Humidity HHSL TA =85"C, RH =85%. (Note 1) Storage Life Pressure Cooker peT TA = 125"C, P =2.3 atm. (Note 1) Temperature Cycling TIC 1010 - 65"C to 150"C, 1 hr/cycle. (Note 1) Lead Fatigue C3 2004 90 0 bends. 3 bends wnhout breaking. (Note 2) Solderability C4 2003 230"C, 5 sec, Rosin Base Flux. (Note 3) Soldering Heat! C6 (Note 4) 260"C, 10 sec, Rosin Base Fluxl (Note 1) Temperature Cyclel 1010 10-1 hr cycles, -S5"C to 150"C1 Thermal Shock 1011 15-10 min cycles, O"C to 100"C Notes: (1) ElectriCal test per data sheet is performed. Devices that exceed the data (3) Less than 95% coverage is considered to be a reject. sheet limits are considered to be rejects. (4) MIL-STD-750A, method 2031. (2) Broken lead is considered to be a reject. 2-15 Reliability and Quality Control' NEe Appendix 3 New Product / Process Change Tests Newly Developed Shrink New Test Item Test Conditions Sample Size Product Ole Package Wafer Assembly High Temp. See Appendix 2, 1000H 20 to SO pes 0 0 0 0 0 Operating Life X 1 t0310ts High Temp. T = 150"C (Plastic), 10t020 pes 0 0 0 0 0 Storage Life 17S"C (Ceramic), 1000H X1t0310ts High Temp. and See Appendix 2, 1000H 20 to SO pes 0 0 0 0 0 Humidity Bias Life X 1 to 3 lots (Plastic Device) Pressure cooker See Appendix 2, 288H 10to 20 pes 0 0 0 0 0 (Plastic Device) X 1 t0310ts Thermal See Appendix 2 10t020 pes 0 X 0 X 0 Environmental X 1 to 3 lots Mechanical 20G, 10 to 2000 Hz 10 to 20 pes Environmental 1S00G, O.S ms X 1 to 3 lots 0 X 0 X 0 (Ceramic Device) 20000G, 1 min Lead Fatigue See Appendix 2 . Spes X X X X1t0310ts Solderabil~y See Appendix 2 Spes X X X X 1 to 3 lots ESD (1) C =200 pF, R =on 20 pes 0 0 X 0 X (2) C =100 pF, R =1.S Kn X1t0310ts Long Term TIC See Appendix 2, 1000 cy 10 to SO pes 0 0 0 0 0 X1t0310ts O-Performed X - Perform if Necessary - - Not Performed 2-16 NEe Reliability and Quality Control Appendix 4 Failure Analysis Flowchart '------INFORMATION Failure mode: Situation, When Failure Appeared: etc. II DC/Function Testing by Tester Curvet racer Ves Test correlation May be Needed Due to the Case: X-ray Fluoroscope, Hermetical Test, Dew-point Test, Curvet racer Check, etc. Decapsulation, Internal Visual Check, Electrical Measurement, Circuit Analysis Etching the PaSSivation, etc. SEM, XMA, Cross-section, etc. Estimation of Causes Countermeasures Corrective Action 83vO·6938A 2-17 Reliability and Quality Contr-ol NEe 2-18 NEe 16·BitCPUs 3-1 16·Bit CPUs NEe Section 3 16-Bit CPUs I'PD70108 (V20), 70108H (V20H) 3a 16-Bit Microprocessor: High-Performance, CMOS I'PD70116 (V30), 70116H (V30H) 3b 16-Bit Microprocessor: High-Performance, CMOS I'PD70208 (V40) 3c 8/16-Bit Microprocessor: High-Integration, CMOS I'PD70216 (V50) 3d 16-Bit Microprocessor: High-Integration, CMOS I'PD70136 (V33) 3e 16-Bit Microprocessor: High-Speed, CMOS I'PD70236 (V53) 3f 16-Bit Microprocessor: High-Speed, High-Integration, CMOS 3-2 NEC pPD70i08 (V20), 70~08H (V20H) i6·Bit Microprocessor: NEe Electronics Inc. High·Performance, CMOS Description Ordering Information ThepPD70108 (V20®) is a CMOS 16-bit microprocessor Part Max Frequency with internal 16-bit arch itectu re and an 8-bit external Number of Operation Package Type data bus. The pPD701 08 instruction set is a superset of Standard Series thepPD8086/8088; however, mnemonics and execution JlPD70108C8 8 MHz 40-pin plastic DIP times are different. The pPD70108 additionally has a powerful instruction set including bit processing, C10 10 MHz packed BCD operations, and high-speed multiplication/ L8 8 MHz 44-pin PLCC division operations. The pPD70108 can also execute the entire 8080 instruction set and comes with a standby mode that significantly reduces power con- L10 GC8 10 MHz 8 MHz 52-pin plastic QFP ED sumption. It is software-compatible with thepPD70116 16-bit microprocessor. - - - - - H-Series GC10 10 MHz (P52GC-100-386) . The H-series microprocessors are fully static devices JlPD701 08HC1 0 10 MHz 40-pin plastic DIP that offer operating frequencies to 16 MHz, lower power consumption, and no restriction on minimum HC12 12 MHz clock frequency from dc to 16 MHz. HC16 16 MHz Features HL 10 10 MHz 44-pin PLCC o Minimum instruction execution time: 250 ns HL 12 12 MHz at 8 MHz, 200 ns at 10 MHz, 125 ns at 16 MHz HL16 16 MHz D Maximum addressable memory: 1 Mbyte o Abundant memory addressing modes HGC10 10 MHz 52-pin plastic QFP o 14 x 16-bit register set HGC12 12 MHz (P52GC-100-386) D 101 instructions HGC16 16 MHz o Instruction set is a superset of pPD8086/8088 instruction set D Bit, byte, word, and block operations Pin Configurations D Bit field operation instructions o Packed BCD instructions 40-Pin Plastic DIP o Multiplication/division instruction execution time: 2.4 to 7.1 ps at 8 MHz, 1.9 to 5.7 ps at 10 MHz IC Voo o High-speed block transfer instructions: A14 A15 A13 38 A16/PSO 1 Mbyte/s at 8 MHz, 1.25 Mbyte/s at 10 MHz o High-speed calculation of effective addresses: A12 A11 5 37 36 A17/PS1 A1S/PS2 2 clock cycles in any addressing mode 6 A10 35 A19/PS3 o Maskable (INT) and nonmaskable (NMI) A9 34 lBSO [HIGH] interrupt inputs As 33 S/LG o IEEE-796 bus compatible interface AD7 32 RD D 8080 emulation mode AD6 10 JlPD 31 HlDRQ [Aa/AKO] o CMOS technology AD5 11 70108 30 HlDAK [Aa/AK1] o Low power consumption AD4 12 29 WR [BUSlOCK] o Low-power standby mode AD3 13 28 IO/M [BS2] D Minimum-power Stop mode (H-SeJies) AD2 14 27 BUFR/W [BS1] AD1 15 26 BUFEN [BSo] D Single power supply; 5-V and 3-V specifications o Maximum operating frequencies: 8 to .16 MHz ADo NMI 16 17 25 24 ASTB[QSo] INTAK [QS1] INT 18 23 POll V20 is a registered trademark of NEC Corporation. ClK READY 19 22 GND 20 21 RESET 83-004104B pPD701 08 (V20) NEe Pin Configurations (cont) Pi n Identification Symbol Direction Function 44-Pln Plastic Leaded Chip Carrier (PLCC) IC· Internally connected A14 - As Out Address bus, middle bits AD? - ADo In/Out Address/data bus NMI In Nonmaskable interrupt input INT In Maskable interrupt input ClK In Clock input ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ GND Ground potential A18/PS2 40 28 A17IPS1 41 27 INTAK [OS1] RESET In Reset input A16/PSO 42 26 POll READY In Ready input A15 43 25 READY Voo 44 RESET POll In Poll input tiP 0 GND 1 0 70108 GND INTAK (QS1) Out Interrupt acknowledge IC 2 GND output (queue status bit 1 A14 21 ClK output) A13 INT ASTB (QSo) Out Address strobe output A12 NMI (queue status bit 0 output) A11 NC BUFEN (BSo) Out Buffer enable output (bus status bit 0 output) BUFR/W (BS1) Out Buffer read/write output (bus status bit 1 output) 83-0041028 10/M (BS2) Out Access is I/O 'or memory (bus status bit 2 output) 52-Pin Plastic QFP WR (BUS lOCK) Out Write strobe output (bus lock output) HlDAK (RQ/ AK1) Out Holdacknowledgeoutput, (In/Out) (bus hold request input! acknowledge output 1) HlDRQ (RQ/ AKa) In") Hold request input (bus hold (In/Out) request input! acknowledge output 0) A18/PS2 A17/PS1 o 38 ASTB [OSo] INTAK [OS1] RD Out Read strobe output S/lG In Small-scale/ large-scale A16/PSo 37 POll system input A15 36 READY lBSO (HIGH) Out latched bus status output 0 Voo 35 RESET (always high in large-scale Voo 34 GND systems) tlPD GND 33 GND 70108 GND 32 NC A19 /PS 3 - Out Address bus, high bits or IC 31 GND A16/ PS O processor status output A14 10 30 ClK A15 Out Address bus, bit 15 A13 11 29 INT VDD Power supply A12 12 28 NMI A11 13 27 NC Notes: * Ie should be connected to ground. Where pins have different functions in small- and large- scale systems, the large-scale system pin symbol and function are in parentheses. 83-0041038 Unused input pins should be tied to ground or VDD to minimize power dissipation and prevent the flow of poten- tially harmful currents. 2 NEe J.lPD701 08 (V20) Block Diagram Inlernal Address/Data Bus A16/PSo ~ A19/PS3 As-A15 Bus Buffer lBSO BUFEN [BSo], BUFFI/W[BS1] 101M [BS2] ASTB rOSol, INTAK [OS1] RD, WR [BUS LOCK] PS Status SS Control DSo S/LG READY RESET POLL HLDRO (FlQ/AKo] 00 HLDAK [RQ/AK1] NMI INT Bus LC PC L r- _ _S_ta_"_d_by_----I'- Control ClK Control Unit [BCUj AW BW Execution Unit CW Effective Address [EXUj Generator OW IX IY BP SP Microinstruction 29 Micro Data Bus Storage TC §: en :I III co co o ., Microsequence ., :I :I Control o Instruction Decoder PSW Sub Data Bus [16] Main Data Bus [16] 83-000072C 3 NEe Pin Functions accepted. A hold request will be accepted during INT Some pins of the pPD701 08 have different functions acknowledge. according to whether the microprocessor is used in a This interrupt causes the pPD701 08 to exit the standby small- or large-scale system. Other pins function the mode. same way in either tYPE3 of system. ClK [Clock] A15 - As [Address Bus] For small- and large-scale systems. For small- and large-scale systems. This pin is used for external clock input. The CPU uses these pins to output the middle 8 bits of RESET [Reset] the 20-bitaddress data. They are three-state outputs For small- and large-scale systems. and become high impedance during hold acknowledge. This pin is used for the CPU reset signal. It is an active AD7 - ADo [Address/Data B.us] high level. I nput of this signal has priority over all other For small- and large-scale systems. operations. After the reset signal input returns to a low . The CPU uses these pins as the time-multiplexed level, the CPU begins execution of the program starting address and data bus. When high, an AD bit is a one; at address FFFFOH. when low, an AD bit is a zero. This bus contains the In addition to causing normal CPU start, RESET input lower 8 bits of the 20-bit address during T1 of the bus will cause the pPD701 08 to exit the standby mode. cycle and is used as an 8-bit data bus during T2, T3, and T 4 of the bus cycle. READY [Ready] For small- and large-scale systems. Sixteen-bit data I/O is performed in two steps. The low byte is sent first, followed by the high byte. The ~d­ When the memory or I/O device being accessed dress/data bus is a three-state bus and can be at a high cannot complete data read or write within the CPU or low level during standby mode. The bus will be high basic access time, it can generate a CPU wait state impedance during hold and interrupt acknowledge. (Tw) by setting this signal to inactive (low level) and requesting a read/write cycle delay. NMI [Nonmaskable Interrupt] For small- and large-scale systems. If the READY signal is active (high level) during either the T3 or Tw state, the CPU will not generate a wait This pin is used to input nonmaskable interrupt state. READY is not synchronized internally. To requests. NMI cannot be masked by software. This guarantee correct operation external logic must ensure input is positive edge triggered and must be held high that setup and hold times relative to ClK are met. for five clocks to guarantee recognition. Actual inter- rupt processing begins, however, after completion of POLL [Poll] the instruction in progress. For small- and large-scale systems. The contents of interrupt vector 2 determine the The CPU checks this input upon execution of the POll starting address for the interrupt-servicing routine. 'instruction.lfthe input is low, then execution continues. Note that a hold request will be accepted even during If the input is high, the CPU will check the POll input NMI acknowledge. every five clock cycles until the input becomes low again. This interrupt will cause the pPD70108 to exit the standby mode. The POll and READY functions are used to syn- chronize CPU program execution with the operation of INT [Maskable Interrupt] external. devices. For small- and large-scale systems. RD [Read Strobe] This pin is an interrupt request tha,.t can be masked by For small- and large-scale systems. software. The CPU outputs this strobe signal d~ing data read INT is active high level and is sensed during the last from an I/O device or memory. The 10/M signal is used clock of the instruction. The interrupt will be accepted to select between I/O and memory. if the interrupt enable flag I E is set. The CPU outputs the INTAK signal to inform external devices that the The three-state output is held high during standby interrupt request has been granted. INT must be mode and enters the high-impedance state during hold asserted until the interrupt acknowledge is returned. acknowledge. If NMI and INT interrupts occur at the same time, NMI has higher priority than INT and INT cannot be 4 NEe pPD70108(V20) S/LG [Small/Large] 10/M's output is three state and becomes high For small- and large-scale systems. impedance during hold acknowledge. This signal determines the operation mode of the CPU. WR [Write Strobe] This signal is fixed at either a liigh or 10V,llIevei. When For small-scale systems. this signal is a high level, the CPU will operate in small- The CPU generates this strobe'signal during data write scale system mode, and when low, in the large-scale to an I/O device or memory. Selection of either I/O or system mode. A small-scale system will have at most memory is performed by the 10/M signal. . one bus master such as a DMA controller device on the bus. A large-scale system can have more than one bus This three-state output is held high during standby master accessing the bus as well as the CPU. mode and enters the high-impedance state during hold acknowledge. INTAK [Interrupt Acknowledge] For small-scale systems. HLDAK [Hold Acknowledge] For small-scale systems. The CPU generates the INTAK signal low when it accepts an INT signal. The HLDAK signal is ,used to indicate that the CPU accepts the hold request signal (HLDRQ). When this The interrupting device synchronizes with this signal and signal is a high level, the address bus, address/data outputs the interrupt vector to the CPU via the data bus bus, and the control lines become high impedance. (AD? - ADo). INTAK is a held at a high level in the standby mode. HLDRQ [Hold Request] For small-scale systems. ASTB [Address Strobe] For small-scale systems. This input signal is used by external devices to request the CPU to release the address bus, address/data bus, The CPU outputs this strobe signal to latch address and the control bus. information at an external latch. LBSO [Latched Bus Status 0] ASTB is held at a low level during standby mode and For small-scale systems. hold acknowledge: --- BUFEN. [Buffer Enable] The CPU uses this signal along with the 10/M and BUFR/W signals to inform an external device what the . For small-scale systems. cu rrent bus cycle is. This is used as the output enable signal for an external bidirectional buffer. The CPU generates this signal during 101M BUFR/W LBSO Bus Cycle data transfer operations with external memory or I/O devices or during input of an interrupt vector. 0 0 0 Program fetch 0 0 1 Memory read This three-state output is held high during standby mode and enters the high-impedance state during hold 0 0 Memory write acknowledge. 0 1 1 Passive state BUFR/W [Buffer Read/Write] 0 0 Interrupt acknowledge For small-scale systems. 0 I/O read The output of this signal determines the direction of 0 I/O write data transfer with an external bidirectional bl,lffer. A Halt high output causes transmission from the GPU to the external device; a low signal causes data transfer from the external device to the CPU. ' BUFR/W is a three-state output and becomes high impedance during hold acknowledge. IO/M [IO/Memory] For small-scale systems. The CPU generates this signal to specify either I/O access or memory access. A high-level output specifies I/O and a low-level signal specifies memory. 5 pPD70108 (V20) NEe A19/PS3- A16/PSO [Address Bus/Processor Status] The external bus controller decodes these signals and For small- and large-scale systems. generates the control signals required to perform access of the memory or I/O device. These pins are time multiplexed to operate as an address bus and as processor status signals. BS 2 BS I BSo Bus Cycle When used as the address bus, these pins are the high 4 0 0 0 Interrupt acknowledge bits of the 20-bit memory address. During 1/0 access, all 4 bits output data O. 0 0 1 1/0 read The processor status signals are provided for both 0 0 110 write memory and 1/0 use. PS3 is always 0 in the native mode 0 1 Halt and 1 in 8080 emulation mode. The interrupt enable 0 0 Program fetch flag (IE) is on pin PS2. Pins PS1 and PS o indicate which 1 Memory read 0 memory segment is being accessed. 0 Memory write A17 /PS I AI 6/PS O Segment Passive state 0 0 Data segment 1 The output of these signals is three state and becomes 0 1 Stack segment high impedance during hold acknowledge. These out- 0 Program segment puts are held at high level in the standby mode. Data segment 0 BUSLOCK [Bus Lock] For large-scale systems. The output of these pins is three state and becomes The CPU uses this signal to secure the bus while high impedance during hold acknowledge. executing the instruction immediately following the QS1, QSO [Queue Status] BUSLOCK prefix instruction, or during an interrupt For large-scale systems. acknowledge cycle. It is a status signal to the other bus The CPU uses these signals to allow external devices, masters in a multiprocessor system, inhibiting them such as the floating-point arithmetic processor chip, from using the system bus during this time. (pPD72091) to monitor the status of the internal CPU The output of this signal is three state and becomes instruction queue. high impedance during hold acknowledge. BUSLOCK is high during standby mode except if the HALT OSI OSo Instruction Oueue Status instruction has a BUSLOCK prefix, then it is held low. 0 0 NOP (queue does not change) RQ/AK1, RQ/AKo [Hold Request/Acknowledge] 0 1 First byte of instruction For large-scale systems. 0 Flush queue These pins function as bus hold request inputs (RQ) "Subsequent bytes of instruction and as bus hold acknowledge outputs (AK). RQ/AKo has a higher priority than RQ/AK1. The instruction queue status indicated by these signals These pins have three-state outputs with on-chip pull- is the status when the execution unit (EXU) accesses up resistors which keep the pin at a high level when the the instruction queue. The data output from these pins output is high impedance. is therefore valid only for one clock cycle immediately Voo [Power Supply] following queue access. These status signals are For small- and large-scale systems. provided so that the floating-point processor chip can monitor the CPU's program execution status and This pinis used for the +5 V power supply. synchronize its operation with the CPU when control is GN D [Ground] passed to it by the FPO (Floating Point Operation) For small- and large-scale systems. instructions. These outputs are held at a low level in the This pin is used for ground. standby mode. IC [Internally Connected] BS2 - BSo [Bus Status] This pin is used for tests performed at the factory by For large-scale systems. NEC. The pPD70108 is used with this pin at ground The CPU uses these status signals to allow an external potential. bus controller to mon itor what the cu rrent bus cycle is. 6 NEe pPD70108 (V20) Absolute Maximum Ratings Capacitance TA = +25°C TA = +25°C, Voo = 0 V Power supply voltage, Voo -0.5 V to +7.0 V limits Test Power dissipation, PDMAX 0.5W Parameter Symbol Min Max Unit Conditions Input voltage, VI -0.5 V to Voo + 0.3 V fc = 1 MHz Input capacitance C1 15 pF ClK input voltage, VK -0.5 V to Voo + 1.0 V Unmeasured pins 1/0 capacitance CIO 15 pF returned to 0 V Output voltage, Vo -0.5 V to Voo + 0.3 V Operating temperature at 5 MHz, TOPT Storage temperature, TSTG Comment: Exposing the device to stresses above those listed in Absolute Maximum Ratings could cause permanent damage. The device is not meant to be operated under conditions outside the limits described in the operational sections of this specification. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. DC Characteristics TA = -10°C to +70°C, Voo = +5 V ± 5% Limits Test Parameter Symbol Min Typ Max Unit Conditions Input voltage high VIH 2.2 Voo +0.3 V Input voltage low VIL -0.5 0.8 V ClK input voltage high VKH 3.9 VOO + 1.0 V ClK input voltage low VKL -0.5 0.6 V Output voltage high VOH 0.7 x Voo V IOH = -400 JlA Output voltage low VOL 0.4 V IOL =2.5 mA Input leakage current high IUH 10 JlA Input leakage current low IUL -10 JlA Output leakage current high ILOH 10 JlA Vo = Voo Output leakage current low ILOL -10 JlA Vo =OV 70108-8 45 80 rnA Normal operation Supply current 100 8 MHz 6 12 mA Standby mode 70108-10 60 100 mA Normal operation 10 MHz 7 14 mA Standby mode 7 pPD7 0·108. (V20) NEe AC Characteristics TA = -10°C to +70°C, Voo = +5 V ± 5% ttPD70108-8 ttPD70108-10 Parameter Symbol MIa. Max Min Max Unit Conditions Small/large Scale Clock cycle tCYK 125 500 100 500 ns Clock pulse width high tKKH 44 41 ns VKH =3.0 V Clock pulse width low tKKL 60 49 ns VKL = 1.5 V Clock rise time tKR 10 5 ns 1.5 V to 3.0 V Clock fall time tKF 10 5 ns 3.0 V to 1.5 V READY inactive setup to ClKl tSRYLK -8 --:-10 ns READY inactive hold after ClKt tHKRYH 20 20 ns READY active setup to ClKt tSRYHK tKKL - 8 tKKL -10 ns READY active hold after ClKt tHKRYL 20 20 ns Data setup time to ClK l tSDK 20 10 ns Data hold time after ClK l tHKD 10 10 ns NMI, INT, POLL setup time tSIK 15 15 ns to ClK t Input rise time (except ClK) tlR 20 20 ns 0.8 V to 2.2 V Input fall time (except ClK) tlF 12 12 ns 2.2 V to 0.8 V Output rise time tOR 20 ,20 ns 0.8 V to 2.2 V Output fall time tOF 12 12 ns 2.2 V to 0.8 V Small Scale Address delay time from ClK l tDKA 10 60 10 48 ns Address hold time from ClK l tHKA 10 10 ns PS delay time from ClK l tDKP 10 60 10 50 ns PS float delay time from ClK t tFKP 10 60 10 50 ns Address setup time to ASTB l tSAST tKKL - 30 tKKL - 30 ns Address float delay time from tFKA tHKA 60 tHKA 50 ns CL = 100 pF ClK l ASTB t delay time from ClK l tDKsni 50 40 ns ASTB l delay time from ClK t tDKSTL 55 45 ns ASTB width high tSTST tKKL - 10 tKKL -10 ns Address hold time from ASTB l tHSTA tKKH -10 tKKH -10 ns 8 N'EC JlPD701 08 (V20) AC Characteristics (cont) TA = -1Q°C to +70°C, Voo = +5 V ± 5% pPD70l08-8 pPD70l08-10 Parameter Symbol Min Max Min Max Unit Conditions Small Scale (conti Control delay time from ClK tOKCT 10 65 10 55 ns Address float to RD~ tAFRL 0 0 ns RD ~ delay time from ClK ~ tOKRL 10 80 10 70 ns RD t delay time from ClK ~ tOKRH 10 80 10 60 ns Address delay time from RD t tORHA tCYK - 40 tCYK - 35 ns RD width low tRR 2tCYK-50 2tCYK-40 ns CL = 100 pF Data output delay time from tOKO 10 60 10 50 ns ClK! Data float delay time from ClK! tFKO 10 60 10 50 ns Bl WR width low tww 2tCYK-40 2tCYK-35 ns HlDRQ setup time to ClK t tSHQK 20 20 ns HlDAK delay time from ClK ~ tOKHA 10 100 10 60 ns large Scale Address delay time from ClK ~ tOKA 10 60 10 48 ns Address hold time from ClK ~ tHKA 10 10 ns PS delay time from ClK ~ tOKP 10 60 10 50 ns PS float delay time from ClK t tFKP 10 60 10 50 ns Address float delay time from tFKA tHKA 60 tHKA 50 ns ClK ~ Address delay time from RD t tORHA tCYK - 40 tCYK -35 ns ASTB delay time from BS ~ tOBST 15 15 ns BS ~ delay time from ClK t tOKBL 10 60 10 50 ns BS t delay time from ClK ~ tOKBH 10 65 10 50 ns RD ~ delay time from address tOAFRL 0 0 ns CL = 100 pF float RD ! delay time from ClK ~ tOKRL 10 80 10 70 ns RD t delay time from ClK ! tOKRH 10 80 10 60 ns RD width low tRR 2tCYK-50 2tCYK-40 ns Date output delay time from tOKO 10 60 10 50 ns ClK ~ Data float delay time from tFKO 10 60 10 50 ns ClK! AK delay time from ClK ~ tOKAK 50 40 ns RQ setup time to ClK t tSRQK 10 9 ns RQ hold time from ClK t tHKRQ 0 0 ns RQ hold time from ClK t tHKRQ2 30 20 ns Q pPD70108 (V20) NEe Timing Waveforms AC Test Input Waveform [Except ClK] Clock Timing 2.2V 2.2V ~::~ =x> O.8V Test Points Test Points E 49·000241A 49·000242A Read Timing [Large Scale) Write Timing [Large Scale) elK elK Alg/PS3 _ ...,.---"",-,,...--~ Ir-::.:;:.~f---+l_-+~ A,g/PS3- --~'~-~'r-------~~~,r_ A16I' PSo A,slPSo LBSo LBSo AD7- ADo AD7-ADo ASTB ASTB (71088 (71088 Output) Output) JI \~____Bu_s_S_ta_tu_s___ as, - aso _ _...1-.'----_----1 '---_ _.I ' -_ _---1 '---_-----"l.I ,_ A,s-Ae~ - - - " " - - - - - - - _........ >E 49-000244A A,s-Ae ___ J~------------------------~~ 49-000243A 11 pPD70108 (V20) NEe Timing Waveforms (cont) Interrupt Acknowledge Timing ClK ASTB BUFR/W 101M tOKA BUSlOCK* ~ltFKA A'5-AB~~------------------------------------------------------------ * : Large Scale Mode Only Hold Request/Acknowledge Timing [Small'Scale] lor2 ClK HlDRQ HlDAK * : A,/PS 3 - A,",PS., A15 - AB, AD7 - AD., RD, lBS., 101M, BUFR/W, WR BUFEN 12 NEe JiPD701 08 (V20) Timing Waveforms (cont) ClK RQ/AK Pulse 1 RQ Pulse 2 Ai( Pulse 3 RQ 70108 Input 70108 Jut ut 70108 Input ---------------------------------------~~----------:I_:_.__ ~----~~--------------- 70108 t : h :: t_FK_A__ U Coprocessor • A1 g/PS3 -A1 6/PSo, AD1 s-ADo, B~ -BSc!, RD, BUS LOCK 83IH-5510B 13 JlPD70108 (V20) NEe Register Configuration Al: Byte multiplication/division, byte I/O, BCD Program Counter [PC] rotation, data conversion, translation The program counter is a 16-bit binary counter that AH: Byte multiplication/division contains the segment offset address of the next BW: Translation instruction which the EXU is to execute. CW: loop control branch, repeat prefix The PC increments each time the microprogram fetches Cl: Shift instructions, rototation instructions, an instruction from the instruction queue. A new BCD operations location value is loaded into the PC each time a branch, call, return, or break instruction is executed. At this DW: Word multiplication/division, indirect time, the contents of the PC are the same as the addressing I/O Prefetch Pointer (PFP). Pointers [SP, BP] and Index Registers [IX, IV] Prefetch Pointer [PFP] These registers serve as base pOinters or index registers The prefetch pOinter (PFP) is a 16-bit binary counter when accessing the memory using based addressing, which contains a segment offset which is used to indexed addressing, or based indexed addressing. calculate a program memory address that the bus These registers can also be used for data transfer and control unit (BCU) uses to prefetch the next byte for arithmetic and logical operations in the same manner the instruction queue. The contents of PFP are an as the general-purpose registers. They cannot be used offset from the PS (Program Segment) register. as 8-bit registers. The PFP is incremented each time the BCU prefetches Also, each of these registers acts as a default register an instruction from the program memory. A new for specific operations. The default assignments are: location will be loaded into the PFP whenever a branch, SP: Stack operations call, return, or break instruction is executed. At that time the contents of the PFP will be the same as those IX: Block transfer (source), BCD string operations of the PC (Program Counter). IY: Block transfer (destination), BCD string operations Segment Registers [PS, SS, OSo, and OS1] Program Status Word [PSW] The memory add resses accessed by the pPD701 08 are The program status word consists of the following six divided into 64K-byte logical segments. The starting (base) address of each segment is specified by a 16-bit status and four control flags. segment register, and the offset from this starting Status Flags Control Flags address is specified by the contents of another register • V (Overflow) • MD (Mode) or by the effective address. • S (Sign) • DIR (Direction) These are the four types of segment registers used. • Z (Zero) • IE (Interrupt Enable) • AC (Auxiliary Carry) • BRK (Break) Segment Register Default Offset • P (Parity) PS (Program Segment) PFP • CY (Carry) When the PSW is pushed on the stack, the word images SS (Stack Segment) SP, effective address of the various flags are as shown here. DSo (Data Segment 0) IX, effective address PSW DS1 (Data Segment 1) IY 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 General-Purpose Registers [AW, BW, CW, and OW] M D IBSZOAOP V C There are four 16-bit general-purpose registers. Each DIE R C Y one can be used as one 16-bit register or as two 8-bit R K registers by dividing them into their high and low bytes The status flags are set and reset depending upon the (AH, Al, BH, Bl, CH, Cl, DH, Dl). result of each type of instruction executed. Each register is also used as a default register for I nstructions are provided to set, reset, and complement processing specific instructions. The default assign- the CY flag directly. ments are: Other instructions set and reset the control flags and AW: Word multiplication/division, word I/O, data control the operation of the CPU. conversion, translation, BCD rotation. The MD flag can be set/reset only by the BRKEM, RETEM, CAllN, and RETI instructions. 1.1 NEe pPD70108 (V20) High·Speed Execution of Instructions Example Th is section high lights the major arch itectural features ADD AW,BW ;AW-AW+BW that en hance the performance of the pPD701 OB. Single Bus Dual Bus • Dual data bus in EXU Step 1 TA-AW TA -AW, TB - BW • Effective address generator Step2TB - BW AW-TA+TB • 16/32-bit temporary registers/shifters (TA, TB) • 16-bit loop counter Step 3 AW - TA + TB • PC and PFP Effective Address Generator Dual Data Bus Method The Effective Address Generator (EAG) (figure 2) is a To reduce the number of processing steps for in- dedicated block of high-speed logic that computes struction execution, the dual data bus method has effective addresses in two clock cycles. If an instruction been adopted for the pPD7010B (figure 1). The two uses memory, EAG decodes the second and/or third data buses (the main data bus and the subdata bus) are instruction bytes to determine the addressing mode, both 16 bits wide. For addition/subtraction and logical initiates any bus cycles needed to fetch data required 1:'-1 and comparison operations, processing time has been to compute the effective address, and stores the I:iiI reduced by some 30% over single-bus systems. computed effective address in the Data Pointer (DP) register. Figure 1. Dual Data Buses Calculating an effective address by the microprogram- ming method normally requires 5 to 12 clock cycles. This circuit requires only two clock cycles for addresses to be generated for any addressing mode. Thus, processing is several times faster. Figure 2. Effective Address Generator Registers 2nd or 3rd byta of Instruction mod rIm EA Ganarator 16 16 Effective Address 83IH·5535A 16/32-Bit Temporary Registers/Shifters [TA, TBl These 16-bit temporary registers/shifters (TA, TB) are provided for multiplication/division and shift! rotation instructions. These circuits have decreased the execution time of multiplication/division instructions. In fact, these instructions can be executed about four times faster than with the microprogramming method. Subdata bus Main data bus TA + TB: 32-bit temporary register/shifter for multi- 83-000103A plication and division instructions. TB: 16-bit temporary register/shifter for shift/rotation instructions. 15 pPD70108 (V20) NEe Loop Counter [LC] Enhanced· Stack Operation Instructions This counter is used to count the number of loops for a PUSH imm primitive block transfer instruction controlled by a This instruction allows immediate data to be pushed repeat prefix instruction and the number of shifts that onto the stack. will be performed for a multiple bit shift/rotation in- struction. PUSH R/POP R The processing performed for a multiple bit rotation of These instructions allow the contents of the eight a register is shown below. The average speed is general registers to be pushed onto or popped from approximately doubled overthe microprogram method. the stack with a single instruction. Example Enhanced Multiplication Instructions RORC AW, CL ; CL = 5 MUL reg16,imm16/MUL mem16, imm16. Microprogram method LC method These instructions allow the contents of a register or memory location to be 16-bit multiplied by immediate 8 + (4 x 5) = 28 clocks 7 + 5 = 12 clocks data. Program Counter and Prefetch Pointer [PC and PFP] Enhanced Shift and Rotate Instructions ThepPD70108 microprocessor has a program counter, SHL reg, immS/SHR reg, immS/SHRA reg, immS (PC) which addresses the program memory location of the instruction to be executed next, and a prefetch These instructions allow the contents of a register tobe. pointer(PFP), which addresses the program memory shifted bythe number of bits defined by the immediate location to be accessed next. Both functions are data. provided in hardware. A time saving of several clocks ROL reg, immS/ROR reg, immS/ROLC reg, immSI is realized for branch, call, return, and break instruction RORC reg, immS execution, compared with microprocessors that have These instructions allow the contents of a register to be only one instruction pointer. rotated by the number of bits defined by the immediate Enhanced Instructions data. I n addition to the pPD8088/86 instructions, the Check Array Boundary Instruction pPD70108 has the following enhanced instructions. CHKINO reg16, mem32 This instruction is used to verify that index values Instruction Function pointing to the elements of an array data structure are PUSH imm Pushes immediate data onto stack within the defined range. The lower limit of the array PUSH R Pushes B general registers onto stack should be in memory location mem32, the upper limit POP R Pops B general registers from stack in mem32 + 2. Ifthe index value in reg16 is not between these limits when CHKIND is executed, a BRK 5 will MUL imm Executes 16-bit multiply of register or memory contents. by immediate data occur. This causes a jump to the location in interrupt vector 5. SHL immB Shifts/rotates register or memory by immediate SHR immB value Block 1/0 Instructions SHRA immB OUTM OW, src-block/lNM dst-block, OW ROL immB ROR immB These instructions are used to output or input a string ROLC immB to or from memory, when preceded by a repeat prefix. RORC immB Stack Frame Instructions CHKIND Checks array index against designated boundaries PREPARE imm16, immS INM Moves a string from an I/O port to memory OUTM Moves a string from memory to an I/O port This instruction is used to generate the stack frames required by block-structured languages, such as PREPARE Allocates an area for a stack frame and copies previous PASCAL and Ada. The stack frame consists of two frame pointers areas. One area has a pointer that points to another DISPOSE Frees the current stack frame on a procedure exit frame which has variables that the current frame can access. The other is a local variable area for the current procedure. 16 NEe J.lPD70108 (V20) DISPOSE Variable Length Bit Field Operation Instructions This instruction releases the last stack frame generated This category has two instructions: INS (Insert Bit by the PREPARE instruction. It returns the stack and Field) and EXT (Extract Bit Field). These instructions base pointers to the values they had -before the are highly effective for computer graphics and high- PREPARE instruction was used to call a procedure. level languages. They can, for example, be used for Unique Instructions data structures such as packed arrays and record type data used in PASCAL. In addition to the pPD8088/86 instructions and the enhanced instructions, the pP0701 08 has the following INS regS, regS/INS regS, imm4 unique instructions. This instruction (figure 3) transfers low bits from the 16-bit AW register (the number of bits is specified by Instruction Function the second operand) to the memory location specified INS Insert bit field by the segment base (OS1 register) plus the byte offset (IY register). The starting bit position within this byte is EXT Extractbit field specified as an offset by the lower 4-bits of the first 1:"-11 ADD4S Adds packed decimal strings operand. ~ SUB4S Subtracts one packed decimal string from another After each complete data transfer, the IY register and CMP4S Compares two packed decimal strings the register specified by the first operand are auto- ROL4 Rotates one BCD digit left through AL lower 4 bits matically updated to point to the next bit field. ROR4 Rotates one BCD digit right through AL lower 4 bits Either immediate data or a register may specify the number of bits transferred (second operand). Because TEST1 Tests a specified bit and sets/resets Z flag the maximum transferable bit length is 16-bits, only the NOT1 Inverts a specified bit lower 4-bits of the specified register (OOH to OFH) will CLR1 Clears a specified bit be valid. SET1 Sets a specified bit Bit field data may overlap the byte bou ndary of memory. REPC Repeats next instruction until CY flag is cleared REPNC Repeats next instruction until CY flag is set FP02 Additional floating point processor call Figure 3. Bit Field Insertion Bit length 15 AW Byte offsel (IY) ~ I : I Memory Byte boundary t Segment base (051) 83-00010SA 17 pPD70108(V20) NEe EXT reg8, regS/EXT regS, imm4 ADD4S This instruction (figure 4) loads to the AW register the This instruction adds the packed BCD string addressed bit field data whose bit length is specified by the by the IX index register to the packed BCD string second operand of the instruction from the memory addressed by the IY index register, and stores the location that is specified by the DSO segment register result in the string addressed by the IY register. The (segment base), the IX index register (byte offset), and length of the string (number of BCD digits) is specified the lower 4-bits of the first operand (bit offset). by the CL register, and the result of the operation will After the transfer is complete, the IX register and the affectthe overflow flag (V), the carry flag (CY), and lower 4-bits of the, first operand are automatically zero flag (2:). updated to point to the next bit field. BCD string (IY, CL) - BCD string (IY, CL) + BCD Either immediate data or'a register may be specified for string (IX, CL) the second operand. Because the maximum trans." SUB4S ferrable bit length is 16 bits, however, only the lower This instruction subtracts the packed BCD string 4-bitsofthe specified register (OH to OFH) will bevalid. addressed by the IX index register from the packed Bit field data may overlap the byte boundary of memory. BCD string addressed by the IY register, and stores the Packed BCD Operation Instructions result in the string addressed by the IY register. The length of the string (number of BCD digits) is specified The instructions described here process packed BCD by the CL register,and the result of the operation will data either as strings (ADD4S, SUB4S, CMP4S) or affect the overflow flag (V), the carry flag (CY), and byte-format operands (ROR4, ROL4). Packed BCD zero flag (Z). strings may be from 1 to 254 digits in length. BCD string (IY, CL) - BCD string (IY, CL) - BCD When the number of digits is even, the zero and carry String (IX, CL) flags will be set according to the result of the operation. When the number of digits is odd, the zero and carry CMP4S flags may not be set correctly in this case, (CL = odd), This instruction performs the same operation as the zero flag will not be set unless the upper4 bits of the SU B4S except that the resu It is not stored and on Iy the highest byte are all zero. The carry flag will not be set overflow (V), carry flags (CY) and zero flag (Z) are unless there is a carry out of the upper 4 bits of the affected. highest byte. When CL is odd, the contents of the upper BCD string (IY, CL) - BCD string (IX, CL) 4 bits of the highest byte of the result are undefined. Figure 4. Bit Field Extraction t ) Segment base (050) 83-0001078 18 N"EC JlPD70108 (V20) ROL4 REPNC This instruction (figure 5) treats the byte data of the This instruction causes the pPD70108 to repeat the register or memory directly specified by the instruction following primitive block transfer instruction until the byte as BCD data and uses the lower 4-bits of the AL CYflag becomes set or the CW register is decremented register (ALL) to rotate that data one BCD digit to the to zero. left. Floating Point Instruction Figure 5. BCD Rotate Left (ROL4) FP02 This instruction is in addition to the pPD8088/86 floating point instruction, FP01. These instructions are covered in a later section. Mode Operation Instructions The pPD70108 has two operating modes (figure 7). One is the native mode which executes pPD8088/86, ROR4 enhanced and unique instructions. The other is the 8080 emulation mode in which the instruction set of the This instruction (figure 6) treats the byte data of the pPD8080AF is emulated. A mode flag (MD) is provided register or memory directly specified by the instruction to select between these two modes. Native mode is byte as BCD data and uses the lower 4-bits of the AL selected when M D is 1 and emu lation mode when M D is register (ALL) to rotate that data one BCD digit to the O. MD is set and reset, directly and indirectly, by right. executing the mode manipulation instructions. Figure 6. BCD Rotate Right (ROR4) Two instructions are provided to switch operation from the native mode to the emulation mode and back: BRKEM (Break for Emulation), and RETEM (Return from Emulation). Two instructions are used to switch from the emulation mode to the native mode and back: CALLN (Call Native Routine), and RETI (Return from Interrupt). Bit Manipulation Instructions The system will return from the 8080 emulation mode to the native mode when the RESET signal is present, TEST1 or when an external interrupt (NMI or INT) is present. This instruction tests a specific bit in a register or memory location. If the bit is 1, the Z flag is reset to O. If Figure 7. V20 Modes the bit is 0, the Z flag is set to 1. HOLD REO/HOLD ACK NOT1 This instruction inverts a specific bit in a register or memory location. CLR1 This instruction clears a specific bit in a register or memory location. SET1 This instruction sets a specific bit in a register or memory location. t ~ ~ndbY Mode Repeat Prefix Instructions ! J - - - - HOLD REO/HOLD ACK REPC This instruction causes the pPD701 08 to repeat the 83-000775A following primitive block transfer instruction until the CY flag becomes cleared or the CW register becomes zero. 19 pPD70108(V20) NEe BRKEM immB RETEM [no operand] This is the basic instruction used to start the BOBO When RETEM is executed in B080 emulation mode emulation mode. This instruction operates exactly the (interpreted by the CPU as a pPOBOBOAF instruction), same as the BRK instruction, except that BRKEM the CPU restores PS, PC, and PSW (as it would when resets the mode flag (MO) to O. PSW, PS, and PC are returning from an interrupt processing routine), and saved to the stack. M 0 is then reset and the interru pt vector returns to the native mode. At the same time, the specified by the operand immB of this command is contents of the mode flag (MO) which was saved to the loaded into PS and PC. stack by the BRKEM instruction, is restored to MO = 1. The instruction codes of the interrupt processing The CPU is set to the native mode. routine jumped to are then fetched. Then the CPU CALLN immB executes these codes as pPOBOBOAF instructions. This instruction makes it possible to call the native In BOBO emulation mode, registers and flags of the mode subroutines from the 80BO emulation mode. To pPOB080AF are performed by the following registers return from subroutine to the emulation mode, the and flags of the pP0701 OB. RETI instruction is used. The processing performed when this instruction is I1P08080AF I1P070108 executed in the BOBO emulation mode (it is interpreted Registers: A AL by the CPU as pPOBOBOAF instruction), is similar to B CH that performed when a BRK instruction is executed in the native mode. The immB operand specifies an interrupt C CL vector type. The contents of PS, PC, and PSW are 0 DH pushed on the stack and an MO flag value of 0 is saved. E DL The mode flag is set to 1 and the interrupt vector H BH specified by the operand is loaded into PS and PC. BL RETI [no operand] SP BP This is a general-purpose instruction used to return from interrupt routines entered by the BRK instruction PC PC or by an external interrupt in the native mode. When Flags: C CY this instruction is executed at the end of a subroutine Z Z entered by the execution of the CALLN instruction,_ the S S operation that restores PS, PC, and PSW is exactly the same as the native mode execution. When PSW is P restored, however, the BOBO emulation mode value of AC AC the mode flag (MO) is restored, the CPU is set in emulation mode, and all subsequent instructions are In the native mode, SP is used forthe stack pointer. In the interpreted and executed as pPOBOBOAF instructions. BOBO emulation mode this function is performed by BP. RETI is also used to return from an interrupt procedure This use of independent stack pointers allows indepen- initiated by an NMI or INT interrupt in the emulation dent stack areas to be secured for each mode and mode. keeps the stack of one of the modes from being destroyed by an erroneous stack operation in the other Floating Point Operation Chip mode. Instructions The SP, IX, IY and AH registers and the four segment FP01 fp-op, mem/FP02 fp-op, mem registers (PS, SS, OSo, and OS1) used in the native These instructions are used for the external floating mode are not affected by operations in BOBO emulation point processor. The floating point operation is passed mode. to the floating point processor when the CPU fetches In the 80BO emulation mode, the segment register for one of these instructions. From this point the CPU instructions is determined by the PS register (set performs only the necessary auxiliary processing automatically by the interrupt vector) and the segment (effective address calculation, generation of physical register for data is the OSo register (set by the addresses, and start-up of the memory read cycle). programmer immediately before the BOBO emulation mode is entered). It is prohibited to nest BRKEM instructions. 20 NEe pPD70108 (V20) The floating point processor always monitors the The interrupt vector table is shown in figure B. The instructions fetched by the CPU. When it interprets one table uses 1K bytes of memory addressesOOOH to as an instruction to itself, it performs the appropriate 3FFH and can store starting address data for a processing. At this time, the floating point processor maximum of 256 vectors (4 bytes per vector). chip uses either the address alone or both theaddress The corresponding interrupt sources for. vectors 0 and read data of the memory read cycle executed by the to 5 are predetermined and vectors 6 to 31 are reserved. CPU. This difference in the data used depends on These vectors consequently cannot be used for which of these instructions is executed. general applications. Note: During the memory read cycle initiated by the CPU for FP01 The BRKEM instruction and CALLN instruction (in the or FP02 execution, the CPU does not accept any read data on the data bus from memory. Although the CPU generates emulation mode) and the INT input are available for the memory address, the data is used by the floating pOint general applications for vectors 32 to 255. processor. A single interrupt vector is made up of 4 bytes (figure 9). Interrupt Operation The 2 bytes in the low addresses of memory are The interrupts used in the pPD7010B can be divided loaded into PC as the offset, and the high 2 bytes are into two types: interrupts generated by external inter- loaded into PS as the base address. The bytes are rupt requests and interrupts generated by software combined in reverse order. The lower-order bytes in processing. These are the classifications. the vector become the most significant bytes in the PC and PS, and the higher-order bytes become the least External Interrupts significant bytes. (a) NMI input (nonmaskable) (b) INT input (maskable) Figure 8. Interrupt Vector Table Software Processing OOOH As the result of instruction execution Vector 0 Divide Error 004H - When a divide error occurs during execution Vector 1 Break Flag of the DIV or DIVU instruction OOSH Vector 2 NMllnput - When a memory-boundary-over error is detected OOCH Dedicated by the CHKIND instruction Vector 3 BRK 3 Instruction 010H Conditional break instruction Vector 4 BRKV Instruction - When V = 1 during execution of the BRKV 014H VectorS CHKIND Instruction instruction 01SH }-".~. Vector 6 Unconditional break instructions - 1-byte break instruction: BRK3 07CH - 2-byte break instruction: BRK immB Vector 31 OSOH Flag processing (Single-step) Vector 32 General Use - When stack operations are used to set the • BRK ImmS Instruction BRK flag • BRKEM Instruction 3FCH } • INT Input IExternal] BOBO Emulation mode instructions Vector 255 • CALLN Instruction - BRKEM immB 83-000111A - CALLN immB Interrupt Vectors Figure 9. Interrupt Vector 0 Starting add~esses for interrupt processing routines are either determined automatically by a single location Vector 0 of the interrupt vector table or selected each time OOOH : I 001H interrupt processing is entered. 002H 003H PS <--- (OO3H, 002H) PC <--- (OO1H, OOOH) 83-000112A J,lPD70108(V20) NEe Based on this format, the contents of each vector For con,ditional control transfer or branch instructions, should be initialized at the beginning of the program. the number on the left side of the slash is applicable if The basic steps to jump to an interrupt processing thetransfer or.,branch takes. place. The number on the routine are now shown. right side is applicable if it does not take place. (SP -1, SP - 2) - PSW If a range of numbers is given, the execution time (SP - 3, SP - 4) - PS depends on the operands involved. (SP - 5, SP - 6) - PC SP +- SP - 6 Symbols IE - 0, BRK - 0, MD - 0 Symbol Meaning PS +- vector high bytes acc Accumulator (AW or AL) PC +- vector low bytes disp Displacement (8 or 16 bits) Standby Function dmem Direct memory address The pPD70116 has a standby mode to reduce power dst Destination operand or address consumption during program wait states. This mode is ext-disp8 16-bit displacement (sign-extension byte set by the HALT instruction in both the native and the + 8-bit displacement) emulation mode. far_label Label within a different program In the standby mode, the internal clock is supplied only segment to those circuits related to functions required to Procedure within a different program release this mode and bus hold control functions. As a segment result, power consumption can be reduced to 1/10 the Floating point instruction operation level of normal operation in either native or emulation mode. imm 8- or 16-bit immediate operand The standby mode is released by inputting a RESET imm3/4 3- or 4-bit immediate bit offset signal or an external interrupt (NMI, INT). imm8 8-bit immediate operand The bus hold function is effective during standby imm16 16-bit immediate operand mode. The CPU returns to standby mode when the bus mem Memory field (000 to 111); hold request is removed. 8- or 16-bit memory location During standby mode, all control outputs are disabled mem8 8-bit memory location and the addresldata bus will be at either high or low mem16 16-bit memory location levels. mem32 32-bit memory location Instruction Set memptr16 Word containing the destination address Symbols within the current segment Preceding the instruction set, several tables explain memptr32 Double word containing a destination address in another segment symbols, abbreviations, and codes. mod Mode field (00 to 10) Clocks Label withinthe current segment In the Clocks column of the instruction set, the numbers Procedure within the current segment cover these operations: instruction decoding, effective offset Immediate offset data (16 bits) address calculation, operand fetch, and instruction Number of bytes to discard from the stack execution. reg Register field (000 to 111); Clock timings assume the instruction has been pre- 8- or 16-bit general-purpose register fetched and is present in the four-byte instruction reg8 8-bit general-purpose register queue. Otherwise, .add four clocks for each byte not present. reg16 16-bit general-purpose register regptr 16-bit register containing a destination For instructions that reference memory operands, the address within the current segment number on the left side of the slash (I) is for byte operands and the number on the right side is for word regptr16 Register containing a destination address within the current segment operands. seg Immediate segment data (16 bits) shorUabel Label between -128 and +127 bytes from the end of the current instruction 22 NEe pPD70108 (V20) Symbols (cant) Symbol Meaning Symbol Meaning sr Segment register IY Index register (destination) (16 bits) src Source operand or address MD Mode flag temp Temporary register (8/16/32 bits) OR V Logical sum tmpcy Temporary carry flag (1 bit) P Parity flag AC Auxiliary carry flag PC Program counter (16 bits) AH Accumulator (high byte) PS Program segment register (16 bits) AL Accumulator (low byte) PSW Program status word (16 bits) ANDA Logical product R Register set AW Accumulator (16 bits) S Sign extend operand field S=O No sign extension Em BH BW register (high byte) S=1 Sign extend immediate byfu BL BW register (low byte) operand BP Base pointer (16 bits) S Sign flag BRK Break flag SP Stack pointer (16 bits) BW BW register (16 bits) SS Stack segment register (16 bits) CH CW register (high byte) TA Temporary register A (16 bits) CL CW register (low byte) TB Temporary register B (16 bits) CW CW register (16 bits) TC Temporary register C (16 bits) CY Carry flag V Overflow flag DH DW register (high byte) W Word/byte field (0 to 1) DIR Direction flag X, XXX, YYY, ZZZ Data to identify the instruction code of the external floating pOint arithmetic chip DL DW register (low byte) XOR ..If Exclusive logical sum DSO Data segment 0 register (16 bits) XXH Two-digit hexadecimal value DS1 Data segment 1 register (16 bits) XXXXH Four-digit hexadecimal value DW DW register (16 bits) Z Zero flag IE Interrupt enable flag () Values in parentheses are memory contents IX Index register (source) (16 bits) Transfer direction + Addition Subtraction x Multiplication Division % Modulo pPD70108 (V20) NEe Flag Operations Register Selection (mod = 11) Symbol Meaning reg W=O W=l . (blank) No change 000 AL AW o Cleared to 0 001 CL CW Set to 1 010 DL DW x Set or cleared according to result 011 BL BW Undefined 100 AH SP R Restored to previous state 101 CH BP 110 DH IX Memory Addressing Modes 111 BH IY mem mod = 00 mod = 01 mod = 10 000 BW+IX BW + IX + disp8 BW + IX + disp16 Segment Register Selection 001 BW+IY BW + IY + disp8 BW + IY + disp16 sr Segment Register 010 BP + IX BP + IX + disp8 BP + IX + disp16 00 DS1 011 BP+ IY BP +IY'+ disp8 BP + IY + disp16 01 PS 100 IX IX + disp8 IX + disp16 10 SS 101 IY IY + disp8 IY + disp16 11 DSO 110 Direct' BP + disp8 BP + disp16 111 BW BW + disp8 BW + disp16 t'lA NEe pPD70108 (V,20) Instruction Set Opcode Flags Mnemonic Operand 6 5 4 3 0 7 6 543 2 1 0 Clocks Bytes AC CY V P S Z Data Transfer Instructions MOV reg, reg 0 0 0 0 1 W reg reg 2 mem, reg 0 0 0 W mod reg mem 9/13 2-4 reg, mem 0 0 1 0 W mod reg mem 11/15 2-4 mem, imm 1 0 0 0 W mod 000 mem 11/15 3-6 reg, imm 0 1 W reg 4 2-3 ace, dmem 0 0 0 oW 10/14 3 dmem, ace 1 0 0 W 9/13 3 sr, reg16 0 0 0 1 1 0 sr reg 2 2 sr, mem16 reg16, sr mem16, sr 1 0 0 0 0 0 0 0 1 0 0 0 0 0 mod 0 , sr 1 1 0 mod 0 sr sr mem reg mem 11/15 2 10/14 2-4 2 2-4 I!I OSO, reg16, mem32 0 0 0 ,1 0 mod reg mem 18/26 2-4 OS1, reg16, mem32 1 0 0 0 0 0 mod reg mem 18/26 2-4 AH, PSW 0 0 1 2 1 PSW, AH 0 0 1 ,1 0 3 x x x x x LOEA reg16, mem16 0 0 0 0 mod reg mem 4 2-4 TRANS srctable 0 9 XCH reg, reg 0 0 0 0 W 1 1 reg reg 3 2 mem, reg 0 0 0 0 W mod reg mem 16/24 2-4 AW, reg16 0 0 0 reg 2 Repeat Prefixes REPC 0 0 0 0 1 2 REPNC 0 0 0 1 0 0 2 REP 0 0 2 REPE REPZ REPNE 1 1 1 1 o 01 0 2 REPNZ Block Transfer Instructions MOVBK dst, src 0 0 0 0 W 11 +Bn CMPBK dst, src 0 0 0 W 7 + 14n x x x x x x CMPM dst 0 0 W, 7 + 10n x x x x x x LOM src 0 0 1 0 W 7 +9n STM dst 0 0 0 W 7 +4n n = number of transfers 110 Instructions IN ace, imm8 0 0 W 9/13 2 ace, OW 0 1 0 W 8/12 OUT immB, ace 0 0 W 8/12 OW, ace 1 0 1 W 8/12 INM dst, OW 0 0 W 9+8n OUTM OW, src 0 0 W 9 +Bn n = number of transfers 25 pPD70108 (V20) NEe Instruction Set (cont) Opcode Flags Mnemonic Operand 6 5 4 ~ 2 076543210 Clocks Bytes AC CY V P S Z BCD Instructions ADJBA 0'0 1 0 3 xxuuuu ADJ4A o0 0 0 3 '1 x 'x u x x x ADJBS o0 7 1 xxuuuu ADJ4S o0 1 0 7 x x u x x x ADD4S o 000 o0 000 0 0 7 + 19n 2 uxuuux SUB4S 000 0 o0 000 o 7 + 19n uxuuux CMP4S o0 0 0 o0 o0 1 0 7 + 19n 2 uxuuux ROL4 reg8 o0 0 0 1 o0 o 000 25 3 1 1 0 0 0 reg mem8 00001111 o0 o 000 28 3-5 mod 0 0 0 mem ROR4 reg8 000011110000029 3 1 1 0 0 0 reg mem8 0000111100 0 0 033 3-5 mod 0 0 0 mem n = number of BCD digits divided by 2 Data Type Conversion Instructions CVTBD 1 o o o o0 0 0 o o 15 2 uuuxxx CVTDB 1 0 o 1 0 o0 0 0 o o 7 2 uuuxxx CVTBW o0 1 0 0 2 CVTWL o0 o0 4-5 Arithmetic Instructions ADD reg, reg 0 0 0 0 0 0 1 W 1 1 reg reg 2 2 x x x x x x --------~------------------------------------------------------------------ mem, reg o0 0 0 0 0 0W mod reg mem 16/24 2-4 x x x x x x reg, mem 0000001W mod reg mem 11/15 2-4 x x x x x x reg, imm o0 0 0 0 SW 1 1 0 0 0 reg 4 3-4 x x x x x x mem, imm 000 0 0 S W mod 0 0 '0 mem 18/26 3-6 x x x x x x ace, imm 0000010W 4 2-3 x x x x x x AD DC reg, reg o0 0 0 0 1 W 1 1 reg reg 2 2 x x x x x x mem, reg o0 0 0 0 0 W mod reg mem 16/24 2-4 x x x x x x reg, mem 0001001W mod reg mem 11/15 2-4 x x -x x x x reg, imm o 0 0 0 0 SW 1 1 0 1 0 reg 4 3-4 x x x x x x mem, imm 1 0 0 0 0 0 S W mod 0 1 0 mem 18/26 3-6 x x x x x x ace, imm 0001010W 4 2-3 x x x x x x SUB reg, reg o0 0 0 1 W 1 1 reg reg 2 2 x x x x x x mem, reg o0 0 0 0 W mod reg rnem 16/24 2-4 x x x x x x reg, mem 0010101W mod reg mem 11/15 2-4 x x x x x x reg, imm OOOOOSW 1 1 1 0 1 reg 4 3-4 x x x x x x 26 NEe pPD70108 (V20) Instruction Set (cont) Opcode Flags Mnemonic Operand 543 o 7 5 4 3 2 1 0 Clocks Byles AC CY V P S Z Arithmetic Instructions (cont) SUB mem, imm 0 0 0 0 S W mod 0 mem 18/26 3-6 x x x x x x --~--------------------------------------------------------------------------- ace, imm 0 1 0 0 W 4 2-3 x x x x x x SUBC reg, reg o0 0 1 W 1 1 reg reg 2 2 x x x x x x mem; reg o0 0 0 W mod reg mem 16/24 2-4 x x x x x x reg, mem 0 1 1 W mod reg mem 11/15 2-4 x x x x x x reg, imm 0 0 0 0 S W 1 1 0 reg 4 3-4 x x x x x x mem, imm 0 0 0 0 S W mod mem 18/26 3-6 x x x x x x ace, imm 0 0 W 4 2-3 x x x x x x ~ INC _r_e_g8___________________1__1__~______0____ 1__ 1__ 0__ 0__ 0___r_eg____2 ______x ______2 x__x__x__x__ ~ _____ mem 1 1 1 W mod 0 0 0 mem 16/24 2-4 x x x x x reg16 0 0 0 0 reg 2 x x x x x DEC reg8 1 1 1 0 1 1 0 reg 2 x x x x x mem 1 1 1 1 1 W mod 0 0 mem 16/24 2-4 x x x x x reg16 0 0 0 reg 2 x x x x x MULU reg 0 W 1 1 0 0 reg 21-30 2 uxxuuu mem 0 1 1 W mod 0 0 mem 27-36 2-4 uxxuuu MUL reg 1 0 1 W 1 1 0 reg 33-47 2 uxxuuu mem 1 0 1 W mod 0 mem 39-57 2-4 uxxuuu reg16,reg16,imm8 o o 0 1 1 reg reg 28-34 3 uxxuuu reg16,mem16,imm8 o o o1 mod reg mem 34-44 3-5 uxxuuu reg 16, reg 16, imm16 o o0 1 1 reg reg 36-42 4 uxxuuu reg16,mem16,imm16 o 0 mod reg mem 46-52 4-6 uxxuuu DIVU reg W 1 1 0 reg 19-25 2 uuuuuu mem o W mod 1 1 0 mem 25-35 2-4 uuuuuu DIV reg W 1 1 reg 29-43 2 uuuuuu mem o W mod 1 1 mem 35-53 2-4 uuuuuu Comparison Instructions CMP reg, reg 0 0 0 1 W 1 1 reg reg 2 2 x x x x x x ------------------~----------------------------------------------------------- mem, reg 0 0 0 0 W mod reg mem 11/15 2-4 x x x x x x reg,mem 00 01 W mod reg mem 11/15 2-4 x x x x x x reg, imm 1 0 0 0 0 0 S W 1 1 1 1 reg 4 3-4 x x x x x x mem, imm 1 0 0 0 0 0 S W mod 1 1 1 mem 13/17 3-6 x x x x x x ace, imm 0 0 0 W 4 2-3 x x x x x x Logical Instructions NOT reg 0 W 1 1 0 o reg 2 2 ------------------------------------------------------------------------------- mem 0 W mod 0 0 mem 16/24 2-4 NEG reg o W 1 1 0 reg 2 2 x x x x x x mem 1 1 0 1 W mod 0 mem 16/24 2-4 x x x x x x TEST reg, reg 000 0 oW 1 1 reg reg 2 2 uOOxxx mem, reg 000 0 oW mod reg mem 10/14 2-4 u 0 0 x x x reg, imm 1 0 W 1 1 0 0 0 reg 4 3-4 o 0 x x x pPD70108 (V20) NEe Instruction Set (cont) Opcode Flags Mnemonic ' Operand 6 5 4 3 2 o 7 543210 Clocks Bytes AC CY V P S Z Logical Instructions (cont) TEST mem, imm 0 1 1 W mod 0 0 0 mem 11/15 3-6 u 0 0 x x x ---------------------------------------------------------------------------- ace, imm 1 0 1 0 0 W 4 2-3 u 0 0 x x x AND reg, reg 0 0 0 0 0 1 W 1 1 reg reg 2 2 u 0 x x x ---------------------------------------------------------------------------- mem, reg 0 0 0 0 0 W mod reg mem 16/24 2-4 u 0 0 x x x reg, mem 0 0 1 0 0 0 1 W mod reg mem 11/15 2-4 u 0 0 x x x reg, imm 0 0 0 0 0 W 1 1 10 0 reg 4 3-4 u 0 0 x x x mem, imm 0 0 0 0 0 0 W mod 1 0 0 mem 18/26 3-6u 0 0 x x x ace, imm 0 0 1 0 0 1 W 4 2-3 u 0 0 x x x OR reg, reg 0 0 0 0 1 0 1 W 1 1 reg reg 2 2 0 0 x x x mem, reg o0 0 0 0 0 W mod reg mem 16/24 2-4 u 0 0 x x x reg, mem 0000101W mod reg mem 11/15 2-4 uOOxxx reg, imm OOOOOOW 1 1 0 0 1 reg 4 3-4 u 0 0 x x x mem, imm 1 0 0 0 0 0 0 W mod 0 0 1, mem 18/26 3-6 u 0 0 x x x ace, imm 00001 OW 4 2-3 u 0 0 x x x XOR reg, reg o0 0 0 1 W 1 1 reg reg 2 u 0 0 x x x mem, reg o0 0 0 0 W mod reg mem 16/24 2-4 u 0 0 x x x reg, mem o0 1 1 0 0 1W mod reg mem 11/15 2-4 uOOxxx reg, imm o 0 0 0 0 0 W 1 1 0 reg 4 3-4 o0 x x x mem, imm 1 0 0 0 0 0 0 W mod 0 mem 18/26 3-6 u 0 0 x x x ace, imm o0 0 0 0 W 4 2-3 o0 x x x Bit Manipulation Instructions INS reg8, reg8 o0 0 0 1 '1, 1 o0 o0 0 35-133 3 1 1 reg reg reg8, imm4 00001111 o0 o0 35-133 4 1 1 0 0 0 reg EXT reg8,reg8 o0 0 0 1 1 1 1 o0 o0 34-59 3 1 1 reg reg reg8, imm4 o0 0 0 1 1 1 1 o0 o 34-59 4 1 1 0 0 0 'leg TEST1 reg, CL o0 0 0 1 1 1 000 o0 0W 3 3 uOOuux 1 1 0 0 reg mem, CL o0 0 0 1 1 1 000 o0 W 12/16 3-5 uOOuux mod 0 0 mem reg, imm3/4 o0 0 0 1 1 1 000 o 0, W 4 4 uOOuux 1 1 0 0 reg mem, imm3/4 00001111 000 o0W 13/17 4-6 uOOuux mod 0 0 0 mem SET1 reg, CL 0000 111000 o oW 4 3 11 0 0 reg mem,CL 00001111000 o o W 13/21 3-5 mod 0 0 0 mem t)Q f't{EC pPD70108 (V20) Instruction Set (cont) Opcode Flags Mnemonic Operands 7 6 5 4 3 2 0 7 5· 4 3 2 0 Clocks Bytes AC CV V P S Z Bit Manipulation Instructions (cont) SET1 reg, imm3/4 0 0 0 0 1 0 0 0 W 5 1 1 0 0 0 reg mem, imm3/4 0 0 0 0 1 1 1 1 0 0 0 0 W 14/22 4-6 mod 0 0 0 mem CY 1 0 0 2 DIR 1 1 1 1 0 1 2 CLR1 reg, CL o 0 0 1 1 1 1 o W 3 1 0 0 0 reg mem, CL 0000 11100 o W 14/22 3-5 mod 0 0 mem reg, imm3/4 0000111100 o W 6 1 1 0 0 0 reg mem, imm3/4 0000 11100 W 15/27 4-6 mod 0 0 mem CY 1 0 0 2 o DIR 1 1 1 1 0 0 2 NOT1 reg, CL o0 0 1 1 1 0 o o W 4 3 1 1 0 reg mem, CL 000011110 o o W 18/26 3-5 mod 0 0 0 mem reg, imm3/4 0000 1110 o W 5 4 1 1 0 0 reg mem, imm3/4 000011110 o W 19/27 4-6 mod 0 0 0 mem CY 2 x Shift/Rotate Instructions SHL reg, 1 0 0 W 1 1 0 0 reg 2 2 u x x x x x ---------------------------------------------------------------------------- mem, 1 0 W mod 0 0 mem 16/24 2-4 u x x x x x reg, CL 0 0 0 1 W 1 1 0 0 reg 7+ n 2 uxuxxx mem, CL 0 0 0 1 W mod 0 mem 19/27 + n 2-4 uxuxxx reg, imm8 0 0 0 0 W 1 1 0 0 reg 7+n 3 uxuxxx mem, imm8 0 0 0 0 W mod mem 19/27 + n 3-5 u x u x x x SHR reg, 1 0 0 0 W 1 1 reg 2 2 u x x x x x ---------------------------------------------------------------------------- mem, 1 0 0 0 0 W mod 0 mem 16/24 2-4 u x x x x x reg, CL 0 0 0 W 1 1 0 reg 7+ n 2 u x u x x x mem, CL 0 1 0 0 1 W mod 0 mem 19/27 + n 2-4 u x u x x x reg, imm8 0 0 0 0 0 W 1 1 0 reg 7+ n 3 u x u x x x mem, imm8 0 0 0 0 0 W mod mem 19/27 + n 3-5 uxuxxx n = number of shifts pPD70108 (V20) NEe Instruction Set (cont) Opcode Flags Mnemonic Operands 6 5 4 3 2 o 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Shift/Rotate Instructions (cont) SHRA reg, 1 1 o o0 0W reg 2 2 u x 0 x x x mem,1 000 0 W mod mem 16/24 2-4 u x 0 x x x reg, CL 01001W 1 1 reg 7+n 2 u x u x x x mem,CL 01001W mod mem 19/27 + n 2-4 u x u x x x reg, immS o0 0 0 0 W 1 1 reg 7+n 3 u x u x x x mem, immS o 000 W mod 1 mem 19/27 + n 3-5 uxuxxx ROL reg, 1 o 0 0 0W 1 1 0 0 0 reg 2 2 x x mem,1 o 0 0 0W mod 0 0 0 mem 16/24 2-4 x x reg, CL o 0 W 1 1 0 0 0 reg 7+n 2 x u mem, CL o1 0 1 W mod 0 0 0 mem 19/27 + n 2-4 x u reg, imm o0 0 0W 1 1 0 0 0 reg 7+n 3 x u mem, imm o0 0 0W mod 0 0 0 mem 19/27 + n 3-5 x u ROR reg, 1 o 0 W 1 1 0 0 reg 2 2 x x mem,1 o 0 0 W mod mem 16/24 2-4 x x reg, CL o 0 0 W 1 1 reg 7+n x u mem, CL o 0 0 W mod 0 0 mem 19/27 + n 2-4 x u reg, immS 000 0 0 W 1 1 0 0 1 reg 7+n 3 x u mem, immS OOOOOW mod 0 0 1 mem 19/27 + n 3-5 x u ROLC reg, 1 o o oW 1 1 0 0 reg 2 2 x x mem,1 o 0 0 0W mod 0 0 mem 16/24 2-4 x x reg, CL o 0 0 W 1 1 0 0 reg 7+n x u mem,CL o 0 0 1W mod 0 0 mem 19/27 + n 2-4 x u reg, immS o 000 0 W 1 1 0 0 reg 7+n 3 x u mem, immS o0 0 0 0W mod 0 0 mem 19/27 + n 3-5 x u RORC reg, 1 o 0 0 0W 1 1 0 reg 2 2 x x mem, 1 o 0 0 0 W mod 0 mem 16/24 2-4 x x reg, CL o 0 0 1W 1 1 0 reg 7+n 2 x u mem,CL o1 0 0 1 W mod 0 mem 19/27 + n 2A x u reg, immS o 000 0 W 1 1 0 reg 7+n 3 x u mem, immS o0 0 0 0W mod 0 mem 19/27 + n 3-5 x u n = number of shifts Stack Manipulation Instructions PUSH mem16 1 1 1 1 1 1 mod 1 1 0 mem 1S/26 2-4 reg16 0 0 o reg S/12 sr 0 0 0 sr 1 0 S/12 PSW 1 0 0 1 1 0 0 S/12 R o 0 o0 0 35/67 imm o 0 oS 0 7/12 2-3 NEe pPD70108 (V20) Instruction Set (cont) Opcode Flags Mnemonic Operands 7 6 5 4 0 7 6 5 4 3 2 1 0 Clocks Byles AC CY V P S Z Stack Manipulation Instructions (cont) POP mem16 1 0 0 0 mod 0 0 0 mem 17/25 2-4 reg16 0 0 reg 8/12 sr 0 sr 8/12 PSW 1 0 8/12 R R R R R R R 0 0 0 1 43/75 PREPARE imm16, imm8 0 0 0 0 * *imm8 = 0: 16 imm8> 1: 23 + 16 (imm8 - 1) DISPOSE 1m 0 0 0 1 6/10 Control Transfer Instructions CALL near_proc 0 0 0 16/20 3 regptr 1 1 1 0 0 reg 14/18 2 memptr16 1 1 1 mod 0 0 mem 23/31 2-4 far_proc 0 0 0 0 21/29 5 memptr32 1 1 1 mod 0 mem 31/47 2-4 RET 0 0 0 0 1 15/19 pop_value 0 0 0 0 0 20/24 3 0 0 0 1 21/29 1 pop_value 0 0 0 0 24/32 3 BR near_label 0 13 3 shorUabel 0 0 12 2 regptr 1 1 0 0 reg 11 2 memptr16 mod 0 0 mem 20/24 2-4 far_label 0 0 15 5 memptr32 1 mod 0 mem 27/35 2-4 BV shorUabel 0 0 0 14/4 2 BNV shorUabel 0 0 14/4 2 BC,BL shorUabel 0 0 0 14/4 2 BNC,BNL shorUabel 0 0 0 14/4 2 BE, BZ shorUabel 0 0 14/4 2 BNE, BNZ shorUabel 0 0 14/4 2 BNH short_label 0 0 14/4 2 BH shorUabel 0 0 1 1 14/4 2 BN shorUabel 0 0 0 0 14/4 2 BP shorUabel 0 0 1 14/4 2 BPE shorUabel 0 0 14/4 2 BPO shorUabel 1 14/4 2 BLT shorUabel 0 0 14/4 2 BGE shorUabel 0 14/4 2 ':21 pPD70108 (V20) NEe Instruction Set (cont) Opcode Flags Mnemonic Operand 6 5 4 3 2 0 7 654321 0 Clocks Bytes AC CY V P S,Z Control Transfer Instructions (cont) BLE shorUabel 0 0 14/4 2 BGT shorUabel 0 1 1 1 14/4 2 DBNZNE shorUabel 0 0 0 0 0 14/5 DBNZE shorUabel 0 0 0 0 1 14/5 2 DBNZ shorUabel 0 0 0 0 13/5 2 BCWZ shorUabel 0 0 0 13/5 2 Interrupt Instructions BRK 3 0 0 0 0 38/50 imm8 0 0 0 1 38/50 2 BRKV 0 0 0 52/3 RETI 1 0 0 1 27/39 R R R R R R CHKIND reg16, mem32 0 0 0 0 0 mod reg mem 18/26 2-4 73-76 BRKEM imm8 0 0 0 0 1 1 1 1 1 1 1 1 38/50 3 CPU Control Instructions HALT 0 1 0 0 2 BUSLOCK 1 0 0 0 0 2 FP01 fp_op 0 X X X 1 1 Y Y Y Z Z Z 2 2 fp_op, mem 1 0 1 1 X X X mod Y y y mem 11/15 2-4 FP02 fp_op 0 1 0 0 X 1 1 Y y y Z Z Z 2 2 fp_op, mem 1 1 0 0 X mod y y y mem 11/15 2-4 POLL 0 0 1 o 1 1 2+5n n = number of times POLL pin is sampled. NOP 0 0 0 0 0 0 3 DI 0 0 2 EI 0 2 8080 Instruction Set Enhancements RETEM 1 0 0 1 0 27/39 2 R R R R R R CALLN imm8 1 0 0 0 0 38/58 3 NEe NEe Electronics Inc. pPD70ii6 (V30), 70ii6H (V30H) i6·Bil Microprocessor: High·Performance, CMOS Description Ordering Information ThepPD70116 (V30®) is a CMOS 16-bit microprocessor Part Max Frequency with an internal 16-bit architecture and a 16-bit external Number of Operation Package Type data bus. The pPD70116 instruction set is a superset of Standard Series thepPD8086/8088; however, mnemonics and execution jiPD70116C8 8 MHz 40-pin plastic DIP times are different. The pPD70116 additionally has a powerful instruction set including bit processing, C10 10 MHz packed BCD operations, and high-speed multiplica- L8 8 MHz 44-pin PLCC tion/division operations. The pPD70116 can also L10 10 MHz execute the entire 8080 instruction set and comes'with a standby mode that significantly reduces power GC8 8 MHz 52-pin plastic QFP consumption. It is software-compatible with the (P52GC-100-386) GC10 10 MHz pPD70108 microprocessor. H-Series The H-series microprocessors are fully static devices jiPD70116HC10 10 MHz 40-pin plastic DIP that offer operating frequencies to 16 MHz, lower power consumption, and no restriction on minimum HC12 12 MHz clock frequency from dc to 16 MHz. HC16 16 MHz Features HL 10 10 MHz 44-pin PLCC o Minimum instruction execution time: HL 12 12 MHz 250 ns at 8 MHz, 200 ns at 10 MHz, 125 ns at 16 MHz HL 16 16 MHz o Maximum addressable memory: 1 Mbyte D Abundant memory addressing modes HGC10 10 MHz 52-pin plastic QFP o 14 x 16-bit register set HGC12 12 MHz (P52GC-100-386) o 101 instructions HGC16 16 MHz o Instruction set is a superset of pPD8086/8088 instruction set o Bit, byte, word, and block operations Pin Configurations OBit fielq operation instructions o Packed BCD instructions 40-Pin Plastic DIP o Multiplication/division instruction execution time: 2.4 t07.1psat8MHz, 1.9 t05.7psat10MHz IC VDD o High-speed block transfer instructions: AD14 A D 15 1 Mbyte/s at 8 MHz, 1.25 Mbyte/s at 10 MHz AD13 A16/PSO o High-speed calculation of effective addresses: AD12 AD11 A17/PS1 A1a/PS2 2 clock cycles in any addressing mode AD10 A19/PS3 o Maskable (INT) and nonmaskable (NMI) AD9 UBE interrupt inputs ADa 33 S/LG o IEEE-796 bus compatible interface AD7 RD o 8080 emulation mode AD6 10 tLPD 31 HlDRO [RO/AKol o CMOS technology ADs 11 70116 HlDAK [RO/AK1l o Low power consumption AD4 12 WR [BUSlOCKl o Low-power standby mode ADa 13 jQ/M [BS2l o Minimum-power Stop mode (H-Series) AD2 14 BUFR/W [BS1l o Single power supply; 5-V and 3-V specifications AD1 15 16 BUFEN [BSol ASTB [OSol ADo D Maximum operating frequencies: 8 to 16 MHz NMI 17 INTAK [OS1l INT 18 POll V30 is a registered trademark of NEC Corporation. ClK 19 READY GND 20 RESET 83-004104B 50029-2 (NECEL-062) pPD70116 (V30) NEe Pin Configurations (cont) Pin Identification Symbol Direction Function 44-Pin Plastic Leaded Chip Carrier (PLCC) IC· Internally connected AD14 - ADo In/Out Address/data bus NMI In Nonmaskable interrupt input INT In Maskable interrupt input ClK In Clock input ..,en .., .., .., .., .., ..,.., .., M .., en a:I ,... CD II) ' O.8V Test Points ~~~tt w oo 0 w w i :gN :g.- :g0l~:E I/j %: %: a: > > a: a: z '" '" '" a: 0 co en co I'- I'- I'- I'- CD I'- II) I'- 0 "" I'-M I'-N ;:::: I'- enCD :g t; :g CD I'- II) A16/PSo 64 lORD 0 NC 63 NC A15 62 MWR A14 61 IOWR A13 60 BUSLOCK A12 59 BUFR/W All 58 BUFEN Al0 57 CLKOUT A9 56 Xl AS 10 55 X2 GND 11 54 GND NC 12 53 NC tiP D70208GF GND 13 52 GND AD7 14 51 [High] AD6 15 50 ASTB ADS 16 49 QSo AD4 17 48 QS1 AD3 18 47 POLL AD2 19 46 TCTL2 AD1 20 45 TOUT2 ADD 21 44 TCLK NC 22 43 NC NC 23 42 INTP7 END/TC 24 41 INTP6 II) N CD N ~ ~ ~ ~ M PI ~ ~ ~ ~ r;; ~ ~ 0 "" o ~ o ~ o ~ Q>C Q>C - UI>a: o .- N M "" II) TTT Q 00.. 0.. 0.. 0.. 0.. °1° a: c( '" c( a: c( '" c( a: '" :E :E :E :E :E Q Q Q Q Q Q a: ~ :E o ~ c( '" a: '" ~ ;: ;:) > ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ :E c( '" :E 0 Q Q !::: I~ 83-0041808 3 NEe Pin Identification Symbol Function Symbol Function INTP1-INTP7 Interrupt request inputs A19-A16/PS3-PSO Multiplexed address/processor status outputs lORD I/O read strobe output A15- AS Address bus outputs 10WR I/O write strobe output AD7-ADo Multiplexed address/data bus MRD Memory read strobe output ASTB Address strobe output MWR Memory write strobe output BS2-BSO Bus status outputs NC No connection BUFEN Data bus transceiver enable output NMI Nonmaskable interrupt input BUFR/W Data bus transceiver direction output POLL Poll input BUS LOCK Buslock output QS1-QSO CPU queue status outputs CLKOUT System clock output READY Ready input DMAAKO DMA channel 0 acknowledge output REFRQ Refresh request output DMAAK1 DMA channel 1 acknowledge output RESET Reset input DMAAK2 DMA channel 2 acknowledge output RESOUT Synchronized reset output DMAAK3/TxD DMA channel 3 acknowledge output/Serial TCLK Timer / counter external clock input transmit data output TCTL2 Timer/counter 2 control input DMARQO DMA channel 0 request input TOUT2 Timer / counter 2 output DMARQ1 DMA channel 1 request input Voo +5 V power supply input DMARQ2 DMA channel 2 request input X1,X2 Crystal/external clock inputs DMARQ3/RxD DMA channel 3 request input/Serial receive data input END/TC End input/Terminal count output GND Ground High High-level output except during hold acknowledge when it is placed in the high-impedance state HLDAK Hold acknowledge output HLDRQ Hold request input IC Internal connection; leave unconnected INTAKITOUT1/SRDY Interrupt acknowledge output/Timer/counter 1 output/Serial ready output 4 NEe pPD70208 (V40) Pin Functions AD7-ADo [Address/Data Bus] A19-A16/PS3-PSO [Address/Status Bus] These three-state pins form the active-high, time-mUlti- plexed address/data bus. During T1 of a bus cycle, These three-state output pins contain the upper 4 bits ADrADo output the lower 8 bits of the 20-bit memory of the 20-bit address during T1 and processor status or I/O address. During the T2, T3, TW, and T4 states, information during the T2, T3, TW, and T 4 states of a bus ADj-ADo form the 8-bit bidirectional data bus. cycle. Du ring T1 of a memory read or write cycle, these pins contain the upper 4 bits of the 20-bit address. The ADrADo pins enter the high-impedance state These pins are forced low during T1 of an I/O bus during hold acknowledge or internal interrupt acknow- cycle. ledge bus cycles or while RESET is asserted. Processorstatus is output during T2, T3, TW, and T4 of ASTB [Address Strobe] both memory and I/O bus cycles. PS3 is zero during any CPU native mode bus cycle. During any DMA, This active-high output is used to latch the address refresh, or 8080 emulation mode bus cycle, PS 3 outputs from the multiplexed address bus in an external address 1:'-11 a high level. PS2 outputs the contents of the interrupt latch during T1 of a bus cycle. ASTB is held at a low I:i:a enable (IE) flag in the CPU PSW register. PS1 and PSo level during hold acknowledge. indicate the segment register used to form the physical address of a CPU bus cycle as follows: BS2-BSO [Bus Status] Outputs BS2-BSO indicate the type of bus cycle being PSI PSo Segment performed as follows. BS2-BSO become active during 0 0 Data segment 1 (DS1) the state preceding T1 and return to the passive state 0 1 Stack segment (SS) during the bus state preceding T4. 0 Program segment (PS) 1 Data segment 0 (DSO) BS2 BSI Bus Cycle BSo These pins are in the high-impedance state during hold 0 0 0 Interrupt acknowledge 0 0 1 I/O read acknowledge. 0 1 o. I/O write 0 1 1 Halt (Note 1) A1s-Aa [Address Bus] 0 0 Instruction fetch These three-state pins form the middle byte of the 0 1 Memory read (Note 2) active-high address bus. During any CPU, DMA, or Memory write (Note 3) 0 refresh bus cycle, A1s-Aa output the middle 8 bits of the 1 Passive state 20-bit memory or 110 address. The A1s-Aa pins enter the high-impedance state during hold acknowledge or Note: an internal interrupt acknowledge bus cycle. During a (1) BS2-BSO in a halt bus cycle returns tothe passive state oneclock slave interrupt acknowledge bus cycle, A1O-Aa contain earlier than normal CPU bus cycles. the address of the selected slave interrupt controller. (2) Memory read bus cycles include CPU, DMA read, DMA verify, and refresh bus cycles. (3) Memory write bus cycles include C!='U and DMA write bus cycles. BS2-BSO are three-state outputs and are high imped- ance during hold acknowledge. 5 pPD70208 (V40) NEe BUFEN [Buffer Enable] DMAAK3/TxD [DMA Acknowledge 3]/[Serial BUFEN is an active-low output for enabling an external Transmit Data] data bus transceiver during a bus cycle. BUFEN is Two output signals multiplexed on this pin are selected asserted during T2 through T3 of a read cycle, T2 by the PF field of the on-chip peripheral connection through T3 of a slave interrupt acknowledge cycle, and register. T1 through T4 of a write cycle. BUFEN is not asserted when the bus cycle corresponds to an internal pe- • DMAAK3 is an active-low output and enables an ripheral, DMA, refresh, or internal interrupt acknow- external DMA peripheral to perform the requested ledge cycle. BUFEN enters the high-impedance state DMA transfer for channel 3. during hold acknowledge. • TxD is the serial data output from the serial control unit. BUFR/W [Buffer Read/Write] BUFR/W is a three-state, active-low output used to DMARQO-OMARQ2 [DMA Request] control the direction of an external data bus trans- These synchronized inputs are used by external pe- ceiver during CPU bus cycles. A high level indicates ripherals to request DMA service for channels 0-2 from thepPD70208wili perform a write cycle and a low level the internal DMA controller. indicates a read cycle. BUFR/W enters the high- impedance state during hold acknowledge. DMARQ3/RxD [DMA Request 3]1[Serial Receive Data] BUSLOCK Two input signals multiplexed on this pin are selected This active-low output provides a means for the CPU to by the PF field of the on-chip peripheral connection indicate to an external bus arbiter that the bus cycles of register. the next instruction are to be kept contiguous. BUSLOCK is asserted for the duration of the instruction • DMARQ3 is used by an external peripheral to request following the BUSLOCK prefix. BUSLOCK is also a DMA transfer cycle for channel 3. asserted during interrupt acknowledge cycles and • RxD is the serial data input to the serial control unit. enters the high-impedance state during hold acknow- ledge. While BUSLOCK is asserted, DMAL:J, RCU, and EN D/TC [End/Terminal Count] external bus requests are ignored. This active-low bidirectional pin controls the termin- CLKOUT ation of a DMA service. Assertion of END by external hardware during DMA service causes the service to CLKOUT is a buffered clock output used as a reference terminate. When a DMA channel reaches its terminal for all timing. CLKOUT has a 50-percent duty cycle at count, the DMAU asserts TC, indicating the program- half the frequency of the input clock source. med operation has completed. DMAAKO-DMAAK2 [DMA Acknowledge] END/TC is an open-drain 1/0 pin, and requires an external 2.2-kO pull-up resistor. This set of outputs contains the DMA acknowledge signals for channels 0-2 from the internal DMA control- ler and indicate that the peripheral can perform the requested transfer. 6 NEe pPD70208 (V40) HLDAK [Hold Acknowledge] INTP1-INTP7 [Peripheral Interrupts] When an external bus requester has become the INTP1-INTP7 accept either rising-edge or high-level highest priority requester, the internal bus arbiter will triggeredasyochronousinterrupt requests from external assert the HLDAK output indicating the address, data, peripherals. These INTP1-INTP7 inputs are internally and control buses have entered a high-impedance state synchronized and prioritized by the interrupt control and are available for use by the external bus master. unit, which requests the CPU to perform an interrupt acknowledge bus cycle. External interrupt controllers Should the internal DMAU or RCU (demand mode) such as the JlPD71059 can be cascaded to increase the request the bus, the bus arbiter will drive HLDAK low. number of vectored interrupts. When this occurs, the external bus master should complete the current bus cycle and negate the HLDRQ These interrupt inputs cause the CPU to exit both the signal. This allows the bus arbiter to reassign the bus to standby and 8080 emulation modes. the higher priority requester. The INTP1-INTP7 inputs contain internal pull-up If a higher priority internal bus master subsequently resistors and may be left unconnected. I:R requests the bus, the high-level width of HLDAK is guaranteed to be a minimum of one CLKOUT period. lORD [1/0 Read] m:I This three-state pin outputs an active-low I/O read HLDRQ [Hold Request] strobe during T2, T3, and TW of an I/O read bus cycle. This active-high signal is assert~d by an external bus Both CPU I/O read and DMA write bus cycles assert master requesting to use the local address, data, and lORD. lORD is not asserted when the bus cycle control buses. The HLDRQ input is used by the internal corresponds to an internal peripheral or register. It bus arbiter, which gives control of the buses to the enters the high-impedance state during hold acknow- highest priority bus requester in the following order. ledge. Bus Master Priority 10WR [1/0 Write] RCU Highest (demand mode) This three-state pin outputs an active-low I/O write DMAU • strobe during T2, T3, and TW of a CPU I/O write or an HLDRQ • extended DMA read cycle and during T3 and TW of a CPU RCU • Lowest (normal operation) DMA read bus cycle. 10WR is not asserted when the bus cycle corresponds to an internal peripheral or register. It enters the high-impedance state during INTAK/TOUT1/SRDY [Interrupt Acknowledge]1 hold acknowledge. [Timer 1 Output]/[Serial Ready] Three output signals multiplexed on this pin are selected by the PFfield of the on-chip peripheral connection register. • INTAK is an interrupt acknowledge signal used to cascade external slave JlPD71059 I nterrupt Control- lers. I NTAK is asserted during T2, T3, and TW states of an interrupt acknowledge cycle. • TOUT1 is the output of timer/counter 1. • SRDY is an active-low output and indicates that the serial control unit is ready to receive the next character. 7 pPD'70208 (V40) NEe MRD [Memory Read Strobe] READY [Ready] This three-state pin outputs an active-low memory This active-high input synchronizes external memory read strobe during T2, T3, and TW 01a memory read and peripheral devices with the pPD70208. Slow bus cycle. CPU memory read, DMA read, and refresh memory and I/O devices can lengthen a bus cycle by bus cycles all assert MRD. MRD enters the high- negating the READY input and forcing the BIU to insert impedance 'state during hold acknowledge. TW states. READY must be negated prior to the rising edge of CLKOUT during the T2 state or by the last MWR [Memory Write Strobe] internally generated TW state to guarantee recognition. When READY is, once again asserted and recognized This three-state pin outputs an active-low memory by the BIU, the Biu will proceed to the T4 state. write strobe during T2, T3, and TW of aCPU memory write or DMA extended write bus cycle and during T3 The READY input operates in parallel with the internal and TW of a DMA normal write bus cycle. MWR enters pPD70208 wait control unit and can be used to insert the high-impedance state during hold acknowledge. more than three wait states into a bus cycle. NMI [Nonmaskable Interrupt] REFRQ [Refresh Request] The NMI pin is a rising-edge-triggered interrupt input REFRQ is an active-low output indicating the current that cannot be masked by software. NMI is sampled by bus cycle is a memory refresh operation. REFRQ is CPU logic each clock cycle and when fOund valid for used to disable memory address decode logic and one or more CLKOUT cycles, the NMI interrupt is refresh dynamic memories. The 9-bit refresh row accepted. The CPU will process the NMI interrupt address is placed on As-Ao during a refresh bus cycle. immediately after the current instruction finishes execution by fetching the segment and offset of the RESET [Reset] NMI handler from interrupt vector 2. The NMI interrupt RESET is a Schmitt trigger input used to force the causes the CPU to exit both the standby and 8080, pPD70208 to a known state by resetting the CPU and emulation modes. The NMI input takes precedence on-chip peripherals. RESET must be asserted for a over the maskable interrupt inputs. minimum offourclocks to guarantee recognition. After RESET has been released, the CPU will start program POLLIPolI] execution from address FFFFOH in the native mode. The active-low POLL input is used to synchronize the RESET will release the CPU from the low-power operation of external devices with the CPU. During standby mode and force it to the native mode. execution of the POLL instruction, the CPU checks the POLL input state every five clocks until POLL is once RESOUT [Reset Output] again asserted. This active..,high output is available to perform a system- QS1-QSO [Queue Status] wide reset function. RESET is internally synchronized with CLKOUT and output on the RESOUT pin. The QS1 and QSo outputs maintain instruction syn- chronization between thepPD70208 CPU and external TCLK devices. These outputs are interpreted as follows. TCLK is an external clock source for the timer control Instruction Queue Status unit. The three timer/counters can be programmed to QSo operate with either the TCLK input or a prescaled o o No operation CLKOUT input. o First byte of instruction fetched o Flush queue contents TCTL2 Subsequent byte of instruction fetched TCTL2 is the control input for timer/counter 2. Queue status is valid for one clock cycle after the CPU TOUT2 has accessed the instruction queue. TOUT2 is the output of timer/counter 2. 8 NEe pPD70208 (V40) Xl, X2 [Clock Inputs] Table 1. Input/Output Pin States These pins accept either a p'arallel resonant, funda- DMA mental mode crystal or an external oscillator input with Symbol Pin Type Hold Halt Reset Cascade a frequency twice the desired operating frequency. A19-A16/PS3-PSO. 3-state Out Hi-Z H/L H/L Hi-Z A15- Aa In the case of an external clock generator, the X2 pin AD7-ADo 3-state 1/0 Hi-Z H/L Hi-Z Hi-Z can be either left unconnected or be driven by the complement of the X1 pin clock source. ASTB Out L L L L , BUFEN 3-state Out Hi-Z H H Hi-Z Pin States BUFR/W 3-state Out Hi-Z H/L H Hi-Z Table 1 lists the output pin states during the Hold, Halt, BUS LOCK 3-state Out Hi-Z HIL H Hi-Z Reset, and DMA Cascade conditions. BS2-BSO 3-state Out Hi-Z H H H CLKOUT Out H/L H/L H/L H/L DMAAKO-DMAAK2 DMAAK3 TxD Out Out H H H/L H/L H/L H H H/L H/L H/L H/L II END/TC I/O H H/L H H HLDAK Out H H/L L L INTAK Out H H H H TOUT1 H/L H/L H/L SRDY H/L H/L H/L lORD 3-state Out Hi-Z H H Hi-Z 10WR 3-state Out Hi-Z H H Hi-Z MRD 3-state Out Hi-Z H H Hi-Z MWR 3-state Out Hi-Z H H Hi-Z QS1-QSO Out H/L L L H/L REFRQ Out H H/L H H ,RESOUT Out L H L TOUT2 Out H/L H/L H/L H/L H: high level; L: low level; H/L: high or low level; Hi-Z: high impedance. pPD70208(V40) NEe Block Diagram INTP1 ~ Wait ~ A19-A1slPS3-PSO INTP2 Control INTP3 Interrupt Control Unit ~A15-A8 , INTP4 [WCU] INTP5 ~ Unit ~Ab7-ADO INTP6 INTP7 [ICU] F===> BS2-BSo QS1 QSo TOUT2 ~ Timer/ POLL TOUT1 Counter Bus ASTB TCTL2 Unit Interface TCLK [TCU] Unit [BIU] BUFEN BUFR/W BUSLOCK DMARQO DMAAKO Central lORD Processing IOWR DMARQ1 Unit MRD DMAAK1- DMA [CPU] MWR Control DMARQ2 Unit READY DMAAK2 [DMAU] RESET DMARQ3 ~ RESOUT DMAAK3 END/TC Bus iNTAK Arbitration f---- HLDAK Unit HLDRQ NMI [BAU] X1 Refresh Serial Clock TxD X2 Control Control Generator Unit - Unit SRDY CLKOUT [CG] [SCU] RxD [RCU] REFRQ 83-004137C NEe pPD70208 (V40) Absolute Maximum Ratings DC Characteristics TA =+25°C TA = -10 to +lO°C, VDD = +5 V ±10% (8 MHz), VDD = 5 V ±5% (10 MHz) Power supply voltage, Voo -0.5 to +7.0 V Limits Input voltage, VI -0.5 to Voo + 0.3 V Test Parameter Symbol Min Max Unit Conditions ClK input voltage, VK -0.5 to Voo + 1.0 V Input voltage, high VIH 2.2 VOD + V Output voltage, Vo -0.5 to Voo + 0.3 V 0.3 Operating temperature, TOPT Input voltage, low Vil -0.5 O.B V Storage temperature, TSTG -65 to +150 °C X1, X2 input VKH 3.9 VOD + V Comment: Exposure to Absolute Maximum Ratings for extended voltage, high 1.0 periods may affect device reliability; exceeding the ratings could X1, X2 input VKl -0.5 0.6 V cause permanent damage. The device should be operated within the voltage, low limits specified under DC and AC Characteristics. Output voltage, high VOH 0.7 Voo V IOH = -400pA Capacitance TA=+25°C, VDD=OV limits Output voltage, low Input leakage current, high VOL ILiH 0.4 10 V pA IOl =2.5 mA VI = VOO D Test Parameter Symbol Min Max Unit Conditions Input leakage ILlPl -300 pA VI = 0 V, INTP current, low input pins Input capacitance CI 15 pF fc = 1 MHz; unmeasured pins ILil -10 pA VI = 0 V, other Output capacitance Co 15 pF input pins are returned to 0 V. Output leakage IlOH 10 pA Vo = Voo current, high Output leakage IlOl -10 pA Vo=OV current, low Supply current 8 MHz 100 90 mA Normal mode 20 mA Standby mode 10 MHz 100 120 mA Normal mode 25 mA Standby mode 11 pPD70208 (V40) NEe AC Characteristics TA = -10 to +70°C; Voo = 5 V ±10% (8 MHz), Voo = 5 V ±5% (10 MHz), CL = 100 pF 8 MHz Limits 10 MHz Limits Parameter Symbol Min Max Min Max Unit Test Conditions External clock input cycle time tCYX 62 250 50 250 ns External clock pulse width, high tXXH 20 19 ns VKH = 3.0 V External clock pulse width, low tXXL 20 19 ns VKL = 1.5 V External clock rise time tXR 10 5 ns 1.5- 3.0V External clock fall time tXF 10 5 ns 3.0 -1.5V CLKOUT cycle time tCYK 124 500 100 500 ns CLKOUT pulse width, high tKKH 0.5 tCYK-7 0.5 tCYK - 5 ns VKH = 3.0 V CLKOUT pulse width, low tKKL 0.5 tCYK'-- 7 0.5 tCYK - 5 ns VKL = 1.5 V CLKOUT rise time tKR 7 5 ns 1.5 - 3.0 V CLKOUT fall time tKF 7 5 ns 3.0-1.5 V CLKOUT delay time from external clock tOXK 55 40 ns Input rise time (except external clock) tlR 20 15 ns 0.8 - 2.2 V Input fall time (except external clock) tlF 12 10 ns 2.2 - 0.8 V Output rise time (except CLKOUT) tOR 20 15 ns 0.8 - 2.2 V Output fall time (except CLKOUT) tOF 12 10 ns 2.2 - 0.8 V RESET setup time to CLKOUT! tSRESK 25 20 ns RESET hold time after CLKOUT! tHKRES 35 25 ns RESOUT delay time from CLKOUT! tOKRES 5 60 5 50 ns READY inactive setup time to CLKOUTl tSRYLK 15 15 ns READY inactive hold time after CLKOUTl tHKRYL 25 20 ns READY active setup time to CLKOUTl tSRYHK 15 15 ns READY active hold time after CLKOUTl tHKRYH 25 20 ns NMI, POLL setup time to CLKOUTl tSIK 15 15 ns Data setup time to CLKOUT! tSOK 15 15 ns Data hold time after CLKOUT! tHKO 10 10 ns Address delay time from CLKOUT! tDKA 10 55 10 50 ns A19-AO UBE Address hold time after CLKOUT! tHKA 10 10 ns 1/0 recovery time tAl 2tCYK - 50 2tCYK - 40 ns (Note 1) PS delay time from CLKOUT! tOKP 10 60 10 50 ns PS float delay time from CLKOUTt tFKP 10 60 10 50 ns Address setup time to ASTB! tSAST tKKL - 20 tKKL - 30 ns Address float delay time from CLKOUT! tFKA tHKA 60 tHKA 50 ns ASTBl delay time from CLKOUT! tOKSTH 45 40 ns ASTB! delay time from CLKOUTl tOKSTL 50 45 ns ASTB pulse width, high tSTST tKKL -10 tKKL - 10 ns Address hold time after ASTB! tHSTA tKKH - 20 tKKH - 20 ns Control delay time from CLKOUT tOKCT1 10 70 10 60 ns (Note 2) tOKCT2 10 60 10 55 ns (Note 3) 19 NEe pPD70208 (V40) AC Characteristics (cont) 8 MHz Limits 10 MHz Limits Parameter Symbol Min Max Min Max Unit Test Conditions RD! delay time from address float tOAFRL 0 0 ns (Note 4) RD! delay time from CLKOUT! tOKRL 10 75 10 65 ns ROt delay time from CLKOUT! tOKRH 10 70 10 60 ns REFROt delay from MROt tORQHRH tKKL - 30 tKKL - 30 ns (Note 5) Address delay time from ROt tORHA tCYK - 40 tCYK - 40 ns RD pulse width, low tRR 2tCYK - 50 2tCYK - 40 ns BUFR/W delay from BUFENt tOBECT tKKL - 20 tKKL - 20 ns Read cycle tOWCT tKKL - 20 tKKL - 20 ns Write cycle Data output delay time from CLKOUT! tOKO 10 60 10 55 ns Data float delay time from CLKOUT! tFKO 10 60 10 55 ns WR pulse width, low tww 2tCYK - 40 2tCYK - 40 ns (Note 4) BS! delay time from CLKOUTt tOKBL 10 60 10 55 ns BS t delay time from CLKOUT! tOKBH 10 60 10 55 ns HLDRO setup time to CLKOUTt tSHQK 20 15 ns HLDAK delay time from CLKOUT! tOKHA 10 70 10 60 ns DMAAK! delay time from CLKOUTt tOKHOA 10 60 10 55 ns DMAAK! delay time from CLKOUT! tOKLOA 10 90 10 80 ns Cascade mode WR pulse width, low (OMA cycle) tWW1 2tCYK - 40 2tCYK - 40 ns DMA extended write cycle WR pulse width, low (DMA cycle) tWW2 tCYK - 40 tCYK - 40 ns DMA normal write cycle RD!, WR! delay from DMAAK! tOOARW tKKH - 30 tKKH - 30 ns DMAAKt delay from Rot tORHOAH tKKL- 30 tKKL- 30 ns ROt delay from WRt tOWHRH 5 5 ns TC output delay time from CLKOUTt tOKTCL 60 55 ns TC off delay time from CLKOUTt tOKTCF 60 55 ns TC pulse width, low tTCTCL tCYK -15 tCYK -15 ns TC pullup delay time from CLKOUTt tOKTCH tKKH tKKH ns + tCYK -10 + tCYK -10 END setup time to CLKOUTt tSEOK 35 30 ns END pulse width, low tEOEOL 100 80 ns DMARO setup time to CLKOUTt tSOQK 35 30 ns INTPn pulse width, low tlPIPL 100 80 ns RxD setup time to SCU internal clock! tSRX 0.5 p's RxD hold time after SCU internal clock! tHRX 0.5 p's SRDY delay time from CLKOUT! tOKSR 150 100 ns Notes: (1) This is specified to guarantee a read/write recovery time for I/O (4) RD represents lORD and MRD. WRrepresents 10WR and MWR. devices. (5) This is specified to guarantee that REFRQ t is delayed from (2) Delay from CLKOUT to DMA cycle MWR/IOWR outputs. MRD t at all times. (3) Delay from CLKOUT to BUFR/W, BUFEN, INTAK, REFRQ out- puts and CPU cycle MWR/IOWR outputs. 1'l pPD70208 (V40) NEe AC Characteristics (cont) 8 MHz limits 10 MHz limits Parameter Symbol Min Max Min Max Unit Test Conditions TxD delay time from TOUT1! tOTX 500 200 ns TCTL2 setup time from CLKOUT! tSGK 50 40 ns TCTL2 setup time to TCLKt tSGTK 50 40 ns TCTL2 hold time after CLKOUT! tHKG 100 80 ns TCTL2 hold time after TCLKt tHTKG 50 40 ns TCTL2 pulse width, high tGGH 50 40 ns TCTL2 pulse width, low tGGL 50 40 ns TOUT output delay time from CLKOUT! tOKTO 200 150 ns TOUT output delay time from TOUT! tOTKTO 150 100 ns TOUT output delay time from TCTL2! tOGTO 120 90 ns TCLK rise time tTKR 25 25 ns TCLK fall time tTKF 25 25 ns TCLK pulse width, high tTKTKH 50 45 ns TCLK pulse width, low tTKTKL 50 45 ns TCLK cycle time tCYTK 124 DC 100 DC ns RESET pulse width low tRESET1 50 50 ps After power on tRESET2 4 tCYK 4 tCYK During operation 14 NEe pPD70208 (V40) Clock Input Configurations Timing Measurement Points Crystal-Controlled Internal Clock Input [except Clock] 2. 4V =X 2.2 V 2.2 V x= t~ T~ X1 0.4 V ..:0:;::.8..:V_ _ _ _ _ _:::O.8::....:...V• II 1SpF II II X2 Output ~ 2.2 V ~..:0:;::.8~V~________:::0.8::....:...V~ 2.2 V tr-- External Clock 1 ----t>o d:: I S3-001S16A ClK External Clock 2 1~: ClK Buffers are high-speed CMOS inverters. I S3-00401SA Timing Waveforms Clock Timing External Clock [Xl] ClKOUT 83-0018448 pPD70208 (V40.) NEe Timing Waveforms (cont) Reset and Ready Timing Reset Timing CLKOUT RESOUT ~'""~,--. ----- Ready Timing, No Wait States 11 T2 T3 T4 11 CLKOUT READY Ready Timing, Wait States 11 . T2 T3 TW T4 CLKOUT READY 83-002725B 16 N'EC pPD70208 (V40) Timing Waveforms (cont) Poll, NMI, and Buslock Timing CLKOUT POLL, NMI Input Timing POLL, NMI _f_'S'K CLKOUT BUSLOCK Output Timing 83-0018318 Read/Write Recovery Time 'AI~l •~-IA-I---_-JI I+--_IAI_--+l}--- 83-0042668 pPD70208 (V40) NEe Timing Waveforms (cont) Read Timing T4 T1 T2 T3/TW T4 CLKOUT Processor Status II ~ -tFKA tSOK~1 AD7-ADO -+---+~ 1_-----"'" Data Input tHKO ASTB-+---- [Note 1] tOKCT2 tOKCT2 I MRD [Note 1] lORD 1+-------+-tRR -----~ tOKBL tOKBH Note: [1] Except internal 110 accesses. 83-001848B NEe pPD70208 (V40) Timing Waveforms (cont) Write Timing T4 T1 T2 T3/TW T4 CLKOUT A19/ PSa- A1s1PSo _ _ _ _J BUFR/W tOKCT2 tOKCT2 MWR~ __________________ ~-+ 10WR [Note 1] ~----------tww----------~ I BS2-BSo~--~----------~----------~--~------------------------- tOKBL tOKBH Note: [1] Except internal I/O accesses. 83-0018468 pPD70208 (V40) NEe Timing Waveforms (cont) Status Timing T4 T1 T2 T3/TW T4 CLKOUT A19 /PS 3 Processor Status -A16/ PS o _ _ _ _J tSOK-j I AD7-ADO .....----1....(1 Address Data Input ASTB tOKBH Bus Status tOKRH QS1.QSO~~~~~-_-_-_- f tRR .1 ---------)('----------~)('----------~)(~___________ ~ 83-002724 B NEe pPD70208 (V40) Timing Waveforms (cont) Interrupt Acknowledge Timing T1 T2 T3 T4 T1 T2 T3 T1 CLKOUT ASTB tOKCT2 tOKCT2 -L~------------~--------- [Note 2) __--- BUF~W _ _ _ _ _~_____________________________________________________________ -f·~ BUSLOCK Note: _ / [1J Slave address when the Interrupt Is from external pP071059. Undefined when InternallCU interrupt. [2J Solid line when Interrupt from external pP071059. Dash line when InternallCU interrupt. 83-0018408 21 pPD70208 (V40) NEe Timing Waveforms (coni) HLDRQ/HLDAK Timing, Normal Operation T2 I I TI I TI T4 TI ~ CLKOUT~ I --I ~tsHaK 1 HLDRa~ ~----+----+---+--- -tOKHA HLDAK --[tOKA [NOTEI[ Internal Bus _____ Maste~,:', ---.'~ .. '-._ _ _ _ L . "-----------------+------(1 Internal ---'~r Bus Master (ii-I tFKA .... -~tOKA [NOTE2J --In-t-er-n-al-B-u-S-M""~ster t-------~)~t'------------------- -I-nt-e-rn-al-B-u-s-M-a-st-er- ( NOTES: [IJ A19/PS3-A16/PSo, ADrADo, AwAs, BUFEN,BUFR/W,MRD,IORD,MWR,IOWR [2J BS2-BSO 83-001842B HLDRQ/HLDAK Timing, Bus Wait CLKOUT HLDRQ HLDAK [NOTEIJ :: -------------c'l ~___E_xt_er_n_al_B_u_S_M_8_st_e_r_ _ _ _ _ _ _ _ _ _ _ _ _..J»)--------« Internal Bus Master 83-002732B 22 NEe pPD70208 (V40) Timing Waveforms (cont) Refresh Timing T4 T1 T2 T3/TW T4 CLKOUT Undefined AS Row Address AD7"ADo - - - - - - - « 1 ASTB tORQHRH tOKeT2 ,t OKBH aS2 = 1, aS1 = 0, aso = 1 ! 83-0027318 23 pPD702'08 (V40) NEe Timing Waveforms (cont) DMAU, DMA Transfer Timing T4 T1 T2 T3/TW T4 CLKOUT ASTB tOKA Address AD7-ADo tOKHOA - tORHOAH tOKRH tOOARW_ ~------t-tRR-----+---""""1 1,..----- tOKen tOOARW_1 83-0027239 24 NEe pPD70208 (V40) Timing Waveforms (cont) DMA Timing EN D/TC Timing T1 T2 T3 T4 CLKOUT TC tSEDK ~EDl-l END -------0..----------------------- DMA Request Timing T2 CLKOUT OMARan (n=0-3) Cascade Mode, Normal Operation Cascade Mode, Refresh Cycle Insertion CLKOUT OMARa OMAAK -----------~ 83-001826C pPD70208 (V40) NEe Timing Waveforms (cont) SCU Timing RXD\_ _~I_ _ _L l~tSRX---'oI4Il.l---- tHRX---.j TounJ 14---+16 or 64 Toun pulses-----+I 1 4 - - - 1 6 or 64 TOUn pulses - - - - TxD tOTX CLKOUT SiffiY ' ' "1 83-001849B ICU Timing ('''''') "~ "J INTPn (n=1-7) I t\'EC pPD70208 (V40) Timing Waveforms (coni) TCU Timing, Internal Clock Source CLKOUT TCTL2 TOUTn ____________£'00'0 ~o"'. [n = 1, 2J _ _ _ _ _ _ _ _ _ _ __ 83-002722B TCU Timing, TCLK Source tTKR tTKF TCLK TCTL2 TOUTn ----------~-;-:-~-)--~~-----:~C'~ro [n=1,2J _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 83-001823B NEe Functional Description Central Processing Unit Refer to the pPD70208 block diagram for an overview The pPD70208 CPU functions similarly to the CPU of of the ten major functional blocks listed below. the pPD70108 CMOS microprocessor. However, be:... cause the pPD70208 has internal peripheral devices, • Central processing unit (CPU) its bus architecture has been modified to permit • Clock generator (CG) sharing the bus with internal peripherals. ThepPD70208 • Bus interface unit (BIU) CPU is object code compatible with both the pPD70108/ • Bus arbitration unit (BAU) pPD70116 and thepPD8086/pPD8088 microprocessors. • Refresh control unit (RCU) • Wait control unit (WCU) Figure 1 is the pPD70208 CPU block diagram. A listing • Time.r/counter unit (TCU) of the pPD70208 instruction set is in the final sections • Serial control unit (SCU) of this data sheet. • Interrupt control unit (ICU) • DMA control unit (DMAU) Figure 1. pPD70208 CPU Block Diagram Internal address/data bus (20) ~_ _ _ _ _ _ _ _ _ _ _ _ _~ To BIU NMI INT (from ICU) CLOCK (from CG) BCU EXU LC pc Effective Address AW Generator Subdata bus(16) Main data bus(16) 83-0027338 NEe pPD70208 (V40) Register Configuration General-Purpose Registers. The pPD70208 CPU con- tains four 16-bit, general-purpose registers (AW, BW, Program Counter [PC]. The program counter is a 16- CW, OW), each of which can be used as a pair of 8-bit bit binary counter that contains the program segment registers by dividing into upper and lower bytes (AH, offset of the next instruction to be executed. The PC is Al, BH, Bl, CH, Cl, DH, DL). General-purpose incremented each time the microprogram fetches an registers may also be specified implicitly in an in- instruction from the instruction queue. The contents of struction. The implicit assignments are: the PC are replaced whenever a branch, call, return, or break instruction is executed and during interrupt AW Word multiplication/division, word I/O, processing. At this time, the contents of the PC are the data conversion same as the prefetch pointer (PFP). Al Byte multiplication/division, byte I/O, BCD Prefetch Pointer [PFP]. The prefetch pointer is a rotation, data conversion, translation 16-bit binary counter that contains the program seg- AH Byte multiplication/division ment offset of the next instruction to be fetched forthe instruction queue. Because instruction queue prefetch is independent of instruction execution, the contents of the PFP and PC are not always identical. The PFP is updated each time the bus interface unit (BIU) fetches BW CW Translation loop control, repeat prefix Shift/rotate bit counts, BCD operations II Cl an instruction for the instruction queue. The contents OW Word multiplication/division, indirect of the PFP are replaced whenever a branch, call, return I/O addressing or break instruction is executed and during interrupt processing. At this time, the contents of the PFP and Pointer [SP, BP] and Index Registers [IX, IV]. These PC are the same. registers serve as base pointers or index registers Segment Registers [PS, SS, OSo, OS1]. ThepPD70216 when accessing memory using one of the base, memory address space is divided into 64K-byte logical indexed, or base indexed addressing modes. Pointer segments. A memory address is determined by the sum and index registers can also be used as operands for of a 20-bit base address (obtained from a segment word data transfer, arithmetic, and logical instructions. register) and a 16-bit offset known as the effective These registers are implicitly selected by certain address (EA). I/O address space is not segmented and instructions as follows. no segment register is used. The four segment registers SP Stack operations, interrupts are program segment (PS), stack segment (SS), data segment 0 (DS o), and data segment 1 (DS1)' The IX Source block transfer, BCD string following table lists their offsets and overrides. operations, bit field extraction IV Destination block transfer, BCD string Default operations, bit field insertion Segment Register Offset Override PS PFP register None Program Status Word [PSW] SS SP register None The program status word consists of six status flags SS Effective address (SP-based) PS, DSo, DS1 and four control flags. DSo Effective address (non SP-based) PS, SS, DSl Status Flags Control Flags DSo IX register (1) PS, SS, DS1 • V (Overflow) • MD (Mode) DS1 IV register (2) None • S (Sign) • DIR (Direction) Note: • Z (Zero) • IE (Interrupt Enable) • AC (Auxiliary Carry) • BRK (Break) (1) Includes source block transfer, output, BCD string, and bit field extraction. • P (Parity) (2) Includes destination block transfer, input, BCD string, and bit • CV (Carry) field insertion. 29 pPD70208 (V40) NEe When pushed onto the stack, the word image of the Figure 2. Dual Data Buses PSW is as follows: 15 8 MD v DIR IE I BRK I 7 o S z o AC o P CY The status flags are set and cleared automatically depending upon the result of the previous instruction execution. Instructions are provided to set, clear, and complement certain status and control flags. Other flags can be manipulated by using the POP PSW instruction. Between execution of the BRKEM and RETEM in- structions, the native mode RETI and POP PSW instructions can modify the MD bit. Care must be exercised by emulation mode programs to prevent inadvertent alteration of this bit. Sub data bus Main data bus CPU Architectural Features 83-0038288 The major architectural features ofthepPD70208 CPU are: Figure 3. Effective Address Generator • Dual data buses • Effective address generator • Loop counter • PCand PFP Dual Data Buses. To increase performance, dual data buses (figure 2) have been employed in the CPU to fetch operands in parallel and avoid the bottleneck of a single bus. For two-operand instructions and effective Effective Address 83-002737A address calculations, the dual data bus approach is 30 percent faster than single-bus systems. Program Counter and Prefetch Pointer. The functions Effective Address Generator. Effective address (EA) calculation requires only two clocks regardless of the of instruction execution and queue prefetch are de- coupled in the pPD70208. By avoiding a single instruc- addressing mode complexity due to the hardware effective address generator (figure 3). When compared tion pointer and providing separate PC and PFP with microprogrammed methods, the hardware ap- registers, the execution time of control transfers and proach saves between 3 and 10 clock cycles during the interrupt response latency can be minimized. Several clocks are saved by avoiding the need to effective address calculation. readjust an instruction pointer to account for prefetch- Loop Counter and Shifters. A dedicated loop counter is ing before computing the new destination address. used to count the iterations of block transfer and multiple shift instructions. This logic offers a significant Enhanced Instruction Set performance advantage over architectures that control In addition to the pPD8086/88 instruction set, the block transfers and multiple shifts using microprogram- pPD70208 has added the following enhanced instruc- ming. Dedicated shift registers also speed up the tions. execution of the multiply and divide instructions. Compared with microprogrammed methods, multiply and divide instructions execute approximately four times faster. 30 NEe pPD70208 (V40) Instruction Function Bit field extraction (EXT) copies the bit field of specified length (0 = 1 bit, 15 = 16 bits) from the bit field PUSH imm Push immediate data onto stack addressed by DSO:IX:reg8 to the AW register (figure 5). PUSH R Push all general registers onto stack POP R Pop all general registers from stack If the bit field is less than 16 bits, it is right justified with a zero fill. The bit field length can be located in any byte MUL imm Multiply register/memory by immediate data register or supplied as immediate data. The value in SHL immB Shift/rotate by immediate count rega is a bit field offset. A content of 0 selects bit 0 and SHR immB 15 selects bit 15 of the word that DSO:IX points to. SHRA immB ROL immB Following execution, the IX and bit offset register are ROR immB updated to point to the start of the next bit field. ROLC immB RORC immB Packed BCD Strings. These instructions are provided to efficiently manipulate packed BCD data as strings CHKIND Check array index INM Input multiple (length from 1 to 254 digits) or as a byte data type with a OUTM Output multiple single instruction. 1:'-11 PREPARE Prepare new stack frame BCD string arithmetic is supported by the ADD4S, m:iI DISPOSE Dispose current stack frame SUB4S, and CMP4S instructions. These instructions allow the source string (addressed by DSO:IX) and the Unique Instruction Set destination string (addressed by DS1 :IY) to be manip- ulated with a single instruction. When the number of In addition to thepPD70208 enhanced instruction set, BCD digits is even, the Z and CY flags are set according the following unique instructions are supported. to the result of the operation. If the number of digits is odd, the Z flag will not be correctly set unless the upper Instruction Function 4 bits of the result are zero. The CY flag will not be INS Insert bit field correctly set unless there is a carry out of the upper 4 EXT Extract bit field bits of the result. ADD4S BCD string addition The two BCD rotate instructions (ROR4, ROL4) perform SUB4S BCD string subtraction CMP4S BCD string comparison rotation of a single BCD digit in the lower half of the AL ROL4 Rotate BCD digit left register through the register or memory operand. ROR4 Rotate BCD digit right Bit Manipulation. Four bit manipulation instructions TEST1 Test bit have been added to the pPD7020a instruction set. The SET1 Set bit abilityto test, set, clear, or complement a single bit in a CLR1 Clear bit NOT1 Complement bit register or memory operand increases code readability as well as performance over the logical operations REPC Repeat while carry set REPNC Repeat while carry cleared traditionally used to manipulate bit data. FP02 Floating point operation 2 Repeat Prefixes. Two repeat prefixes (REPC, REPNC) allow conditional block transfer instructions to use the Bit Fields. Bit fields are data structures that range in state of the CY flag as a terminating condition. The use length from 1 to 16 bits. Two separate operations on bit of these prefixes allows inequalities to be used when fields, insertion and extraction, with no restrictions on working on ordered data, increasing the performance the position of the bit field in memory are supported. of searching and sorting algorithms. Separate segment, byte offset, and bit offset registers Floating Point Operation Instructions. Two floating are used for bit field insertion and extraction. Because point operation (FPO) instruction types are recognized of their power and flexibility, these instructions are by thepPD7020a CPU. These instructions are detected highly effective for graphics, high-level languages, and by the CPU, which performs any auxiliary processing data packing/unpacking applications. such as effective address calculationand the initial bus Insert bit field (INS) copies the bit field of specified cycle if specified by the instruction. It is the responsi- length (0 = 1 bit, 15 = 16 bits) from the AW register to bility of the external coprocessor to latch the address the bit field addressed by DS1:IY:reg8 (figure 4). The information and data (if a read cycle) from the bus and bit field length can be located in any byte register or complete the execution of the instruction. supplied as an immediate value. The value in reg8 is a bit field offset. A content of 0 selects bit 0 and 15 selects bit 15 of the word that DSO:IX points to. Following execution, the IY and bit offset register are updated to point to the start of the next bit field. pPD70208 (V40) NEe Figure 4. Bit Field Insertion Bit length 15 AW Bit offset Memory Byte boundary Segment base (051) 83-000106B Figure 5. Bit Field Extraction Bit length Bit offset Byte boundary Segment base (050) 83-000107B 8080 Emulation Mode. The pPD70208 CPU can operate JlJIPD8080AF JlPD70208 in either of two modes; see figure 6. Native mode allows Registers A/PSW ALIPSW (lower) the execution ofthepPD8086/88, enhanced and unique instructions. The other operating mode is 8080 emu- B CH lation mode, which allows the entire pPD8080AF C CL instruction set to be executed. A mode (MD) flag is D DH provided to distinguish between the two operating E DL modes. Native mode is active when M D is 1 and 8080 H BH emulation mode is active when MD is O. L BL Two instructions are provided to switch from na"tive to SP BP PC PC 8080 emulation mode and return back. Break for emulation (BRKEM) operates similarly to a BRK Flags C Cy Z Z instruction, except that after the PSW has been pushed S S on the native mode stack, the M D flag becomes P P write-enabled and is cleared. . AC AC During 8080 emulation mode, the registers and flags of the 8080 are mapped onto the native mode registers During 8080 emulation mode, the BP registerfunctions and flags as shown below. Note that PS, SS, DSo, DS1, as the 8080 stack pointer. The use of separate stack IX, IY, AH, and the upper half of the PSW registers are pointers prevents inadvertent damage to the native inaccessible to 8080 programs. mode stack pointer by emulation mode programs. 32 NEe pPD70208 (V40) The 8080 emulation mode PC is combined with the PS To exit 8080 emulation mode, the return from emulation register to form the 20-bit physical address. All emu- (RETEM) instruction pops the PS, PC, and PSW from lation mode data references use DSO as the segment the native mode stack, disables modification of the MD register. For compatibility with older 8080 software bit, and execution continues with the instruction follow- these registers must be equaL By using different ing the BRKEM instruction. Nesting of 8080 emulation segment register contents, separate 64K-byte code modes is prohibited. and data spaces are possible. Interrupt Operation Either an NMI or maskable interrupt will cause the 8080 emulation mode to be suspended. The CPU pushes the TheJiPD70208 supports a number of external interrupts PS, PC, and PSW registers on the native mode stack, and software exceptions. External interrupts are events sets the MD bit (indicating native mode), and enters the asynchronous to program execution. On the other specified interrupt handler. When the return from hand, exceptions always occur as a result of program interrupt (RETI) instruction is executed, the PS, PC, execution. and PSW (containing MD=O) are popped from the native stack and execution in 8080 emulation mode The two types of external interrupts are: continues. Reset will also force a return to native mode. • Nonmaskable interrupt (NMI) The 8080 emulation mode programs also have the • Maskable interrupt (INT) capability to invoke native mode interrupt handlers by means of the call native (CALLN) instruction. This instruction operates like the BRK instruction except that the saved PSW indicates 8080 emulation mode. Figure 6. JiPD 70208 Modes 83-0038308 33 pPD70208 (V40) NEe The six software exceptions are: During standby mode, the clock is distributed only to the circuits required to release the standby mode. • Divide error (DIV, DIVU instructions) When a RESET, NMI, or INT event is detected, the • Array bound error (CHKIND instruction) standby mode is released. Both NMI and unmaskable • Break on overflow (BRKV instruction) interrupts are processed before controir,eturns to the • Break (BRK, BRK3 instructions) instruction following the HALT. In the case of the INT • Single step (BRK bit in PSW set) input being masked, execution will begin with the • Mode switch (BRKEM, CALLN instructions) instruction immediately following the HALT instruction Interrupt vectors are determined automatically for without an intervening interrupt acknowledge bus exceptions and the NMI interrupt or supplied by cycle. When maskabl~ interrupts are again enabled, the hardware for maskable interrupts. The 256 interrupt interrupt will be serviced. vectors are stored in a table (figure 7) located at address OOOOOH. Vectors 0 to 5 are predetermined and Output signal states in the standby mode are listed vectors 6 to 31 are reserved. Interrupt vectors 32 to 255 below. are available for use by application software. Output Signal Status in Standby Mode Each vector is made up of two words. The word located at the lower address contains the new PC for the INTAK, BUFEN, High level MRD, MWR, IOWR, interrupt handler. The word at the next-higher address lORD is the new PS value for the interrupt handler. These BS2-BSO (Note 2) High level must be initialized by software at the start of a program. Low level Nonmaskable interrupts and maskable interrupts (when BUS LOCK High level (low level if the enabled) are normally serviced following the execution HALT instruction follows the of the current instruction. However, the following BUS LOCK prefix) cases are exceptions to this rule and the occurrence of BUFR/W, High or low level the interrupt will be delayed until after the execution of A19-A16/PS3-PSO, the next instruction. A15- AS, AD7-ADo • Moves to/from segment registers Note: • POLL instruction (1) Output pin states during refresh and DMA bus cycles will be as • Instruction prefixes defined for those operations. • EI instruction (maskable interrupts only) (2) Halt status is presented prior to entering the passive state. Another special case is the block transfer instructions. These instructions are interruptable and resumable, Figure 7. Interrupt Vector Table but because of the asynchronous operation of the BIU, OOOH the actual occurrence of the interrupt may be delayed Vector 0 Divide Error up to three bus cycles. 004H Vector 1 Break Flag 008H Standby Mode Vector 2 NMllnput OOCH Dedicated The JlPD70208 CPU has a low-power standby mode, Vector 3 BRK 3 Instruction which can dramatically reduce power consumption 010H during idle periods. Standby mode isentered by simply Vector4 BRKV Instruction 014H executing a native or 8080 emulation HALT instruction; VectorS CHKIND Instruction no external hardware is required. All other peripherals 018H },-~, such as the timer/counter unit, refresh control unit, VectorS and DMA control unit continue to operate as pro- grammed. 07CH Vector 31 080H Vector 32 General Use • BRK imm8 Instruction 3FCH • BRKEM Instruction } • INT Input [External] Vector 255 • CALLN Instruction 83·000111A 34 NEe pPD70208 (V40) Clock Generator Figure 9. External Oscll/ator Configuration The clock generator (CG) generates a clock signal half the frequency of a parallel-resonant, fundamental mode crystal connected to pins X1 and X2. Figure 8 shows the recommended circuit configuration. Capac- itors C1 and C2, required for frequency stability, are selected to match the crystal load capacitance. External clock sources are also accommodated as External shown in figure 9. The CG distributes the clock to the Clock CLKOUT pin and to each functional block of the 83-002740A pPD70208. The generated clock signal has a 50- percent duty cycle. Figure 10. RESET/READY Synchronization Bus Interface Unit The bus interface unit (BIU) controls the external CLOCK address, data, and control buses for the three internal RESOUT bus masters: CPU, DMA control unit (DMAU), and refresh control unit (RCU). The BIU is also responsible To internal circuit for synchronization of the RESET and READY inputs To internal with the clock. The synchronized reset signal is used circuit internally by the pPD70208 and provided externally at the RESOUT pin as a system-wide reset. The synCh- 83-002728A ronized READY signal is combined with the output of the wait control unit (WCU) and is distributed internally to the CPU, DMAU, and RCU. Figure 10 shows the synchronization of RESET and READY. The BIU also has the capability of overlapping the execution of the next instruction with memory write bus cycles. There is no overlap of instruction execution with read or I/O write bus cycles. Figure 8. Crystal Configuration Xl OSC Frequency Divider Oscillator [+2] CLKOUT X2 o Cl = C2 = 15 to 30 pF e'ye, CLOCK (to internal circuit) osc I I J 1---.-1:'. ------4}- CLOCK (CLKOUT) 83-001822B 35 J.lPD70208 (V40) NEe Bus Arbitration Unit determine the I/O addressing, enable/disable periph- erals, and control pin multiplexing. Byte I/O instruct- The bus arbitration unit (BAU) arbitrates the external ions must be used to access the system I/O area. address, data and control buses between the internal CPU, DMAU, and RCU bus requesters and an external bus master. TheBAU bus priorities from the highest liD Address Register Operation priority requester to the lowest are: FFFFH Reserved FFFEH OPCN Read/Write RCU (Demand mode) FFFDH OPSEL Read/Write DMAU FFFCH OPHA Read/Write HLDRQ FFFBH DULA Read/Write CPU FFFAH IULA ReadlWrite RCU (Normal mode) FFF9H TULA ReadiWrite Note that RCU requests the bus at either the highest or FFF8H SULA Read/Write FFF7H Reserved lowest priority depending on the status of the refresh request queue. Bus masters other than the CPU are FFF6H WCY2 Read/Write FFF5H WCY1 Read/Write prohibited from using the bus when tHe CPU is FFF4H WMB Read/Write executing an instruction containing a BUSLOCK prefix. Therefore, caution shouldbe exercised when using the FFF3H Reserved FFF2H RFC Read/Write BUS LOCK prefix with instructions having a long FFF1H Reserved ,execution time. FFFOH TCKS Read/Write If abus master with higher priority than the current bus master requests the bus, the BAU inactivates the On-Chip Peripheral Connection Register current bus master's acknowledge signal. When the BAU sees the bus request from the current master go The on~chip peripheral connection (OPCN) register inactive, the BAU gives control of the bus to the higher controls multiplexing of the JlPD70208 multiplexed priority bus master. Whenever possible, the BAU per- pins. Figure 11 shows the format of the OPCN register. forms bus switching between internal bus masters The interrupt request switch (IRSW) field controls without the introduction of idle bus cycles, enhancing multiplexing of ICUinterrupt inputs INT1 and INT2. system throughput. The output of an internal peripheral or ~n external interrupt source can be selected as the INTland INT2 System 110 Area inputs to the ICU. The I/O address space from addresses FFOOH to The pin function (PF) field in the OPCN selects one of FFFFH is reserved for use as the system I/O area. four possible states for the DMARQ3/RxD, DMAAK3/ Located in this area are the 12 JlPD70208 registers that TxD, and INTAK/TOUT1/SRDY pins. Bit 0 of the Figure 11. OpeN Register Format 21 I - I - I - I - I IRSW I PF OPCN L p;" F,"oIi," 00 DMAR03/RxD DMAR03 DMAAK3/TxD DMAAK3 INTAK/SRDY/TOUT1 INTAK 01 DMAR03 DMAAK3 TOUT1 10 RxD TxD INTAK 11 RxD TXD SRDY Interrupt Request Switch INT1 INT2 00 INTP1 Pin INTP2 Pin 01 SCU INTP2 Pin 10 INTP1 Pin TOUn 11 SCU TO un 83-0018276 36 NEe pPD70208 (V40) OPCN controls the function of the INTAK/TOUT1/ Internal Peripheral Relocation Registers SRDY pin. If cleared, INTAK will appear on this The five internal peripheral relocation registers (figure output pin. If bit 0 is set, either TOUT1 or SRDY will 13) are used to fix the 110 addresses of the DMAU, ICU, appear at the output depending on the state of bit 1. If TCU, and SCU. The on-chip peripheral high-address bit 1 is cleared, DMA channel3110 signals will appear (OPHA) register is common to all four internal periph- on the DMARQ3/RxD and DMAAK3/TxD pins. If the erals and fixes the high-order byte of the 16-bit I/O SCU is to be used, bit 1 of the PF field must be set. address. The individual DMAU low-address (DULA) register, ICU low-address (IULA) register, TCU low- On-Chip Peripheral Selection Register address (TULA) register, and the SCU low-address The on-chip peripheral selection (OPSEL) register is (SULA) register select the low-order byte of the I/O used to enable ordisable theJlPD70208 internal periph- addresses for the DMAU, ICU, TCU, and SCU periph- erals. Figure 12 shows the format of the OPSEL erals. register. Any of the four (DMAU, TCU, ICU, SCU) The contents of the OPHA register are: peripherals can be independently enabled or disabled by setting or clearing the appropriate OPSEL bit. 7 OPHA o A8 Figure 12. OPSEL Register Format The formats for the individual internal peripheral re- 7 4 gisters appear below. Since address checking is not I - I - I ~ I - I 55 I T5 I IS I DS I OPSEL performed, do not overlap two peripheral I/O address ~J spaces. 7 DULA o r- r- 7 IULA o Peripheral Selected Operation ~ ~ DMAU ICU TCU 0== 1 Disabled Enabled 7 TULA o SCU 83-001813A 7 SULA o Figure 13. JlPD7020B Peripheral Relocation 64 K byte 1/0 space FFFFH Reserved System 1/0 Area 256 byte area FFOOH r - - - - - - - - ; / / OPHA'256~/ 0100HD '\\.\~_____. . . "\ -'-'-...-ou LA ...................L.J...'"-'-"--'-'-............ _ OOOOH 83-0027278 37 pPD70208 (V40) NEe Timer Clock Selection Register The RCU will then perform back-to-back refresh cycles until three requests remain in the queue. This guar- The timer clock selection (TCKS) register selects the antees the integrity of the DRAM system while maximiz- clock source for each of the timer/counters as well as ing performance. the divisor for the internal clock prescaler. Figure 14 shows the format of the TCKS register. The clock The refresh count interval can be calculated as follows: source for each timer/counter is independently select- Refresh interval = 8 x N x tCYK ed from either the prescaled internal CPU clock orfrom an external clock source (TCLK). The internal clock is where N is the timer factor selected by the RTM derived from the CLKOUT signal and can be divided by field. 2,4,8, or 16 before being presented to the clock select When the pPD70208 is reset, the RE field in the RFC logic. register is unaffected and the RTM field is set to 01000 (N = 9). No refresh bus cycles occur while RESET is Refresh Control Unit asserted. The refresh control unit (RCU) refreshes external dynamic RAM devices by outputting a 9-bit row address Figure 15. Refresh Control Register on address lines As-Ao and performing a memory read 5 4 bus cycle. External logic can distinguish a refresh bus cycle by monitoring the refresh request (REFRQ) pin. IRE 1-I -1 RTM I RFC Following each refresh bus cycle, the refresh row counter is incremented. The refresh control (RFC) register in the system I/O L R.I.... Ti_ 00000 N (Timer Factor) 17 00001 18 area contains two fields. The refresh enable field 00010 19 enables or disables the refreshing fu nction. The refresh 00011 20 timer (RTM) field selects a refresh interval to match the -- - -- - - - - 00100 5 dynamic memory refresh requirements. Figure 15 00101 6 shows the format for the RFC register. 11110 31 To minimize the impact of refresh on the system bus 11111 32 bandwidth, the pPD70208 utilizes a refresh request queue to store refresh requests and perform refresh Refresh Enable Function bus cycles in otherwise idle bus cycles. . 0 Disables Refresh 1 Enables Refresh The RCU normally requests the bus as the lowest- 83-001814A priority bus requester (normal mode). However, if seven refresh requests are allowed to accumulate in the RCU refresh request queue, the RCU will change to the highest-priority bus requester (demand mode). Figure 14. Timer Clock Selection Register 4 I - I - I - I CS2 I CS1 I cso I PS I TCKS ~ Prescale Select Internal Clock Prescaled by: 00 2 01 4 10 8 11 16 Clock Selection Clock for TCTn Input 0 Internal Clock 1 TCLK Pin 83-001819B 38 NEe pPD70208 (V40) Wait Control Unit the READY pin remains inactive. When READY is again asserted, the bus cycle continues with T4 as the next The wait control unit (WCU) inserts from zero to three cycle. TheJlPD70208 internal peripherals neverrequire wait states into a bus cycle in order to compensate for wait states; four clock cycles will terminate an internal the varying access times of memory and 1/0 devices. peripheral bus cycle. The number of wait states for CPU, DMAU, and RCU bus cycles is separately programmable. In addition, CPU Wait States the memory address space is divided into three in- The WMB register divides the 1M-byte memory address dependent partitions to accommodate a wide range of space into three independent partitions: lower, middle, system designs. RESET initializes the WCU to insert and upper. Figure 16 shows the WMB register format. three wait states in all bus cycles. This allows operation with slow memory and peripheral devices before the Initialization software can then set the number of wait initialization of the WCU registers. states for each memory partition and the 1/0 partition via the WCY1 register (figure 17). The three system I/O area registers that control the WCU are wait cycle 1 (WCY1), wait cycle 2 (WCY2), DMA and Refresh Wait States . and wait state memory boundary (WMB). The WCU always inserts wait states corresponding to the wait The WCY2 register (figure 18) specifies the number of count programmed in WCY1 or WCY2 registers into a wait states to be automatically inserted in DMA and bus cycle, regardless of the state of the external refresh bus cycles. DMA wait states must be set to the READY input. After the programmed number of wait maximum of the DMA memory and I/O partitions. states occurs, the WCU will insert Tw states as long as Refresh wait states should be set to the maximum value of all DRAM memory partitions. Figure 16. Wait State Memory Boundary Register 7 6 I-I LMB I-I UMB WMB I Lower Memory Block Size [1) Memory Block Size (KB) ~ Upper Memory Block Size 000 32 001 64 010 96 011 128 100 192 101 256 110 384 111 512 FFFFFH .....-------........,} Upper Memory Block Specified by the UMB Field Middle Memory Block OOOOOH _ ~_Lo_w_e_rM_e_m_O_ry_B_lo_Ck_..... } Specified by the LM B Field Note: [1) By default, the address space remaining between the UBM and LBM is the middle memory block. 83-0018208 39 pPD70208 (V49) NEe Figure 17. Wait Cycle 1 Register Figure 18. Wait Cycle 2 Register 76543210 I lOW UMWIMMWILMW IWCY1 4 G. . . , I - I - I - I - I DMAW I RFW IWCY2 ,--I -.J M.m,,,! Block W.' .,,", Middle Memory Block Wait States Number of ~ ~""'h W.;I '101" DMA Wait States Number of Wait States Upper Memory Block Wait States Wait States 00 0 1/0 Wait States 01 1 00 0 10 2 01 1 11 3 10 2 11 3 83-001815A 83-001818A Timer/Counter Unit pPD71054 Programmable Timer/Counter.' Figure 19 shows the internal block diagram of the TCU. The timer/counter unit (TCU) provides a set of three independent 16-bit timer/counters. The output signal The TCU has the following features: of ti mer/cou nter 0 is hardwi red internally as an i nterru pt • Three 16-bit timer/counters source. The output of timer/counter 1 is available • Six programmable count modes internally as an interrupt source, used as a baud rate • Binary/BCD counting generator, or used as an external output. The timer/ • Multiple latch command counter 2 output is available as an external output. Due • Choice of two clock sources to mode restrictions, the TCU is a subset of the Figure 19. TCU Block Diagram TCLK (EXT) CLOCK TCTLO=High TCTL1 =Hlgh TCTL2 (EXT) TOUTO (to ICU) TOUT1 (EXT) TOUT2 (EXT) Read/Write Control Circuit TMD I (Mode Register) I I I L 83-001834B 40 NEe pPD70208 (V40) Because RESET leaves the TCU in an uninitialized Mode 1 [ Retriggerable One-Shot]. In mode 1, a low- state, each timer/counter must be initialized by level one-shot pulse, triggered by TCTL2 is output specifying an operating mode and a count. Once from the TOUT2 pin. This mode is available only on programmed, a timer/counter will continue to operate timer/counter 2. ' in that mode until another mode is selected. When the Mode 2 [Rate Generator]. In mode 2, TOUT cyclically count has been written to the counter and transferred goes low for one clock period when the counter to the down counter, a new count operation starts. reaches the 0001 H count. A counter in this mode Both the current count and the counter status can be operates as a frequency divider. All timer/counters can read while count operations are in progress. operate using mode 2. TCU Commands Mode 3 [Square-Wave Generator]. Mode 3 is a frequency divider similar to mode 2, but the output has a sym- The TCU is programmed by issuing I/O instructions to metrical duty cycle. This mode is available on all three the I/O port addresses programmed in the OPHA and timer/counters. TULA registers. The individual TCU registers are selected by address bits A1 and Ao as follows. Mode 4 [Software-Triggered Strobe]. I n mode 4, when ~ the specified count is reached, TOUT goes low for the a:iI At AD Register Operation duration of one clock pulse. Mode 4 is available on all timer/counters. 0 0 TCTO Read/Write TSTO Read ModeS [Hardware-Triggered Strobe]. Mode5 is similar 0 TCT1 Read/Write to mQde 4 except that operation is triggered by the TST1 Read TCTL2 input and can be retriggered. This mode is 0 TCT2 Read/Write available only on timer/counter 2. TST2 Read TMD Write Serial Control Unit The serial control unit (SCU) is a single asynchronous The timer mode (TMO) register selects the operating serial channel that performs serial communication mode for each timer/counter and issues the latch between the pPD70208 and an external serial device. command for one or more timer/counters. Figure 20 TheSCU issimiiartothepPD71051 Serial Control Unit shows the format for the TMD register. except for the lack of synchronous communication protocols. Figure 23 is the block diagram of the Writes to the timer/counter 2-0 (TCT2-TCTO) registers SCU. stores the new count in the appropriate timer/counter. The count latch command is used before reading The SCU has the following features. count data in order to latch the current count and • Full-duplex asynchronous serial controller prevent inaccuracies. • Clock rate divisor (x16, x64) The timer status 2-0 (TST2-TSTO) registers contain • Baud rates to 250 kb/ssupported status information for the specified cou nter (figu re 21). • 7-, 8-bit character lengths The latch command is used to latch the appropriate • 1-, 2-bit stop bit lengths counter status before reading status information. If • Break transmission and detection both status and counter data are latched for a counter, • Full-duplex, double-buffered transmitter/receiver the first read operation returns the status data and • Even, odd, or no parity subsequent read operations obtain the count data. • Parity, overrun, and framing error detection • Receiver-full/transmitter-empty interrupt Count Modes The SCU contains fou r separately addressable registers There are six programmable timer/counter modes. The for reading/writing data, reading status, and control- timing waveforms for these modes are in figure 22. ling operation of the SCU. The serial receive buffer (SRB) and the serial transmit buffer (STB) store the Mode 0 [Interrupt on End of Count]. In this mode, incoming and outgoing character data. The serial TOUT changes from the low to high level when the status (SST) register allows software to determine the specified count is reached. This mode is available on current state of both the transmitter and receiver. The all timer/counters. serial command (SCM) and serial mode (SMD) registers determine the operating mode of the SCU while the serial interrupt mask (SIMK) register allows software control of the SCU receive and transmit interrupts. 41 pPD70208 (V40) NEe Figure 20. Timer Mode ,Register 4 4 TMD L sc I RWM I CMODE I BD I TMD r sc oT 0 I o I 0 I 0 I o I ~ I ~ Binary or BCD 0 Binary Count L-...., SC 00 Counter to be Latched TCTO I 1 BCD I 01 TCT1 10 TCT2 L-_ Count Mode Mode 000 0 001 1 x10 2 x11 3 100 4 101 5 Read/Write ~ Operation Mode 00 Counter Latch Command 01 Lower Byte Only 10 Higher Byte Only Lower Byte Followed by 11 Higher Byte Select Counter Operation 00 TCTO 01 TCT1 10 TCT2 11 Multiple Latch Command Note: x = Don't care 83-0018178 Figure 21. TCU Status Register 4 2 TSTn I oL'1 NC 1 RWM 1 CMODE I BD I 1.1'"""'" ,•• '""'"' mo. . . .«h'g. The meaning of each field is the same as that of the TMD register. I Null Count 1 Count Data 1 r 0 1 Valid J I 1 1 Invalid 1 r Output Levell Level I r 0 1 Low 1 I 1 I High 1 83-0018218 42 NEe pPD70208 (V40) Figure 22. TCU Waveforms (Sheet 1 of 3) Mode 0 ClK IOWR TOUT Count Value IOWR L.:.J TOUT Count Value IOWR ~ TCTL2 LJ TOUT2 Count Value OOOOH IFFFFH IFFFEH IFFF DH I FFFCH Mode 1 TCTL2 - - - - - - - - - \ t1---------------\ t1--------------\ t1----- -I 11------- --- TOUT2 Count Value n I n-1 I n-2 L:J TCTL2 _--__-__ --__--__ t1----------------1t1--------------------- -~\ TOUT2 Count Value n I n-1 I n-2 83-001851 B 43 pPD70208 (V40) NEe Figure 22. TCU Waveforms (Sheet 2 of 3) Mode 2 ClK TCTL LJ TOUT Count n Value TOUT Count Value n n-1 I0006H I 0005H I 0004H I0003H I 0002H Mode 3 ClK IOWR l LB=4 TCTL LJ TOUT U 0004H Count Value n n-1 0004H 0002H 0004H I 0002H 0004H I 0002H I 0004H 0004H I IOWR 1 LB=5 TOUT L 0004H Count Value n n-1 0004H I Q002H I OOOOH 0004H I 0002H 0004H 0002H I OOOOH I 83-0018536 44 NEe pPD70208 (V40) Figure 22. TCU Waveforms (Sheet 3 of 3) Mode 4 TOUT Count Value n n-1 I 0004H I 0003H I 0002H I 0001H OOOOH FFFFH I I FFFEH FFFDH FFFCH I TCTl TOUT Count Value n n-1 I 0004H I 0004H I 0004H I 0003H I 0002H I 0001 H --, lB=5/ IOWR L-..J TOUT I n-1 I 0005H I 0004H I 0003H I 0002H I 0003H I 0002H I Q001H OOOOH FFFFH Mode 5 TCTL2 -- - - - - - - - - - - - -\n- --------- -- ----\ n------ n ------ l: TOUT2 Count Value n-1 I n-2 I n-3 I 0002H I 0001H' TCTL2 -- - - - - - -', n--------------------------: n---------- TOUT2 Count Value I n-1 I 0004H I 0003H I 0002H I 0001H I LJIOOOOH FFFFH tFFFEH I 0003H I0002H 83-0018558 45 pPD70208 (V40) NEe Figure 23. SCU Block Diagram RESET CLOCK r--. K" J J SST I" I I I ~ I (Status Register) f~ III Read/Write Control A ::I Ao II) ec SUS ~ I .... SCM (Command Register) L 0 0 RTCLK (from TCU) '" I I " Receiver (Including I Receive Buffer) S III ~K 1\1 '; ~ SRB 1 (Receive Data Buffer) I f IA (8) RxD c iii E ... lieD ~ I STB ~ (Transmit Data Buffer) ! (8) '" / Transmitter (Including Transmit Buffer) ~ ~ I .... SMD (Mode Register) [ "~ I " 0 :::) II) .4 .. 1 SIMK (Interrupt I Interrupt ~ SINT (To ICU) ~ Mask Register) I - Generation logic 83-001838B Receiver Operation stream (LSB to MSB) and an optional parity bit. One or two stop bits are then appended, depending on the While the RxD pin is high, the receiver is in an idle state. programmed mode. When the character has been A transition on RxD from high to low indicates the start transferred from the STB, the TRBDY bit in the SST is of new serial data. When a complete, character has set and if unmasked, a transmit buffer empty interrupt been received, it is transferred to the SRB; the receive is generated. buffer ready (RBRDY) bit in the SST register is set and (if unmasked) an interrupt is generated. The SST also Serial data can be transmitted and received by polling latches any parity, overrun, or framing errors at this the SST register and checking the TBRDY or RBRDY time. flags. Data can also be transmitted and received by SCU-generated interrupts to the interrupt control unit. The receiver detects a break condition when a null The SCU generates an interrupt in either of these character with zerd parity is received. The BRK bit is conditions: set for as long as the subsequent receive data is low and resets when RxD returns to a high level. The MRDY (1) The receiver is enabled, the SRB is full, and receive bit (SCM) and RBRDY (SST) are gated to form the interrupts are unmasked. output SRDY. SRDY prevents overruns from occurring (2) The transmitter is enabled, the STB is empty, and when the program is unable to process the input data. transmit interrupts are unmasked. Software can control MRDY to prevent data from being sent from the remote transmitter while RBRDY can prevent the immediate overrun of a received character. Transmitter Operation TxD is kept high while the STB register is empty. When the transmitter is enabled and a character is written to the STB register, the data is converted to serial format and output on the TxD pin. The start bit indicates the start of the transmission and is followed by the character 46 NEe pPD70208 (V40) SCU Registers and Commands Figure 25 shows the SCM and SMD registers. The SCM register stores the command word that controls I/O instructions to the I/O addresses selected by the transmission, reception, error flag reset, break trans- OPHA and SULA registers are used to read/write the mission, and the state of the SRDY pin. The SMD SCU registers. Address bits A1 and Ao and the read/ register stores the mode word that determines serial write lines select one of the six internal registers as characteristics such as baud rate divisor, parity, char- follows: acter length, and stop bit length. Initialization software should first program the SMD AI Ao Register Operation register followed by the SCM register. Unlike the 0 0 SRB Read JlPD71051, the SMD register can be modified at any STB Write time without resetting the SCU. 0 SST Read SCM Write The SIMK register (figure 26) controls the occurrence 0 SMD Write of RBRDY and TBRDY interrupts. When an interrupt is masked, it is prevented from propagating to the inter- ~ SiMK Read/Write rupt control unit. U The SRB and STB are a-bit registers. When the Baud Rate Generator character length is 7 bits, the lower 7 bits of the SRB Timer/counter 1 is used as the baud rate generator register are valid and bit 7 is cleared to O. If programmed when the SCU is enabled. The input baud rate clock is for 7-bit characters, bit 7 of the STB is ignored. scaled by 16 or 64, as selected in the SMD register, to The SST register (figure 24) contains the status of the determine the receive/transmit data clock. There are transmit and receive data buffers and the error flags. no restrictions on the SCU input baud rate clock other Error flags are persistent. Once an error flag is set, it than operating the TCU in mode 3 with a square-wave remains set until a clearerrorflags command is issued. output. Figure 24. SST Register 4 SST \ 1 \ BKD \ FE \ OVE \ PE \ 1 \RBRDV\TBRDV\ I J Transmit Buffer Ready 1 Operation I STB Full I l 0 1 l 1 I STB Empty 1 .1 Receive Buffer Ready I Operation 1 L 0 I SRB Empty I I 1 I SRB Full 1 J Parity Error 1 Operation 1 1 0 I No Error \ L 1 I Error Occurred I J Overrun Error I Operation 1 L 0 I No Error I L 1 1 Error Occurred 1 I Framing Error 1 Operation 1 L 0 1No Error 1 L 1 \ Error Occurred \ J Break I Operation 1 I 0 I Normal Reception I L 1 1 Break Detected 1 83-0018328 47 pPD70208 (V40) NEe Figure 25. SCM and SMD Registers SCM Register 4 o SCM I - I - IMRDVI·ECL ISBRKI RE 1 - I TE I Transmitter Enabled Operation I 0 Transmitter Disabled 1 Transmitter Enabled Receiver Enabled Operation 0 Receiver Disabled 1 Receiver Enabled Send Break Operation I 0 Normal Operation 1 TxD = 0 (Break) Error Clear Operation I 0 No Operation 1 Error Flag Clear MRDY Mask Ready 0 SRDY = 1 (Mask) 1 Normal Operation .of SFi'ilY Output SMD Register SMD I STL I PS I CL J BF L Baud Rate Factor 0- Illegal Operation 10 RTCLK Frequency + 16 11 RTCLK Frequency + 64 Character Length Operation 0- Illegal 10 7 Bit Characters 11 8 Bit Characters Parity Select Operation -0 No Parity 01 Odd Parity 11 Even Parity Stop Bit Length Operation -0 Illegal 01 1 Stop Bit 11 2 Stop Bits 83-0018368 48 NEe pPD70208 (V40) Figure 26. SIMK Register The ICU has the fellewing features. • Eight interrupt request inputs 4 3 2 0 • Cascadable with JlPD71059 Interrupt Centrollers • Pregrammable edge- er level-triggered interrupts (TCU, edge-triggered interrupts enly) • Individually maskable interrupt reql,lests eperation • Pregrammable interrupt request prierity o Unmask • Pelling mede 1 Mask o Unmask leu Registers 1 Mask Use I/O instructiens to. the I/O addresses selected by 83-002736A the OPHA and IULA registers to read from and write to the ICU registers. Address bit Ao and the cemmand Interrupt Control Unit word selects an ICU internal register. I:R The interrupt centrel unit (ICU) is a pregrammable ______-------'---~ a:I interrupt centreller equivalent to. the JlPD71059. The AO Other Condition Operation ICU arbitrates up to. eight interrupt inputs, generates a Read 0 IMD selects IRQ CPU - IRQ data CPU interrupt request, and eutputs the interrupt vecter 0 IMD selects liS CPU -liS data number en the internal data bus during an interrupt 0 Polling phase CPU - Polling data acknowledge cycle. Cascading up to. seven external 1 CPU -IMKW slave JlPD71059s permits the JlPD70208 to. suppert up Write 0 D4= 1 CPU -+ IIW1 to. 56 interrupt seurces. Figure 27 is the bleck diagram 0 D4 = 0 and D3 = 0 CPU -+ IPFW fer the ICU. 0 D4 = 0 and D3 = 1 CPU -+ IMDW During initialization CPU -+ IIW2 CPU -+ IIW3 CPU -+ IIW4 After initialization CPU -+ IMKW Note: (1) In polling phase. polling data has priority. over the contents of the IRQ or liS register when read. Figure 27. leu Block Diagram SAO} {_A8 SAl To BIU" - A g SA2 --..oA10 Read/Write Control t----INTAK (from CPU) 1 - - - - INT (to CPU) TeUTO (from TCU) Priority Determination Logic INTo INT 1 J1'.. Mux . SINT (from SCU) TeUT1 (from TCU) INTPl INT 2• Mux INTP2 In- Interrupt service Request INT3 olNTP3 Register 1 4 - - - - - 1 - - - - + 1 Register INT4 olNTP4 External Pins (liS) (IRQ) Interrupt INTs olNTPs Mask INTs olNTPs Register (IMK) INT7 olNTP7 83-0018378 49 pPD70208 (V40) NEe Initializing the ICU slave J.lPD71059 INT output is routed to one of the J.lPD70208 INTP inputs. During the second interrupt The ICU is always used to service maskable interrupts acknowledge bus cycle, the ICU places the slave in a J.lPD70208 system. Prior to accepting maskable address on address lines A10-Aa. Each slave com- interrupts, the ICU must first be initialized (figure 28). pares this address with the slave address programmed Following initialization, command words from the CPU using interrupt initialization word 3 (1IW3).lf the same, can change the interrupt request priorities, mask/un- the slave will place the interrupt vector on pins ADr mask interrupt requests, and select the polling mode. ADo during the second interrupt acknowledge bus Figures 29 and 30 list the ICU initialization and com- cycle. mand words. Interrupt initialization words 1-4 (IIW1-IIW4) initialize Figure 29. Interrupt Initialization Words 1-4 the ICU, indicate whether external J.lPD71059s are connected as slaves, select the base interrupt vector, 07 06 05 04 03 02 01 00 and select edge- or level-triggered inputs for INT1- IIW1 I - I - I - I 1 LEV I - ISNGL.i 114 I INT7. Interrupt sources from the TCU are fixed as I edge-triggering. INTO is internally connected to I I TOUTO, and INT2 may be connected to TOUT1 by the IRSW field in the OPCN. lr Writes IIW4 I 0 I IIW4 Not Required Operation The interrupt mask word (IMKW) 'contains program- 1 I IIW4 Required I mable mask bits for each of the eight interrupt inputs. The interrupt priority and finish word (IPFW) is used by ~I Single Mode I Mode I 0 I Extended Mode (Slave Controllers) the interrupt handler to terminate processing of an 1 1Single Mode (No Slave Controllers) I interrupt or change interrupt priorities. The interrupt mode word (IMDW) selects the polling register, inter- ~ Level-Triggered Mode Mode rupt request (IRQ) or interrupt in service (liS) register, 0 Edge Trigger (RiSing Edge) and the nesting mode. 1 Level Trigger (Active High) The initialization words' are written in consecutive order starting with IIW1. IIW2 sets the interrupt vector. IIW3 specifies which interrupts are connected to slaves. IIW3 is only required in extended systems. The ICU will only expect to receive IIW3 if SNGL = 0 (bit 01 of IIW1). Higher 5 bits of interrupt IIW4 is only written if 114 = 1 (bit Do of IIW1). vector number I1PD71059 Cascade Connection IIW3 I S7 I S6 I S5 I S4 I S3 I S2 SI I o I To increase the number of maskable interrupts, up to seven slave J.lPD71059 Interrupt Controllers can be cascaded. During cascade operation (figure 31), each Figure 28. Initialization Sequence lE'" ~ C"oKIi" Status 0 Status INTn is not a slave input I IIWI I Bits SNGL and 114 are set. 1 INTn is a slave input lAo = 0,04 = 11 The default Initialization I Is performed. I IIW2 I I I Ao=1 I IIW4 I o I o I o IEXTNI - I - I SFI I 1 ~ SNGL=O, 114=1 I SNGL=O, 114=0 I I SNGL=I, 114=1 SNGL=I, 114=0 I I I IIW3 Ao-1 I I l I L IIW3 Ao-1 I I L Self Finish Interrupt Operation 0 FI Command Mode I IIW4 I I IIW4 I I I I .I 1 Self Finish Mode - Ao=1 Ao-1 I I I External llnltlalization Completed I Nesting Mode 0 Mode Normal Nesting 83-003821 A 1 Extended Nesting 83-0027268 50 NEe pPD70208 (V40) Figure 30. Command Words Interrupt Request Mask Operation INTn not Masked INTn Masked IPFW I RP Sil FI oI0 Il2 1L1 IlO I + + + Interrupt 0 0 0 INTO level 0 0 1 INT1 0 1 0 INT2 0 1 1 INT3 1 0 0 INT4 1 0 1 INT5 1 1 0 INT6 1 1 1 INT7 0 0 1 No Rotation Normal FI Command No level 1 0 1 Specification Rotation Normal Rotation FI Command FI 0 1 1 No Rotation FI Command Command for Specification Rotate Priority 1 1 1 level Rotation Specified Bit Specify Interrupt level, Specification Rotation FI Command Finish Interrupt 0 1 0 No Rotation No Operation Commands 1 1 0 Rotation Specified Bit Non·FI Rotation Command 0 0 Command No Rotation Sell FI Mode 0 No level Rotation Reset Specification 1 0 0 Rotation Sell FI Mode Rotation Set D6 DO IMDW I- I SNM IEXCNI 0 I 1 I POL I SR IISJlR I Select Register In-Service/Request Register Read Register Selection to Read Select 0 - No Operation 1 0 IRQ Selection 1 1 liS Selection Polling Mode Polling 0 No Operation I 1 Polling Command I Set Nesting Exceptional Nesting Mode 2 Mode Nesting Mode 0 - No Operation 1 0 Exceptional Nesting Mode Release 1 1 Exceptional Nesting Mode Set 83-001835C 51 pPD70208 (V40) NEe Figure 31. pPD71059 Cascade Connection ~D702081 I ASTB Address A19/PS3·A1S/PSo I - - Latches/ LA1 A1S-AS I - - Buffers ~S AD7·ADo r ",PD71059 D7-DO INTPo INTP1 - - '-- Ao INTP2 - lORD RD INTP 3 - 10WR WR INTP4 - INTPs - INTPs - INTPn INT INTP7 - INTAK INTAK LA - Latched Address ' - - - SA2·SAo BA - Buffered Address 83-002739A DMA Control Unit Terminal Count The DMA Control Unit (DMAU) is a high-speed DMA The DMAU ends DMA service when the terminal count controller compatible with the pPD71071 DMA Con- condition is generated or when the END input is troller. The DMAU has four independent DMAchannels asserted. A terminal count (TC) is produced when the and performs high-speed data transfers between contents of the current count register becomes zero. If memory and external peripheral devices at speeds as autoinitialization is not enabled when DMA service high as 2 megabytes/second in an 8-MHz system. terminates, the mask bit of the channel is set and the Figure 32 is the block diagram for the DMAU. DMARQ input of that channel is masked. Otherwise, the current count and address registers are reloaded The DMAU has the following features. from the base registers and new DMA transfers are • Four independent DMA channels again enabled. • Cascade mode for slave pPD71071 DMA controllers DMA Transfer Type • 20-bit address registers • 16-bit transfer count registers The type of transfer the DMAU performs depends on • Single, demand, and block transfer modes the following conditions. • Bus release and bus hold modes • Direction of the transfer (each channel) • Autoinitialization • Transfer mode (each channel) • Address increment/decrement • Fixed/rotating channel priorities • Bus mode • TC output at transfer end Transfer Direction • Forced termination of service by END input All DMA transfers use memory as a reference point. DMAU Basic Operation Therefore, a DMA read operation transfers data from memory to an I/O port. A DMA write operation reads an The DMAU operates in either a slave or master mode. I/O port and writes the data into memory. During In the slave mode, the DMAU samples the four DMARQ memory-to-I/O transfer, the DMA mode (DMD) register input pins every clock. If one or more inputs are active, is used to select the transfer directions for each the corresponding DMA request bits are set and the channel and activate the appropriate control signals. DMAU sends a bus request to the BAU while continuing to sample the DMA request inputs. After the BAU returns the DMA bus acknowledge signal, the DMAU Operation Transfer Direction Activated Signals stops DMA request sampling, selects the DMA channel DMA read Memory -I/O 10WR, MRD with the highest priority, and enters the bus master DMA write I/O - Memory lORD, MWR mode to perform the DMA transfer. While in the bus master mode, the DMAU controls the external bus and DMA verify Addresses only; no transfer performed performs DMA transfers based on the preprogrammed channel information. 52 NEe pPD70208 (V40) Figure 32. DMAU Block Diagram DMAU Address Bus (20) Internal Address Bus Internal Bus Interface Internal Data Bus Address Register I Current Address (20x4) I Control Register Group Base Address (20x4) Channel (4) Internal Control Bus Device Control (10) BUSRQ BAU { BUSAK DMAU Data Bus Status (8) Mode Control (7x4) Count Register Base Count (16x4) Mask (4) DMARQ3-0 Current Count (16x4) I DMAAK3-0 END/TC Priority Control Terminal Count 83-001830B Bus Mode Figure 33. Bus Modes The DMA device control (DDC) register selects oper- Bus Release Mode ation in either the bus release or bus hold mode. The Right to Use selected bus mode determines the DMAU conditions Bus CPU for return of the bus to the BAU. Figure 33 shows that in bus release mode, only a single channel is serviced Service Channel DMAU L.JLJULJ CHO CH1 CH2 CH3 after the DMAU obtains the bus. When DMA service ends (termination conditions depend on the transfer Bus Hold Mode mode), the DMAU returns the bus to the BAU regardless Right to Use of the state of other DMA requests, and the DMAU Bus CPU reenters the slave mode. When the DMAU regains use Service DMAU ~ Channel CHO:CH1 !cH21cH3 of the bus, a new DMA operation can begin. I , I 83-001864A In bus hold mode, several channels can receive con- tiguous service without releasing the bus. If there is Transfer Modes another valid DMA request when a channel's DMA service is finished, the new DMA service can begin The DMD register also selects either single, demand, immediately after the previous service without return- or block transfer mode for each channel. The conditions ing the bus to the BAU. for the termination of each transfer characterize each transfer mode. The following table shows the various transfer modes and termination conditions. Transfer Mode Termination Conditions Single After each byte/word transfer Demand END input Terminal count Inactive DMARQ DMARQ of a higher priority channel becomes active (bus hold mode) Block END input Terminal count 53 pPD70208 (V40) NEe The operation of single, demand, and block mode Byte Transfer transfers depends on whether the DMAU is in bus The DMD register can specify only byte DMA transfers release or bus hold mode. Figure 34 shows the oper- for each channel. Depending on the mode selected, the ation flow for the six possible transfer and bus mode address register can either increment or decrement, operations in DMA transfer. whereas the count register is always decremented. Single-Mode Transfer. I n bus release mode, when a channel completes transfer of a single byte, the DMAU Autoinitialize enters the slave mode regardless of the state of DMA When the DMD register selects autoinitialize for a request inputs. I n this manner, other lower-priority bus channel, the DMAU automatically reinitializes the ad- masters will be able to access the bus. dress and count registers when END is asserted or the In bus hold mode, when a channel completes transfer terminal count condition is reached. The contents of of a single byte, the DMAU terminates the channel's the base address and base count registers are transfer- service even if the DMARQ request signal is asserted. red to the current address and current count registers, The DMAU will then service any other requesting and the applicable bit of the mask register remains channel. If there are no requests from any other DMA cleared. channels, the DMAU releases the bus and enters the slave state. Channel Priority Demand-Mode Transfer. In bus release mode, the Each of the four DMAU channels is aSSigned a priority. currently active channel continues to transfer data as When multiple DMA requests from several channels long as the DMA request of that channel is active, even occur simultaneously, the channel with the highest though other DMA channels are issuing higher-priority priority will be serviced first. The DDC register selects requests. When the DMA request of the serviced one of two priority schemes: fixed or rotating (figure channel becomes inactive, the DMAU releases the bus 35). In fixed priority, channel 0 is assigned the highest and enters the slave state. priority and channel 3, the lowest. In rotating priority, priority order is rotated after each service so that the I n bus hold mode, when the active channel completes a channel last serviced receives the lowest priority. This single transfer, the DMAU checks the other DMA method prevents the exclusive servicing of higher- request lines without ending the current service. If priority channels and the lockout of lower-priority there is a higher-priority DMA request, the DMAU DMA channels. stops the service of the current channel and starts servicing the highest-priority channel requesting serv- ice. If there is no higher request than the current one, the DMAU continues to service the currently active channel. Lower-priority DMA requests are honored without releasing the bus after the current channel service is complete. Block-Mode Transfer. In bus release mode, the current channel continues DMA transfers until a terminal count or the external END input becomes active. During this time, the DMAU ignores all other DMA requests. After completion of the block transfer, the DMAU releases the bus and enters the slave state, even if DMA requests from other channels are active. In bus hold mode, the current channel transfers data until an internal or external END Signal becomes active. When the service is complete, the DMAU checks all DMA requests without releasing the bus. If there is an active request, the DMAU immediately begins servicing the request. The DMAU releases the bus after it honors all DMA requests or a higher-priority bus master requests the bus. 54 NEe pPD70208 (V40) Figure 34. Transfer Modes Bus Mode Bus Release Bus Hold Transfer Mode Single Demand Block 83-001856C 55 pPD70208 (V40) ~EC Cascade Connection The DMAU always operates in the bus hold mode while a cascade channel is in service, even when the bus Slave pPD71071 DMA Controllers can be cascaded to release mode is programmed. Other DMA requests are easily expand the system DMA channel capacity to 16 held pending while a slave pPD71071 channel is in' DMA channels. Figure 36 shows an example of cascade service. When the cascaded pPD71071 ends service connection. During cascade operation, the DMAU acts and moves into the slave state, the DMAU also moves as a mediator between the BAU and the slave to the slave state and releases the bus. At this time, all pPD71071 s. During DMA cascade mode operation, it bits of the DMAU request register are cleared. The is the responsibility of external logic to isolate the DMAU cont'inues to operate normally with the other cascade bus master from the pPD70208 control noncascaded channels. outputs. These outputs are listed in a table at the front of this data sheet. Figure 35. Priority Order Fixed Priority Highest Rotating Priority Highest Highest CH1 Service Lowest 83-003819B Figure 36. pPD71071 Cascade Example DMA1 .. DMA2 DMA3 C...... Channel I DMAAK DMARQ ~ -- HLDAK HLDRQ .. ~ DMA4 DMA5 DMAU -"" (Master) .. DMA6 --'" .. DMA7 fLPD71 071 (Slave) 83-001857B 56 NEe pPD70208 (V40) Bus Waiting Operation DMAU Registers The DMAU will automatically perform a bus waiting Initialize. The DMA initialize command (DICM) register operation (figure 37) whenever the RCU refresh request (figure 38) is used to perform a software reset of the queue fills. When the DMA bus acknowledge goes DMAU. The DICM is accessed using the byte OUT inactive, the DMAU enters the bus waiting mode and instruction. inactivates the DMA bus request signal. Control of the Channel Register. Writes to the DMA channel (DCH) bus is then transferred to the higher-priority RCU by register (figure 39) select one of the four DMA the BAU. channels for programming and also the base/current Two clocks later, the DMAU reasserts its internal DMA registers. Reads of the DCH register return the cur- bus request. The bus waiting mode is continued until rently-selected channel and the register access mode. the DMA bus acknowledge signal again becomes Count Registers. When. bit 2 of the DCH register is active and the interrupted DMA service is immediately cleared, a write to the DMA count register updates both restarted. the DMA base count (DBC) and the DMA current count ~ Programming the DMAU (DCC) registers with a new count. If bit 2 of the DCH 1:.:1 register is set, a write to the DMA count register affects To prepare a channel for DMA transfer, the following only the DBC register. The DBC register holds the characteristics must be programmed. initial count value until a new count is specified. If autoinitialization is enabled, this value is transferred to • Starting address for the transfer the DCC register when a terminal count or END • Transfer count condition occurs. For each DMA transfer, the current • DMA operating mode count register is decremented by one. The format of • Transfer size (byte/word) the DMA count register is shown below. The count The contents of the OPHA and DULA registers deter- value loaded into the DBC/DCC registers is one less mine the base I/O port address of the DMAU. Addresses than the desired transfer count. A3-AO are used to select a particular register as follow: 2H, IN/OUT 7 o A3 A2 Al Ao Register Operation Co 0 0 0 0 DICM Write 3H, IN/OUT 0 0 0 1 DCH Read/Write 7 o 0 0 1 0 DBC/DCC (low) Read/Write Cg Ca 0 0 1 1 DBC/DCC (high) Read/Write 0 1 0 0 DBA/DCA (low) Read/Write Address Register. Use either byte or word I/O in- 0 1 0 1 DBA/DCA (high) Read/Write 0 1 1 0 DBA/DCA (upper) Read/Write structions with the lower two bytes (4H and 5H) of the 0 1 1 1 Reserved DMA address register. However, byte I/O instructions must be used to access the high-order byte (6H) of this 0 0 0 DDC (low) Read/Write 0 0 1 DDC (high) Read/Write register. When bit 2 of the channel register is cleared, a 0 1 0 DMD Read/Write write to the DMA address register updates both the 0 1 1 DST Read DMA base address (DBA) and the DMA current address 0 0 Reserved (DCA) registers with the new address. If bit 2 of the 0 1 Reserved DCH register is set, a writeto the DMA address register 1 0 Reserved affects only the DBA register. 1 1 DMK Read/Write 7 4H, IN/OUT o Word I/O instructions can be used to read/write the register pairs listed below. All other registers are Ao accessed via byte I/O instructions. 7 5H, IN/OUT o DBC/DCC DBA/DCA (higher/lower only) DDC 7 6H, IN/OUT (Byte only) 0 F.7 pPD70208 (V40) NEe The DBA register holds the starting address value until Status Register. The DMA status (DST) register (figure a new address is specified. This value is transferred to 41) contains information about the current state of the DCA register automatically if auto'initialization is each DMA channel. Software can determine if a termin- selected. For each DMA transfer, the current address ation condition has been reached (TC3-TCo) or if a register is increment~d/decremented by one. DMA service request is present (RQ3-RQO). The byte IN instruction must be used to read this register. Device Control Register. The DMA device control (DOC) register (figure 40) is used to to p'rogram the DMA transfer characteristics common to. all DMA channels. It controls the bus mode, write timing, priority logic, and enable/disable of the DMAU. Figure 37. Bus Waiting Operation Other Other DMAU RCU DMAU Bus Master Bus Master -.l DMARO '----- DMA BUSAK -.l \ Approx 2 Clocks I '---- I~ -I DMA BUSRO 83-0018588 Figure 38. DMA Initialize Command Register Initialize 7 3 OH I I0 Note: [1] The DMAU initializes as follows: Register Initialization Operation Initialize Clears all bits Address No change Count No change Channel SeleCts channel 0 Mode Control Clears all bits Device Control Clears all bits Status Clears all bits Mask Sets all bits [masks all channels] 83-0018598 NEe pPD70208 (V40) Figure 39. DMA Channel Register Channel Register Read 7 6 4 3 o 1H I - I - I - I BASE I SEL3 I SEL2 I SEL1 I SELo IN (Byte only) J 0001 Channel 0 I Selected Channel 0010 0100 Channel 1 Channel 2 1000 Channel 3 0 Current (read), Base Base Only and Current (write) 1 Base (read/write) Channel Register Write 7 6 4 3 1H 1-1-1 - I - 1 - 1BASE 1 SELCH OUT (Byte only) L Select Channel 00 01 10 11 Channel 0 Channel 1 Channel 2 Channel 3 Select Current (read), 0 select both Base and Base Only Current (write) 1 Select Base (read/write) 83-0038208 Figure 40. DMA Device Control Register 7 5 4 2 . Disable DMA Operation(1) 0 1 Enable Disable I Priority 0 Fixed 1 Rotational I Extended Writing(2) 0 1 Normal Extended o 9H 1 - 1 - 1 -1-1 - 1 - I WEV 1BHLD IN/OUT L Bus Mode 0 1 Bus Release Bus Hold Wait Enable 0 Disable During Verify(3 1 Enable Note: [1 J Disables BUSRQ to the BAU to prevent incorrect DMA operation while the DMAU registers are being initialized or modified. [2] When EXW is 0, the write signal becomes active [normal writeJ during T3 and TW [see timing waveformsJ. When 1, the write Signal becomes active during T2, T3, and TW [like the read signalJ. [3J Wait states are generated by the READY signal during a verify transfer. 83-0018638 pPD70208 (V40) Mode Control Register. The DMA mode (DMD) register Mask Register Read/Write. The DMA mask (DMK) (figure 42) selects the operating mode for each DMA register (figure 43) allows software to individually channel. The DCH register selects which DMD register enable and disable DMA channels. The DMK register will be accessed. A byte IN/OUT instruction must be can only be accessed via byte I/O instructions. used to access this register. Figure 41. DMA Status Register 7 6 4 2 o OBH I R03 I R02 R01·1 ROo I TC3 I TC2 I TC1 I TCo IN (Byte only) I Terminal Count 0 1 Not ended (for each read) END or terminal count 0 No DMA request active DMA 1 DMA request active Request 83-0018608 Figure 42. DMA Mode Register 7 4 3 2 o OAH I TMODE 1ADIR 1AUTI 1 TDIR 1 -I - L~ 00 Verify Transfer 01 I/O-to-memory Direction 10 Memory-to-I/O 11 Not allowed Auto- 0 Disable initialize 1 Enable Address 0 Increment Direction 1 Decrement 00 Demand Transfer 01 Single Mode 10 Block 11 Cascade 83-002734B Figure 43. DMA Mask Register 76543210 OFH I - I - I - I. - I M3 I M2 I M1 I MO I INIOUT (Byte only) l J IL....-__- fl OMARa I 0 I Not masked I I Mask I 1 I Masked I 83-0038298 NEe pPD70208 (V40) Reset Output Pin Status The falling edge of the RESET signal resets the The following table lists output pin status during reset. pPD70208. The signal must be held low for at least four clock cycles to be recognized as valid. Signal Status INT AK.JllifEJillU.£.R/JL _ High level CPU Reset State MRD, MWR, END/TC, 10WR, lORD, Register Reset Value REFRQ, BS~BSo, :USLOCK, PFP OOOOH RESOUT, D AAK -DMAAKO PC OOOOH QS1-QSO, ASTB, HLDAK Low level PS FFFFH SS OOOOH DSO OOOOH A15-Aa High or low level DS1 OOOOH AD7-ADO High impedance PSW F002H Co_n_ti_nu_e_s_to_s_u_pp_ly_c_lo_C_k__ ~ _CL_K_O_UT_____________________ AW, BW, CW, DW, Undefined IX, IV, BP, SP Instruction queue Cleared When RESET returns to the high level, the CPU will start fetching instructions from physical address FFFFOH. Internal Peripheral Registers Internal peripheral devices initialized on reset are listed in the following table. 1/0 devices not listed are not initialized on reset and must be initialized by software. Register Reset Value System OPCN ----0000 I/O area OPSEL ----0000 WCV1 11111111 WCV2 - - - -1111 WMB -111-111 TCKS ---00000 RFC x--01000 SCU SMD 01001011 SCM --0000-0 SIMK - - - - - -11 SST 10000100 DCH ---00001 DMD 000000-0 DMAU DDC (low) --00-0-- DDC (high) ------00 DST xxxxOOOO DMK ----1111 Symbols: x = unaffected; 0 = cleared; 1 = set; (-) = unused. J.lPD70208 (V40) NEe Instruction Set Symbols Symbols Symbol Meaning mem8 8-bit memory location Preceding the instruction set, several tables explain symbols, abbreviations, and codes. mem16 16-bit memory location mem32 32-bit memory location Clocks memptr16 Word containing the destination address within the current segment In the Clocks column ofthe instruction set, the numbers cover these operations: instruction decoding, effective memptr32 Double word containing a destination address in another segment address calculation, operand fetch, and instruction execution. mod Mode field (00 to 10) near..Jabel Label within the current segment Clock timings assume the instruction has been pre- fetched and is present in the four-byte instruction near--proc Procedure within the current segment queue. Otherwise, add four clocks for each byte not offset Immediate offset data (16 bits) present. Number of bytes to discard from the stack For instructions that reference memory operands, the reg Register field (000 to 111); number on the left side of the slash (I) is for byte 8- or 16-bit general-purpose register operands and the number on the right side is for word reg8 8-bit general-purpose register operands. reg16 16-bit general-purpose register For conditional control transfer or branch instructions, regptr 16-bit register containing a destination the number on the left side of the slash is applicable if address within the current segment the transfer or branch takes place. The number on the regptr16 Register containing a destination address right side is applicable if it does not take place. within the current segment If a range of numbers is given, the execution time seg Immediate segment data (16 bits) depends on the operands involved. shorLiabel Label between -128 and +127 bytes from the end of the current instruction Symbols sr Segment register Symbol Meaning src Source operand or address acc Accumulator (AW or AL) temp Temporary register (8/16/32 bits) disp Displacement (8 or 16 bits) AC Auxiliary carry flag dmem Direct memory address AH Accumulator (high byte) dst Destination operand or address AL Accumulator (low byte) ext-disp8 16-bit displacement (sign-extension byte AW Accumulator (16 bits) + 8-bit displacement) BH BW register (high byte) far_label Label within a different program segment BL BW register (low byte) far-proc Procedure within a different program BP BP register segment BRK Break flag Floating point instruction operation BW BW register (16 bits) imm 8- or 16-bit immediate operand CH CW register (high byte) imm3/4 3- or 4-bit immediate bit offset CL CW register (low byte) imm8 8-bit immediate operand CW CW register (16 bits) imm16 16-bit immediate operand CY Carry flag mem Memory field (000 to 111); DH OW register (high byte) 8- or 16-bit memory location DlR Direction flag DL OW register (low byte) NEe pPD70208(V40) Symbols (cont) Flag Operations Symbol Meaning Symbol Meaning DSO Data segment 0 register (16 bits) (blank) No change DS1 Data segment 1 register (16 bits) o Cleared to 0 DW DW register (16 bits) Set to 1 IE Interrupt enable flag x Set or cleared according to result IX Index register (source) (16 bits) Undefined IV Index register (destination) (16 bits) R Restored to previous state MD Mode flag P Parity flag Memory Addressing Modes PC Program counter (16 bits) mem mod = 00 mod = 01 mod = 10 PS PSW R Program segment register (16 bits) Program status word (16 bits) Register set 000 001 010 BW+IX BW+IV BP + IX BW + IX + disp8 BW + IV + disp8 BP + IX + disp8 BW + IX + disp16 BW + IV + disp16 BP + IX + disp16 1m S Sign extend operand field 011 BP+ IV BP + IV + disp8 BP + IV + disp16 S = 0 No sign extension 100 IX IX + disp8 IX + disp16 S = 1 Sign extend immediate byte operand 101 IV IV + disp8 IV + disp16 S Sign flag 110 Direct BP + disp8 BP + disp16 SP Stack pointer (16 bits) 111 BW BW + disp8 BW + disp16 SS Stack segment register (16 bits) v Overflow flag Register Selection (mod = 11) W Word/byte field (0 to 1) reg W=O W=1 X,XXX, VVV, ZZZ Data to identify the instruction code of the 000 AL AW external floating point arithmetic chip 001 CL CW XOR Exclusive logical sum 010 DL DW XXH Two-digit hexadecimal value 011 BL BW XXXXH Four-digit hexadecimal value 100 AH SP Z Zero flag 101 CH BP 110 DH IX 111 BH IV Segment Register Selection sr Segment Register 00 DS1 01 PS 10 SS 11 DSO pPD70208 (V40) NEe Instruction Set Opcode Flags Mnemonic Operand 6 5 4 3 2 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Data Transfer Instructions MOV reg, reg 0 0 0 1 W reg reg 2 2 mem, reg 0 0 0 0 0 W mod reg mem 7/11 2-4 reg, mem 0 0 0 1 0 W mod reg mem 10/14 2-4 mem, imm 1 0 0 0 W mod reg mem 9/13 3-6 reg, imm 1 0 1 W reg 4 2-3 acc, dmem 1 0 0 0 0 0 W 10/14 3 dmem, acc 0 0 0 0 W 9/13 3 sr, reg16 0 0 0 1 1 1 0 sr reg 2 2 sr, mem16 0 0 0 1 mod 0 sr mem 14 2-4 reg16, sr 0 0 0 0 0 1 1 0 sr reg 2 2 mem16, sr 0 0 0 1 0 0 mod 0 sr mem 12 2-4 OSO, reg16, mem32 0 0 0 0 mod reg mem 25 2-4 OS1, reg16, mem32 0 0 0 mod reg mem 25 2-4 AH, PSW 0 0 1 2 PSW, AH 0 0 1 0 3 x x x x x LOEA reg16, mem16 0 0 0 0 mod reg mem 4 2-4 TRANS srctable 0 0 9 XCH reg, reg 0 0 0 0 W 1 1 reg reg 3 2 mem, reg 0 0 0 0 W mod reg mem 13/21 2-4 AW, reg16 0 0 reg 3 Repeat Prefixes REPC 0 0 0 0 2 REPNC 0 0 0 0 0 2 REP 0 0 2 REPE REPZ REPNE 1 1 1 1 0 0 1 0 2 REPNZ Block Transfer Instructions MOVBK dst, src 1 0 1 o 0 1 oW 1 9 (9) + Bn (W = 0) 9 (17) + 16n (W = 1) CMPBK dst, src 1 0 1 0 0 1 1 W 1 x x x x x x 7 (13) + 14n (W = 0) 7 (21) + 22n (W = 1) CMPM dst 1 0 1 0 1 1 1W 1 x x x x x x 7 (7) + 10n (W = 0) . 7(11)+14n(W=1) LOM src 1 0 1 0 1 1 oW 1 7 (7) + 9n (W = 0) 7 (11) + 13n (W = 1) STM dst 1 0 1 0 1 0 1 W 1 5 (5) + 4n (W = 0) 5 (9) + Bn (W = 1) n = number of transfers String instruction execution clocks for a single instruction execution are in parentheses. CA NEe pPD70208 (V40) Instruction Set (cont) Opcode Flags Mnemonic Operand 6 4 3 o 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z 110 Instructions IN acc, imm8 0 0 0 W 9/13 2 ------------------------------------------------------------------------------- acc, DW 0 W 8/12 OUT imm8, acc o0 W 8/12 2 DW, acc o 1 W 8/12 INM dst, DW o 0 W 1 9 (10) + 8n (W = 0) 9 (18) + 16n (W = 1) OUTM DW, src o1 1 0 1 1 1 W 1 9 (10) + 8n (W = 0) 9 (18) + 16n (W = 1) n = number of transfers String instruction execution clocks for a single instruction execution are in parentheses. BCD Instructions ADJBA o xxuuuu ADJ4A o0 3 x x u x x x ADJBS xxuuuu ADJ4S o0 x x u x x x ADD4S dst, src o o o0 0 0 0 7 + 19n 2 uxuuux SUB4S dst, src o0 0 0 o 0 000 7+ 19n uxuuux CMP4S dst, src o0 0 0 o0 o0 1 1 0 7 + 19n 2 uxuuux ROL4 reg8 o0 0 0 1 o0 o 000 13 3 1 1 0 0 0 reg mem8 o0 0 0 1 1 1 o0 o 000 25 3-5 mod 0 0 mem ROR4 reg8 o0 0 0 1 1 1 1 o0 o o o 17 3 1 1 0 0 0 reg mem8 o0 0 0 1 1 1 1 o0 o o o 29 3-5 mod 0 0 0 mem n = number of BCD digits divided by 2 Data Type Conversion Instructions CVTBD 1 0 o 0 0 0 0 0 o o 15 2 u u u x x x CVTDB 1 1 0 o0 0 0 o o 7 2 uuuxxx CVTBW 0 000 2 CVTWL o 0 o 0 4/5 Arithmetic Instructions ADD reg, reg o0 0 0 0 0 1 W 1 1 reg reg 2 2 x x x x x x ------------------------------------------------------------------------------- mem, reg o 0 0 0 0 0 0 W mod reg mem 13/21 2-4 x x x x x x reg, mem o0 0 0 0 0 1 W mod reg mem 10/14 2-4 x x x x x x reg, imm o0 0 0 0 SW 1 1 0 0 0 reg 4 3-4 x x x x x x mem, imm o0 0 0 0 SW mod 0 0 0 mem 15/23 3-6 x x x x x x acc, imm o0 0 0 0 W 4 2-3 x x x x x x 65 pPD70208 (V40) NEe Instruction Set (cont) Opcode Flags Mnemonic Operand 6 5 432 o 7 6 5 4 3 2 1 0 Clocks Bytes AC CV V P S Z Arithmetic Instructions (cont) ADDC reg, reg 0 0 0 0 0 1 W reg reg 2 2 x x x x x x --------------------------------------------------------------------------~~ mem, reg 0 0 0 0 0 0 W mod reg mem 13/21 2-4 x x x x x x reg, mem o 0 0 1 0 0 1 W mod reg mem 10/14 2-4 x x x x x x reg, imm o 0 0 0 0 S WOO reg 4 3-4 x x x x x x mem, imm o 0 0 0 S W mod 0 1 0 mem 15/23 3-6 x x x x x x ace, imm 000 010W 4 2-3 x x x x x x SUB reg, reg o0 0 0 W reg reg 2 2 x x x x x x mem, reg o 0 0 0 0 W mod reg mem 13/21 2-4 x x x x x x reg, mem o0 0 1 0 1 W mod reg mem 10/14 2-4 x x x x x x reg, imm o0 0 0 0 SW 1 0 1 reg 4 3-4 x x x x x x mem, imm 1 0 0 0 0 0 S W mod 1 0 1 mem 15/23 3-6 x x x x x x ace, imm o0 0 0 W 4 2-3 x x x x x x SUBC reg, reg o0 0 0 1 W 1 1 reg reg 2 2 x x x x x x mem, reg o0 0 0 0 W mod reg mem 13/21 2-4 x x x x x x reg, mem 0001 01W mod reg mem 10/14 2-4 x x x x x x reg, imm o0 0 0 0 SW 1 1 0 1 reg 4 3-4 x x x x x x mem, imm 100000SW mod 0 1 mem 15/23 3-6 x x x x x x ace, imm 000 0 W 4 2-3 x x x x x x INC regS 1 0 1 1 0 0 0 reg 2 2 x x x x x mem 1 1 W mod 0 0 0 mem 13/21 2-4 x x x x x reg16 o 000 reg 2 x x x x x DEC regS 1 1 1 1 0 1 1 0 0 reg 2 2 x x x x x mem 1 1 1 1 W mod 0 0 mem 13/21 2-4 x x x x x reg16 o o 0 1 reg 2 x x x x x MULU reg o 1W 1 1 0 0 reg 21-30 2 uxxuuu mem o 1 1W mod o0 mem 26-39 2-4 uxxuuu MUL reg o1 1W 1 1 o reg 33-47 2 uxxuuu mem o1 W mod 0 mem 3S-56 2-4 uxxuuu reg16,reg16,immS o o 0 1 1 reg reg 2S-34 3 uxxuuu reg16,mem16,immS o o 0 mod reg mem 37-43 3-5 uxxuuu reg16,reg16,imm16 o 000 1 1 reg reg 36-42 4 uxxuuu reg16,mem16,imm16 o 000 mod reg mem 45-51 4-6 uxxuuu DIVU reg o W 1 1 0 reg 19-25 2 uuuuuu mem o W mod 1 1 0 mem 24-34 2-4 uuuuuu DIV reg o W 1 1 reg 29-43 2 uuuuuu mem o W mod 1 1 mem 34-52 2-4 uuuuuu 66 NEe pPD70208 (V40) Instruction Set (cont) Opcode Flags Mnemonic Operand 6 432 o 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Comparison Instructions CMP reg, reg 0 0 0 1 W reg reg 2 2 x x x x x x ---------------------------------------------------------------------------- mem, reg 0 0 0 0 W mod reg mem 10/14 2-4 x x x x x x reg, mem 0 0 1 1 0 1 W mod reg mem 10/14 2-4 x x x x x x reg, imm 0 0 0 0 0 S W 1 1 1 reg 4 3-4 x x x x x x mem, imm 0 0 0 0 S W mod 1 1 1 mem 12/16 3-6 x x x x x x ace, imm o0 oW 4 2-3 x x x x x x Logica/lnstructions NOT reg 0 WOO reg 2 2 ~ ________ =m=e=m========================o======w===m=od===O====0===m=e=m====13=/2=1===2=-4=================~ NEG reg 0 W reg 2 2 x x x x x x ---------------------------------------------------------------------------- mem 1 1 0 1 W mod 0 mem 13/21 2-4 x x x x x x TEST reg, reg o 0 0 0 0 W ~g ~g 2 2 u 0 0 x x x mem, reg o0 0 W mod reg mem 9/13 2-4 u 0 0 x x x reg, imm o W o 0 0 reg 4 3-4 0 0 x x x mem, imm 1 0 1 1 W mod o 0 0 mem 10/14 3-6 0 0 x x x ace, imm 10 0100W 4 2-3 0 0 x x x AND reg, reg o 0001W reg reg 2 2 u 0 0 x x x mem, reg o 0 0 0 0 W mod reg mem 13/21 2-4 u 0 0 x x x reg, mem 0010001W mod reg mem 10/14 2-4 u 0 0 x x x reg, imm o 0 0 0 W o0 reg 4 3-4 OOxxx mem, imm o 0 0 0 W mod 1 0 0 mem 15/23 3-6 0 0 x x x ace, imm 0010010W 4 2-3 0 0 x x x OR reg, reg 0000 01W reg reg 2 2 u 0 0 x x x mem, reg 000 0 W mod reg mem 13/21 2-4 u 0 0 x x x reg, mem o 0 1 0 1 W mod reg mem 10/14 2-4 u 0 0 x x x reg, imm OOOOOOW o0 1 reg 4 3-4 uOOxxx mem, imm OOOOOOW mod o0 1 mem 15/23 3-6 0 0 x x x ace, imm o 0 1 1 0 W 4 2-3 0 0 x x x XOR reg, reg 00 001W reg reg 2 u 0 0 x x x mem, reg o 0 0 0 0 W mod reg mem 13/21 2-4 u 0 0 x x x reg, mem o 0 1 1 0 0 1 W mod reg mem 10/14 2-4 u 0 0 x x x reg, imm OOOOOOW 1 0 reg 4 3-4 OOxxx mem, imm 1 0 0 0 0 0 W mod 1 1 0 mem 15/23 3-6 0 0 x x x ace, imm o 0 0 0 W 4 ~3 0 0 x x x 67 pPD70208 (V40) twEC Instruction Set (cont) Opcode Flags Mnemonic Operand 65432 0765432 o Clocks Bytes AC CV V P SZ Bit Manipulation Instructions INS reg8, reg8 000 0 d 0 o0 0 35-133 3 1 1 reg reg reg8, imm8 0000111100 o0 35-133 4 . 1 1 0 0 0 reg EXT reg8, reg8 0000111100 o0 34-59 3 1 1 reg reg reg8, imm8 0000111100 o 34-59 4 1 1 0 0 0 reg TEST1 reg, CL 00001111000 o0 W 3 3 uOOuux 1 1 0 0 0 reg mem, CL 00001111000 o 0 W 7/11 3-5 uOOuux mod 0 0 0 mem reg, imm3/4 000011'11000 o0W 4 4 uOOuux 1 1 0 0 0 reg mem, imm3/4 00001111000 o 0 W 8/12 4-6 uOOuux mod 0 0 0 mem SET1 reg, CL 00001111000 oW 4 3 1 1 0 0 0 reg mem, CL 00001111000 o 0 W 10/18 3-5 mod 0 0 0 mem reg, imm3/4 00001111000 W 5 4 1 1 0 0 0 reg mem, imm3/4 0000111100 oW 11/19 4-6 mod 0 0 0 mem CY o0 2 DIR 1 1 1 1 1 1 0 1 2 CLR1 reg, CL 00001111 0 o0 W 5 3 1 1 0 0 0 reg mem, CL 00001111000 o W 11/19 3-5 mod 0 0 0 mem reg, imm3/4 00001111000 o W 6 4 1 1 0 0 0 reg mem, imm3/4 00001111000 o W 12/20 4-6 mod 0 0 0 mem CY 1 0 0 0 2 o DlR 1 1 1 1 1 0 0 2 1 NOT1 reg, CL o0 0 0 1 1 1 1 000 o W 4 3 1 1 0 0 0 reg mem, CL 00001111 o0 o W 10/18 3-5 mod 0 0 0 mem reg, imm3/4 00001111 o0 W 4 1 1 0 0 0 reg mem, imm3/4 00001111 o 0 W 11/19 4-6 mod 0 0 0 mem CY 1 1 o 1 0 1 2 x 68 NEe pPD70208 (V40) Instruction Set (cont) Opcode Flags Mnemonic Operands 7 6 543 2 o 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Shift/Rotate Instructions SHL reg, 1 0 0 0 0 WOO reg 2 2 u x x x x x ----------------------------~------------------------------------------------- mem, 1 0 0 0 0 W mod 0 0 mem 13/21 2-4 u x x x x x reg, CL 0 0 0 W 1 1 0 0 reg 7+ n 2 u x u x x x mem, CL 0 1 0 0 1 W mod 0 0 mem 16/24 + n 2-4 u x u x x x reg, immB 0 0 0 0 0 W 1 1 0 reg 7+ n 3 u x u x x x mem, immB 0 0 0 0 W mod 0 mem 16/24 + n 3-5 u x u x x x SHR reg, 1 mem, 1 reg, CL 0 0 0 0 0 0 W 0 0 0 W 0 0 1 W 1 1 mod 1 1 0 0 reg mem reg 2 13/21 7+ n 2 2-4 2 u x x x x x u x x x x x u x u x x X II - - - - - - - , - - - - mem, CL 0 1 0 0 1 W mod mem 16/24 + n 2-4 u x u x x x reg, immB 0 0 0 0 0 W 1 1 0 reg 7+ n 3 u x u x x x mem, immB 0 0 0 0 W mod 0 mem 16/24 + n 3-5 u x u x x x SHRA reg, 1 0 0 0 0 W 1 1 reg 2 2 u x 0 x x x mem, 1 0 0 0 W mod mem 13/21 2-4 u x 0 x x x reg, CL 0 0 W 1 1 reg 7+ n 2 u x u x x x mem, CL 0 0 0 W mod mem 16/24 + n 2-4 u x u x x x reg, immB 0 0 0 0 0 W 1 1 1 1 reg 7+ n 3 u x u x x x mem, immB 0 0 0 0 0 W mod 1 1 mem 16/24 + n 3-5 u x u x x x ROL reg, 1 0 0 0 0 W 1 1 0 0 0 reg 2 2 x x mem, 1 0 0 0 W mod 0 0 mem 13/21 2-4 x x reg, CL 0 0 0 W 1 1 0 0 0 reg 7+ n x u mem, CL 0 1 0 0 1 W mod 0 0 0 mem 16/24 + n 2-4 x u reg, imm 0 0 0 0 0 W 1 1 0 0 0 reg 7+ n 3 x u mem, imm 0 0 0 0 W mod 0 0 0 mem 16/24 + n 3-5 x u ROR reg, 1 0 0 0 W 1 1 0 reg 2 2 x u mem, 1 0 0 0 0 W mod 0 mem 13/21 2-4 x x reg, CL 0 0 W 1 1 0 0 reg 7+n x u mem, CL 0 1 0 0 1 W mod 0 0 mem 16/24 + n 2-4 x u reg, immB 0 0 0 0 0 W 1 1 0 0 reg 7+ n 3 x u mem, immB 0 0 0 0 W mod 0 0 mern 16/24 + n 3-5 x u ROLC reg, 1 0 0 0 0 iN 1 1 0 0 reg 2 2. x x mem, 1 0 0 0 0 W mod 0 0 mem 13/21 2-4 x x reg, CL 0 0 0 W 1 1 0 0 reg 7+ n 2 x u mem, CL 0 1 0 0 W mod 0 0 mem 16/24 + n 2-4 x u reg, immB 0 0 0 0 0 W 1 1 0 0 reg 7+ n 3 x u mem, immB 0 0 0 0 0 W mod 0 0 mem 16/24 + n 3-5 x u n = number of shifts 69 pPD7020'8 (V40) NEe Instruction Set (cont) Opcode Flags Mnemonic Operands 6 543 2 o 7 6 5 4 3 2 1 0 Clocks Bytes AC CV V PS Z Shift Rotate Instructions (cont) RORC reg, 1 0 0 0 0 W 0 reg 2 2 x x -------------------------------------------------------------------------- mem, 1 0 0 0 0 W mod 0 mem 13/21 2-4 x x reg, CL 0 0 0 W 0 reg 7+ n 2 x u mem, CL o 1 0 0 1 W mod 0 l' mem 16/24 + n 2-4 x u reg, immB OOOOOW 0 reg 7+ n 3 x u mem, immB o 0 0 0 0 W mod 0 mem 16/24 + n 3-5 x u n = number of shifts Stack Manipulation Instructions PUSH mem16 1 1 1 1 1 1 1 mod 1 1 0 mem 23 2-4 -------------------------------------------------------------------------- reg16 0 1 0 1 0 reg 10 sr 0 0 0 sr 1 0 10 PSW o0 0 10 R 01100000 65 imm o 1 1 0 1 0 S 0 9-10 2-3 POP mem16 1 0 0 0 mod 0 0 0 mem 25 2-4 reg16 o1 0 reg 12 sr o0 0 sr 1 1 12 PSW 1 0 1 1 0 12 R R R R R R R o 100001 75 PREPARE imm16, immB o0 0 0 0 * 4 *immB =0: 16 immB> 1 : 21 + 16 (immB - 1) DISPOSE o 0 1 10 Control Transfer Instructions CALL near_proe 0 0 0 0 20 3 --------------------------------~---------------------------------------- regptr l '1 1 0 0 reg 1B memptr16 1 1 1 mod 0 0 mem 31 2-4 far_proe 0 0 0 29 5 memptr32 1 1 1 1 1 mod 0 mem 47 2-4 RET o0 0 0 1 19 o0 0 0 0 24 3 o0 o 1 29 o0 o1 0 32 3 BR o o0 13 3 shorLiabel o o 12 2 reg 1 1 o0 reg 11 2 memptr16 1 mod o0 mem 23 2-4 o o o 15 5 memptr32 1 1 1 mod o mem 34 2-4 BV o o0 0 0 14/4 2 BNV near-.label o 000 14/4 2 70 NEe pPD70208(V40) Instruction Set (cont) Opcode Flags Mnemonic Operands 5 4 3 2 0 7 654321 0 Clocks Bytes AC CY V P S Z Control Transfer Instructions (cont) BC, BL near-1abel 0 0 0 0 14/4 2 BNC, BNL near-1abel 0 0 0 1 14/4 2 BE, BZ near-1abel 0 0 0 0 14/4 2 BNE, BNZ near-1abel 0 0 0 1 14/4 2 BNH near-1abel 0 0 0 14/4 2 BH near-1abel 0 0 1 14/4 2 BN near-1abel 0 0 0 0 14/4 2 BP neaUabel 0 0 0 14/4 2 BPE near-1abel 0 0 0 14/4 2 BPO near-1abel 0 0 1 14/4 2 BLT near-1abel 0 0 0 14/4 2 BGE near-1abel 0 0 1 14/4 2 BLE near-1abel 0 0 14/4 2 BGT near-1abel 0 1 1 1 14/4 2 OBNZNE near-1abel 0 0 0 0 0 14/5 2 OBNZE near-1abel 0 0 0 0 14/5 2 OBNZ near-1abel 0 0 0 0 13/5 2 BCWZ near-1abel 0 0 0 1 13/5 2 Interrupt Instructions BRK 3 0 0 0 0 50 1 imm8 0 0 0 1 50 2 BRKV imm8 0 0 1 0 52/3 RETI 1 0 0 1 1 39 R R R R R R CHKINO reg16, mem32 0 0 0 0 0 mod reg mem 25/72-75 2-4 BRKEM imm8 0 0 0 0 1 1 1 1 1 1 1 1 50 3 CPU Control Instructions HALT 0 0 0 2 BUS LOCK 1 0 0 0 0 2 FP01 fp_op 0 X X X 1 1 Y Y y Z Z Z 2 2 fp_op, mem 0 1 X X X mod y y y mem 14 2-4 FP02 fp_op 0 0 0 X 1 1 Y Y Y Z Z Z 2 2 fp_op, mem 0 1 1 0 0 X mod y y y mem 14 2-4 POLL 0 0 0 2+5n n = number of times POLL pin is sampled. NOP 0 0 0 0 0 0 3 01 1 0 0 2 EI 1 0 1 2 OSO:, OS1:, PS:, and SS: 0 0 seg 0 2 (segment override prefixes) 8080 Instruction Set Enhancements RETEM 1 0 0 1 0 39 2 R R R R R R CALLN imm8 1 0 0 0 0 58 3 pPD70208 (V40) NEe 72 NEe NEe Electronics Inc. pPD702i6 (V50) i6-Bit Microprocessor: High-Integration, CMOS Description Ordering Information The pPD70216 (V50™) is a high-performance, low- Part Number Max Frequency IMHzl Package power 16-bit microprocessor integrating a number of pPD70216R8 8 68-pin ceramic PGA commonly-used peripherals to dramatically reduce the R10 10 size of microprocessor systems. The CMOS construc- L8 8 68-pin PLCC tion makes the pPD70216 ideal for the design of portable computers, instrum~ntation, and process L10 10 control equipment. GF8 8 80-pin plastic QFP The pPD70216 contains a powerful instruction set that GF10 10 is compatible with the pPD70108/pPD70116 (V20®/ V30®) and pPD8086/pPD8088 instruction sets. In- Pin Configuration struction set support i.ncludes a wide range of arith- metic, logical, and control operations as well as bit 68-Pln Ceramic PGA manipulation, BCD arithmetic, and high-speed block Bottom View transfer instructions. The pPD70216 can also execute / the entire pPD8080AF instruction set using the 8080 000000000 emulation mode. Also available is thepPD70208 (V40TM), A2 identical to the pPD70216 but with an 8-bit external 00000000000 data bus. 00 00 Features 00 00 o Low-power CMOS technology 00 00 o V20/V30 instruction set compatible 00 pPD70216R 00 o Minimum instruction execution time: 250 ns at 00 00 8 MHz; 200 ns at 10 MHz o Direct addressing of 1M bytes of memory 00 00 o Powerful set of addressing modes 00 00 o Fourteen 16-bit CPU registers o On-chip peripherals including 10 00000000000 L 10 - Clock generator 11 000000000 - Bus interface - Bus arbitration A C 0 G H - Programmable wait state generator - DRAM refresh controller Pin Symbol Pin Symbol Pin Symbol Pin Symbol - Three 16-bit timer/counters A2 INTP7 B9 DMARQl FlO AD7 K4 NMI A3 INTP5 B10 DMARQO Fll GND K5 RESET - Asynchronous serial I/O controller A4 INTP3 Bll ADO Gl Xl K6 RESOUT - Eight-input interrupt controller AS INTPl Cl TCTL2 G2 CLKOUT K7 HLDRQ - Four-channel DMA controller A6 DMAAK3/TxD C2 POLL Gl0 ADa K8 A19/PS3 o Hardware effective address calculation logic A7 DMAAK2 Cl0 ADl Gll AD9 K9 A17/PSl o Maskable and nonmaskable interrupt inputs A8 A9 DMAAKl DMAAKO Cll Dl AD2 QSl Hl H2 BUFEN BUFR/W Kl0 Kll AD14 AD1S o IEEE 796 compatible bus interface Al0 END/TC D2 QSo Hl0 AD10 L2 lORD o Low-power standby mode Bl TCLK 010 AD3 Hll AD11 L3 BSo B2 TOUT2 Dll AD4 Jl BUSLOCK L4 BS2 B3 INTP6 El ASTB J2 iOWA L5 READY V20 and V30 are registered trademarks of NEC Corporation. B4 INTP4 E2 UBE J10 AD12 L6 Voo V40 and V50 are trademarks of NEC Corporation. B5 INTP2 El0 ADs Jll AD13 L7 HLDAK B6 INTAK/TOUT11 Ell AD6 Kl MWR L8 REFRQ SRDY B7 DMARQ3/RxD Fl GND K2 MRD L9 A1a1PS2 B8 DMARQ2 F2 X2 K3 BS1 Ll0 A16/PSo 83-0027196 50008-1 (NECEL-419) pPD70216 (V50) NEe Pin Configurations (cont) 68-Pin Plastic Leaded Chip Carrier (PLCC) Itt Itt I~ I~ Iw g~ Z I- ::l .. .-I:j N N ~ :i! ~ -J II) ~ ~ 0 ~ .. Q ~ ~ ~ 0 >< >< Cl ::l 4( 000.. l- I- l- -J ('II c Z III IWIII II) l- II) II) 0 -J I- ::l -J 0 0 0 I- ~ e a. :g L() .,. l:l ~ :;; e a..,. .,.co .,. ~ .,. ~ " CD L() CD L() L() L() L() L() L() " lORD 43 INTP7 MRD 42 INTP6 BSo 41 INTP5 BS1 40 INTP4 BS2 39 INTP3 NMI 38 IflITP2 READY 37 INTP1 RESET 36 INTAK/TOUT1/SRDY Voo 0 35 DMAAK3/TxD RESOUT 34 DMARQ3/RxD HLDAK 33 DMAAK2 HLDRQ 32 DMARQ2 REFRQ 31 DMAAK1 A19/PS3 30 DMARQ1 A1S/PS2 29 DMAAKO A17/PS1 28 DMARQO A16/PSO 27 END/TC 83-0041266 2 pPD70216 (V50) 64 lORD 63 NC 62 MWR 61 IOWR 60 BUSLOCK 59 BUFR/W 58 BUFEN 57 CLKOUT 56 X1 55 54 53 52 X2 GND NC GND 1m 51 UBE 50 ASTB 49 aSO 48 aS1 47 POLL 46 TCTL2 45 TOUT2 44 TCLK 43 NC 42 INTP7 41 INTP6 83-0041278 3 pPD70216 (V50) NEe Pin Identification Symbol Function Symbol Function TOUT2 Timer/counter 2 output Multiplexed address/ processor status outputs UBE Upper byte enable output Multiplexed address/data bus VDn +5 V power supply input ASTB Address strobe output Xl, X2 Crystal/external clock inputs Bus status outputs BUFEN Data bus transceiver enable output Pin Functions BUFR/W Data bus transceiver direction output A19-A16/PS3-PSO [Address/Status Bus] BUS LOCK Buslock output These three-state output pins contain the upper 4 bits CLKOUT System clock output of the 20-bit address during T1 and processor status DMAAKO DMA channel 0 acknowledge output information during the T2, T3, TW, and T4 states of a DMAAK1 DMA channel 1 acknowledge output bus cycle. During T1 of a memory read or write cycle, DMAAK2 DMA channel 2 acknowledge output these pins contain the upper 4 bits of the 20-bit address. These pins are forced low during T1 of an I/O DMAAK3/TxD DMA channel 3 acknowledge output/Serial bus cycle. transmit data output DMARQO DMA channel 0 request input Processor status is output during T2, T3, TW, and T4 of DMARQ1 DMA channel 1 request input both memory and I/O bus cycles. PS 3 is zero during any CPU native mode bus cycle. During any DMA, DMARQ2 DMA channel 2 request input refresh, or 8080 emulation mode bus cycle, PS3 outputs DMARQ3/RxD DMA channel 3 request input/Serial receive a high level. PS2 outputs the contents of the interrupt data input enable (IE) flag in the CPU PSW register. PS1 and PS o END/TC End input/Terminal count output indicate the segment register used to form the physical GND Ground address of a CPU bus cycle as follows: HLDAK Hold acknowledge output PSI PSo Segment HLDRQ Hold request input 0 0 Data segment 1 (DS1) IC Internal connection; leave unconnected 0 1 Stack segment (SS) INTAKITOUT1/SRDY Interrupt acknowledge output/Timer/counter 1 Program segment (PS) 0 output/Serial ready output 1 Data segment 0 (DSO) INTP1-INTP7 Interrupt request inputs lORD I/O read strobe output These pins are in the high-impedance state during hold acknowledge. 10WR I/O write strobe output MRD Memory read strobe output AD15-ADo [Address/Data Bus] MWR Memory write strobe output These three-st~te pins form the middle byte of the NC No connection active-high, time-multiplexed address/data bus. During NMI Nonmaskable interrupt input T1 of a bus cycle, AD1S-ADo output the lower 16 bits of POLL Poll input the 20-bit memory or I/O address. During the T2, T3, TW, and T4 states, AD1S-ADo form the 16-bit bi- CPU queue status outputs directional data bus. READY Ready input The memory and I/O address spaces are organized REFRQ Refresh request output into a pair of byte-wide banks. The even bank is RESET Reset input accessed whenever ADo = 0 during T1 of a bus cycle. RESOUT Synchronized reset output Access to the odd bank is controlled by the USE pin. TCLK Timer/counter external clock input The AD1S-ADo pins enter the high-impedance state TCTL2 Timer/counter 2 control input during hold acknowledge or internal interrupt acknow- ledge bus cycles or while RESET is asserted. Pins AD10-ADs contain the slave address of an external interrupt controller during the second interrupt ac- knowledge bus cycle. 4 NEe pPD70216 (V50) ASTB [Address Strobe] BUSLOCK This active-high output is used to latch the address This active-low output provides a means forthe CPU to from the multiplexed address bus in an external address indicate to an external bus arbiter that the bus cycles of latch during T1 of a bus cycle. ASTB is held at a low the next instruction are to be kept contiguous. level during hold acknowledge. BUSLOCK is asserted forthe duration of the instruction following the BUS LOCK prefix. BUSLOCK is also BS2-BSO [Bus Status] asserted during interrupt acknowledge cycles and enters the high-impedance state during hold acknow- Outputs BS2-BSO indicate the type of bus cycle being ledge. While BUSLOCK is asserted, DMAU, RCU, and performed as shown below. BS2-BSO become active external bus requests are ignored. during the state preceding T1 and return to the passive state during the bus state preceding T4. CLKOUT BS) Bus Cycle CLKOUT is a buffered clock output used as a reference BS2 BSo for all timing. CLKOUT has a 50-percent duty cycle at 0 0 0 Interrupt acknowledge ha:/f the frequency of the input clock source. 0 0 1 I/O read 0 1 1 0 1 I/O write Halt DMAAKO-DMAAK2 [DMA Acknowledge] nI ~ 0 0 0 Instruction fetch This set of outputs contains the DMA acknowledge 0 1 Memory read (1) signals for channels 0-2 from the internal DMA control- 0 Memory write (2) .Ier and indicate that the peripheral can perform the 1 Passive state requested transfer. Note: DMAAK3/TxD [DMA Acknowledge 3]/[Serial (1) Memory read bus cycles include CPU, DMA read, DMA verify, Transmit Data] and refresh bus cycles. (2) Memory write bus cycles include CPU and DMA write bus cycles. Two output signals multiplexed on this pin are selected by the PF field of the on-chip peripheral connection BS2-BSO are three-state outputs and are high imped- register. ance during hold acknowledge. • DMAAK3 is an active-low output and enables an external DMA peripheral to perform the requested BUFEN [Buffer Enable] DMA transfer for channel 3. BUFEN is an active-low output for enabling an external • TxD is the serial data output from the serial control data bus transceiver during a bus cycle. BUFEN is unit. asserted during T2 through T3 of a read cycle, T2 through T3 of a slave interrupt acknowledge cycle, and DMARQO-DMARQ2 [DMA Request] T1 through T4 of a write cycle. BUFEN is not asserted when the bus cycle corresponds to an internal pe- These synchronized inputs are used by external pe- ripheral, DMA, refresh, or internal interrupt acknow- ripherals to request DMA service for channels 0-2 from ledge cycle. BUFEN enters the high-impedance state the internal DMA controller. during hold acknowledge. DMARQ3/RxD [DMA Request 3]/[Serial Receive BUFR/W [Buffer Read/Write] Data] BUFR/W is a three-state, active-low output used to Two input signals multiplexed on this pin are selected control the direction of an external data bus trans- by the PF field of the on-chip peripheral connection ceiver during CPU bus cycles. A high level indicates the register. pPD70216 will perform a write. cycle and a low level • DMARQ3 is used by an external peripheral to request indicates a read cycle. BUFR/W enters the high- a DMA transfer cycle for channel 3. impedance state during hold acknowledge. • RxD is the serial data input to the serial control unit. 5 pPD70216 (V50) NEe END/TC [End/Terminal Count] • TOUT1 is the output of timerlcounter 1. This active-low bidirectional pin controls the termin- • SRDY is an active-low output and indicates that the ation of a DMA service. Assertion of END by external serial control unit is ready to receive the next hardware during DMA service causes the service to character. terminate. When a DMA channel reaches its terminal count, the DMAU asserts TC, indicating the program- INTP1-INTP7 [Peripheral Interrupts] med operation has completed. INTP1-INTP7 accept either rising-edge or high-level END/TC is an open-drain 1/0 pin, and requires an triggered asynchronous interrupt requests from external external 2.2-kO pull-up resistor. peripherals. These INTP1-INTP7 inputs are internally synchronized and prioritized by the interrupt control HLDAK [Hold Acknowledge] unit, which requests the CPU to perform an interrupt acknowledge bus cycle. External interrupt controllers When an external bus requester has become the such as the pPD71059 can be cascaded to increase the highest priority requester, the internal bus arbiter will number of vectored interrupts. assert the HLDAK output indicating the address, data, and control buses have entered a high-impedance state These interrupt inputs cause the CPU to exit both the and are ayailable for use by the external bus master. standby and 8080 emulation modes. Should the internal DMAU or RCU (demand mode) The INTP1-INTP7 inputs contain internal pull-up re- request the bus, the bus arbiter will drive HLDAK low. sistors and may be left unconnected. When this occurs, the external bus master should complete the current bus cycle and negate the HLDRQ lORD [1/0 Read] signal. This allows the bus arbiter to reassign the bus to This three-state pin outputs an active-low 110 read the higher priority requester. strobe during T2, T3, and Tw of an I/O read bus cycle. If a higher priority internal bus master subsequently Both CPU I/O read and DMA write bus cycles assert requests the bus, the high-level width of HLDAK is lORD. lORD is not asserted when the bus cycle guaranteed to be a minimum of one CLKOUT period. corresponds to an internal peripheral or register. It enters the high-impedance state during hold acknow- HLDRQ [Hold Request] ledge. This active-high signal is asserted by an external bus 10WR [1/0 Write] master requesting to use the local address, data, and control buses. The HLDRQ input is used by the internal This three-state pin outputs an active-low 110 write bus arbiter, which gives control of the buses to the strobe during T2, T3, and TW of a CPU I/O write or an highest priority bus requester in the following order. extended DMA read cycle and during T3 and TW of a DMA read bus cycle. 10WR is not asserted when the Bus Master Priority bus cycle corresponds to an internal peripheral or register. It enters the high-impedance state during RCU Highest (demand mode) hold acknowledge. DMAU • HLDRQ • CPU RCU • Lowest (normal operation) MRD [Memory Read Strobe] This three-state pin outputs an active-low memory read strobe during T2, T3, and TW of a memory read INTAK/TOUT1/SRDY [Interrupt Acknowledge]1 bus cycle. CPU memory read, DMA read, and refresh [Timer 1 Output]l[Serial Ready] bus cycles all assert MRD. MRD enters the high- Three output signals multiplexed on this pin are impedance state during hold acknowledge. selected by the PF field of the on-chip peripheral connection register. MWR [Memory Write Strobe] • INTAK is an interrupt acknowledge signal used to This three-state pin outputs an active-low memory cascade external siavepPD71059 Interrupt Control- write strobe during T2, T3, and TW of a CPU memory lers. INTAK is asserted during T2, T3, and TW states write or DMA extended write bus cycle and during T3 of an interrupt acknowledge cycle. and TW of a DMA normal write bus cycle. MWR enters the high-impedance state during hold acknowledge. 6 NEe pPD70216 {V50} NMI [Nonmaskable Interrupt] REFRQ [Refresh Request] The NMI pin is a rising-edge-triggered interrupt input REFRQ is an active-low output indicating the current that cannot be masked by software. NMI is sampled by bus cycle is a memory refresh operation. REFRQ is CPU logic each clock cycle and when found valid for used to disable memory address decode logic and one or more CLKOUT cycles, the NMI interrupt is refresh dynamic memories. The 8-bit refresh row accepted. The CPU will process the NMI interrupt address is placed on As-A1 during a refresh bus cycle. immediately after the current instruction finishes execution by fetching the segment and offset of the RESET [Reset] NMI handler from interrupt vector 2. The NMI interrupt RESET is a Schmitt trigger input used to force the causes the CPU to exit both the standby and 8080 pPD70216 to a known state by resetting the CPU and emulation modes. The NMI input takes precedence on-chip peripherals. RESET must be asserted for a over the maskable interrupt inputs. minimum of four clocks to guarantee recognition. After RESET has been released, the CPU will start program POLL [Poll] execution from address FFFFOH in the native mode. The active-low POLL input is used to synchronize the RESET will release the CPU from the low-power operation of external devices with the CPU. During standby mode and force it to the native mode. ~ execution of the POLL instruction, the CPU checks the POLL input state every five clocks until POLL is once again asserted. RESOUT [Reset Output] ~ This active-high output is available to perform a system- QS1-QSO [Queue Status] wide reset function. RESET is internally synchronized with CLKOUT and output on the RESOUT pin. The QS1 and QSo outputs maintain instruction synch- ronization between the pPD70216 CPU and external TCLK devices.These outputs are interpreted as follows. TCLK is an external clock source for the timer control Instruction Queue Status unit. The three timer/counters can be programmed to QSo operate with either the TCLK input or a prescaled o No operation CLKOUT input. First byte of instruction fetched Flush queue contents TCTL2 Subsequent byte of instruction fetched TCTL2 is the control input for timer/counter 2. Queue status is valid for one clock cycle after the CPU TOUT2 has accessed the instruction queue. TOUT2 is the output of timer/counter 2. READY [Ready] UBE [Upper Byte Enable] This active-high input synchronizes external memory USE is an active-low output, asserted when the upper and peripheral devices with the pPD70216. Slow byte of the 16-bit data bus contains valid data. USE is memory and I/O devices can lengthen a bus cycle by used along with Ao by the memory decoding logic to negating the READY input and forcing the SIU to insert select the even/odd banks as follows. TW states. READY must be negated prior to the rising edge of CLKOUT during the T2 or by the last internally- Bus generated TW state to guarantee recognition. When Operation UBE Cycles Ao READY is once again asserted and recognized by the Word, even address 0 0 1 SIU, the SIU will proceed to the T4 state. Word, odd address 0 1 (1st bus cycle) 2 The READY input operates in parallel with the internal 1 o(2nd bus cycle) pPD70216 wait control unit and can be used to insert Byte, even address 1 0 more than three wait states into a bus cycle. Byte, odd address 0 USE is a three-state output and enters the high- impedance state during hold acknowledge. 7 pPD70216.(V50) NEe X1, X2 [Clock Inputs] Pin States These pins accept either a parallel resonant, funda- Table 1.lists the output pin states during the Hold, Halt, mental mode crystal or an external oscillator input with Reset and DMA Cascade conditions. a frequency twice the desired operating frequency. Table 1. Output PIn States In the case of an external clock generator, the X2 pin can either be left unconnected or be driven by the DMA complement of the X1 pin clock source. Symbol Output Hold Halt Reset Cascade A19- A16 1PS3-PSO 3-state Out Hi-Z H/L H/L Hi-Z AD15- AD o 3-state I/O Hi-Z H/L Hi-Z Hi-Z ASTB Out L L L L BS2-BSO 3-state Out Hi-Z H H H BUFEN 3-state Out Hi-Z H H Hi-Z BUFR/W 3-state Out Hi-Z H/L H Hi-Z BUS LOCK 3-state Out Hi~Z H/L H Hi-Z CLKOUT Out H/L H/L H/L H/L DMAAKO-DMAAK2 Out H H/L H H/L DMAAK31 Out H H/L H H/L TxD H/L H/L H/L END/TC I/O H H/L H H HLDAK Out H H/L L INTAK Out H H H H TOUT1 H/L H/L H/L SRDY H/L H/L H/L lORD 3-state Out Hi-Z H H Hi-Z 10WR 3-state Out Hi-Z H H Hi-Z MRD 3-state Out Hi-Z H H Hi-Z MWR 3-state Out Hi-Z H H Hi-Z QS1-QSO Out H/L L L H/L REFRQ Out H H/L H. H RESOUT Out L L H L TOUT2 Out H/L H/L H/L H/L UBE 3-state Out Hi-Z H H Hi-Z H: high level; L: low level; H/L.: high or low level; Hi-Z: high impedance. 8 NEe pPD70216 (V50) Block Diagram INTP1 Wait A19-A16/PS3-PSO INTP2 Control Interrupt Unit INTP3 Control INTP4 [WCU] Unit INTPS AD1S-ADo [ICU] INTP6 BS2-BSo INTP7 QS1 QSo TOUT2 Timer/ POLL TOUT1 Counter Bus ASTB TCTL2 Unit Interface USE TCLK [TCU] Unit [BIU] BUFEN BUFR/W DMARQO DMAAKO DMARQ1 Central Processing Unit BUSLOCK lORD IOWR B MRD i5MAAi<1 DMA [CPU] MWR Control DMARQ2 Unit READY DMAAK2 [DMAUl RESET DMARQ3 RESOUT DMAAK3 END/TC Bus INTAK Arbitration HLDAK Unit HLDRQ NMI [BAUl X1 Refresh Serial Clock TxD X2 Control Control Generator SRDY Unit Unit CLKOUT [eG] [SCUl RxD [RCUl REFRQ 83-004138C 9 IlPD70216 (V50) NEe Absolute Maximum Ratings DC Characteristics TA = +25°C TA = -10 to +70°C, Voo = +5 V ±10% (8 MHz), Voo = 5 V ±5% (10 MHz) Power supply voltage, Voo -0.5 to +7.0 V Limits Input voltage, VI -0.5 to Voo + 0.3 V Test Parameter Symbol Min Max Unit Conditions ClK input voltage, VK -0.5 to Voo + 1.0 V rnput voltage, high VIH 2.2 Voo+ V Output voltage, Vo -0.5 to Voo + 0.3 V 0.3 Operating temperature, TOPT -10 to +70°C -0.5 V Input voltage, low VIL 0.8 Storage temperature, TSTG -65 to +150 °C X1, X2 input 3.9 V VKH Voo + Comment: Exposure to Absolute Maximum Ratings for extended voltage, high 1.0 periods may affect device reliability; exceeding the ratings could X1, X2 input VKL -0.5 0.6 V cause permanent damage. The device should be operated within the voltage, low limits specified under DC and AC Characteristics. Output voltage, high VOH 0.7 Voo V 10H = -400J1.A Capacitance Output voltage, low VOL 0.4 V 10L= 2.5 rnA TA=+25°C, Voo=OV Input leakage ILiH 10 J1.A VI = Voo current, high Limits Test Input leakage ILlPL -300 J1.A VI =0 V, INTP Parameter Symbol Min Max Unit Conditions current, low input pins Input capacitance CI 15 pF fc = 1 MHz; ILiL -10 J1.A VI = 0 V, other unmeasured pins Output capacitance Co 15 pF input pins are returned to 0 V. Output leakage ILOH 10 J1.A Vo = Voo current, high Output leakage ILOL -10 J1.A Vo=OV current, low Supply current 8 MHz 100 90 rnA Normal mode 20 rnA Standby mode 10 MHz 100 120 rnA Normal mode 25 rnA Standby mode 10 NEe pPD70216 (V50) AC Characteristics TA = -10 to +70°C; Voo = 5 V ±10% (8 MHz), Voo = 5 V ±5% (10 MHz), CL = 100 pF 8 MHz Limits 10 MHz Limits Parameter Symbol Min Max Min Max Unit Test Conditions External clock input cycle time tCYX 62 250 50 250 ns External clock pulse width, high tXXH 20 19 ns VKH = 3.0 V External clock pulse width, low tXXL 20 19 ns VKL = 1.5 V External clock rise time tXR 10 5 ns 1.5 - 3.0V External clock fall time tXF 10 5 ns 3.0 -.1.5 V CLKOUT cycle time tCYK 124 500 100 500 ns CLKOUT pulse width, high tKKH 0.5 tCYK-7 0.5 tCYK - 5 ns VKH = 3.0 V CLKOUT pulse width, low tKKL 0.5 tCYK-7 0.5 tCYK - 5 ns VKL = 1.5 V CLKOUT rise time tKR 7 5 ns 1.5 - 3.0 V CLKOUT fall time tKF 7 5 ns 3.0 -1.5 V CLKOUT delay time from external clock Input rise time (except external clock) Input fall time (except external clock) tDXK tlR tlF 55 20 12 40 15 10 ns ns ns 0.8- 2.2 V 2.2 - 0.8 V 1m Output rise time (except CLKOUT) tOR 20 15 ns 0.8- 2.2V Output fall time (except CLKOUT) tOF 12 10 ns 2.2 - 0.8 V RESET setup time to CLKOUT 1 tSRESK 25 20 ns RESET hold time after CLKOUT 1 tHKRES 35 25 ns RESOUT delay time from CLKOUT 1 tDKRES 5 60 5 50 ns READY inactive setup time to CLKOUTt tSRYLK 15 15 ns READY inactive hold time after CLKOUTt tHKRYL 25 20 ns READY active setup time to CLKOUTt tSRYHK 15 15 ns READY active hold time after CLKOUTt tHKRYH 25 20 ns NMI, POLL setup time to CLKOUTt tSIK 15 15 ns Data setup time to CLKOUT 1 tSDK 15 15 ns Data hold time after CLKOUT 1 tHKD 10 10 ns Address delay time from CLKOUT 1 tDKA 10 55 10 50 ns A19-AO UBE Address hold time after CLKOUT 1 tHKA 10 10 ns 1/0 recovery time tAl 2tCYK - 50 2tCYK - 40 ns (Note 1) PS delay time from CLKOUT 1 tDKP 10 60 10 50 ns PS float delay time from CLKOUTt tFKP 10 60 10 50 ns Address setup time to ASTBl tSAST tKKL - 20 tKKL - 30 ns Address float delay time from CLKOUT 1 tFKA tHKA 60 tHKA 50 ns ASTB t delay time from CLKOUT 1 tDKSTH 45 40 ns ASTBl delay time from CLKOUTt tDKSTL 50 45 ns ASTB pulse width, high tSTST tKKL -10 tKKL -10 ns Address hold time after ASTBl tHSTA tKKH - 20 tKKH - 20 ns Control delay time from CLKOUT tDKCT1 10 70 10 60 ns (Note 2) tDKCT2 10 60 10 55 ns (Note 3) 11 tlPD70216 (V50) NEe AC Characteristics (cont) 8 MHz Limits 10 MHz limits Parameter Symbol Min Max Min Max Unit Test Conditions RO! delay time from address float tOAFRL 0 0 ns (Note 4) RO! delay time from CLKOUT! tOKRL 10 75 10 65 ns ROt delay time from CLKOUT! tOKRH 10 70 10 60 ns REFRQt delay from MROt tORQHRH tKKL - 30 tKKL - 30 ns (Note 5) Address delay time from ROt tORHA tCYK - 40 tCYK - 40 ns RO pulse width, low tRR 2tCYK - 50 2tCYK - 40 ns BUFR/W delay from BUFENt tOBECT tKKL - 20 tKKL - 20 ns Read cycle tOWCT tKKL - 20 tKKL - 20 ns Write cycle Data output delay time from CLKOUT! tDKD 10 60 10 55 ns Data float delay time from CLKOUT! tFKO 10 60 10 55 ns WR pulse width, low tww 2tCYK - 40 2tCYK - 40 ns (Note 4) BS! delay time from CLKOUTt tOKBL 10 60 10 55 ns BS t delay time from CLKOUT! tOKBH 10 60 10 55 ns HLDRQ setup time to CLKOUTt tSHQK 20 15 ns HLOAK delay time from CLKOUT! tOKHA 10 70 10 60 ns DMAAK! delay time from CLKOUTt tOKHOA 10 60 10 55 ns DMAAK! delay time from CLKOUT! tOKLOA 10 90 10 80 ns Cascade mode WR pulse width, low (DMA cycle) tWW1 2tCYK - 40 2tCYK - 40 ns DMA extended write cycle WR pulse width, low (DMA cycle) tWW2 tCYK - 40 tCYK - 40 ns DMA normal write cycle RD!, WR! delay from DMAAK! tOOARW tKKH - 30 tKKH - 30 ns DMAAKt delay from RDt tORHOAH tKKL- 30 tKKL - 30 os RDt delay from WRt towHRH 5 5 ns TC output delay time from CLKOUTt tOKTCL 60 55 ns TC off delay time from CLKOUTt tOKTCF 60 55 ns TC pulse width, low tTCTCL tCYK -15 tCYK -15 ns TC pullup delay time from CLKOUTt tOKTCH tKKH tKKH ns + tCYK -10 + tCYK -10 END setup time to CLKOUTt tSEOK 35 30 ns END pulse width, low tEOEOL 100 80 ns DMARQ setup time to CLKOUTt tSOQK 35 30 ns INTPn pulse width, low tlPlPL 100 80 ns RxD setup time to SCU internal clock! tSRX 0.5 J,Js RxD hold time·after SCU internal clock! tHRX 0.5 J,Js SRDY delay time from CLKOUT! tOKSR 150 100 ns Notes: (1) This is specified to guarantee a read/write recovery time for I/O (4) RD represents lORD and MRD. WR represents 10WR and MWR. devices. (5) This is specified to guarantee that REFRQ t is delayed from (2) Delay from CLKOUT to DMA cycle MWR/IOWR outputs. MRD t at all times. (3) Delay from CLKOUT to BUFR/W, BUFEN, INTAK, REFRQ out- puts and CPU cycle MWR/IOWR outputs. 12 NEe pPD70216 (V50) AC Characteristics (cont) 8 MHz Limits 10 MHz Limits Parameter Symbol Min Max Min Max Unit Test Conditions TxD delay time from TOUT1! tOTX 500 200 ns TCTL2 setup time from CLKOUT! tSGK 50 40 ns TCTL2 setup time to TCLKt tSGTK 50 40 ns TCTL2 hold time after CLKOUT! tHKG 100 80 ns TCTL2 hold time after TCLKt tHTKG 50 40 ns TCTL2 pulse width, high tGGH 50 40 ns TCTL2 pulse width, low tGGL 50 40 ns TOUT output delay time from CLKOUT! tOKTO 200 150 ns TOUT output delay time from TOUT! tOTKTO 150 100 ns TOUT output delay time from TCTL2! tOGTO 120 90 ns TCLK rise time tTKR 25 25 ns TCLK fall time TCLK pulse width, high TCLK pulse width, low tTKF tTKTKH 50 50 25 45 45 25 ns ns ns 1m tTKTKL TCLK cycle time tCYTK 124 DC 100 DC ns RESET pulse width low tRESET1 50 50 pS After power on tRESET2 4 tCYK 4 tCYK During operation 13 pPD70218 (V50) NEe pPD70216 Clock Input Configurations Timing Measurement Points Crystal-Controlled Internal Clock Input 2.4 V [except Clock] ---v- 2.2 V 2.2 V \ ; - - 1 { T 'II-_-'-_~ X1 0.4 v~_0_.8_V_ _ _ _ _ _.;.;0.;;.,8..;...V~ 1~~F II J:::l 15pF 1 - -.......-~X2 Output V 2.2 V 2.2 V \ ; - - ~~0~.8_V_ _ _ _ _ _. .;.;0.8~V~ CLK~ q:: External Clock 1 I 83·00181SA External Clock 2 X1 CLK-1 Buffers are high-speed X2 I CMOS inverters. 83·004019A Timing Waveforms Clock Timing External Clock [X1] CLKOUT 83-001844B 14 NEe pPD70216 (V50) Timing Waveforms (coni) Reset and Ready Timing Reset Timing CLKOUT RESOUT ~,"6) ___ -flt' (1 t",'6~~ _ __ Ready Timing,No Wait States T1 T2 T3 T4 T1 CLKOUT READY Ready Timing, Wait States T1 T2 T3 TW T4 CLKOUT READY 83-0027258 15 pPD70216 (V50) NEe Timing Waveforms (cont) Poll, NMI, and Buslock Timing _f_t CLKOUT POLL, NMI Input Timing S'K _ POLL, NMI CLKOUT BUSLOCK Output Timing 83-001831 B Read/Write Recovery Time 1 + - - - - tAI---~ 83-004266B 16 NEe pPD70216 (V50) Timing Waveforms (coni) Read Timing T4 T1 T2 T3fTW T4 CLKOUT A19/PS3· Processor Status A1s1 PSo ----- II tSOK~1 Data Input ASTB .......- - - - [Note 1) I tOCKT2 tOKeT2 [Note 1) ~-----------rtRR----------~ tOKBL Note: (1) Except internal If 0 accesses. 83-0018458 17 pPD7021'6{V50) NEe Timing Waveforms (cont) Write Timing T4 T1 T2 T3/TW T4 CLKOUT A19/ PS3 . -A16/PS O Processor Status AD15"ADO -+-----(J Data Output AsrB tOKCT2 [Note 1] BUFRiW tOKCT2 tOKCT2 [Note 1] ~----------+-tww--------~ tOKBL tOKBH Note: [1] Except internal 1/0 accesses. 83-0018438 18 NEe pPD70216 (V50) Timing Waveforms (cont) Status Timing T4 T1 T2 T3/TW T4 CLKOUT A19/ PS 3 Processor Status -A16/ PS o II UBE tFKA~ tsoK~1 AD1S-AD o Address Data Input Em ASTB tOKBH Bus Status tOKRH ~---------tRR----------~.1 OS1,OSO _____X'-------IX__--.JX'---_)C 83-0027218 19 pPD70218 (V50) NEe Timing Waveforms (cont) Interrupt Acknowledge Timing CLKOUT ItHKD ---.....---f' ' --~ Vector number [Note2J ASTB ~~_ _~_ _ _ _ _ _ _ _ _ _ _ _ _~~~______J~~_______________________________ tOKCT2 \ ' - - _ _- - . 1 1 tOKCT2 BUFR/W ________ ~--------------------------~~--------~~------~----------~------------------------ -(-~.. BUSLOCK _ 2 -----...,1 (1-( Notes: [1 J If the Interrupt Is accepted following a control transfer, the three TI states can be replaced .wIth an unused instruction fetch bus cycle. [2J Slave address when the Interrupt Is' from external pPD70159. Undefined when internallCU Interrupt. .' . [3J Solid line when Interrupt·from externalpPD70159.Dash Une when internal ICU Interrupt. 83-0018416 20 NEe pPD70216 (V50) Timing Waveforms (coni) HLDRQ/HLDAK Timing, Normal Operation TI TI T4 T1 CLKOUT~<",---+----+QK~~ HLDRQ ~ ~ ______________ ~ ______+-____~_____________ HLDAK tOKA Internal Bus Master [N;(~e 1] Internal Bus Master ~ tFKA tOKA Inte-r-n-a-I-B-us--M-a-st-e-r-[N..(~ote 2] .-------------'~-----------------------o(] Internal Bus Master ( ~-------- NOTES: (1) A19/PS3-A1S/PSo, AD1S-ADo, BUFEN,BUFR/W,MRD,IORD,MWR,IOWR,UBE (2) BS2-BSO 83-0018288 HLDRQ/HLDAK Timing, Bus Wait CLKOUT HLDRQ HLDAK External ____ __ Bus __ Master __ [Note _1]_ ~(r:t'.~~-------------------J).-----_~(~_I_nt_eM_ran!.atl!B!:..u_S :~ _po _ __ Note: [1] A19/PS3-A1S/PSo, AD1S-ADO, UBE, BUFEN, BUFR/W, MRD, tORD, MWR, IOWR, B52-B50_ 83-0018298 21 pPD70216 (V50) NEe Timing Waveforms (cont) Refresh Timing T4 T1 T2 T3/TW T4 CLKOUT ADS·ADO ------0«1 ASTB tOAFRL tORQHRH tOKRL tOKeT2 itOKBL rtOKBH 'l BS2 = 1, BS1 = 0, BSo ~1 ! 83-003517C 22 NEe pPD70216 (V50) Timing Waveforms (cont) DMAU. DMA Transfer Timing T4 T1 T2 T3/TW T4 CLKOUT ASTB 83-0018478 23 pPD70216 '(V50) NEe Timing Waveforms (cont) DMA Timing EN CITe Timing T1 T2 T3 T4 CLKOUT TC tSEDK 1tEDl~ -------0..----------------------- CMA Request Timing CLKOUT OMARan (n=0-3) Cascade Mode, Normal Operation Cascade Mode, Refresh Cycle Insertion CLKOUT OMARa OMAAK -----------------~ 83-001S26C 24 NEe pPD70216 (V50) Timing Waveforms (coni) SCU Timing R X D \_ _ _ +--t_ _ _ L I~ tSRX .1. tHRx--.I TounJ \J 14----+-16 or 64 Toun pulses---+I 1 + - - - - 1 6 or 64 TOUT1 pulses---+i TxD CLKOUT SRDY ________ I""d:~-------- ~ 83-0018496 ICU Timing INTPn (n=1-7) (I",,,) 25 pPD70216 (V50) NEe Timing Waveforms (coni) TCU Timing, Internal Clock Source CLKOUT TCTL2 _ _ _ _f'O.WITOUT2) TOUTn [n = 1, 2] -------------------- 83-0027228 TCU Timing, TCLK Source trKR tTKF TCL.K TCTL2 ____~_;~~_)_:x=t-~:x=~'M'ro TOUTn [n = 1, 2] 83-0018238 26 NEe pPD70216 (V50) Functional Description Central Processing Unit Refer to the JlPD70216 block diagram for an overview The JlPD70216 CPU functions similarly to the CPU of of the ten major functional blocks listed below. the JlPD70116 CMOS microprocessor. However, be- cause the pPD70216 has internal peripheral devices, • Central processing unit (CPU) its bus architecture has been modified to permit • Clock generator (CG) sharing the bus with internal peripherals. ThepPD70216 • Bus interface unit (BIU) CPU is object code compatible with both thepPD70108/ • Bus arbitration unit (BAU) JlPD70116 and theJlPD8086/JlPD8088 microprocessors. • Refresh control unit (RCU) • Wait control unit (WCU) Figure 1 is the pPD70216 CPU block diagram. A listing • Timer/counter unit (TCU) of the JlPD70216 instruction set is in the final sections • Serial control unit (SCU) of th is data sheet. • Interrupt control unit (ICU) • DMA control unit (DMAU) Figure 1. JlPD70216 CPU Block Diagram Internal address/data bus (20) To BIU • NMI INT (from ICU) TEMP Qo Q1 Q2 Q3 CLOCK Q4 Qs (from CG) • ---- BCU EXU LC PC Effective Address AW Generator BW CW • OW • IX IV BP SP • • • Subdata bus(16) Main data bus(16) 83-0018396 ')7 pPD70216 (V50) NEe Register Configuration General-Purpose Registers. The pPD70216 CPU con- tains four 16-bit general-purpose registers (AW, BW, Program Counter [PC]. The program counter is a 16- CW, DW), each of which can be used as a pair of 8-bit bit binary counter that contains the program segment registers by dividing into upper and lower bytes (AH, offset of the next instruction to be executed. The PC is Al, BH, Bl, CH, Cl, DH, Dl). General, purpose incremented each time the microprogram fetches an registers may also be specified implicitly in an in- instruction from the instruction queue. The contents of struction. The implicit assignments are: the PC are replaced whenever a branch, call, return, or break instruction is executed and during interrupt AW Word multiplication/division, word I/O, processing. At this time, the contents of the PC are the data conversion same as the prefetch pointer (PFP). Al Byte multiplication/division, byte I/O, BCD Prefetch Pointer [PFP]. The prefetch pointer is a rotation, data conversion, translation 16-bit binary counter that contains the program seg- AH Byte multiplication/division ment offset of the next instruction to be fetched for the instruction queue. Because instruction queue prefetch BW Translation is independent of instruction execution, the contents CW loop control, repeat prefix of the PFP and PC are not always identical. The PFP is updated each time the bus interface unit (BIU) fetches Cl Shift/rotate bit counts, BCD operations an instruction for the instruction queue. The contents DW Word multiplication/division, indirect of the PFP are replaced whenever a branch, call, return I/O addressing or break instruction is executed and during interrupt processing. At this time, the contents of the PFP and Pointer [SP, BP] and Index Registers [IX, IV]. These PC are the same. registers serve as base pointers or index registers Segment Registers [PS, SS, OSo, OS1]. ThepPD70216 when accessing memory using one of the base, memory address space is divided into 64K-byte logical indexed, or base indexed addressing modes. Pointer segments. A memory address is determined by the sum and index registers can also be used as operands for of a 20-bit base address (obtained from a segment word data transfer, arithmetic, and logical instructions. reg ister) and a 16-bit offset known as the effective These registers are impliCitly selected by certain address (EA). I/O address space is not segmented and instructions as follows. no segment reg ister is used. The four segment reg isters SP Stack operations, interrupts are program segment (PS), stack segment (SS), data segment 0 (DSo), and data segment 1 (DS1)' The IX Source block transfer, BCD string following table lists their offsets and overrides. operations, bit field extraction IY Destination block transfer, BCD string Default operations, bit field insertion Segment Register Offset Override PS PFP register None Program Status Word [PSW] SS SP register None The program status word consists of six status flags SS Effective address (BP-based) PS, OSo, OS1 and four control flags. DSo Effective address (non BP-based) PS, SS, OS1 Status Flags Control Flags DSo IX register (1) PS, SS, OS1 • V (Overflow) • MD (Mode) DS1 IY register (2) None • DIR (Direction) • S (Sign) Note: • Z (Zero) • IE (Interrupt Enable) (1) Includes source block transfer, output, BCD string, and bit field • AC (Auxiliary Carry) • BRK (Break) extraction. • P (Parity) (2) Includes destination block transfer, input, BCD string, and bit • CY (Carry) field insertion. 28 NEe pPD70216 (V50) When pushed onto the stack, the word image of the Figure 2. Dual Data Buses PSW is as follows: 15 8 MD v DIR IE I BRK I 7 o S z o AC o P CY The status flags are set and cleared automatically depending upon the result of the previous instruction execution. Instructions are provided to set, clear, and complement certain status and control flags. Other flags can be manipulated by using the POP PSW instruction. Between execution of the BRKEM and RETEM in- structions, the native mode RETI and POP PSW instructions can modify the MD bit. Care must be exercised by emulation mode programs to prevent inadvertent alteration of this bit. Sub data bus Main data bus CPU Architectural Features 83-0038288 The major arch itectu ral featu res of the pPD70216 CPU are: Figure 3. Effective Address Generator • Dual data buses • Effective address generator • Loop counter • PC and PFP Dual Data Buses. To increase performance, dual data buses (figure 2) have been employed in the CPU to fetch operands in parallel and avoid the bottleneck of a single bus. For two-operand instructions and effective Effective Address address calculations, the dual data bus approach is 30 83-002737A percent faster than single-bus systems. Program Counter and Prefetch Pointer. The functions Effective Address Generator. Effective address (EA) of instruction execution and queue prefetch are de- calculation requires only two clocks regardless of the coupled in thepPD70216. By avoiding a single instruc- addressing mode complexity due to the hardware tion pointer and providing separate PC and PFP effective address generator (figure 3). When compared registers, the execution time of control transfers and with microprogrammed methods, the hardware ap- the interrupt response latency can be minimized. proach saves between 3 and 10 clock cycles during Several clocks are saved by avoiding the need to effective address calculation. readjust an instruction pointer to account for prefetct;J- ing before computing the new destination address. Loop Counter and Shifters. A dedicated loop counter is used to count the iterations of block transfer and multiple shift instructions. This logic offers a significant performance advantage over arch itectu res that control block transfers and multiple shifts using microprogram- ming. Dedicated shift registers also speed up the execution of the multiply and divide instructions. Compared with microprogrammed methods, multiply and divide instructions execute approximately four times faster. 29 pPD70216 (V50) t\fEC Enhanced Instruction Set Insert bit field (INS) copies the bit field of specified length (0 = 1 bit, 15 = 16 bits) from the AW register to In addition to the pPDSOS6/SS instruction set, the the bit field addressed by DS1 :IY:regS (figure 4). The pPD70216 has added the following enhanced instruct- bit field length can be located in any byte register or ions. supplied as an immediate value. The value in regS is a bit field offset. A content of 0 selects bit 0 and 15 selects Instruction Function bit 15 of the word that DSO:IX points to. Following PUSH imm Push immediate data onto stack execution, the IY and bit offset register are updated to PUSH R Push all general registers onto stack point to the start of the next bit field. POP R Pop all general registers from stack Bit field extraction (EXT) copies the bit field of specified MUL imm Multiply register/memory by immediate data length (0 = 1 bit, 15 = 16 bits) from the bit field SHL immB Shift/rotate by immediate count addressed by DSO:IX:regS to the AW register (figure 5). SHR immB If the bit field is less than 16 bits, it is right justified with SHRA immB ROL immB a zero fi II. The bit field length can be located in any byte ROR immB register or supplied as immediate data. The value in ROLC immB regS is a bit field offset. A content of 0 selects bit 0 and RORC immB 15 selects bit 15 of the word that DSO:IX points to. CHKIND Check array index Following execution, the IX and bit offset register are INM Input multiple updated to point to the start of the next bit field. OUTM Output multiple Packed BCD Strings. These instructions are provided PREPARE Prepare new stack frame DISPOSE Dispose current stack frame to efficiently manipulate packed BCD data as strings (length from 1 to 254 digits) or as a byte data type with a single instruction. Unique Instruction Set BCD string arithmetic is supported by the ADD4S, In addition to the pPD70216 enhanced instruction set, SUB4S, and CMP4S instructions. These instructions the following unique instructions are supported. allow the source string (addressed by DSO:IX) and the destination string (addressed by DS1 :IY) to be manip- Instruction Function ulated with a single instruction. When the number of INS Insert bit field BCD digits is even, the Z and CY flags are set according EXT Extract bit field to the result of the operation. If the number of digits is ADD4S BCD string addition odd, the Z flag will not be correctly set unless the upper SUB4S BCD string subtraction 4 bits of the result are zero. The CY flag will not be CMP4S BCD string comparison correctly set unless there is a carry out of the upper 4 ROL4 Rotate BCD digit left bits of the result. ROR4 Rotate BCD digit right The two BCD rotate instructions (ROR4, ROL4) perform TEST1 Test bit SET1 Set bit rotation of a single BCD digit in the lower half of the AL CLR1 Clear bit register through the register or memory operand. NOT1 Complement bit Bit Manipulation. Four bit manipulation instructions REPC Repeat while carry set have been added to the pPD70216 instruction set. The REPNC Repeat while carry cleared ability to test, set, clear, or complement a single bit in a FP02 Floating point operation 2 register or memory operand increases code readability as well as performance over the logical operations Bit Fields. Bit fields are data structures that range in traditionally used to manipulate bit data. length from 1 to 16 bits. Two separate operations on bit Repeat Prefixes. Two repeat prefixes (REPC, REPNC) fields, insertion and extraction, with no restrictions on allow conditional block transfer instructions to use the the position of the bit field in memory are supported. state of the CY flag as a terminating condition. The use Separate segment, byte offset, and bit offset registers of these prefixes allows inequalities to be used when are used for bit field insertion and extraction. Because working on ordered data, increasing the performance of their power and flexibility, these instructions are of searching and sorting algorithms. highly effective for graphics, high-level languages, and data packing/unpacking applications. 30 NEe pPD70216 (V50) Figure 4. Bit Field Insertion Bit length 15 o AW I ! ~~----+-!t _----"v---- 1: 17 + 8(imm8 -1) DISPOSE o0 6/10 Control Transfer Instructions CALL near _proc 0 0 0 0 16/20 3 ---------------------------------------------------------------------------- regptr 1 1 1 1 1 0 1 0 reg 14/18 1 memptr16 1 1 1 mod 0 1 0 mem 23/31 2-4 far-proc 0 0 0 0 21/29 5 memptr32 1 1 1 1 mod 0 mem 31/47 2-4 RET o0 0 0 1 15/19 1 o0 0 0 0 20/24 3 o0 0 21/29 o0 o o 24/32 69 pPD70216 (V50) NEe Instruction Set (cont) Opcode Flags Mnemonic Operands 5 4 3 2 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Control Transfer Instructions (cont) BR near_label 1 0 0 0 13 3 shorLiabel 0 0 12 reg 1 1 0 0 reg 11 memptr16 1 1 mod 0 0 mem 19/23 2-4 far_label 0 0 0 15 5 memptr32 1 1 1 mod 0 mem 26/34 2-4 BV near_label 0 0 0 0 14/4 BNV near_label 0 0 0 1 14/4 2 BC, Bl neaLiabel 0 0 14/4 2 BNC,BNl near.Jabel 0 0 0 1 14/4 BE, BZ near_label 0 0 0 0 14/4 BNE, BNZ near_label 0 0 1 14/4 2 BNH near_label 0 14/4 2 BH near_label 0 0 1 14/4 2 BN near_label 0 0 14/4 2 BP near_label 0 0 14/4 2 BPE near_label 0 0 14/4 BPO near_label 0 1 1 14/4 2 BlT near_label 0 0 14/4 2 BGE near_label 0 1 14/4 2 BlE near-label 0 14/4 2 BGT near_label 0 1 1 14/4 2 DBNZNE near_label 0 0 0 14/5 DBNZE near_label 0 0 0 0 1 14/5 2 DBNZ near_label 0 0 0 0 13/5 2 BCWZ near_label 0 0 13/5 2 Interrupt Instructions BRK 3 0 0 0 38/50 1 imm8 0 0 1 38/50 2 BRKV imm8 0 0 40/3 RETI 1 0 0 1 1 27/39 R R R R R R CHKIND reg16; mem32 0 0 0 0 mod reg mem 17-251 2-4 52-55 BRKEM imm8 0 0 0 0 1 1 1 1 1 1 1 1 38/50 3 CPU Control Instructions HALT 0 1 0 0 2 BUSlOCK 1 0 0 0 2 FP01 fp_op 0 X X X 1 1 Y Y Y Z Z Z 2 2 fp_op, mem 1 0 1 1 X X X mod Y Y Y mem 10/14 2-4 FP02 fp_op 0 0 0 X 1 1 Y Y Y Z Z Z 2 2 fp_op, mem 0 0 X mod Y Y Y mem 10/14 2-4 70 NEe pPD70216 (V50) Instruction Set (cont) Opcode Flags Mnemonic Operand 5 4 2 0 7 654321 0 Clocks Bytes AC CV V P S Z CPU Control Instructions (cont) POLL 0 0 2 + 5n n = number of times POLL pin is sampled. NOP 0 0 0 0 0 3 01 1 1 1 0 0 2 EI 1 1 0 1 2 OSO:, OS1:, PS:, SS: 0 seg 0 2 (segment override prefixes) 8080 Instruction Set Enhancements RETEM 1 1 0 1 0 27/39 2 R R R R R R CALLN imm8 0 0 0 38/58 3 1m 71 pPD70216 (V50) NEe 72 NEe NEC Electronics Inc. pPD70136 (V33) 16·Bit Microprocessor: High·Speed, CMOS Description o High-speed multiplication: 16-bit multiply in 12 clocks (0.75 I-'s at 16 MHz) The I-'PD70136 (V33™) is a 16-bit, high-speed CMOS microprocessor that is object and source code compat- o High-speed division: 16-bit divide in 19 clocks ible with the I-'PD70116 (V30~). Performance is four times (1.19 I-'S at 16 MHz) that of the 10-MHz V30 due to a number of architectural o I-'PD72291 floating-point coprocessor executes 530K features, such as hard-wired data path control and floating-point operations per second dedicated high-speed logic. The address space is ex- o BCD string arithmetic instructions panded to 16M bytes using an internal address transla- tion table. o CMOS with low-power standby mode The powerful instruction set includes bit processing, o 12.5-MHz or 16-MHz clock bit-field insertion and extraction, and BCD string arith- o Single power supply metic. Using a modified Booth's algorithm, the 16-MHz device can execute a 16-bit multiply in 750 ns. Ordering Information Part Number Clock (MHz) Package The I-'PD70136 has separate 16-bit data and 24-bit ad- dress buses. Bus control is synchronous. The nominal p.PD70136R-12 12.5 68-pin ceramic PGA bus cycle is two clock periods. Dynamic bus sizing is R-16 16 supported for devices that require an 8-bit data path. L-12 12.5 68-pin PLCC This allows the I-'PD70136 to be used in either 16- or 8-bit systems. L-16 16 GJ-12 12.5 74-pin plastic QFP An undefined instruction trap allows instructions that are not part of the V-Series instruction set (such as GJ-16 16 commands for proprietary MMUs) to be emulated. The I-'PD72291, a high-speed CMOS floating-point coproces~ sor capable of 530K floating-point operations per sec- ond at 16 MHz, is offered. Features o 125-ns minimum instruction execution time at 16 MHz o Expanded add ress space - 24-bit addressing to 16M bytes - LIM 4.0 compatible o No microcode; better performance with hard-wired data path control o Dynamic bus sizing for both memory and I/O o Fully I-'PD70116 software compatible o Undefined instruction trap V30 is a registered trademark of NEC Corporation V20, V33, V40, and V50 are trademarks of NEC Corporation 50049 pPD70136 (V33) NEe Pin Configurations BB-Pin Ceramic PGA Bottom View Pin Symbol Pin Symbol Pin Symbol Pin Symbol A2 AEX B9 CLK F10 Voo K4 A12 000000000 A2 A3 HLOAK B10 014 F11 GNO KS A14 00000000000 A4 READY B11 012 G1 AO KS GNO 00 00 AS AS CPREQ C1 C2 UBE Bussn G2 G10 A1 Os K7 KS A1S 01S VOO 4 00 00 A7 CPBUSY C10 011 G11 04 K9 A20 00 00 AS INT C11 010 H1 A2 K10 A23 A9 01S 01 BUSSTO H2 A3 K11 A22 00 ILPD70136R 00 A10 013 02 RNI H10 03 L2 A7 00 00 B1 BUSLOCK 010 09 H11 02 L3 A9 B2 BCYST 011 J1 A4 L4 A11 00 00 B3 BSSIBS1S E1 Os MilO J2 AS LS A13 00 00 B4 HLORQ E2 OSTB J10 01 LS VOO 10 00000000000 BS RESET E10 07 J11 DO L7 A1S 11 o 0 0 0 0 0 0 0 0 L10 BS B7 GNO CPERR E11 F1 Os GNO K1 K2 AS AS LS L9 A17 A19 BS NMI F2 VOO K3 A10 L10 A21 ABC D G H 49NR-339B BB-PinPLCC AEX 8S8/8S16 41 HlDAK 40 HlDRQ 39 READY RESET CPREQ GND VDD CPERR CP8USY NMI INT ClK D15 D14 D13 49NR-340B 2 NEe pPD70136 (V33) 74-Pin Plastic QFP A21 A20 A19 015 3 A18 CLK A17 INT A16 A15 CPBUSY 7 NC GNO I-lPD70136GJ VDO GND A14 CPREQ A13 NC A12 RESET NC READY A11 HLDRQ 41 A10 HLDAK A9 BSSIBS16 As AEX A7 49NR-346B Pin Identification Symbol 1/0 Function Symbol 1/0 Function Ao-A23 3-state _Address bus HLDAK Out Bus hold acknowledge 0 0-015 3-state Data bus INT In Maskable interrupt USE 3-state Upper byte enable NM1 In Nonmaskable interrupt R!W 3-state Read/write CPBUSY In Coprocessor busy M/iO 3-state Memory I/O CPERR in Coprocessor error BUSSTO, 3-state Bus status CPREQ In Coprocessor request BUSST1 RESET In Reset BCYST 3-state Bus cycle start strobe CLK In Clock lrn'i'B 3-state Data strobe Voo +5-volt power supply BUSLOCK Out Bus lock GND Ground READY In Ready IC Internal connection; connect to BS'8/BS16 In Dynamic bus sizing control ground AEX Out Address expansion flag NC No connection HLDRQ In Bus hold request 3 ,.,PD70136 (V33) NEe Table 1. Output Pin States sizing can be selected so that only the lower 8 bits, State. 00-07, are used. During CPU read cycles, the value on the data bus is latched by the CPU on the trailing edge of Symbol Hold Standby Re.et T2 orthe last TW state. During CPU write cycles. 00-015 Ao-A23 (Note 1) HI-z L HI-z become valid after the rising edge of T1 and remain valid 015-00 (Note 1) HI-z (Note 2) HI-z until after the rising edge of the clock cycle following T2 O'BE (Note 1) HI-z H HI-z or the last TW state. During HLOAK and when RESET is asserted. 00-015 are not driven. R/W (Note 1) HI-z L HI-z M/K) (Note 1) HI-z L HI-z UBE (Upper Byte Enable) BUSSTO, BUSST1 (Note 1) HI-z H HI-z USE indicates thatthe upper 8 bits of the data bus will be BOYSi (Note 1) HI-z (Note 3) HI-z used in the current CPU bus cycle. This signal is used in I5'SiB (Note 1) HI-z H HI-z conjunction with Ao as shown in table 2. eOSLOOR (Note 4) (Note 4) H Table 2. Bus Operation l'S USE and Ao AEX (Note 5) (Note 5) L Number of HLDAK H L L Bu. Operation USE Bu. Cycle. Ao Note.: Word at even address, 0 o (Note 1) 2 (1) Latched Internally. ~8/BS16 = 0 1 1 (Note 3) (2) Undefined during first two clock periods of the halt acknowledge Word at odd address 0 1 (Note 1) 2 cycle; three-state thereafter. o (Note 2) (3) Low during first clock period of the halt acknowledge cycle; high thereafter. Byte at even address 0 (4) Low If =BU"""S=L-=O-=C":":K prefix Is used for halt Instruction; high other- Byte at odd address 0 wise. Note.: (5) Low If In extended addressing mode; high otherwise. (1) First bus cycle PIN FUNCTIONS (2) Second bus cycle (3) Second cycle for bus sizing elK (Clock) CLK is the main clock. All timing is relative to this input. USE has the same timing as Ao-A23 and is not driven Each bus state is one CLK period wide. Instruction clock during HLOAK or while RESET is asserted. counts refer to this CLK input. R/W (Read/Write) Ao-A23 (Address Bus) RiW indicates whether the current bus cycle will be a Ao-A23 form the 24-bit physical address bus. It is used to read or a write. If RiW is high. then the cycle will be a access both the 16M-byte expanded and 1M-byte nor- read; if low, a write cycle. RiW has the same timing as mal memory spaces and the 64K-byte 1/0 space. These Ao-A23 and is not driven during HLOAK or while RESET is three-state outputs become valid during T1 of all bus asserted. cycles and remain valid until after the bus cycle is completed. During HLOAK and when RESET is active. M/iO (Memory/IO) these outputs are not driven. MIlO indicates whether the current bus cycle will be. an access to the memory or 1/0 space. If MIlO is high, Do-D15 (Data Bus) access will be to memory; if low. to the I/O space. MIlO is 00-015 form the 16-bit data bus. which is used to transfer used with SUSSTO and SUSST1 to identify the cycle type. 16- and 8-bit data between the "P070136 and the exter- MIlO has the same timing as Ao-A23 and is not driven nal system. To accommodate 8-bit devices. dynamic bus during HLOAK or while RESET is asserted. 4 NEe pPD70136 (V33) BUSSTO-BUSST1 (Bus Cycle Status) BUSLOCK (Bus Lock) BU.SSTO and BUSST1, in conjunction with M/IO and R~ BUS LOCK should be used by external logic to exclude identify the current cycle type as shown in table 3. any other bus master (e.g., a DMAcontroller) from using a shared resource that the I'PD70136 currently is using. Table 3. Bus Cycle Types When BUSLOCK is asserted high, HLDRQ will beig- Status nored. M/iQ RNi BUSST1 BUSSTO Type of Bus Cycle BUS LOCK is asserted when the BUSLOCK prefix is 0 0 0 Interrupt acknowledge executed or when the I'PD70136 is performing a bus 0 0 I/O read operation that must not be interfered with, such as an interrupt acknowledge cycle. BUS LOCK has the same 0 0 0 I/O write timing as the address bus AO-A23· and is driven high 0 1 0 Coprocessor read during HLDAK and RESET. 0 0 0 Coprocessor write 0 0 1 HALT acknowledge READY (System Ready) 0 0 Instruction fetch READY is asserted low when the external system is 1 0 Memory. read ready for the current bus cycle to terminate. While 0 0 Memory write READY is not asserted, the I'PD70136 will·add TW (wait) 0 CP data read states to the current bus cycle. The bus state in which READY is sampled low wi II be the last state of the cycle. 0 0 CP data write READY is used during CPU read cycles to give slow Note: All bus status signals change after the start of the T1 state. devices time to drive the Do-D7 inputs, and during write The 11 cycle types are described in detail in the bu.s cycles to give slow devices enough time to finish the cycles section. The remaining five combinations of these write operation. inputs are reserved for future use. READY is sampled on the rising (middle) edge Of T2 and BUSSTO-BUSST1 have the same timing as the address all TW states. READY is ignored during the HLDAK state. bus, Ao-A23' and are not driven during HLDAK or while This input is not internally synchronized. To ensure RESET is asserted. proper device operation, minimum setup and hold times must be met. BCYST (Bus Cycle Start). BS8/BS16 (8-Bit Bus Size/16-Bit Bus Size) BCYST indicates the start of a bus cycle. It is asserted low during T10t every bus cycle, and only for the first BS8/BS16 is driven low by external logic when the clock period of each bus cycle. BCYST is not driven I'PD70136 addresses a device with an 8-bit data path. If during HLDAK or while RESET is asserted. the I'PD70136 operand is 16 bits wide and BS8/BS16 is low, then thel'PD70136 will perform two 8-bit bus DSTB (Data Strobe) cycles. The current bus cyCle will handle the low byte on Do-D7, and the next bus cycle wi II handle the upper byte DSTB indicates the status of the data on Do-D15. When also on Do-D7' This input is ignored during HLDAK, asserted low during a write cycle, the I'PD70136 drives interrupt acknowledge, and coprocessor cycles. the write data on Do-D15. When the CPU asserts this output during a read cycle, external logic should drive BS8/BS16 is sampled on the rising (middle) edge of T2 or the read data onto Do-D15' the last TW state, coincident with READY. This input is not internally synchronized. To ensure proper device DSTB is asserted following the rising edge (middle) of operation, minimum setup and hold times must be met. T1, and stays asserted through T2 and any TW (wait) state that may be inserted. During write cycles, DSTB AEX (Address Expansion) will be deasserted after the rising edge of either T2 or the last wait state. During read cycles, DSTB is deasserted AEX is asserted when the expanded addressing mode is after the trailing edge of T2 or the last wait state. DSTB enabled. When AEX is high, the memory address space is not driven during HLDAK, HALT acknowledge cycles, is 16M bytes (24-bit address), and when low, 1M bytes or while RESET is asserted. (20-bit address). 5 IIPD70136 (V33) NEe H LORQ (Hold Request) NMI is sampled on the rising edge of. each clock. This input is not internally synchronized. To ensure proper HLDRQ is asserted high by external logic when an device operation, minimum setup and hold times must external bus master (e.g., a DMA controller) wants to be met. take over the #,PD70136 bus. When HLDRQ is detected high, the #,PD70136 will release the bus after the current Once NMI is samped low, an internal flag is set, so that a bus operation is completed. Note that this is not neces- one-clock pulse meeting setup and hold times will be sarily the current bus cycle. The #,PD70136 releases its recognized. The flag is cleared when the NMI is accepted bus by floating the address, data, and control buses. See and can be set again immediately. table 1. . CPBUSY (Coprocessor Busy) HLDRQ is sampled on the rising edge of each clock. It will be ignored while BUSLOCK is asserted. This input is CPBUSY is asserted low by a coprocessor (such as not internally synchronized. To ensure proper device #,PD72291) when it is busy with an internal operation. operation, minimum setup and hold times must be met. The #,PD70136 uses this pin to check the status of the coprocessor. HLOAK (Hold Acknowledge) CPBUSY is sampled on the falling edge of each clock. HLDAK is asserted when the #,PD70136 enters the hold This- input is not internally synchronized. To ensure acknowledge state in response to HLDRQ. Data, ad- proper device operation, minimum setup and hold times dress, and control buses are not driven. See table 1. must be met. INT (Interrupt Request) CPERR (Coprocessor Error) INT is asserted high by external logic to notify the CPU CPERR is asserted low by a coprocessor to notify the that an external event has occurred that requires the #,PD70136 of an error. CPU's attention. After INT has been sampled high, and if CPERR is sampled on the falling edge of each clock. This the IE (enable interrupts) bit in the PSW is high, interrupt input is not internally synchronized. To ensure proper processing will begin after the current instruction is device operation, minimum setup and hold times must completed. ' be met. INT is sampled on the rising edge of each clock. After being asserted high, INT must be kept high until the first CPREQ (Coprocessor Request) INTAK cycle begins. This input is not internally synchro- CPREQ is asserted high by a coprocessor to request the nized. To ensure proper device operation, minimum #,PD70136 to run a memory operation for the co- setup and hold times must be met. processor. NMI (Nonmaskable Interrupt Request) CPREQ is sampled on the falling edge of each clock. This input is not internally synchronized. To ensure proper NMI is asserted by external logic to notify the CPU that device operation, minimum setup and hold times must an external event has occurred which requires the CPU's be met. immediate attention. When NMI is sampled low, ,interrupt processing will begin immediately after the current in- struction is completed: A trap will be taken through vector 2. The state of the IE bit in the PSW has no effect on NM I acceptance. 6 NEe "PD70136 (V33) RESET (Reset) RESET is asserted high when external logic needs to initialize the #,PD70136; for instance, after power-up. When RESET is asserted for at least 6 clock periods, the #,PD70136 wi II abort any current bus cycles and initialize the registers as shown in table 4. Table 4. Regi.ter Initl.,iZlltion by Reset Regl8ter OffaetValue PFP OOOOH PC OOOOH PS FFFFH SS OOOOH eso OOOOH eS1 OOOOH 1514 13 12 11 10 9 8 7 6 5 4 3 2 1 0 PSW 11 11 11 11 10 10 10 10 10 10 10 10 10 10 11 10 I Prefetch Queue Cleared Address Mode Normal Address Mode Other Undefined Qf power has just been turned on) Registers Unchanged Qf power on, but RESET Is asserted) Refer to table 1 for the state of the #,PD70136 outputs during reset. When RESET is de asserted low, the #,PD70136 will begin fetching from address OFFFFOH. This input is not internally synchronized. To ensure proper device operation, minimum setup and hold times must be met. 7 pPDl0136. (V33) NEe "PD70136 Block Diagram 20 Address Expansion 24 AO-A23 Control DO-D15 LC PC AW CLK. RESET. HLDRQ. READY. BSSIBS1"6 HLDAK. BUSLOCK. Registerl UBE. RiW. M/iO. ALU BUSST1. BUSSTO. Control Main Decoder AEX. BCYST. DSTB CPBUSY CPERR Execution Interrupt INT Control Control NMI Sub Main Data Bus Data Bus 49NR-333B 8 NEe pPD70136 (V33) ELECTRICAL SPECIFICATIONS Typ;CIII Supply Current VB Clock Frequency Absolute Maximum Ratings 200 TA =- +25°C Power supply voltage. Voo -0.5 to +7.0 V 150 Input voltage. VI -0.5 V to Voo + 0.3 V ClK Input voltage. VK -0.5 Vto Voo + 1.0 V --- [100) Output voltage. Vo -0.5 V to Voo + 0.3 V Operating ' " ~ -~ Operating temperature. TOPT Storage temperature. TSTG 50 ~ I ~ 16m Sta~dbY", ~ Exposure to Absolute Maximum Ratings for extended periods may [25) affect device reliability; exceeding the ratings could cause permanent [5) r- damage. 8 10 14 4 6 12 Frequency [MHz] Capacitance 49NR-326A TA- +25°C. Voo = 0 V Parameter Symbol Max Unit Conditions Input capacitance CI 15 pF fc = 1 MHz; unmeasured pins 1/0 capacitance CIO 15 pF returned to 0 V. DC Characteristics TA .. -10 to +70°C. Voo =- +5 V :10% Parameter Symbol Min Typ Max Unit Conditions Input voltage high 2.2 Voo + 0.3 V Input voltage low -0.5 0.8 V ClK Input voltage high 0.8 Voo Voo + 0.5 V ClK Input voltage low -0.5 0.6 V Output voltage high 0.7Voo V IOH-400 rnA Output voltage low 0.45 V 10L = 2.5 rnA Input leakage current high -10 p.A VI = Voo Input leakage current low 10 p.A VI =OV Output leakage current high 10 p.A Vo - Voo Output leakage current low -10 p.A Vo = OV Supply current 100 16 MHz 100 150 rnA Normal operation (see graph) 25 35 rnA Standby mode 12.5 MHz 75 110 rnA Normal operation 20 30 rnA Standby mode *Stop mode current is not a function of CPU * 200 p.A Stop mode clock frequency 9 IIPD70136 .(V33) NEe AC Characteristics TA = -10 to +70·C; VOO = 5 V ±10%; CL = 100 pF 12.5-MHz Limits 18 MHz-Limits Parameter Symbol Min Max Min Max Unit Clock period tcYK 80 500 62.5 500 ns Clock high-level width tKKH 35 25 ns Clock low-level width If INT > BRK flag> others at same level Interrupts are not accepted during certain times. NMI, INT and BRK flags are not accepted in these cases: (1) Between execution of MOV or POP that uses a segment register as an operand and the next in- struction. (2) Between a segment override prefix and the next instruction (3) Between a repeat or BUS LOCK prefix and the next instruction 28 NEe IIPD70136 (V33) Figure 12. Interrupt Prioritization Flow Diagram Complete current * If current instruction causes internal interrupt, SOFT flag = 1 instruction At the end of current instruction: • If BRK flag in PSW = 1, BRK =1 • If INT from ICU is sampled, INT = 1 • If NMI input is sampled, NMI = 1 Execute next instruction 83YL·6327B 29 ,.,PD70136 (V33) NEe Each interrupt vector consists of 4 bytes. The 2 bytes in Figure 14. Interrupt ",ctor 0 the low addresses of memory are loaded into PC as the Vector 0 offset, and the 2 high bytes are loaded into PS as the base address. Interrupt vector 0 in figure 14 is an exam- 001H OOOH ple. The bytes are combined in reverse order. The lower- 003H 002H order bytes in the vector become the most significant PC +- [001 H, OOOH] bytes in the PC and PS, and the higher-order bytes PS +- [003H, 002H] become the least significant. 49NR·345A Based on this format, the contents of each vector should During interrupt servicing, the third item pushed on the be initialized at the beginning of the program. The basic stack is the return PC value. For some types of traps mechanism for servicing an interrupt is: (divide error, CHKIND, illegal opcode, AFPP error, co- (SP - 1, SP - 2) - PSW procesor not present, or other CP error), this value pOints (SP - 3, SP - 4) - PS to the instruction that generated the trap. For the other (SP - 5, SP - 6) - PC interrupts (single-step, BRK3, BRKV, NMI, or INT), this SP - SP-6 value points to the next instruction. Trap handlers for IE - 0, BRK-O error traps can thus easily find the offending opcode, PS - vector high bytes and other handlers can simply return after processing PC - vector low bytes the interrupt. Figure 13. Interrupt ",ctor Table STANDBY FUNCTION The ItPD70136 offers two standby modes to reduce OOOH Vector 0 Divide Error power consumption: HALT and STOP. Both are entered 004H Vector 1 Break Flag after executing a HALT instruction. 008H OOCH 010H 014H Vector 2 Vector 3 Vector 4 VectorS NMllnput BRK 3 Instruction BRKV Instruction CHKIND Instruction j Dedicated HALT Standby Mode In the HALT standby mode, the internal clock is supplied tRe~NOO 018H Vector 6 only to those circuits related to functions required to exit ::~ l:: this mode and bus hold control functions. As a result, power consumption is reduced to one-fifth the level of 07CH Vector 31 normal operation. 080H I------i . Vector 32 General Use The HALT standby mode is exited when RESET or an ... ... } • BRK Imm8 Instruction 1E8 INT Input [External] external interrupt (NMI, INT) is received. If INT is used H _ _ _V_ec_t_or_1_22_~ 1- Undefined Instruction Trap and interrupts were enabled before the HALT state was ~ General Use entered, an INTAK cycle will be performed to fetch a "- • BRK Imm8 Instruction "" • INT Input [External] vector number. The interrupt service routine will be 200H Vector 128 I1PD72291 AFPP Error executed. After RETI, execution will resume with the 204H Other Coprocessor Error Vector 129 instruction following the HALT. If interrupts were dis- 208H Vector 130 Coprocessor Does Not Exist abled, the interrupt service routine will not be entered, ... 'f ... 1 General Use 'f .BRK Imm8 Instruction 3FCH r~===v=ec=t=or=2=55===:!1 • INT Input [External] 49NR·332A but execution will resume with the instruction following the HALT. If NMI is used to exit the HALT standby mode, the NMI service routine will always be entered. The bus hold (HLDRQ/HLDAK) function still operates during HALT standby mode. The CPU returns to HALT standby mode when the bus hold request is removed. During HALT standby mode, when all control outputs go low, the address and data buses will be either high or low. Refer to table 1 for information about the states of other outputs in the standby mode. 30 NEe pPD70136 (V33) STOP Standby Mode Enhanced Stack Operation Instructions In the STOP standby mode, the ~PD70136 clock is PUSH imm. This instruction allows immediate data to stopped for maximum power reduction. To enter this be pushed onto the stack. mode, special steps must be taken .to prepare the PUSH R; POP R. These instructions allow the contents ~PD70136 for having its clock stopped. of the eight general registers to be pushed onto or INT, NMI and HLDRQ must not be asserted while the popped from the stack with a single instruction. ~PD70136 is in STOP mode, or for at least 10 clock periods before STOP is entered, or for at least 10 clock Enhanced Multiplication Instructions periods after STOP mode is exited. External hardware MUL reg16, Imm16; MUL mem16, Imm16. These in- must ensure that these intputs are not asserted during structions allow the contents of a register or memory this time. location to be multiplied by immediate data. STOP mode is entered by disabling NMI, INT, and HLDRQ, entering the HALT standby mode, and stopping Enhanced Shift and Rotate Instructions the clock input 10 clock periods after the HALT acknowl- SHL reg, imm8; SHR reg, imm8; SHRA reg, Imm8. edge but cycle is issued. The eLK input must be stopped These instructions allow the contents of a register to be during the low phase of the clock. STOP mode is exited shifted by the number of bits defined by the immediate when external logic starts the clock, waits 10 clock data. periods, and enable NMI, INT, and HLDRQ; the ROL reg, imm8; ROR reg imm8; ROLC reg, Imm8; ~PD70136 will return to the HALT standby mode. RORC reg, imm8. These instructions allow the contents All output pins in STOP mode are in the same state as in of a register to be rotated by the number of bits defined HALT standby mode. Refer to table 1. by the immediate data. INSTRUCTION SET HIGHLIGHTS Check Array Boundary Instruction CHKINO reg16, mem32. This instruction is used to Enhanced Instructions verify that index values pointing to the elements of an In addition to the ~PD8088/86 instructions, the array data structure are within the defined range. See ~PD70136 has enhanced instructions listed in table 8. figure 15. The lower limit of the array should be in memory location mem32, the upper limit in mem32 + 2. If Table 8. Enhanced Instruction the index value in reg16 is not between these limits when CHKIND is executed, a BRK 5 will occur. This causes a Instruction Function jump to the location in interrupt vector 5. PUSH Imm Pushes Immediate data onto stack PUSHR Pushes 8 general registers onto stack Figure 15. Check Array Boundary POPR Pops 8 general registers onto stack Memory MULLlmm Executes 16·bit multiply of register or memory UP"""mlt~ contents by Immediate data SHLlmm8 Shifts/rotates register or memory by Immediate .............. 15 0 SHRlmm8 value ~ . Array ~ mem32 + 2 (Upper limit) SHRAlmm8 ~ ........ mem32 (Lower Limit) ROLlmm8 LowerLimitk:-~"""""''''''''''''<'"'''''<''"''''''''''''''''''''''''....-.d'--or RORlmm8 ROLClmm8 49NR-336A RORClmm8 CHKlND Checks array Index against designated boundaries Block I/O Instruction INM Moves a string from an I/O port to memory OUTM ow, src-block; INM dlst-block, ow. These in- OUTM Moves a string from memory to an I/O port structions are used to output or input a string to Qrfrom PREPARE Allocates an area for a stack frame and copies memory, when preceded by a repeat prefix. previous frame pointers DISPOSE Frees the current stack frame on a procedure exit 31 pPD70136 (V33) NEe Stack Frame Instruction INS reg8, reg8; INS reg8, Imm4. This instruction trans- fers low bits from the 16-bit AW register (the number of PREPARE Imm16,lmm8. This instruction is used to bits is specified by the second operand) to the memory generate the stack frames required by block-structured location specified by the segment base (OS1 register) languages. such as PASCAL and Ada. The stack frame plus the byte offset (IY register). The starting bit position consh~ts of two areas. One area has a pointer that points within this byte is specified as an offset by the lower 4 to another frame which has variables that the current bits of the first operand. See figure 16. frame can access. The other is a local variable area for the current procedure. After each complete data transfer. the IY register and the register specified by the first operand are automatically DISPOSE. This instruction releases that last stack frame updated to pOint to the next bit field. . generated by the PREPARE instruction. It returl1s the stack and base pOinters to the values they had before Either immediate data or a register may specify the the PREPARE instruction was used to call a procedure. number of bits transferred (second operand). Because the maximum transferable bit length is 16 bits. only the Unique Instructions lower 4 bits of the specified register (OOH to OFH) will be valid. In addition to the "POSOSS/S6 instructions and the ,en- hanced instructions. the "P070136 has the unique in- Bit field data may overlap the byte boundary of memory. structions listed in table 9. Figure 16. Bit Field Insertion Table 9. Unique Instructions Bit Instruction Function INS EXT ADD4S Insert bit field Extract bit field Adds packed decimal strings Awl" 0 g Bit JJ.·rnme'1 By" ~~:--.--~--r-lt~~--+-t----lJtt.Me=~ : OftootjlY] S UB4S Subtracts one packed decimal string from another 1 CMP4S Compares two packed decimal strings Byte Segment Base . ROL4 Rotates one BCD digit left through AL lower 4 bits Boundary [DS1] ROR4 Rotates one BCD digit right through AL lower 4 bits 49NR-341A BRKXA Break and enable expanded addressing RETXA Return from break and disable expanded EXT reg8, reg8; EXT reg8, Imm4. This instruction addressing loads to the AW registers the bit field data whose bit TEsn Tests a specified bit and sets/resets Z flag length is specified by the second operand of the instruc- tion from the memory location that is specified by the Non Inverts a specified bit OSO segment register (segment base). the.lX Index CLR1 Clears a specified bit register (byte offset). and the lower 4 bits of the first SET1 Sets a specified bit operand (bit offset). See figure 17. REPC Repeats next Instruction until CY flag Is cleared After the transfer is complete. the IX register and the REPNC Repeats next Instruction until CY flag Is set lower 4 bits of the first operand are automatically up- FP02 Additional floating-point processor call dated to point to the next bit field. Either immediate data or a register may be specified for variable Length Bit Field Operation Instructions the second operand. Because the maximum transfer- able bit length is 16 bits. however. only the lower 4 bits of This category has two instructions: INS (Insert Bit Field) the specified register (OOH to OFH) will be valid. and EXT (Extract Bit Field). These instructions are highly effective for computer graphics and high-level Bit field data may overlap the byte boundary of memory. languages. They can, for example. be used for data structures such as packed arrays and record type data used in PASCAL. 32 NEe IIPD70136 (V33) Figure 17. Bit Field Extrtlction BCD data and uses the lower 4 bits of the Al register (ALL,) to rotate that data one BCD digit to the left. See Bit Bit Byte figure 18. : • O~t.~. Offseat[lXl ~ Figure 18. BCD Rotate Left #~:-----rJ--+-_~--+-_ --jl j f 15 ~ 0 Byte ;---r I Memory Segment Base AW ,;.;:,;""-0-.....f%;.,..~.;--7I Boundary [DS01 49NR-342A Packed BCD Operation Instructions ROR4. This instruction treats the byte data of the regis- ter or memory specified by the instruction as BCD data The instructions described here process packed BCD and uses the lower 4 bits of the Al register (ALL,) to rotate ~_ data either as strings (ADD4S. SUB4S. CMP4S) or byte- that data one BCD digit to the right. See figure 19. ~ format operands (ROR4. ROl4). Packed BCD strings may be from 1 to 254 digits in length. Figure 19. BCD Rotate Right When the number of digits is even. the zero (Z) and carry (CY) flags will be set according to the result of the operation. When the number of digits is odd. the Z and CY flags may not be set correctly. In this case (Cl = odd). the Z flag will not be set unless the upper 4 bits of the highest byte are all Os. The CY flag will not be set unless there· is a carry out of the upper 4 bits of the Bit Manipulation Instructions highest byte. When Cl is odd. the contents of the upper TEST1. This instruction tests a specific bit in a register 4 bits of the highest byte of the result are undefined. or memory location. If the bit is 1. the Z flag is reset to O. ADD4S. This instruction adds the packed BCD string If the bit is O. the Z flag is set to 1. addressed by the IX index register to the packed BCD NOT1. This instruction inverts a specific bit in a register string addressed by the IY index register. and stores the or memory location. result in the string addressed by the IY register. The length of the string (number of BCD digits) is specified CLR1. This instruction clears a specific bit in a register by the Cl register. and the result of the operation will or memory location. affect the V (overflow). CY, and Z flags. SET1. This instruction sets a specific bit in a register or BCD string (IY, Cl) - BCD string (IY, Cl) + BCD string memory location. (IX. Cl) Repeat Prefix Instructions SUB4S. This instruction subtracts the packed BCD string addressed by the IX index register from the REPC. This instruction causes the #,PD70136 to repeat packed BCD string addressed by the IV register. and the following primitive block transfer instruction until stores the result in the string addressed by the IV the CY flag becomes cleared or the CW register be- register. The length of the string (number of BCD digits) comes zero. is specified by the Cl register. and the result of the REPNC. This instruction causes the p,PD70136 to repeat operation will affect the V.CY, and Z flags. the following primitive block transfer instruction until BCD string (IY, Cl) - BCD string (IY, Cl) -- BCD string the CY flag becomes set or the CW register becomes (IX. Cl) zero. CMP4S. This instruction performs the same operation Address Expansion Control Instructions as SUB4S except that the result is not stored and only the V. CY, and Z flags are affected. BRKXA ImmS. This instruction is used to turn on ex- panded addressing. The 8-bit immediate data specifies BCD string (IY, Cl) -- BCD string (IX. Cl) an interrupt vector. The PC field of this vector is loaded ROL4. This instruction treats the byte data of the regis- into the PC (and PFP). The XA flag in the XAM register is ter or memory operand specified by the instruction as set to 1. thereby enabling the expanded addressing 33 pPD70136 (V33) ttlEC mode. The p.PD70136 will begin fetching from the new (5) When processing a divide error, the p.PD70116 saves PFP through the address translation table. That is, the the address of the next instruction. The p.PD70136 new PC is treated as a logical address and is translated saves the address of the current instruction (the to the new, larger physical address space. divide instruction). This instruction does not save any return address infor- (6) The p.PD70116 allows up to 3 prefix instructions in mation, such as PC, PS, or PSW to the stack. any combination. The p.PD70136 also allows 3 pre- RETXA ImmB. This instruction is' used to turn off ex- fixes, but only one of each type can be used. The panded addressing. It is identical in operation to BRKXA, p.PD70136 could operate incorrectly if there are two except that the expanded addressing mode is turned off prefixes of the same type. For example, consider: before fetching from the new address. That is, the XA flag REP in the XAM register is set to 0, and the PC is loaded with REPC the value of the PC field in the interrupt vector selected CMPBK SS: src-block, dst-block by the immediate data. If the compare operation is interrupted, then when it This instruction does not save any return address infor- resumes following the interrupt service, execution mation such as PC, PS, or PSW to the stack. will begin at the REPC instruction, not the REP instruction, because two repeat prefixes were used. Porting I'PD70116n0108 Code to I'PD70136 (7) The p.PD70116 accepts NMI requests even while The p.PD70136 is completely software compatible with processin~NMI. The p.PD70136 does not allow the p.PD70116/70108. However, the p.PD70136 offers nes!!n9..of NMls; the NMI input will be ignored until some improvements that may affect the porting of the NMI interrupt handler is exited. p.PD70116 code to the p.PD70136. These improvements are: INSTRUCTION SET (1) The p.PD70116 does not trap on undefined opcodes. Symbols The p.PD70136 will trap, and also will trap when a register addressing mode is used for any of these Preceding the instruction· set, several tables explain instructions: symbols, abbreviations, and codes. CHKIND LDEA Clocks MOV DSO/DS1 BR 1,id CALL 1,id In the Clocks column of the instruction set, the numbers cover these operations: instruction decoding, effective (2) During signed division (DIV), if the quotient is 80H address calculation, operand fetch, and instruction exe- (byte operation) or 8000H (word), the p.PD70116 will cution. take a Divide By 0 trap. The p.PD70136 will perform the calculation. Clock timings assume the instruction has been prefetched and is present in the 8-byte instruction (3) When the p.PD70116 executes the POLL instruction, queue. Otherwise, add two clocks for each pair of bytes it will wait for the POLL input signal to be asserted. not present. The p.PD70136 has no POLL input; instead, when this instruction is executed, if a coproce$sor is not Word operands require two additional clocks for each connected, then a Coprocessor Not Present trap will transfer to an unaligned (odd address) memory operand. be taken. If a coprocessor is attached, then no These times are shown on the right side of the slash (/). , operation takes place. For conditional control transfer or branch instructions, The p.PD70116 accepts FP01 and FP02 as opcodes the number on the left side of the slash is applicable if the for the iAPX8087 coprocessor. The p.PD70136 ac- transfer or branch takes place. The number on the right cepts these as opcodes for the p.PD72291 coproces- side is applicable if it does not take place. sor, which is not compatible with the iAPX8087. If a range of numbers is given, the execution time (4) D!.ning the POP R instruction, the p.PD70116 does depends on the operands involved. . not restore the SP register. The p.PD70136 does restore the gP. 34 N'EC pPD70136 (V33) Symbols Symbol Meaning Symbol Meaning acc Accumulator(AW or AL) AW Accumulator (16 bits) duso Displacement (8 or 16 bits) BH BW register (high byte) dmem Direct memory address BL BW register (low byte) dst Destination operand or address BP BP register ext-disp8 16-blt displacement (sign-extension byte + 8- BRK Break flag bit displacement) BW BW register (16 bits) far_label Label within a different program segment CH CW register (high byte) far_proc Procedure within a different program segment CL CW register (low byte) fp_op Floating-point Instruction operation· CW CW register (16 bits) imm 8- or 16-blt Immediate operand II CY Carry flag imm3/4 3- or 4-bit Immediate bit offset DH DW register (hIgh byte) imm8 8-bit immediate operand DIR Direction flag imm16 16-bit Immediate operand DL DW register Oow byte) mem Memory field (000 to 111): 8- or 16-bit memory DSO Data segment 0 register (16 bits) location DS1 Data segment 1 register (16 bits) mem8 8-blt memory location DW DW register (16 bits) mem16 16-bit memory location IE Interrupt enable flag mem32 32-bit memory location IX Index register (source) (16 bits) memptr16 Word containing the destination address within the current segment IY Index register (destination) (16 bits) memptr32 Double word containing a destination address in MD Mode flag another segment P Parity flag mod Mode field (00 to 10) PC Program counter (16 bits) neaclabel Label within the current segment PS Program segment register (16 bits) neacproc Procedure within the current segment PSW Program status word (16 bits) offset Immediate offset data (16 bits) R Register set pop_value Number of bytes to discard from the stack S Sign extend operand field reg Register field (000 to 111): 8- or 16-bit general- = S No sign extension purpose register S = Sign extend immediate byte operand reg8 8-bit general-purpose register S Sign flag reg16 16-bit general-purpose register SP Stack pointer (16 bits) regptr 16-bit register containing a destination address SS Stack segment register (16 bits) within the current segment V Overflow flag regptr16 Register containing a destination address within W Word/byte field (0 to 1) the current segment X,XXX, Data to identify the Instruction code of the seg Immediate segment data (16 bits) YYY, ZZZ external floating-point arithmetic chip shorLJabel Label between -128 and + 127 bytes from the XXH Two-digit hexadecimal value end of the current Instruction XXXXH Four-digit hexadecimal value sr Segment register Z Zero flag src Source operand or address temp Temporary register (8116/32 bits) AC Auxiliary carry flag AH Accumulator (hIgh byte) AL Accumulator (low byte) 35 pPD70136 (V33) NEe Flag Operations Register Selection (mod = 11) Symbol MeanIng reg w =0 W =1 (blank) No change 000 AL AW o Cleared to 0 001 CL CW Set to 1 010 OL ow x Set or cleared according to result 011 BL BW u Undefined 100 AH SP R Restored to previous state 101 CH BP 110 OH IX Memory Addressing Modes 111 BH IV mem mod = 00 mod = 01 mod = 10 000 BW + IX BW + IX + dlsp8 BW + IX + dlsp16 Segment Register Selection --------------------------------------~ 001 BW + IV BW + IV + dlsp8 BW + IV + disp16 _sr_ _ _ _ _ _S_e..;:g~m_e_nt_R_e...;;g~ls_te_r_ _ _ _ _ _ _ __ 010 BP + IX BP + IX + dlsp8 BP + IX + dlsp16 _00_____________ 0_S1_________________________ 011 BP + IV BP + IV + dlspS ~+N+~p~ ~ ~ 100 IX IX + dlsp8 IX + disp16 ----------------------------------------- _10_____________ SS___________________________ 101 IV IV + disp8 IV + disp16 11 OSO 110 Oirect BP + disp8 BP + dlsp16 ---------------------------- 111 BW BW + dlsp8 BW + dlsp16 Instruction Set Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Dsts Trsnsfer Instructions MOV reg, reg 000 o W reg reg 2 2 --~~------~--------------------------~----~----------------------------- mem, reg 000100W mod reg mem 3/5 2-4 reg, mem o 0 0 1 0 W mod reg mem 5/7 2-4 mem,lmm 1 0 0 0 W mod 000 mem 3/5 3-6 reg, imm o 1 W reg 2 2-3 acc, dmem o 0 0 0 0 W 5/7 3 dmem, acc o 1 0 0 0 W 3/5 3 sr, reg16 o 0 0 0 1 1 0 sr reg 2 2 sr, mem16 o 0 0 1 0 mod 0 sr mem 5/7 2-4 reg16, sr o 0 0 0 0 1 1 0 sr reg 2 2 mem16, sr o 0 () 1 00 modO sr mem 3/5 2-4 OSO, reg16, mem32 o 0 0 o mod reg mem 10/14 2-4 OS1, reg16, mem32 1 0 0 0 o 0 mod reg mem 10/14 2-4 AH, PSW 0 0 .1 2 PSw, AH . 0 0 o 2 x x x x x LOEA reg16, mem16 1 0 0 0 1 1 0 0 mod reg mem 2 2-4 TRANS o 0 5 XCH reg, reg o 0 0 0 W 1 1 reg reg 3 2 mem, reg 1 0 0 0 0 W mod reg mem 8/12 2-4 36 NEe IIPD70136 (V33) Instruction Set (cont) Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Dsts Trsnsfer Instructions (cont) XCH (cont) AW, reg16 1 0 0 1 0 reg 3 Repest Prefixes REPC o o 0 o 1 2 REPNC o o 0 o 0 2 REP o 0 2 REPE REPZ REPNE 1 1 1 1 0 0 1 0 2 REPNZ Block Trsnsfer Instructions MOVBK dst, src 1010010W 1 3 + 4n fY'/ = 0) 3 + 4n fY'/ = 1, even addresses) 3 + 8n fY'/ = 1, odd addresses) 3 + 6n fY'/ = 1, odd/even addresses) CMPBK dst, src 1010011W 1 x xxxxx 3 + 7n fY'/ = 0) 3 + 7n fY'/ = 1, even addresses) 3 + 11n fY'/ = 1, odd addresses) 3 + 9n fY'/ = 1, odd/even addresses) CMPM dst 1010111W 1 x xxxxx 3 + 5n fY'/ = 0) 3 + 5n fY'/ = 1, even addresses) 3 + 7n fY'/ = 1, odd addresses) LOM; src 1010110W 1 5 +2nfY'/= 0) 5 + 2n fY'/ = 1, even addresses) 5 + 4n fY'/ = 1, odd addresses) STM dst 1010101W 1 3 +2nfY'/= 0) 3 + 2n fY'/ = 1, even addresses) 3 + 4n fY'/ = 1, odd addresses) n = number of returns String Instruction execution clocks for a single-Instruction execution are In parentheses. I/O Instructions IN ace,Imm8 0 0 0 W 5/7 2 acc, OW 0 0 W 3/5 OUT Imm8, ace 0 0 W 3/5 2 Ow, ace 0 W 3/5 1 37 IIPD70136 (V33) NEe Instruction Set (cont) Opcode Flags MnemonIc Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z I/O Instructions (cont) INM dst, OW 0110110W 1 3 + 11n ~ = 0) 3 + 8n ~ = 1, even addresses) 3 + 22n ~ = 1, odd addresses) 3 + 20n ~ = 1, odd/even addresses; odd for I/O) 3 + 13n ~ = 1, odd/even addresses; odd for memory) OUTM Ow. src 0110111W 1 3 + 11n ~ = 0) 3 + 8n ~ = 1, even addresses) 3 + 22n ~ = 1, odd addresses) 3 + 20n ~ = 1, odd addresses; odd for I/O) 3 + 13n ~ = 1, odd addresses; odd for memory) n = number of transfers String instruction execution clocks for a single-Instruction execution are In parentheses. Use the right side of the slash (J) for OMA I/O accesses. BCD Instructions ADJBA 0 0 1 0 4 x x u u u u ADJ4A 0 0 0 0 2 x x u x x x ADJBS 0 0 1 4 x x u u u u ADJ4S 0 0 0 2 1 x x u x x x ADD4S dst, src 0 0 0 0 0 0 0 0 0 0 0 2 + 18n 2 u x u u u x SUB4S dst, src 0 0 0 0 0 0 0 0 0 0 2 + 18n 2 u x u u u x CMP4S dst, src 0 0 0 0 0 0 0 0 1 1 0 7 + 14n 2 u x u u u x ROL4 reg8 0 0 0 0 1 0 0 0 0 0 0 9 3 0 0 0 reg mem8 0 0 0 0 0 0 0 0 0 0 15 3-5 mod 0 0 0 mem ROR4 reg8 0 0 0 0 0 0 0 0 0 13 3 1 1 0 0 0 reg mem8 0 0 0 0 1 0 0 0 0 0 19 3-5 mod 0 0 0 mem n = number of BCD digits divided by 2 Dsts Type Conversion Instructions CVTBD 1 1 0 0 0 0 0 0 0 0 0 0 12 2 u u u x x x CVTDB 0 0 0 0 0 0 0 0 0 8 2 u u u x x x CVTBW 0 0 0 0 0 2 CVTWL 0 0 0 0 2 38 t\fEC pPD70136 (V33) Instruction Set (cont) Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CV V p S Z Arithmetic Instructions ADD reg, reg 000000 W 11 reg reg 2 2 x xxxxx ----------------------------------------------------------------------------------- mem, reg OOOOOOOW mod reg mem 7/11 2-4 x x x x x x reg, mem 0000001W mod reg mem 6/8 2-4 x x x x x x reg, imm OOOOOSW 1 1 0 0 0 reg 2 3-4 x x x x x x mem, inim 100000SW mod 0 0 0 mem 7/11 3-6 x x x x x x aoc, imm 00000 OW 2 2-3 x x x x x x ADDC reg, reg 00000 W 1 1 reg reg 2 2 x x x x x x mem, reg 000 OOOW mod reg mem 7/11 2-4 x x x x x x 1:9!11 reg, mem 0001001W mod reg mem 6/8 2-4 x x x x x x~ reg,imm OOOOOSW 1 1 0 1 0 reg 2 3-4 x x x x x x mem, imm OOOOOSW mod 0 1 0 mem 7/11 3-6 x x x x x x acc, imm 000010W 2 2-3 x x x x x x SUB reg, reg o 0 0 0 W 1 1 reg reg 2 2 x x x x x x mem, reg o a a 0 0 W mod reg mem 7/11 2-4 x x x x x x reg, mem a a 0 a W mod reg mem 6/8 2-4 x x x x x x reg, imm OOOOOSW 1 1 a reg 2 3-4 x x x x x x mem,imm OOOOOSW mod 0 mem 7/11 3-6 x x x x x x acc, imm o a a 0 W 2 2-3 x x x x x x SUBC reg, reg o a a a W 1 1 reg reg 2 2 x x x x x x mem, reg 000 OOW mod reg mem 7/11 2-4 x x x x x x reg, mem 000110 W mod reg mem 6/8 2-4 x x x x x x reg,imm OOOOOSW 1 1 0 1 reg 2 3-4 x x x x x x mem,imm 100000SW mod 0 1 mem 7/11 3-6 x x x x x x acc, imm a a a a W 2 2-3 x x x x x x INC reg8 a 1 1 0 0 0 reg 2 2 x x x x x mem 1 1 W mod 0 0 0 mem 7/11 2-4 x x x x x reg16 o o 0 a ~g 2 x x x x x DEC regS o 1 1 0 0 reg 2 2 x x x x x mem 1 1 W mod 0 0 mem 7/11 2-4 x x x x x reg16 o a a reg 2 x x x x x MULU reg8 a 1 0 o 0 reg 8 2 u x x u u u reg16 a o 0 reg 12 2 u x x u u u mem8 o o mod 0 0 mem 12 2-4 u x x u u u mem16 a mod a a mem 16/18 2-4 u x x u u u MUL reg8 a o a reg 8 2 u x x u u u reg16 a a reg 12 2 u x x u u u mem8 a o mod o mem 12 2-4 u x x u u u mem16 1 1 a 1 mod a mem 16/18 2-4 u x x u u u reg16, reg16, imm8 a o 0 1 1 reg reg 12 3 u x x u u u 39 pPD70136 (V33) NEe Instruction Set (cont) Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Arithmetic Instructions (cont) MUL reg16, mem16, 0 o o mod reg mem 16/18 3-5 u x x u u u (cont) Imm8 -------------------------------------------------------------------------------- reg16, reg16, o o o 0 1 1 reg reg 12 4 u xxuuu Imm16 reg16, mem16, o o o 0 mod reg mem 16/8 4-6 u x x u u u Imm16 DIVU reg8 o o 1 1 o reg 11 2 u u u u u u reg16 o 1 1 o reg 19 2 u u u u u u mem8 o o mod o mem 15 2-4 u u u u u u mem16 o 1 mod o mem 23/25 2-4 U U U U U U DIV reg8 o o 1 1 reg 16 2 U UUUUU reg16 o 1 1 1 reg 24 2 U UUUUU mem8 o o mod mem 20 2-4 U U U U U U mem16 o mod mem 28/30 2-4 U U U U U U Compsrlson Instructions CMP reg, reg 0 0 0 1 W 1 1 reg reg 2 2 x x x x x x -------------------------------------------------------------------------------- mem, reg 0 0 0 0 W mod reg mem 6/8 2-4 x x x x x x reg, mem 0 0 1 1 0 W mod reg mem 6/8 2-4 x x x x x x reg, Imm 0 0 0 0 0 S W 1 1 reg 2 3-4 x x x x x x mem, Imm 1 0 0 0 0 0 S W mod mem 6/8 3-6 x x x x x x ace, Imm 0 0 0 W 2 2-3 x x x x x x Logicsllnstructlons NOT reg 0 W 1 1 0 0 reg 2 2 --~------------------------------------------~----------------------------- mem 0 W mod 0 0 mem 7/11 2-4 NEG reg o W 1 1 0 reg 2 2 x x x x x x mem o W mod 0 mem 7/11 2-4 x x x x x x TEST reg, reg o 0 0 0 0 W 1 1 reg reg 2 2 U o 0 x x x mem, reg o 0 0 0 0 W mod reg mem 6/8 2-4 U o 0 x x x reg,lmm o W 1 1 0 0 0 reg 2 3-4 U o 0 x x x mem,lmm o 1 1 W modOOO mem 6/8 3-6 U o 0 x x x ace,lmm 100100W 2 2-3 U o 0 x x x AND reg, reg o 0 0001W 11 reg reg 2 2 U 0 0 x x x mem, reg OOOOOOW mod reg mem 7/11 2-4 U o 0 x x x reg, mem 000001W mod reg mem 6/8 2-4 U o 0 x x x reg,lmm OOOOOOW 1 1 o 0 reg 2 3-4 U o 0 x x x mem,lmm 1000000W mod o 0 mem 7/11 3-6 U o 0 x x x acc,lmm 0000 10W 2 2-3 U 0 0 x x x OR reg, reg 00000 W 11 reg reg 2 2 U OOxxx mem, reg 0000 OOW mod reg mem 7/11 2-4 U 0 0 x x x 40 NEe pPD70136 (V33) Instruction Set (cont) Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Logical Instructions (cont) OR (cont) reg, mem 0 0 0 0 1 0 W mod reg mem 6/8 2-4 u 0 0 x x x -------------------------------------------------------------------------------- reg, Imm 0 a 0 0 0 0 W 1 1 0 0 reg 2 3-4 u 0 0 x x x mem,lmm 0 0 0 0 0 0 W mod 0 0 mem 7/11 3-6 u 0 0 x x x ace, Imm 0 0 0 a 1 1 0 W 2 2-3 u 0 0 x x x XOR reg, reg 0 0 0 0 1 W 1 1 reg reg 2 2 u 0 0 x x x -------------------------------------------------------------------------------- mem, reg o 0 a a 0 W mod reg mem 7/11 2-4 u 0 0 x x x reg, mem 001a01W mod reg mem 6/8 2-4 u o o x x x reg,lmm oaoaoow 1 1 o reg 2 3-4 u o o x x x I:JI!II mem, imm 100aOOOw mod 1 0 mem 7/11 3-6 u o o x x x~ acc,lmm o 0 a a W 2 2-3 u o o x x x Bit Manipulation Instructions INS reg8, regS 0 0 0 0 001 1 000 37-61/ 3 reg reg 39-77 regS,lmm4 000 0 o 0 o a 37-69/ 4 1 1 0 a 0 reg 39-77 EXT reg8, reg8 000 a o a o 0 29-61/ 3 1 reg reg 33-63 reg8, imm4 o 0 0 0 1 o 0 o 29-61/ 4 1 0 0 0 reg 33-63 TEST1 reg, CL o 0 0 0 1 000 o 0 0 W 4 3 u 0 0 u u x 1 0 0 0 reg memB, CL o 0 0 a 1 000 a 0 008 3-5 u 0 0 u u x mod 0 0 0 mem mem16, CL o 0 0 0 1 1 000 000 B/10 3-5 u 0 0 u u x mod 0 a 0 mem reg, imm3/4 000 0 000 o 0 W 4 4 u OOuux 1 1 0 0 0 reg memB,lmm3 o 0 0 0 1 000 o 0 0 13 4-6 u 0 a u u x mod 0 0 0 mem mem16,lmm4 o 0 0 0 1 1 000 o a B/10 4-6 u 0 0 u u x mod 0 0 0 mem SET1 reg, CL o 0 0 0 1 o a 0 o a W 4 3 1 1 0 0 a reg mem,CL o 0 a 0 000 o o W 9 3-5 modaaO mem reg,lmm3/4 o 0 a a 1 o a 0 o W 4 4 1 1 0 0 a reg mem8,lmm3 o a a a o a 0 1 1 009 4-6 mod a 0 a mem 41 pPD70136 (V33) NEe Instruction Set (cont) Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Bit Manipulation Instructions (cont) SET1 mem16, Imm4 0 0 0 0 1 1 1 o 0 0 1 1 1 0 1 9/13 4-6 (cont) mod 0 0 0 mem CY o 0 2 DIR 1 1 1 0 2 CLR1 reg, CL o 0 0 0 1 000 o 0 W4 3 1 1 0 0 0 reg memS, CL o 0 0 0 1 000 o 0 o 9 3-5 mod 0 0 0 mem mem16, CL 0000111 000 o 0 9/13 3-5 mod 0 0 0 mem reg,lmm3/4 o 0 0 0 1 000 o W 4 4 1 1 0 0 0 reg memS,imm3 o 0 0 0 1 1 O' 0 0 o o 9 4-6 mod 0 0 0 mem mem16,lmm4 000 0 1 1 000 o 9/13 4-6 mod 0 0 0 mem CY 1 1 o 0 0 2 o DIR 1 1 o 0 2 NOT1 reg,CL o 0 0 0 1 000 o W4 3 1 1 0 0 0 reg memS, CL o 0 0 0 1 000 o o 9 3-5 mod 0 0 0 mem mem16, CL 0000111 000 o 9/13 3-5 modOOO mem reg, imm3/4 o 0 0 0 1 000 W 4 4 1 1 0 0 0 reg memS,lmm3 000 0 000 W 9 4-6 mod 0 0 0 mem mem16,lmm4 0000111 000 9/13 4-6 mod 0 0 0 mem CY 1 1 0 1 0 1 2 x Shift/Rotste Instructions SHL reg, 1 0 0 0 0 W 1 1 0 0 reg 2 2 u x x x x x -------------------------------------------------------------------------------- mem, 1 0 0 0 0 W mod 0 0 mem 7/11 2-4 u x x x x x reg, CL 0 0 0 W 1 1 0 0 reg 2 +n 2 u x u x x x mem, CL 0 1 0 0 W mod 0 0 mem 6/10 + n 2-4 u x u x x x reg, ImmS 0 0 0 0 0 W 1 1 0 0 reg 2 +n 3 u x u x x x n = number of shifts 42 NEe pPD70136 (V33) Instruction Set (cont) Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1 o 7 6 5 4 3 2 1 0 Clocks Bytes AC CV V P S Z Shift/Rotste Instructions (cont) SHL (cont) mem.lmm8 o 0 0 0 0 W mod o 0 mem 6/10 + n 3-5 u x u x x x SHR reg. 1 o 0 0 0 W 1 1 o reg 2 2 u x x x x x mem.1 o 0 0 0 W mod 0 mem 7/11 2-4 u x x x x x reg. CL o 0 0 W 1 1 0 reg 2 + n 2 u x u x x x mem.CL o 0 0 1 W mod 0 mem 6/10 + n 2-4 u x u x x x reg.lmm8 o 0 0 0 0 W 1 1 0 reg 2+n 3 u x u x x x mem.lmmS o 0 0 0 0 W mod 0 mem 6/10 + n 3-5 u x u x x x SHRA reg. 1 o 0 0 0 W 1 1 reg 2 2 u x o x x x~ mem.1 o 0 0 0 W mod mem 7/11 2-4 u x o x x x~ reg. CL o o 0 W 1 1 reg 2+n 2 u x u x x x mem.CL o 0 0 1 W mod mem 6/10 + n 2-4 u x u x x x reg. imm8 o 0 0 0 0 W 1 1 reg 2 +n 3 u x u x x x mem.immS o 0 0 0 0 W mod 1 mem 6/10 + n 3-5 u x u x x x ROL reg. 1 o 0 0 0 W 1 1 0 0 0 reg 2 2 x x mem.1 o 0 0 0 W modOOO mem 7/11 2-4 x x reg. CL o 0 0 W 1 1 0 0 0 reg 2 + n 2 x u mem.CL o 0 0 W mod 0 0 0 mem 6/10 + n 2-4 x u reg.lmm o 0 0 0 0 W 1 1 0 0 0 reg 2+n 3 x u mem.imm o 0 0 0 0 W modOOO mem 6/10 + n 3-5 x u ROR reg. 1 o 0 0 0 W 1 1 0 0 reg 2 + n 2 x u mem.1 o 0 0 0 W mod 0 0 mem 7/11 2-4 x x reg. CL 000 W 1 1 0 0 reg 7 +n 2 x u mem.CL 000 W mod 0 0 mem 6/10 + n 2-4 x u reg.imm8 o 0 0 0 0 W 1 1 0 0 reg 2+n 3 x u mem. immS o 0 0 0 0 W mod 0 0 mem 6/10 + n 3-5 x u ROLC reg. 1 o o 0 0 W 1 1 0 0 reg 2 2 x x mem.1 o o 0 0 W mod 0 0 mem 7/11 2-4 x x reg. CL o o 0 W 1 1 0 0 reg 2+n 2 x u mem.CL o 1 0 0 W mod 0 0 mem 6/10 + n 2-4 x u reg.lmm8 o 0 0 0 0 W 1 1 0 0 reg 2 + n 3 x u mem.immS o 0 0 0 0 W mod 0 0 mem 6/10 + n 3-5 x u RORC reg. 1 o 0 0 0 W 1 1 0 reg 2 2 x x mem.1 o OOOW modO mem 7/11 2-4 x x reg. CL 000 W 110 reg 2 + n 2 x u mem.CL 0100 W modO mem 6/10 + n 2-4 x u reg. imm8 o 0 0 0 0 W 110 reg 2 + n 3 X LI n = number of shifts 43 "PD70136 (V33) N'EC Instruction Set (cont) Ope ode Flags Mnemonic Operand 76 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Shift/Rotste Instructions (cont) RORC mem,lmm8 1 1 0 0 0 0 0 W mod 0 1 1 mem 6/10 + n 3-5 x u (cont) Stack Manlpulstlon Instructions PUSH mem16 1 1 mod 1 1 0 mem 5/9 2-4 reg16 0 1 0 0 reg 3/5 sr 0 0 0 sr 1 0 3/5 PSW 0 0 1 0 0 3/5 R 0 0 0 0 0 0 20/36 Imm 0 1 0 0 S 0 3/5 2-3 POP mem16 0 0 0 mod 0 0 0 mem 5/9 2-4 reg16 0 1 0 reg 5/7 sr 0 0 0 sr 1 5/7 PSW 1 0 0 1 1 1 0 5/7 R R R R R R R 0 1 0 0 0 0 22/38 PREPARE Imm16,lmm8 0 0 0 0 0 * 4 *imm8 = 0:15 imm8:=!: 1: 17 + 12 (imm8 - 1) odd, 15 + 8 (imm8-1) even DISPOSE 1 0 0 1 0 0 1 6/10 1 Control Trsnsfer Instructions CALL near_proc 0 0 0 0 7/9 3 regptr16 1 1 0 0 reg 7/9 2 memptr16 1 1 mod 0 0 mem 11/15 2-4 faLproc 0 0 0 0 9/13 5 memptr32 mod 0 1 mem 15/23 2-4 RET 0 0 0 0 1 10/12 pop_value 0 0 0 0 0 10/12 3 0 0 0 1 12/16 1 pop_value 0 0 0 1 0 12/16 3 BR near_label 0 0 0 7 3 shorLJabel 0 0 7 ·2 regptr16 1 1 0 0 reg 7 2 memptr16 mod 0 0 mem 11/13 2-4 faLlabel 0 0 0 7 5 memptr32 1 mod 1 0 1 mem 13/17 2-4 BV shorLJabel 0 0 0 0 0 3(6 2 BNV shorLJabel 0 0 0 0 3/6 2 BC,BL shorLJabel 0 0 0 0 3/6 2 n = number of shifts 44 NEe IIPD70136 (V33) Instruction Set (cont) Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CYV P S Z Control Transfer Instructions (cont) BNC, BNl shorUabel 0 1 1 0 0 1 3/6 2 BE,BZ shorUabel 0 0 0 0 3/6 2 BNE, BNZ shorUabel 0 0 1 0 3/6 2 BNH shorUabel 0 0 0 3/6 2 BH shorUabel 0 0 1 3/6 2 BN shorUabel 0 0 0 0 3/6 2 BP shorLlabel 0 0 0 1 3/6 2 BPE BPO shorLlabel shOrLlabel Interrupt Instructions 0 0 0 0 0 3/6 3/6 2 2 ED BlT shorLlabel 0 0 0 3/6 2 BGE shOrLlabel 0 0 1 3/6 2 BlE shorLlabel 0 0 3/6 2 BGT shOrLlabel 0 1 3/6 2 OBNZNE shorLlabel 0 0 0 0 0 3/6 2 OBNZE shorLlabel 0 0 0 0 3/6 2 OBNZ shorLlabel 0 0 0 0 3/6 2 BCWZ shorLlabel 0 0 0 1 1 3/6 2 BRK 3 0 0 0 0 18/24 imm8 0 0 0 18/24 2 BRKV imm8 0 0 0 20/26 RETI 1 0 0 1 1 13/19 R R R R R R CHKlNO reg16, mem32 0 0 0 0 0 mod reg mem 24-26/ 2-4 30-32 CPU Control Instructions HALT 0 1 0 0 2 BUSLOCK 1 0 0 0 0 2 FP01 fp_op 0 X X X 1 1 Y Y Y Z Z Z * 2 fp_op, mem 1 0 X X X mod Y Y Y mem * 2-4 FP02 fp_op 0 0 0 X 1 1 Y Y Y Z Z Z * 2 fp_op, mem 0 0 0 X mod Y Y Y mem * 2-4 POLL 0 0 0 2 + 5n n = number of times POLL pin is sampled. NOP 0 0 0 0 0 0 3 01 0 0 2 EI 1 1 0 2 OSO:, OS1:, PS:, SS: 0 0 seg 0 2 (segment override prefixes) 45 IIPD70136 (V33) NEe Instruction Set (cont) Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CV V P S Z Address Expansion Contro/lnstructions BRKXA immS 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 12 3 immS RETXA immS o 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 12 3 immS 46 NEe NEG Electronics Inc. pPD70236 (V53) 16-Bit Microprocessor: High-Speed, High-Integration, CMOS Description The V53 instruction set is upward compatible with the native modes of the V20, V30, V40™, and V50™. It The V53™ is a high-speed, high-integration 16-bit includes bit processing, bit field insertion and extrac- CMOS microprocessor with a CPU that is object and tion, and BCD string arithmetic. Using a modified source code compatible with the V2CJiJN3CJiJ. Integrated Booth's algorithm, the 16-MHz V53 executes 16-bit on the same die is a 4-channel DMA controller, a UART, multiplies in 750 ns. The CPU performance is the high- three timer/counters, an interrupt controller, a refresh est currently available in a high-integration micropro- controller, a clock generator, and a bus controller. cessor. (1) The DMA unit has four channels of high- bandwidth DMA (up to 8M bytes/sec). It has two The V53 has an undefined instruction trap that allows sets of control registers, one compatible with the instructions not part of the V-series instruction set (such as commands for proprietary MMUs) to be emu- JlPD71087/8237 and another with the JlPD71071. lated. High-speed numerics support is provided by the (2) (3) The UART offers asynchronous serial I/O and is functionally compatible with the JlPD71051 (8251). The three 16-bit general-purpose timer/counters JlPD72291 CMOS floating-point unit (530K FLOPs at 16 MHz). The V53's combination of high-speed CPU and DMA ED are compatible with the JlPD71054 (8254). makes it ideal for high-bandwidth data control applica- (4) The interrupt controller is identical to the tions such as disk or LAN controllers. The high integra- JlPD71059 (8259) and offers eight interrupt chan- tion and software compatibility of the CPU and periph- nels. External JlPD71059s may be cascaded. erals with the V33 and V30 makes the V53 ideal for very compact personal computer applications such as dis- (5) The refresh controller generates a 16-bit refresh kless work stations and lap top computers, or embed- cycle for use with dynamic or pseudostatic RAMs. ded MS-DOS® compatible PCs for POS terminals or (6) The clock generator uses a crystal at two times control applications. the desired frequency to produce the internal Features clock for the CPU and peripherals. A peripheral clock is also output. o High-speed, V30-compatible CPU (7) The bus controller generates JlPD71088-style con- -125-ns minimum instruction execution time at trol signals for easy interface to external devices. 16MHz The full V33 bus is also provided. Bus cycles are -750-ns 16-bit multiply at 16 MHz nominally two clock cycles long and can be ex- -1.19 Jls 16-bit divide (16 MHz) tended using the internal wait state generator. - Fastest high-integration MPU available Dynamic bus sizing can be used to set the data- o Dual bus architecture path width for every bus cycle. Both 8- and 16-bit cycles are supported, allowing the V53 to be used o 8-byte instruction queue on both 8- and 16-bit systems. o Expanded LIM 4.0-compatible 24-bit addressing The V53 CPU is identical to the JlPD70136 (V33™). o Four DMA channels (to 8M bytes/sec) Hardwired data-path control and a high-bandwidth bus o On-chip serial I/O controller give a performance level four times that of the 10-MHz o Three JlPD71054-compatible 16-bit counter/timers V30. The 1M-byte addressing range of the V30 is mapped into a 16M-byte LIM specification using on- o Eight-channel JlPD71059-compatible interrupt chip page registers. controller o Refresh controller V20 and V30 are registered trademarks of NEC Corporation. o Bus controller with wait-state generator V33, V40, V50, and V53 are trademarks of NEC Corporation. o Clock generator with STOP mode control for low MS-DOS is a registered trademark of Microsoft Corporation. power o 16-MHz (or 12.5-MHz) operation with 32-MHz (or 25-MHz) crystal 50159-1 pPD70236 (V53). NEe Ordering Information Part Number Clock (MHz) Package IlPD70236GD-10 10 120-pin plastic QFP GD-12 12 GD-16 16 R-10 10 132-pin ceramic PGA R-12 12 R-16 16 Pin Configurations 120-Pin Plastic QFP C') C\I ~ 0 00 en co 1'-. <0 II) ..,. 0 C') C\I ~ 00 0 0 NNNNCZ ...-...-..-..-..- ..... o..-..-..-..-z (7)cor---COLnvCZ ('1')(\,1..-0 ««>~«««>««~«««>~«« ENOITC 90 0 15 DMARQO 89 014 OMAAKO 88 013 DMARQ1 87 012 DMAAK1 VOD DMARQ2 GNO DMAAK2 °11 OMARQ3 °10 5MAAi<3 REFRQ 81 °9 08 HLORQ °7 HLOAK GNO °6V OO INTPO °5 INTP1 INTP2 °4 03 INTP3 02 voo GNO INTP4 °1 INTP5 71 00 INTP6 IC INTP7 CPBUSY INTAK CPERR # TCTLO CPREQ# TOUTO VOO TCTL1 GNO TOUT 1 UBE TCTL2 BUFEN TOUT2 OSTB TCLK BCYST # CPERR (error Indication) and CPREQ (data request) are Inputs from a coprocessor. 83YL·6469B 2 NEe IIPD70236 (V53) 132-Pin Ceramic PGA Bottom View Top View 00000000000000 14 00000000000000 13 00000000000000 12 000 000 11 000 000 10 000 000 9 000 000 S 000 000 7 000 000 S 000 000 S 000 0000 4 00000000000000 3 Index mark 00000000000000 2 / 00000000000000 o P N M L K J H G FED C B A ABC 0 E F G H J KL M N P III Pin Symbol Pin Symbol Pin Symbol Pin Symbol Pin Symbol Pin Symbol A1 A22 B9 A9 03 OMAROO H1 INTP2 L13 GNO N7 BUS LOCK A2 A20 B10 AS 012 0 14 H2 INTP3 L14 CPERRII NS RESOUT A3 GNO B11 GNO 013 IC H3 VOO M1 TOUTO N9 X2 A4 A 19 B12 A2 014 0 11 H12 GNO M2 TCTL2 N10 BUSSTO AS A1S B13 IC E1 HLORO H13 02 M3 TCLK N11 RiW AS A14 B14 0 12 E2 i5MAAK3 H14 03 M4 OTR N12 lORD A7 A12 C1 OMAAK2 E3 OMAR02 J1 INTP4 .MS RxROY N13 BCYST AS A11 C2 OMAAKO E12 VOO J2 INTPS Me AEX N14 UBE A9 NC C3 IC E13 0 10 J3 INTP7 M7 GNO P1 OSR A10 AS C4 A23 E14 08 J12 IC M8 VOO P2 CTS A11 AS CS IC F1 NC J13 01 M9 BUSST1 P3 SINT A12 A4 C6 A 18 F2 HLOAK J14 NC M10 IC P4 TxO A13 A3 C7 VOO F3 REFRO K1 INTPS M11 MRO PS READY A14 Ao C8 GNO F12 09 K2 INTAK M12 IC P6 BS8IBS1S B1 OMAR01 C9 A7 F13 07 K3 TCTL1 M13 BUFEN P7 PCLKOUT B2 ENOITC C10 VOO F14 Os K12 VOO M14 CPREOII PS CLKOUT B3 A21 C11 A1 G1 INTP1 K13 CPBUSY N1 TOUT 1 P9 X1 B4 VOO C12 °1S G2 INTPO K14 DO N2 IC P10 RESET BS A17 C13 0 13 G3 GNO L1 TCTLO N3 RTS P11 BUSST2 B6 A1S C14 GNO G12 VOO l2 IC N4 IC P12 MliO B7 A13 01 OMARQ3 G13 Os L3 TOUT2 NS RxO P13 IOWR B8 A10 02 OMAAK1 G14 04 L12 OSTB NS NMI P14 MWR # CPERR (error indication) and CPREO (data request) are inputs from a coprocessor. 83YL-6470B 3 ,.,PD70236· (V53) NEe Pin Identification Symbol I/O Function Symbol I/O Function Out Address bus TxD Out Serial transmit data AEX Out Address expansion mode flag UBE Out Data bus higher byte enable Out Bus cycle start X1,X2 In Crystal/external clock BS8/BS16 In Data bus width specification Voo In + 5-volt power source Out Buffer enable GND Ground BUSLOCK Out Bus lock flag IC Internal connection B USSTO-B USST2 Out Bus status NC No connection CLKOUT Out System clock In Coprocessor busy Table 1. Output Pin States Out Clear to send DMA Symbol Hold Halt Reset Cascade I/O Data bus Hi-Z L Hi-Z Hi-Z Out DMA acknowledge AEX Note 6 Note 6 H/L Note 6 DMARQO-DMARQ3 In DMA request BCYST Hi-Z Note 4 Hi-Z Hi-Z In Data set ready BUFEN Hi-Z H Hi-Z Hi-Z Out Data strobe BUSLOCK Note 5 Note 5 H H Out Data terminal ready BUSSTO-BUSST2 Hi-Z H Hi-Z H I/O DMA service forced-end input; DMA service complete output CLKOUT o o o O' Hi-Z Note 3 Hi-Z Hi-Z HLDAK Out Bus hold acknowledge HLDRQ In Bus hold request DMAAKO-DMAAK3 H o H o Hi-Z H Hi-Z Hi-Z INTAK Out Interrupt acknowledge INTPO-INTP7 In Maskable interrupt request o o H o lORD Out I/O read Hi-Z o Hi-Z o HLDAK H H/L L L 10WR Out I/O write H H H H M/IO Out Memory I/O select Hi-Z H Hi-Z Hi-Z MRD Out Memory read Hi-Z H Hi-Z Hi-Z MWR Out Memory write NMI In Nonmaskable interrupt request MiiO Hi-Z L Hi-Z H MRD Hi-Z H Hi-Z Hi-Z PCLKOUT Out External I/O clock Hi-Z H Hi-Z Hi-Z READY In Bus cycle end REFRQ Out Refresh request PCLKOUT o o o o RESET In Reset. REFRQ H o H H RESOUT L L H L RESOUT Out System reset RTS Out Request to send RTS o o H o R/W Out Read/write R/W L Hi-Z H RxD In Serial receive data RxRDY o o H o RxRDY Out Serial receive ready SINT o o L o SINT Out Serial interrupt request TCLK In Timer clock TCTLO-TCTL2 In Timer control TOUTO-TOUT2 Out Timer output 4 NEe pPD70236 (V53) Table 1. Output Pin States (conI) BCYST (Bus Cycle Start Strobe) DMA This signal indicates the start of a bus cycle by going low Symbol Hold Halt Reset Cascade for one clock immediately after the bus cycle is started. TOUTO-TOUT2 0 0 0 0 When the bus is placed in the hold state, the BeYST pin TxD 0 0 H 0 enters the high-impedance state. iJBi: HI-Z H HI-Z HI-Z BS8/BS16 (8-Blt Bus Slze/16-Blt Bus Size) Notes: BS8/B516 is driven low by external logic when the (1). The pin states are Interpreted as follows: H Is high level; L Is low level; H/L Is high or low level; Hi-Z is high impedance; 0 is p.PD70236 addresses a device with an 8-bit data path. If indeterminate. the p.PD70236 operand is 16 bits wide and B58/BS16 is (2) Halt includes both the HALT and STOP modes. low, then the p.PD70236 will perform two 8-bit bus cycles. The current bus cycle will handle the low byte on (3) Undefined for the first two clocks of the halt acknowledge cycle and the Hi-Z. Do-D7, and the next bus cycle will handle the upper byte als6 on Do-D7' This input is ignored during HLDAK, (4) L for the first clock of the halt acknowledge cycle and then H. interrupt acknowledge, and coprocessor cycles. (5) L under either of the following conditions: an instruction is executed during hold with a BUSLOCK prefix, or the HALT instruction is executed with a BUSLOCK prefix. Otherwise, the BS8/B516. is samP.led on the rising (middle) edge of T2 or the last TW state~ coincident with READY. This input is ED value is H. not internally. synchronized. To ensure proper device (6) H in address expansion mode; L in nonexpansion mode. operation, minimum setup and hold times must be met. PIN FUNCTIONS BUFEN (Buffer Enable) Ao-A,,3 (Address Bus) This signal is output to enable an external buffer, and becomes active during the read cycle, interrupt acknowl- These pins constitute an address bus that outputs real edge cycle, and write cycle. It does not become active addresses when memory or an I/O device is accessed. while the internal I/O is being accessed. Up to 64K bytes of I/O space and up to 16M bytes of memory space (including reserved areas) 'can be ac- BUSLOCK (Bus Lock) cessedthrough the address bus. BU5LOCK should be used by external logic to exclude The address bus enters the high-impedance state if one any other bus master (e.g., a DMA controller) from using of the following occurs. a shared resource.that the p.PD70236 currently is using. When BU5LOCK is asserted high, HLDRQ will be ig- • RESET signal is applied nored. • Microprocessor is in HOLD mode BU5LOCK is asserted when the BU5LOCK prefix is • DMA requests are cascade connected executed or when the p.PD70236is performing· a bus The status of the address bus is undefined during an operation that must not be interfered with, such as an interrupt acknowledge cycle. When interrupt requests interrupt acknowledge cycle. BUS LOCK has the same are cascade connected, the slavelCU address is output timing as the address bus Ao-A23 and is driven high on pins Ao-A2' during HLDAK and RESET. When I/O is accessed, pins A16-A23 go low. The address BUSSTO-BUSST2 (Bus Status) can be expanded even when the interrupt vector table is accessed. These three pins encode and output information identi- fying the type of bus cycle currently being executed. AEX (Address Extension) They enter the high-impedance state in the bus hold mode. These pins are used with the M/IO and R/W AEX is asserted when the expanded addressing mode is signals, as shown in table 2. enabled. When AEX is high, the memory address space is 16M bytes (24-bit address), and when [ow, 1M byte (20-bit address). 5 "PD70236 (V53) NEe Tsble2. BusCycle8 The bus sizing function cannot be effected. Both the ~ R~ BUSST2 BUSST1 BUSSTO BUI Cycle programmable wait function and READY signal are in- valid. However, two wait state clocks are automatically 0 0 0 0 Interrupt acknowledge cycle (from SLAVE) inserted into all internal 1/0 area cycles except those for the address expansion table and address expansion flag. 0 0 0 Interrupt acknowledge cycle (from ICU) External 1/0 Write Cycle. This cycle is output when an 0 0 0 External I/O read cycle external 1/0 area, is written by executing the OUT in- 0 0 Internal I/O read cycle struction. The bus sizing function can be effected. Also, the programmable wait function and READY signal are 0 0 0 0 External I/O write cycle both valid. 0 0 0 Internal I/O write cycle Internal 1/0 Write Cycle. This is output when the inter- 0 1 0 o . <, Coprocessor read cycle nalllO area is. written by executing the OUT instruction. 0 0 0 0 Coprocessor write cycle The bus sizing function cannot be effected. Both the 0 0 0 Halt acknowledge cycle programmable wait function and READY signal are in- InstruCtion fetch Cycle valid. However, two wait state clocks are automatically 0 0 0 inserted into all internal ,I/O area cycles except those for 1 0 0 Refresh cycle the address expansion table and address expansion flag. 0 0 CPU memory read ~cle Coprocessor Read Cycle. This cycle indicates that an 1 0 DMA read transfer cycle external coprocessor Is accessed for data read when a 0 0 0 CPU memory write cycle coprocessor instruction is executed. The bus timing and 0 1 0 DMA write transfer cycle ac characteristics of this cycle are the same as those of Coprocessor memory the ordinary I/O read cycle. 0 0 read cycle Although the bus sizing function cannot be effected, 0 0 0 Coprocessor memory coprocessor operations are not guaranteed if the bus write cycle sizing function is used. The programmable wait function DMAcascade is invalid, but the READY Signal is valid. Coprocessor Write Cycle. This cycle indicates that an Interrupt, Acknowledg. Cycle (from SLAVE). This cy- external coprocessor instruction is executed. The bus cle is the second interrupt acknowledge cycle during timing and ac characteristics of this cycle are the same which an interrupt request from a slave interrupt control as those of the ordinary 1/0 write cycle. unit '(ICU) is acknowledged. During this cycle, the data output by an external interrupt controller is processed Although the bus sizing function can be effected; copro- as a vector. The bus sizing function cannot be effected in cessor operations are not guaranteed if the bus sizing this cycle. The programmable wait function and READY function is used. The programmable wait function is signals are both valid,' however. invalid, but the READY signal is valid. Interrupt Acknowledge Cycle (f~om ICU). This cycle is flalt Acknowledge Cycle. This cycle is output when the output during the first interrupt acknowledge cycle, dur- HALT instruction is executed. During this bus cycle, the ing which an interrupt request for a non-slave ICU is OSTB pin does not output a low level. The bus sizing acknowledged. During this acknowledge cycle, the data function cannot be effected. Both the programmable output by the internallCU is processed as a vector, and wait function and READY signal are invalid. the bus sizing function cannot be effected. The program- Instruction Fetch Cycle. This cycle indicates that an mable wait function and READY signal are both valid, instruction is being fetched. The bus sizing function can however. be effected. Also, the programmable wait function and External 1/0 Read Cycle. This cycle is output when an READY signal are both valid .. external 1/0 area is read by executing the IN instruction. Refresh Cycle. This cycle indicates that DRAM refresh- During this cycle, the bus sizing function can be ef- ingis in progress. The bus sizing function cannot be fected. Also, the programmable wait function and effected. (Note that BS8/BSt6must be 16 bits.) The READY signal are both valid. programmable wait function and READY signal are both Internal 1/0 Read Cycle. This cycle is output when the valid. internal 1/0 area is read by executing the IN instruction. CPU Memory Read Cycle. This cycle is output when the CPU reads data from memory. The bus sizing function 6 NEe pPD70236 (V53) can be effected. Also, the programmable wait function CPBUSY is sampled on the falling edge of each clock. and READY signal are both valid. This input is not internally synchronized. To ensure proper device operation, minimum setup and hold times DMA Read Transfer Cycle. This cycle is output when must be met. DMA transfer (that is, data transfer from memory to 1/0) takes place. The bus sizing function cannot be effected~ If a 'coprocessor is not connected to the p.PD70236, The programmable wait function and READY signal are CPBUSY should be grounded. both valid. CPU Memory Write Cycle. This cycle is output when the CTS (Clear to Send) CPU writes data to memory. The bus sizing function .can This is a serial transmission control input pin. T~e SCU is be effected. Also, the programmable wait function and ready for data transmission when bit 0 of the SCM READY signal are both valid. register is set to 1 and this pin is at low level. When this DMA Write Transfer Cycle. This cycle is output when pin is made high while data transmission is in progress, write DMA transfer (that is, data transfer from 110 to transmission is stopped atter the current data has been memory) takes place. The bus sizing function cannot be completely transmitted, and 'the TxD pin goes high. effected. The programmable wait function and READY signal are both valid. Coprocessor Memory Read Cycle. This cycle is output 00-0 15 (Data Bus) These pins constitute a data b~s that inputs or outputs III when data read from memory is sent to the coprocessor. write data and read data when the external main mem- Although the bus sizing function cannot be effected, ory or 1/0 device is accessed. The data bus is in the input coprocessor operations are not guaranteed if bus sizing mode during any bus cycle ,other than a write cycle. is used. The programmable wait function and READY During the write bus cycle, the bus outputs data starting signal are both valid. from the rising edge of the T1 clock until the cycle following the write bus end cycle. Coprocessor Memory Write Cycle. This cycle is output when data for a coprocessor is written to memory. The OMAAKO -OMAAK3 (OMA Acknowledge) CPU does not drive the data bus. Instead, the cop'roces- sor drives the data bus to write data to memory. These pins output active-low DMA acknowledge signals fr'Om channels 0 to 3 of the internal DMAU. Although the bus sizing function cannot be effected, coprocessor operations are not guaranteed if the bus OMARQO ..OMARQ3 (OMA Request) sizing function is used. The programmable wait function These pins input active-high DMA request signals from and READY signal are both yalid. channels 0 to 3 of the internal DMA control unit (DMAU). DMA Cascade. This cycle indicates that the DMA is cascade connected to an external slave DMA controller. OSR (Oata Set Ready) During this cycle, the buses are relinquished. This is a general-purpose input pin. The status of this pin can be determined by reading bit 7 of the serial status CLKOUT (Clock Output) (SSn register. This pin outputs a square-wave clock pulse. The fre- quencyof the output clock pulse is obtained by dividing OSTB (Oata Strobe) the frequency of the 'clock signal input to the X1 and X2 This is a strobe signal for read and write operations. The pins by a specific value. The duty factor of the output signal does not go low during the halt acknowledge cycle clock pulse is 50%. The outputfrequency is the same':as that indicates that the' HALT instruction has been exe- the operating frequency of the CPU (programmable to cuted. When the buses are placed in the hold state, the one-half, one-fourth, one-eighth, or one-sixteenth of the DSTB pin enters the high-impedance state. The signal oscillation frequency). output timing of this pin differs depending on whether a read or write operation is performed. The DSTB signal CPBUSY (Coprocessor Busy) does not go low when the internal 1/0 area is accessed. CPBUSY is asserted low by a coprocessor (such as OTR (Oata Terminal Ready) p.PD72291) when it is busy with an internal operation; The p.PD70236 uses this pin to check the. ~tatus of the This is a general-purpose output pin. The status of this coprocessor. pin can be set by bit 1 olthe SCM register. 7 pPD70236 (V53) NEe END/TC (End/Terminal Count) is not internally synchronized. To ensure proper device operation, minimum setup and hold times must be met. This pin inputs the END signal to or outputs the TC signal from the internal DMAU. INTAK (Interrupt Acknowledge) END Input. When a low-level pulse is input to this pin This is an active-low acknowledge signal for a maskable during DMA transfer, the DMA .service under execution interrupt. is terminated after the current bus cycle is over. TC Output. When the count register of the DMAU INTPO-INTP7 (Interrupt from Peripherals) channel currently performing DMA transfer becomes These are asynchronous interrupt request input pins 0, and when the DMA transfer has been performed the for the internal interrupt control unit (lCU). The input specified number of times, the TC pin outputs a low- signals can be triggered either at the rising edge or at level pulse. high level. The priority of these signals can be fixed or rotated. These interrupt request inputs are also used to H LOAK (Hold Acknowledge) release the HALT and STOP modes. This is an acknowledge signal that indicates that the V53 has accepted the HLDRQ signal, placed the ad- lORD (I/O Read) dress, data, and control buses in the high-impedance This active-low read signal goes low during the I/O read state, and relinquished the buses to an external device. cycle. This signal is also output when write DMA trans- The external devices that can acquire the buses are fer is performed. However, it is not output during the assigned the following priority. CPU's internal I/O read cycle. REFU (highest priority) 10WR (I/O Write) DMAU HLDRQ This is an active-low write signal that goes low during CPU the I/O write cycle. This signal is also output when read REFU DMA transfer is performed in two output timing modes: the expansion write mode and the ordinary write mode. If a bus hold request takes place while the buses are idle It is not output during the CPU's internal I/O write cycle. (TI state), during the CPU bus cycle, or during lowest- priority refresh cycle, the HLDRQ signal is accepted M/IO (Memory I/O) immediately after the bus cycle is over and the buses are relinquished .. ' This pin indicates whether a memory or other device (such as an I/O device or' coprocessor) is currently If a DMA request or top-priority refresh request is accessed. The device to be accessed is determined ~ generated while the buses are in the hold state, the this pin and the BUSSTO and BU.sST1 signals. The M/IO HLDAK signal is forcibly made inactive. In this case, the pin enters the high-impedance state in the bus hold external device must return control of the bus to the mode. Its status changes at the falling edge of the T1 V53 (making the HLDRQ signal inactive). Therefore, the clock. high-level width of the HLDAK signal when it is made inactive forcibly is 1 clock minimum. MRD (Memory Read) This is an active-low read signal that goes low during a H LDRQ (Hold Request) read cycle in which data is read from memory. This HLDRQ is asserted. high by external logic when an signal is output not only during the CPU's memory external bus master (e.g., a DMA controller) wants to read, but alsoquring the refresh cycle and when read take over the pPD70236 bus. When HLDRQ is detected DMAtransfer is 'performed. high, the pPD70236 wi II release the bus after the current MWR (Memory Write) bus operation is completed. Note that this is. not necessarily the. current bus cycle. The pPD70236 re~ This active-low write signal goes low when the memory leases its bus by floating the address, data, and control write cycle is in progress. This signal is output not only buses. during the CPU's memory write cycle, but also during the write DMA transfer and when write DMA transfer is HLDRQ is sampled on the rising edge of each clock. It performed in two output timing modes: the expansion will be ignored while BUSLOCK is asserted. This input write mode and the ordinary write mode. 8 NEe pPD70236 (V53) NMI (Nonmaskable Interrupt Request) RESOUT (Reset Output) NMI is asserted by external logic to notify the CPU that This pin outputs an active-high signal which is an an external event requires the CPU's immediate atten- asynchronous RESET signal synchronized with the tion. When NMI is sampled low, interrupt processing internal clock. This signal can be used to reset the will begin immediately after the current instruction is system. completed. A trap will be taken through vector 2. The state of the IE bit in the PSW has no effect on NMI RTS (Request to Send) acceptance. This is a general-purpose output pin. The status of this NMI is sampled on the falling edge of each CPU clock. pin can be set by bit 5 of the serial command (SCM) This input is not internally synchronized. To ensure register. proper device operation, minimum setup and hold times must be met. R/W (Read/Write) Interrupt processing begins immediately after the end This pi n indicates whether the current bus cycle is a of the current instruction. Once NMI processing com- read cycle or a write cycle. This pin is valid only while a mences, no further NMI requests will be accepted until termination of the current NMI routine, which is indi- cated by the RETI instruction. bus cycle is being executed, and goes high if the current bus cycle is a read cycle or during an interrupt acknowledge cycle; it J!oes low if the current bus cycle III is a write cycle. The RIW pin enters the high-impedance PClKOUT (Peripheral Clock Output) state in the bus hold mode. The level of this pin changes at the falling edge of the T1 clock. This pi n outputs a square-wave clock pulse with a frequency one-fourth the frequency of the clock signal RxD (Receive Data) input to the X1 and X2 pins. The duty factor of the When the serial control unit does not receive data, this output clock pulse is 50%. pin is at high level (mark state). When the pin detects a start bit, the SCU starts receiving serial data from an READY (System Ready) external device. The READY signal is asserted low when the external system is ready for the current bus cycle to terminate. RxRDY (Receive Ready) While READY is not asserted, the Jl PD 70236 wi II add TW When the serial control unit has received one character (wait) states to the current bus cycle. The bus state in of data, and when that data is transferred to the receive which READY is sampled low will be the last state of the data buffer (that is, when the receive data is ready to be cycle. read), this pin goes high. During CPU read cycles, READY gives slow devices SINT (Serial Interrupt) time to drive the Do-D7 inputs, and during write cycles gives slow devices enough time to finish the write This signal becomes active to output an interrupt operation. request signal from the SCU when the transmit data buffer of the SCU is empty and when the interrupt of, the The READY input is sampled on the rising (middle) transmitting side is not masked, or when it contains the edge of T2 and all TW states. It is ignored during the SCU's receive buffer data to be read and the receive HLDAK state. This input is not internally synchronized. interrupt is not masked. To ensure proper device operation, minimum setup and hold times must be met. TClK (Timer Clock) RE F RQ (Refresh Request) This pi n inputs a clock pulse from an external source to the internal timer/counter unit (TCU). When the system This signal is asserted during refresh cycles. is initialized, either the external clock or the internal clock is selected to be supplied to the TCU. RESET (Reset) This signal initializes the processor. The processor is TCTlO -TCTl2 (Timer Control) reset when this signal is held low for six clocks or longer These pins input control signals to the three TCU and then returned to the high level. counters. The functions of the control signals input 9 IIPD70236 (V53) NEe through these pins differ depending on the mode· (six The #,PD70236 CPU has functions equivalent to those of modes are available) set by the TCU. the ILPD70136 (V33) and is therefore completely software compatible with the V33. The ",PD70236 instruction set TOUTO·TOUT2 (TImer Output) is upward compatible with the native modes of the V20, V30, V40, and V50. These are output pins for the internal timer/counter unit. The TCU outputs signals through these pins in six Clock Generator (CG) different modes. The clock generator divides the oscillation frequency of TxD (Transmit Data) the crystal or external oscillator connected across pins X1 and X2 by 2, 4, 8, or 16 to generate a clock that is When the serial control unit (SCU) has no data to be supplied' to the CPU as an operation clock and to an transmitted to an external device, this pin is at high level external device through the CLKOUT pin. A clock having (mark state). When transmit data is set in theSCU, the a frequency one-fourth the oscillation frequency is also TxD pin automatically outputs a start bit, serial data that output to the PCLKOUT pin. has been set in the SCU, a parity bit, and 1 or 2 stop bits. Bus Interface Unit (BIU) UBE (Upper Byte Enable) The bus interface unit controls the pins of the address When the microprocessor accesses external main mem- bus, data bus, and control bus, which are used by the ory or an I/O device that requires the upper 8 bits CPU, DMA unit (DMAU), and refresh control unit (RE FU). (08-D15) of the data bus, this pin goes low at the falling edge ofthe T1 clock, enabling the upper byte on the bus. Bus Arbitration Unit (BAU) The lower 8 bits (Do-D7) of the data bus are controlled by the Ao pin as shown in the following table. The bus arbitration unit arbitrates the internal bus mas- tership. The priority of the bus mastership is: UBE & Operation 0- 0 16 bits accessed CPU with BUSLOCK (highest priority) o 1 Upper 8 bits accessed RE FU of top priority 1 0 Lower 8 bits accessed DMAU 1 1 Second cycle (for use with bus sizing HLDRQ function) Ordinary CPU When dynamic bus sizing is used to make a 16-bit RE FU of lowest priority access into an a-bit, Ao must be used as an address bit; UBE can be ignored. Walt Control Unit (WCU) The function of the wait control unit is to insert wait X1, X2 (Crystal) states equivalenrtoO to 7 clocks automatically into the To use the internal clock generator, connect a crystal memory, I/O, DMA, and refresh cycles. The 16M-byte with a frequency twice the operating frequency across memory space can be divided into three blocks. In these pins. When using an external clock generator, addition, any 1M-byte memory space can also be divided input square waves with a frequency twice the operating into three blocks. frequency to the X1 pin. To the X2 pin, make the input signal 180° out of phase (an Inverter output) with the Refresh Control Unit (REFU) signal input to the X1 pin. The RE FU supports the DRAM refresh operation by UNIT OPERATION generating 16-bit refresh addresses and a refresh signal (REFRQ) indicating that the refresh cycle is currently Central Processing Unit (CPU) taking place. The ILPD70236 CPU is a high-performance engine whose performance surpasses most other 16-bit CPUs. To Timer/Counter Unit (TCU) achieve this performance level, hardwired data path The timer/counter unit of the #,PD70236 performs the control was used (no microcode) so that instruction same. functions as the #,PD71054. It provides a set of execution times are greatly reduced. three independent 16-bit timer/counters. 10 NEe IIPD70236 (V53) Serial Control Unit (SCU) Unlike the p.PD71059, p.PD70208, and p.PD70216, the INTPO to INTP7 pins in the V53 do not have internal The p.PD70236 SCU has the same functions as the pullup resistors to reduce current dissipation. p.PD71051 except the synchronous mode for supporting RS-232C protocol. This SCU is equipped with a dedi- DMA Control Unit (DMAU) cated baud rate generator. The DMAU on the p.PD70236 functions the same as the The SCU provides serial communications functions· of DMAUs on the p.PD71071 and p.PD71037 and, therefore, it the start-stop synchronization type. Commands for the can operate in two modes (p.PD71071 mode and SCU in the V53 are similar to those of the p.PD71051 p.PD71037 mode). You can set the operation modes using except that the V53 uses two registers-SCM (serial a register in the system 1/0 area. command) register and SMD (serial mode) register-to implement the functions of the control word register of In p.PD71071 mode, source and destination addresses the p.PD71051. are 24 bits. In p.PD71037 mode, source and destination addresses are 16 bits. To extend these addresses to 20 or Interrupt Control Unit (ICU) 24 bits, four 8-bit bank registers are provided. These registers supply the upper address bits. The ICU in the V53 has the same functions as those on the p.PD71059 except the V53 does not have the CALL The DMA unit provides. four channels of p.PD71071- .:91 mode (8085 mode) or the slave mode of cascade con- compatible or p.PD71037-compatible DMA. External .:II nection. The p.PD70236 ICU has eight external interrupt hardware requests DMA cycles via the DMA request input pins and can arbitrate up to eight interrupt re- inputs. DMA is always between an I/O device and mem- quests. The number of external interrupt inputs can be ory (fly-by style DMA). External DMA controllers may be increased by cascade connecting the ICU to an external cascaded using the V53 DMAU. interrupt controller. 11 pPD70236 (V53) NEe "PD70236 Block Diagram ~I~I~I ClKO~ ~ PCLKOUT~ TCLK DMAROO DMAAKO TxO DMAR01 RxO DMAAK1 CPU RxROY DMAR02 DMAU SINT SCU CTS DMAAK2 DMARQ3 RTS DMAAK3 OTR ENDfTC OSR WCU REFRO -1 REFU BAU » ~I~ ~1~'~I~I~I~I~I~I~I~lil~li' m x A a> BAU Bus Arbitration Unit ICU Interrupt Control Unit BIU Bus Interface Unit REFU Refresh Control Unit CG Clock Generator SCU Serial Control Unit CPU Central Processing Unit TCU Timer/Counter Unit DMAU DMA Control Unit WCU Wait Control Unit 83YL-5728B 12 NEe pPD70236 (V53) ELECTRICAL SPECIFICATIONS Absolute Maximum Ratings TA = +25°C Power supply voltage, Voo -0.5 to + 7.0 V Input voltage, VI -0.5 to Voo + 0.3 V Clock input voltage, VK -0.5 to Voo + 1.0 V Output voltage, Vo -0.5 to Voo + 0.3 V Output short circuit current, 10 50 mA t Operating temperature, TOPT Storage temperature, TSTG -65 to + 150°C t Devices with a rating of -40 to + 85°C are available. Contact NEC for dc and ac characteristics. Exposure to Absolute Maximum Ratings for extended periods may affect device reliability; exceeding the ratings could cause perma- nent damage. DC Characteristics III TA = -10 to + 70°C; Voo = +5 V ±10% Parameter Symbol Min Max Unit Conditions Input voltage, high VIH 2.2 VOO + 0.3 V Except RESET 0.8 VOO V RESET Input voltage, low Vil -0.5 0.8 V Except RESET 0.2 Voo V RESET Clock input voltage, high VKH 0.8 Voo VOO + 0.5 V Clock input voltage, low VKl -0.5 0.6 V Output voltage,high VOH 0.7 Voo V 10H = -400 pA Output voltage, low VOL 0.45 V 10l = 2.5 mA Input leakage current, high ILiH 10 Input leakage current, low ILil -10 pA VI = 0 V Output leakage current, high ILOH 10 pA Vo = VOO Output leakage current, low IlOl -10 pA Vo = 0 V Supply current 100 13 f + 40 mA Operating; f = 2 to 16 MHz 40 mA HALT mode TBD pA STOP mode Voltage Thresholds for Timing Measurements AC (except ClK) Signal Inputs 2.4 V = X 2 . 2 V 2 . 2V;C (except ClK) 0.4 V ..;;0,;.;;.8...,;v_ _ _ _.....,;0;.;,;.8;,..v;;... AC test input measuring point ---Y·2.2V 2.2VV-- ClK Input ~..;;0.;.;;.8...;V~_ _ _.....,;0~.8~V;;.."_____ 83VL·6484A 13 JlPD70236(V~53) NEe AC Characteristics TA = -10 to + 70°C; VOO = 5 V ±10%; CL of output terminals = 100 pF max Parameter Symbol Min Max Unit Param' 'I Min Max Unit Clocks (figure 1) " 50 ns CLKOUT period tCYK 62.5 50 r 40 ns CLKOUT high-level t",(H 0.5 tr width CLKOUT low-level P070236 t\lS3) 10 ns width dUm" to the ~ , d \n thiS ') ns CLKOUT rise time d bV Adden \S \nc\Ude 40 ns Supersede addendum CLKOUTfall time Sheet. "the . section 7. oata \( 10\\0'11\09 0 40 ns X1 input perio' data bOO X1 input high-level 'OKMR 0 40 ns width X1 input low-level ... KOUTto MWR tOKMW 0 40 ns width delay X1 input rise time t) 5 ns CLKOUT t to DSTB t tOKOSH 5 40 ns X1 input fall time tXKF 5 ns Address/status output tOAOSL tKKL + tKR - 15 ns X1 to CLKOUT delay tOXK 20 ns delay to DSTB ~ PCLKOUT period tCYPK 125 1000 ns Address/status hold tHOSHA tKKL + tKR - 15 ns time from DSTB t PCLKOUT high-level tpKH 4 tCYK-7 ns width Data output delay tooSHO tKKL + tKR - 15 ns from DSTB t PCLKOUT low-level tpKL 4 tCYK-7 ns width Data output delay tOAD tKKL + tKR - 15 ns from address/status PCLKOUT rise time tpKR 7 ns output PCLKOUT fall time tpKF 7 ns Data output delay 5 tOKo 40 ns Reset (figure 2) from CLKOUT t RESET setup time vs 30 ns Data setup time to tSOK 7 ns tSRSTK CLKOUT ~ CLKOUT ~ RESET hold time vs 15 ns Data hold time from tHKO 10 ns tHKRST CLKOUT ~ CLKOUT ~ RESET low-level width 6 Data hold time from tHOSO 0 ns twRSTL tcyC DSTB t RESOUT delay from tOKRO 0 40 ns CLKOUT ~ Data hold time from tHASO 0 ns change point of Write, Read (figures 3-12, 16-19, 23-24, 28, 31) Note 2 address or status BCYST delay from tOKBC 5 40 ns Dat hold time from ' tHRWO 0 ns CLKOUT ~ R/W t BCYST low-level width tBCBCL tCYK-10 ns READY setup time to tSRYK 7 ns CLKOUT t BCYST high-level tBCBCH tCYK (n+ 1) - 10 ns width READY hold time from tHKRY 15 ns CLKOUT t Address delay from toKA 5 40 ns CLKOUT ~ Notes: Control 2 delay from to KCT2 0 40 ns (1) tCYC = CPU clock period CLKOUT n = number of wait states Status delay from toKST 5 40 ns (2) The clock-to-signal delays in the -10 (10 MHz) and -12 (12.5 MHz) CLKOUT ~ parts are 45 ns compared to 40,ns in the -16 (16 MHz) part. For full electrical characteristics of the -10 and -12 parts, contact NEC. 14 1ttIEC pPD70236 (V53) AC Characteristics (cont) Parameter Symbol Min Max Unit Parameter ~" ... I- Min Max Unit - -- .C::P.,.;-' Bus Sizing (figures 13, 14) 888/8816 setup time tSBSK ns to CLKOUT f 888/8816 hold time tWVD" 70236 {\}53) ns from CLKOUT f '\ to the ~p~ \0 thiS Bus Hold (figure ~ddeodum .s \Oc\ude 500 ns ded bV odUm \ HLDRQ setup tilT' SUperse \ 1he add~ ct\OO 7. ~) oa\a She~ 10\\0'1l\Og e CLKOUT t v 40 ns HLDRQ hold til). data bOo form CLKOUT t 0 40 ns CLKOUT t to H LDA~ delay CLI\~_ .) tOKHOA 0 40 ns .Output floating to tOFh •. .,. ." ns DMMKO-uMMK3 HLDAK delay Input Setup and Hold (figure 15, NMI,INTPO-INTP7, tSIK 10 ns delay IORD~, IOWR ~ delay from DMMKO- DMAAK3 ~ tOOARW tKKH - 30 ns ED CP8U8Y setup time to CLKOUT ~ DMMKO-DMMK3 t tORHOAH tKKH -30 ns delay from lORD t NMI, INTPO-INTP7, tHKT 10 ns CP8U8Y hold time CLKOUT to control 1 tOKCT1 0 40 ns from CLKOUT ~ delay Timer/Counter Unit TCU (figures 20-21) lORD t delay to IOWR tOWHRH 5 40 t TCTLO-TCTL2 setup tsGK 50 ns time to CLKOUT ~ TC output delay from ·tOKTCL 0 40 ns CLKOUT t TCTLO-TCTL2 hold tHKG 100 time from CLKOUT ~ TC off output delay tOKTCF 0 40 ns from CLKOUT t TCTLO-TCTL2 low-level tGGL 50 ns width TC pullup delay from tOKTCH 0 40 ns CLKOUT t TCTLO-TCTL2 high- tGGH 50 ns level width TC low-level width trCTCL tCYC -15 ns TOUTO-TOUT2 output 100 ns END setup time to tSEOK 35 ns tOKTO delay from CLKOUT ~ CLKOUT t TCLK period 100 ns END low-level width tEOEOL 100 ns tCYTK TCLK rise time 15 ns lORD, MRD low-level tRR 2tCYC - 40 trKR width TCLK fall time tTKF 15 ns IOWR, MWR low-level tWWI 2tCYC - 40 TCLK low-level width trKTKL 45 ns width (Expanded TCLK high-level width 30 ns write) trKTKH TCTLO-TCTL2 setup 50 ns IOWR, MWR low-level tv-IW2 tCYC -40 tsGTK time to TCLK t width (Normal write) TCTLO-TCTL2 hold 100 ns DMARQO-DMARQ3 tSOQK 15 ns tHTKG time from TCLK t setup time to CLKOUT t TOUTO-TOUT2 output tOTKTO 100 ns delay from TCLK ~ CLKOUT ~ to tOKLOA 0 45 ns DMAAKO-DMMK3 TOUTO-TOUT2 output tOGTO 100 ns delay delay from TCTL ~ Interrupt Control Unit, ICU (figure 27) INTPO-INTP7 low-level tlPIPL 100 ns width 15 pPD70236 (V53) NEe Figure 1. Clock Timing (X1) CLKOUT PCLKOUT ~-----tpKH ----~ ~-----tpKL----~ ~-----------tCYPK-----------~ 83YL·6482B Figure 2. Reset Timing CLKOUT ~-I------ tWRSTL------+-I RESET 'DKRO \ ' -_ _ _ __ RESOUT 83YL·6483B 16 ttiEC pPD70236 (V53) Figure 3. B••,c Write (0 Waif T1 T2 (TI, T1) CLKOUT J J J tOKBC- r- tOKBC _I .- tBCBCH- \ I \ I -r--tBCBCL -I I ) tOKA- r- - \ r- tOKMW ~tOKMW III * ) t OKST -.../ 'r- tHOSHA - tOAOSL . - tOKos r-- tOKOSH OSTB J \ I ~. BUFEN - \ ~tosoSL- r- tOKCT2 - r- ! tOKCT2 tOOSHO - \ tOAD r- t OKO - I-- tFK I * AMi, M/iQ, BUSSTO, BUSST1, BUSST2, UBE, AEX 83YL-83428 17 "PD70236 (V53) NEe Flllur.... B••/e Wrll. (1 "'0 T1 T2 TW (TI, T1) CLKOUT I I tOKBC_ - tOKBC -- tBCBCH J I \ 1 \ -.- f-tBCBCL-1 *- tOKMW - r- tOKMW MWR \ ) K tOKA1 ~ II II I * ) K tOKST-I r- - ~ tHOSHA - \ tOAOSL r+- tOKOS I - - tOKOSH J i J ~ tOKcT2 \ tOSOSL -F OKCT2 - - - tDDSHD - ~ tOAD -tDKO - ~ >- p --.ltS.T..~. tSRv~~1 j EtHK~ C * RIW, MliD, BUSSTO, BUSST1, BUSST2, UBE, AEX 83YL-6343B 18 NEe pPD70236 (V53) Figure 5. S••'c Rad (0 Hlri~ T1 T2 (TI, T1) CLKOUT J ~ , } t DKBC ~ tDKBC_ I- tBCBCH H \ 1 \ MRD - I---I-tBCBCL-I \ - tDKMR H tDKMR ) ~ III l- tDKA1 I II I * tDKST-1 ) - -.. I+- tDKDS "K r-- tDKDSH DSTB \ J 1\ -- - tDADSL tDsDSH I+- tDKCT2 ~tHDSD -.. \ I - tDKcT2 - ~tHASD I - t HRWD BUFEN / tSDK HI-Z Hi-Z tSRYK :.----.. I tHKD \ * RMi, M/iQ, BUSSTO, BUSST1, BUSST2, UBE, AEX - t HKRy 83YL-6344B 19 I'PD70236 (V53) NEe Figure a. S••/e Read (1 l1li/(,1 T1 T2 TW (TI, T1) CLKOUT j ~ I tDKBC_ - t DKBC ~ tBCBCH J l \ I \ k-- I-tBcBCL-1 - \ ~ tDKMR H ) tDKA~ l- II II II I * ) tDKST-l ~ - \~ ~ tDKDS - tDKDSH / L ------ tDADSL j. tHDSD ~tDSD SH -- ~ tDKCT2 j. ~ tHASD ~t DKCT2 t HRWD - ~ ~ \ k: tSDK Hi-Z Hi-Z r- ~ tHKD tSRYKI- tSRYK f - - ~ \ * - - - RIW, MIlO, BUSSTO, BUSST1, BUSST2, UBE, AEX tHKRY - I- - tHKRY 83YL·6345B 20 NEe pPD70236 (V53) Figure 7. External I/O Read (0 l1li/(1 Tl T2 (TI, Tl) I) j j " CLKOUT tDKBC_ \ I- t DKBC r- \ ~ f-tBCBCL-1 - \ - tDKIR H tDKIR ) X III tDKA~ l- I II II I * ) X -- , I tDKST-1 I- tDKDS tDKDSH - f- ) ~I\ - tDSDSH :.- -\ I-- tDKCT2 t HDSD f..---.j tDKCT2 BUFEN ! tSDK Hi-Z Hi-Z tSRYK I - - II tHKD READY \ * RIW, M/iO, BUSSTO, BUSST1, BUSST2, UBE, AEX - tHKRY 83YL-6346B 21 "PD70236 (V53) NEe Figure & External I/O Read (1 . , ' T1 T2 TW (TI, T1) CLKOUT / / tDKBC""'" I- tDKBC t_ \ \ ~ r-tBCBCL-1 tDKIR .,...,. I - tDKIR H \ ) X tDKA-I l- II II II I * ) X ..- - tDKST-i .,...,. +- t DKDS tDKDSH \ /L - .. - tHDSD I- t DsD SH .,...,. ~ ~ tDKCT2 CT2 \ ~ tSDK Hi-Z Hi-Z I - I tHKD tSRYK t SRYK \ - ~ \ * R1W, M/iO, BUSSTO, BUSST1, BUSST2, UBE, AEX tHKRY - I- - t HKRy 83YL-6347B 22 NEe IIPD70236 (V53) Figure 9. Externall/O Write (0 WaIO T1 T2 (TI, T1) ,j CLKOUT j j tOKBC_ \ I- t oKBC r- \ I+-- I-tBCBCL- IOWR -\ I - tOKIW -j tOKIW ) X l- tOKA1 I II I * ) X -...J f- - \ tOKST I-- tOKOS H tOKOSH OSTB =l - \ k------tososL - k- tOKCT2 - !r- tO KcT2 - ~ k- t oKo - I+- tFK ~ ~ ( 'HKRV * R/W, M/iO, BUSSTO, BUSST1, BUSST2, UBE, AEX 83YL-6348B 23 pPD70236 (V53) NEe Figure 10. External 110 Write (1 l1li/(1 T1 T2 TW (TI, T1) \ J Ij J CLKOUT " BCYST tOKBC- \ I- tOKBC r .\ ~ f-tBCBCL-1 - \ I - tOKIW Ht OK,W ) X tOKA -I ~ I II II I * ) X -.J -\ ~ -1 tOKST f+- tOKOS tOKOSH DSTB ~ - - F' I- tOKCT2 OKCT2 BUFEN \k - \; ~ tOKO - l- ~ I tSRYKI-I tSRYKH REAOY ~ \ * RJW,- MIlO,- BUSSTO, BUSST1, BUSST2, -UBE, AEX tHKRy - ~ - tH KRY 83YL-8349B 24 NEe pPD70236 (V53) Figure 11. Internal ua Read T1 T2 TW TW T1rr1 * =x--!...-----~X ~1~tIDKD - Do-D15 --------~ r tDKCT2 * RJW, M/iQ, BUSSTO, BUSST1, BUSST2, UBE, AEX 83YL·6359B 25 ,.,PD70236 (V53) NEe Figure 12. Internal I/O Write T1 T2 TW TW T1fT! *==r~--------------~x~­ ---!..-1~t 'OKO °0·D 15 --------~ E r t DKCT2 BUFEN _-----J I * RiW, MliO, BUSSTO, BUSST1, BUSST2, UBE, AEX 83YL-6360B 26 ttiEC pPD70236 (V53) Figure 13. Bus Sizing (0 ./0 T1 T2 (T1.TI) CLKOUT BS8/BS16 * RIW. M/iO. BUSSTO. BUSST1. BUSST2. UBE. AEX 83YL-6361B 27 pPD70236 (V53) NEe Figure 14. Bus Sizing (1 ./0 T1 T2 TW (T1,TI) CLKOUT. BS8/BS16 * - - - RIW, MIlO, BUSSTO, BUSST1, BUSST2, UBE, AEX 83YL-6362B 28 NEe pPD70236 (V53) Figure 15. Input S.tup/Hold CLKOUT ~ SIK NMI, CPBUSY, INTPa - INTP7 ------- ~ -t-HK-T---------------- 83YL-6369B Figure 16. a. Lock CLKOUT BUSLOCK III 83YL-6370B 29 pPD70236 (V53) ~EC Figure 17. Bus Hold CLKOUT HLDRQ HLDAK * - Hi-Z CLKOUT HLDRQ HLDAK * ____________________~H~I-~Z~_________________~t~ * AO -A 23 • Do -D15. MliO. BUSSTO. BUSST1. BUSST2. UBE. BCYST. DSTB 83VL-6371B 30 NEe pPD70236 (V53) Figure 18. Interrupt Acknowledge (Single Mode) T1 T2 TW TW T1 T1 T2 TW TW AO-A23 II tOKCT2 -j tOKCT2 ~ tO KCT2 INTAK II III II * II C -iLt BUFEN DKcT, tSRYK ~ tSRYK I-- \[ \ t HKRy H t HKRy ~ Hi-Z _o_srn BUS LOCK 11 tD~ ~~______________________________ - \r-t_tOK_A_ _ _ _ __ J" * RIW. M/iO. BUSSTO. BUSST1. BUSST2. UBE. AEX 83YL·6372B 31 pPD70236 (V53) NEe Figure 19. Interrupt Acknowledge (Cascade Mode) T1 T2 TW TW T1 T1 T2 TW TW II I I I I II I ~ !: 1-I {'DKCT' ~~'DKCT' cT2 ! 1 II II 11 tDKCT2 tSDK * R/W, MliO, BUSSTO, BUSST1, BUSST2, UBE, AEX 83YL·6373B 32 NEe pPD70236 (V53) Figure 20. Timer/Counter Unit (TCU) CLKOUT TCTLO - TCTL2 _______________________________ tD_K_TO ~ __- . ___ TOUTO- TOUT2 ----------------------------~ TCLK III TCTLO - TCTL2 __________________________tD_G_T_O____ ~t: ~---------------~.- t DTKTO TOUTO- )( TOUT2 _______________________________________---J L -________ ~ 83YL-6374B 33 pPD70236 (V53) NEe Figure 21. Serial Control Unit (SCU) RxD TOUT 1 I- 1.....1 - - - - 1 6 or 64 TOUT 1 pulses - 1--- 16 or 64 TOUT1 pulses - Tx D --------'1--. tDTX 83YL-6375B Figure 22. Refresh Timing T4 T1 T2 T3 T4 CLKOUT Ao-A23 ____________ ID~ ~ ttt ocOCL ~)(~--~----------~----------------------~~------')(~_____________ tl I *--------------~)(~~------~~----------------~--J)(---------------------- ____________ tD_K_C_T_2_~ ___{ tDKCT2 -.J )+- REFRQ 1~ ~-------" -i~ ISRYK ylSRYK * R!W, M/iO, BUSSTO, BUSST1, BUSST2, UBE, AEX 83YL-6376B 34 NEe pPD70236 (V53) Figure 23. DMA Timing 1 T4 T1 T2 T3 T4 CLKOUT ED tOOARW MRO,IORO tOKCT1 _ tOOARW tOWHRH 83YL·6377B 35 pPD70236 (V53) NEe Figure 24. DIIA Timing 2 T1 T2 T3 T4 CLKOUT tDKTCF tDKTCH SEDK _____________{ t tEDED'}.~________________________________________________ END __ CLKOUT DMARQn (n =0 -3) * Pull-up resistance at TC pin = 2200 ohms 83YL·6378B Figure 25. DIIA Timing 3; Ca.~dellode (Norma' Operation) r T1 T4 CLKOUT /\. DMARQn (n =0 -3) _ ----J ________ ttSS_DD_QQ~K-Jr~~~------~\~--~ ~------------------~---------------- _________________ tD_K~L~~ DMAAKn (n = 0 - 3) )7------------------------------' 83YL·6379B 36 NEe pPD70236 (VS3) Figure 26. DIIA Timing 4; Refresh Cyclell To Be Inserted CLKOUT ~ DMARQn r---'5 (n=O-3) ---.l ______________ ~/~tDKLD:r- ~ ,~------tD-KL-DA----~~~ DMAAKn (n = 0 - 3) _ _ _ __ _ 83YL-6380B Figure 27. ICU Timing INTPn __ttIPlPLJ__ (n=O-7) __ III 83YL-6381A 37 IIPD70236 (V53) NEe Figure 28. "elllOry Write tor Coprocessor (0 w./~ T1 TC T2 (TI,T1) CLKOUT \ / / ~ / tOKBC_ r- t OKBC - tBCBCH I \ I \ ). - r-tBCBCL-1 ( I MWR t OKA - - H t oKMW j..--I tOKMW - tOK CT2 - 1- tOKCT2 * ) K -I - tOKsT -I - t OKOS ~ t OKOS tHosHA OSTB \ I -I - _tOSOSL- tSRYK \ * RIVii, MliO, BUSSTO, BUSST1, UBE, AEX - tHKRY 83YL-6382B 38 NEe pPD70236 (V53) Figure 29. Memory Write tor Coprocessor (1 ./0 T1 TC T2 TW (TI,T1) r- ClKOUT I I I 1,/ I t DKBC I- -- t DKBC f- tBCBCH .1 I BCYST n I \ 1 -I-tBCBCl-i I =~ K - tDKA f- H tDKMW III I - - tDKMW \ - tDKCT2 - - t DKCT2 *~ K -I - tDKST -I - t DKDS tHDSHA ~ tDKDS DSTB \ I I READY tSRYK~ tDSDSl \ tSRYK \ - I * R/W, wiD, BUSSTO, BUSST1, UBE, AEX - - tHKRY - tHKRY 83YL·6383B 39 pPD70236 (V53) NEe Figure 3D. lIemory Read for Coproctlllllor (0 ./0 T1 TC T2 (TI, T1) CLKOUT J ~ ~ / tOKBC- ..- t OKBC _I ..- .. tBCBCH J I \ I \ - -tBCBCL-1 I ) tOKA- ..- -I 11"- tOKMR ,r BUFEN -\ tOKMR t OKCT2 - ) - ..- t OKCT2 * -I -.! t OKST --I ..- t OKOS tOKOS tOSOSH- ..- r- OSTB J \ L tOAOSL tSRYK \ - * RIW, M/iO, BUSSTO, BUSST1, UBE, AEX - 1..- t HKRy 83YL-6384B 40 ttiEC pPD70236 (V53) Figure 31. Memory RfNld tor Coprocessor (1./0 T1 TC T2 TW (TI. T1) CLKOUT ~ \ I --- - - ~tOKBC ~ tOKBC tBCBCH I I BCYST n t \ 1 - '-tBCBCL-1 ~ - tOKA ~ tOKMR_ 1- -\ \ tOKMR tDK~2)- ED *~ - - tOKCT2 -ltOKST -~ _ t OKOS tOKDS -..J IOSOSH- - r- \ ~ I '- IOAOSL ISRYK!- ISRYK \ - REAOY 1\ * Rlw. M/iO. BUSSTO. BUSST1. UBE. AEX tHKRy - - IHKRY - 83VL·6385B 41 pPD70236·· (V53) FUNCTIONAL OPERATION • Wait Control -Unit • Refresh Control Unit The I'PD70236 is described under these major headings. • Timer/Counter Unit • Central Processing Unit • Serial Control Unit • Clock Generator • Interrupt Control Unit • Bus Operation • DMA Control Unit • System ControlI/O • Power Conservation Figure 32.' CPU BIDCk DllIIJI'sm )I II f' II Internal PS Address Bus Address DSO Expansion ) ToBIU DS1 c:::> Control SS PFP /'. ~"" ?" Address Translation Table p Internal Data Bus ) ToBIU LC PC ~ ODR P AW EAG BW (I ~ CW PO <= P OW U IX L--- IV '--- Pre-Decoder BP SP Registerl ALU U Control TC p TA P Main Decoder TB M U Co-Processor Control - I Execution Control I - INT (from ICU) Interrupt Control I - NMI PSW lc Sub Data Bus Main Data Bus (16) (16) 83YL-6216B 42 NEe pPD70236 (V53) CENTRAL PROCESSING UNIT (CPU) are general-purpose registers (AW, BW. Cw. DW, IX. IV, BP. and SP). These contain either operand data or point-to.- Architecture operand data in memory. A unique hardware architecture feature of the CPU is that The temporary registers speed up instruction execution it contains no microcode. Instruction decode and data by serving as scratch pad registers during complex path control are implemented using logic and small operations. independent state machines. This greatly enhances in- struction execution speed. The V53 is four times faster The loop counter (LC) is used during primitive block than the V30. transfer operations. It contains the count value. It is also a shift counter for multiple-bit shift and rotate instruc- The CPU comprises the execution unit and the address tions. generator. Figure 32 is the CPU block diagram. Temporary registers TA. TB. and TC are inputs to the CPU Execution Unit AW. They are used as temporary registers/shifters dur- ing multiply. divide. shift/rotate. and BCD rotate opera- The execution unit consists of a register file. an ALU. and instruction decode and execution control logic. In addition to the hardware control logic. the most significant feature of the execution unit is a dual-bus tions. AW. The ALU consists of a complete adder ar1d logical operation unit. It executes arithmetic (ADD. SUB. MUL. ED DIV. INC. DEC. NEG. etc.) and logical (TEST. AND. OR. internal data path (figure 33). The AW and many regis- XOR. NOT, SET1. CLR1. etc.) instructions. ters are dual ported with a data bus on each port. This allows two operands to be transferred in one clock cycle Data Path Control Logic. This logic comprises the instead of two. Performance is improved as much as main instruction decoder and the execution control 30% by the dual data bus concept. blocks. Its purpose is to determine which operations must be done and to schedule them. It transfers oper- Figure 33. DuII'O.'. Buses ands. as required. and controls the ALU. State machines implement long. complex instructions. . Subdata Main Data Bus Bus Instruction Prefetchlng. The V53 is a pipelined ma- chine. To keep the pipeline running efficiently. it should be kept full of instructions in various stages of execu- tion. Instructions are fetched before they are needed and placed in the instruction processing queue (lPQ). Data in the IPQ is broken out by the decoder logic to determine what addressing modes will be used and what CPU resources are required to execute the prefetched instruction. To keep the a-byte IPQ full, the bus control logic schedules an instruction prefetch cycle whenever there are at least 2 unused bytes in the IPQ. The IPO is cleared whenever a control transfer instruc- tion (any branch. call, return. or break is executed). This is done because a different instruction stream will be used following a control transfer, and the IPO will then contain instruction data that will never be used. When this happens. the V53's pipeline is emptied and perfor- mance is reduced. To maximize performance. the num- ber of control transfers should be minimized. 49NR-247A Effective Address Generator. The effective address generator (EAG) logic computes a 16-bit effective ad- dress for each operand. This address is an offset into one Register File. There are 12 registers in the internal RAM. of the four segments. Refer to figure 34. This effective Four are temporary registers used in the execution of address is passed on to the address modifier adder. The certain instructions (LC. TA. TB. and TC). The other eight EAG decodes the first byte(s) of each instruction to 43 JlPD70236 (V53) NEe determine the addressing mode and initiates any bus calculated as described below. The I/O space can only cycles required to fetch pointers/offsets from memory. be accessed through the IN, OUT, INM, and OUTM Effective addresses are calculated in a maximum of 1 instructions. clock period as compared with 5 to 12 clocks for a Certain areas of the V53 address spaces (physical for microprogrammed machine. normal mode and logical for expanded addressing mode) are reserved .. Memory addresses 0-3FCH are Figure U. Effective Address Generator used for the interrupt vector ta.ble (figure 35) located in the interrupt operation section. Memory addresses FFFFOH-FFFFFH must contain a branch to boot code; PC, PFP, and PS are initialized at RESET to point to this area. I/O addresses FFOOH-FFFFH are reserved for the ad- dress translation registers and system control registers. Effective Address 49NR-248A The DMAU, TCU, ICU, and SCU sections each contain a block of registers with programmable base addresses. They may be located inside any 256-byte block in the I/O . Address Generator space. See figure 36. The address generator comprises the address register file, the address modifier (ADM), the address translation Figure 35. lIIemory Address Space table, and the needed control logic. 16M B FFFFFFH r - - __ _ .:.,.yte_s---, The registers in the address register file are PS. SS, DSO, DS1, PC, and PFP. The ADM is a dedicated adder that 1M Bytes adds one of the segment registers to the effective ad- FFFFFH Reserved dress to produce the 20-bit normal address. The ADM FFFFCH FFFFBH also increments the prefetch pointer. If extended ad- Reset Vector FFFFOH 1 Page = 16K Bytes dressing is enabled, the address translation table is accessed to map the 20-bit address into a 24-bit ex- tended address. For instruction stream data, addresses are generated differently. The prefetch pointer contains a 16-bit offset 1 Page = 16K Bytes into the PS segment that points to the next instruction 1024 Pages word to be prefetched. The program counter contains an offset into the PS segment that points to the instruction 64 Pages that is currently being executed. As part of all control transfers, the PFP is set to the same value as the PC. 3FCH Interrupt ~ ~ CPU Addressing Mechanism Vector Table 01 1 The V53 is completely compatible with the p.PD70108/116 Normal Memory Address Space Expanded Address Mode Address Space in its addressing modes and in the way that addresses 49NR-334A are computed. It offers a method of expanding the memory address space to 16M bytes. I/O Addresses The I/O space is 64K bytes (16-bit address). The normal I/O devices can be referenced by 8-bit immediate ad- memory address space is 1M byte (20-bit address), and dresses or by 16-bit addresses via the OW register. If I/O the expanded address space is 16M bytes (24-bit ad- operations require other more complex addressing dress). See figure 35. Expanded addreSSing is enabled or modes, the I/O devices must be placed in the memory disabled using the BRKXA and RETXA instructions. address space (using memory-mapped I/O techniques). The memory space is accessed when an instruction uses For· memory-mapped I/O devices, there are no restric- a memory addressing mode. Memory addresses are tions on instruction or addressing mode usage. However, the V53 will not automatically insert 6 clock cycles after 44 NEe pPD70236 (V53) memory-mapped 1/0 operations; external logic must Figure 37. 2O-8il AddrellS provide the necessary I/O device recovery time. 15 15 Figure 36. va Address Space FFFFH System Control and Address Translation Registers FFOOH DMAU Normal Mode Physical Address or Expanded Mode Logical Address Within ICU 49NR-349A 256 Bytes in the TCU Internal 110 Area If normal addressing mode is enabled, this 20-bit result is mil SCU presented on the address bus during the bus cycle. If E.JI expanded addressing mode is enabled, this address is used as a logical address. Expanded Addresses OOOOH 83YL-6549A In the expanded addressing mode, the memory space is divided into 1024 pages (figure 35). Each page is 16K bytes. Each page of the normal 20;.bit address space is Normal Memory Addresses mapped to a page in the expanded address space using The V53 is a 16-bit device with 16-bit registers. To allow a a 64-entry address translation table. The table is made memory address space larger than 64K bytes, memory up of 64 page registers that reside in the 1/0 space. segmentation is used. The 1M-byte memory address The programming model of this mode is the same as for space is divided into 64K-byte'segments. Up to four the normal mode. Address expansion. is a layer added to segments can be in use at any given time. The base the normal mode that is transparent to executing code. addresses of the four active segments (program seg- The program still sees a 20-bit contiguous logical mem- ment, stack segment, data segment 0, and data segment ory address space, but the hardware sees 64 pages 1) are contained in four 16-bit segment registers (PS, SS, mapped into a set of 1024 physical pages. OSO, and OS1, respectively). The 16-bit value in each register is the upper 16 bits of the 20-bit memory ad- The 1/0 space is not affected by the expanded address- dress. Thus, segments must start on 16-byte boundaries. ing mode. As described above, the V53 hardware generates a 16-bit The address translation mechanism is shown in figure effective address for each memory operation. This effec- 38. The upper 6 bits of the logical 20-bit address select tive address is an offset into one of the four active one of the entries in the address translation table, which segments. The actual 20-bit memory address is com- supplies a 10-bit value. This value is substituted for the puted by adding the EA to the segment register value original 6 bits in the normal address to create a 24-bit expanded with zeros to 20· bits. Figure 37 shows this expanded address. process. 45 "PD70236 (V53) NEe Figure 38. Address Translation Mechanism Figure 39. Addr.s Expansion Registers Page Registers 20-Bit Logical Address Page Offset PGR Selected PGR I/O Addr••• 14 o PGR1 FFOO PGR2 FF02 2 PGR3 FF04 3 PGR4 FF06 Translation Table 63 PGR64 FF7E XAM Regllt.r 15 o 14 13 24-Bit Expanded Address Operand Addressing Modes 49NR-335A For operand addressing, the V53 offers nine modes. Address Expansion Registers • Register • Immediate These are the page and XAM registers, accessed by the • Direct word IN and OUT instructions. Figure 39 shows page • Register indirect register usage and 1/0 addresses. The page registers contain the 10-bit physical page base address. The XAM • Indexed register is a read-only status flag that indicates whether • Based expanded addressing is enabled. • Based indexed Unused data bits in the XAM register are read as O. • Bit Expanded addressing must be disabled before access- • Autoincrement/autodecrement ing any of the page registers. That is, if expanded mode Register. The operand is in a V53 register pointed to by is enabled, the page registers cannot be accessed. This the instruction. prevents an expanded mode task from accidentally mod- ifying its memory map. Immediate. The operand is in the instruction stream following the opcode of the instruction. This data will have been prefetched. Immediate. data uses the V53 pipeline efficiently. Direct. Immediate data in the instruction stream points directly to the operand. This data can be a 16-bit effec- tive address or a bit field length of 4 bits. Register Indirect. A 16-bit register (IX, IV, or BW) contains a 16-bit effective address. Indexed. One or two bytes of immediate data are treated asa signed displacement that is added to the contents of a 16-bit index register (IX or IV) to obtain a 16-bit effective address. Based. One or two bytes of immediate data are treated as a signed displacement that is added to the contents of a 16-bit base register (BP or BW) to form a 16-bit effective address. Based Indexed. One or two bytes of immediate data are treated as a signed displacement that is added to two 46 1\'EC ,.,PD70236 (V53) 16-bit registers (BP or BW and IX or IV) to form the Based. One or two bytes of immediate date are a signed effective address. This mode is useful for array address- displacement added to the contents of a 16-bit base ing. register (BP or BW) to form an effective address. This address is used to fetch another effective address from Bit. Used with NOT1, ClR1, or TEST1. A 4-bit immediate memory, which is then loaded into the PC (and PFP). data value SET1 selects a bit in a 16-bit operand. For 8-bitoperands,· only 3 bits are used. Based Indexed. One or two bytes of immediate data are a signed displacement added to the contents of two Autolncrement/Autodecrement. Some iterative opera- 16-bit registers (BP or BW and IX or IV) to form an tions (such as MOVBK or IN S) will automatically incre- effective address. This address is used to fetch another ment or decrement index registers after each iteration. effective address from memory, which is then loaded into Specifically, IX is used in addressing a source pointer, the PC (and PFP). and/or IY is used in addressing a destination pointer. After the operation, both will be incremented or decre- CPU Register Configuration mented (according to the PSN DIR control flag) to point to the next operand in the array. Program Counter (PC). The ,PC is a 16-bit register containing the effective address of the instruction cur- Instruction Addressing Modes rently being executed. The PC is incremented each time the instruction decoder accepts a new instruction from mil Instruction address modes are basically the same as the operand addressing modes, but the PC is always used in the prefetch queue. The PC is then loaded with a new .:II value during execution of a branch, call, return, or break the register. These modes are used in control transfer instruction, and during interrupt processing. instructions. Segment Registers (PS, SS, DSO, DS1). There are four • Direct segment registers, each containing the upper 16 bits of • Relative the base address of a 64K logical segment. Since logical • Register segments reside on 16-byte boundaries, the lower 4 bits • Register indirect of the base address are always zero. Normal 20-bit • Indexed memory addresses are formed by adding the 16-bit • Based effective address to the base address of one of the • Based indexed segments. During this operation, certain types of effec- tive addresses will be paired with specific segment Direct. Four bytes of immediate data are taken as an registers. absolute address and loaded directly into the PS and PC (and PFP). Segment Register Default Offset Relative. One or two bytes of immediate data are a PS (program segment) PFP signed displacement that is added to the contents of the SS (stack segment) SP, effective address PC, and then placed in the PC (and PFP). This mode is DSO (data segment 0) IX, effective address useful to create position-independent code. DS1 (data segment 1) IY Register. The register selected by the instruction (AW, Program instructions will always be· fetched from the BW, etc.) contains an effective address, which is loaded program segment. Whenever the IY index register ad- into the PC (and PFP). dresses an operand, the DS1 segment register will be Register Indirect. An index register (IX, IV. or BW) used. DSO is usually used with IX. Stack operations with points to a memory location that contains an effective the SP will always use the stack segment. For other address (short pointer) or a segment register value and effective addresses, the table above shows the default the effective address (far pointer). This effective address segment, but another segment may be selected by a is read from memory and loaded into the PS and/or PC segment override prefix instruction. (and PFP). General-Purpose Registers (AW, BW, Cw, DW). The Indexed. One or two bytes of immediate data are a four 16-bit general-purpose registers can be accessed as signed displacement added to the contents of a 16-bit 16-bit or 8-bit quantities. When the AW, BW, Cw, or rJN index register (IX or IV) to form an effective address. This destination is used, the register will be 16 bits. When Al, address is used to fetch another effective address from AH, Bl, BH, Cl, CH, Dl, or DH is used, the register will memory, which is then loaded into the PC (and PFP). be 8 bits. Al will be the low byte of PW and AH will be the high byte, etc. 47 ,.,PD70236 (V53) NEe Some operations require the use of specific registers. The DIR control flag determines whether address point- ers are incremented (1) or decremented (0) for block Operation (string) operations. IE enables interrupts (1) or disables Word multiplication/division, word I/O, interrupts (0). BRK enables (1) or disables (0) the single data conversion stepping trap (vector 1). AL Byte multiplication/division, byte I/O, BCD The P&N cannot be accessed directly as a 16-bit register. rotation, data conversion, translation Specific instructions set/reset the control flags. When AH Byte multiplication/division the PSW is pushed on the stack (as during interrupt BW Translation processing), the PSW is set as shown in the diagram CW Shift instructions, rotation instructions, above. BCD operations Word multiplication/division, indirect Interrupt Operation addressing I/O The interrupts supported by the V53 can be divided into Pointer (SP, BP) and Index Registers (IX, IV). These two types: those generated by external interrupt re- registers are used as base pOinters and index registers quests and traps generated by software processing. when based, indexed, or based indexed addressing Interrupts of each type are listed below. modes are used. •. External Interrupts They may also be used as general-purpose registers for - NMI input (nonmaskable) data transfer, arithmetic, and logical instructions. They - INTPO-INTP7 (maskable) can only be accessed as 16..bit registers. • Software Traps Some operations use these registers in specific ways. - Divide error during DIV or DIVU instruction - Array bound error during CHKIND Register Operation - Single-step (PSW BRK flag = 1) SP Stack operations - Undefined instruction IX Source pointer for block transfer, bit field, - Coprocessor error and BCD string operations - Coprocessor not connected IV Destination pointer for block transfer, bit - Break instructions (BRKV, BRK3, BRK imm8, field, and BCD string operations BRKXA) Program Status Word (PSW). The program status word The eight INTP interrupts are handled by the interrupt reflects the status of the CPU by six status flags and control unit (ICU). The leu prioritizes the INTPs and affects the operation of the CPU by three control flags. produces a single INT output, an internal signal that 15 PSW 8 goes to the CPU interrupt logic.. There the interrupt prioritization· flow diagram (figure 40) is implemented. I 1 I 1 I 1 IV DIR I IE I BRK I Interrupts are prioritized by the CPU as follows. 7 0 NMI (highest priority S Iz I 0 AC 0 I P I 1 CY INT BRKflag Status Flags Control Flags Other software interrupts and exceptions V Overflow DIR Direction S Sign IE Interrupt enable Z Zero BRK . Break AC Auxiliary carry P Parity CV Carry 48 NEe pPD70236 (V53) Figure 411. Interrupt Pl'loritizstlon Row Dlllllram Complete current * If current Instruction causes Internal Interrupt, SOFT flag = 1 Instruction At the end of current Instruction: • If BRK flag In PSW= 1, BRK = 1 • If INT from leu Is sampled, INT = 1 • If NMllnput Is sampled, NMI = 1 III Execute next instruction 83YL-6327B 49 pPD70236 (V53) NEe Interrupts are not accepted by the CPU at certain times. Each interrupt vector consists of four bytes. The two NMI, INT, and BRK flags are not accepted under the low bytes are loaded into the PC as the offset, and the following conditions. two high bytes are loaded into the PS as the base address. See figure 42. (1) Between execution of a MOV or POP that uses a segment register as an operand and the next Figure 42. Interrupt Vector 0 instruction. Vector 0 (2) Between a segment override prefix and the next 001H OOOH instruction... 003H 002H (3) Between a repeat or BUSLOCK prefix and the next instruction. PC ~ [001 H, OOOH] PS ~ [003H, 002H] INT is not accepted when the PSW IE flag is 0, or 49NR-345A between an RETI or POP PSW and the next instruction. Based on this format, the contents of each vector Once an interrupt has been accepted by the CPU, an should be initialized at the beginning of the program. interrupt service routine will be entered. The address of The basic mechanism for servicing an interrupt follows. this routine is specified by an interrupt vector stored in the interrupt vector table (figure 41). For most inter- (SP - 1, SP - 2) - PSW rupts, the vector used depends on what interrupt is (SP - 3, SP - 4) - PS being processed (e.g., NMI always uses vector 2). For (SP - 5, SP - 6) - PC INT and BRK imm8 interrupts, any vector may be used; SP - SP - 6 the vector number is supplied by the ICU or an external IE - 0, BRK - a device (such as a j.lPD71059) in the case of INT, or by PS - vector high bytes immediate data in the case of BRK. PC - vector low bytes The interrupt vector table uses 1K bytes of memory at When an interrupt is accepted, two possible PC values addresses OOOH to 3F FH and stores up to 256 vectors. could be saved. For some interrupts, the offset of the current instruction is saved. These interrupts are divide Figure 41. Interrupt Vector Table error, CHKIND, illegal opcode, j.lPD72291 FPP error, other coprocessor error, and CP not present. For the OOOH Vector 0 Divide Error other interrupts (NMI, BRKflag, BRK instruction, or ICU j 004H interrupt), the offset of the next instruction is saved. Vector 1 Break Flag 008H Vector 2 NMllnput OOCH Dedicated Vector 3 BRK 3 Instruction CLOCK GENERATOR (CG) 010H Vector 4 BRKV Instruction 014 H VectorS CHKIND Instruction The clock generator (figure 43) is driven by a crystal connected to pins X1 and X2 or' an external clock tR.reN~ 018 H Vector 6 connected directly to pin X1 and through an inverter to ~~ ~ pi n X2. The frequency of the crystal or external clock is 07CH Vector 31 twice the frequency of the CPU clock. ------i1. 080H Vector 32 General Use For crystal operation, the crystal should be AT-cut, ~ ~ • BRK Imm8 Instruction fundamental mode, and parallel resonant. Connect a f INT Input [External] 1E8H t-_--Vec-t-or-1-22----I Undefined Instruction Trap 5-pF capacitor from pin X1 to ground and a 15-pF capacitor from pin X2 to ground. ~ General Use i" , • BRK Imm8 Instruction 200H • INT Input [External) For operation with an external clock, the maximum Vector 128 ILPD72291 AFPP Error 204H delay through the inverter connected to pin X2 should Vector 129 Other Coprocessor Error 208H not exceed 20 ns. Vector 130 Coprocessor Does Not Exist 1 ~ General Use The source frequency is divided to supply various ~" 'f 'f . BRK Imm8 Instruction clocks to internal units (CPU, DMAU, etc.) and to exter- 3FCH r~====vec==tor=2=55===~1 • INT Input [External) nal devices at pins CLKOUT and PCLKOUT. 49NR-332A 50 NEe pPD70236 (V53) Figure 43. Clock Gener.tor Dillflr.m Bus Arbitration Unit (BAU) The BAU accepts and grants five different requests for X1 bus mastership in the following priority order. X2 REFU demand (highest) DMAU request Programmable HLDRQ CPU Clock Frequency CPU, DMAU, CPU request Divide-by REFU,SCU 1,2,4,orS REFU request CLKOUT The refresh unit is assigned both the highest and the lowest priorities. Normally, REFU requests are made, PCLKOUT and if the bus is not granted, they are placed in a queue. Once the queue depth reaches seven requests, a refresh demand is made, and the BAU gives this the highest priority. 1 - - - - - TCU Bus Wait Function When the bus is active and the BAU receives a higher III BRC 83VL-6217A priority request, the BAU will take away its grant to the current bus master. But the current master may not BUS OPERATION release the bus immediately. The BAU will wait until the current master takes away its request before granting The V53 uses a synchronous bus interface. The X1 and X2 inputs provide a reference oscillator frequency for the the bus to the higher priority requester. This is called bus internal clock generator, which supplies the main system waiting. clock to the ,other .internal devices and to external For example, if an external device has been granted the devices via the CLKOUT pin. All V53 bus timings and bus via the HLDAK output, and the DMAU requests the instruction execution clock counts are specified relative bus (DMA is higher priority than HLDRQ), the V53 will to the CLKOUT signal. Bus cycles start on the falling deassert HLDAK but will not take the bus back until the edge of CLKOUT. external master deasserts HLDRQ. Note that the exter- The V53's internal bus is a multimaster, shared bus. The nal master is not required to immediately release the bus CPU, DMAU, or REFU can all be bus masters. Each back to the V53; the BAU will wait until HLDRQ is requests bus mastership from the bus arbitration unit removed. (BAU). External devices can also request mastership of Usually a higher priority request will be granted quickly; the bus using the HLDRQ input. for example, if a DMA request is accepted during T2 of a Bus Interface Unit (BIU) CPU bus cycle, the next bus cycle will usually be a DMA cycle. However, each internal bus master will hold onto The BIU contains the interface logic that allows the three the bus under certain circumstances. internal bus masters (CPU, DMAU, and RE FU) to control the external address, data, and control buses. The BIU The CPU will not let go of the bus as long as the also synchronizes the BS8/BS16, RESET, and READY BUSLOCK prefix is used, or until the current bus opera- inputs to the system clock. When a reset signal is tion is completely finished (an unaligned or bus-sizing acceptec!, the BIU asserts the RES OUT output. operation may take more than one bus cycle). Likewise, when it is in bus hold mode, the DMAU will not release the bus until all active DMA requests have been pro- cessed. This mode should be used with care as it can result in DRAM refresh errors if the DMA takes a long time to complete. Note that bus hold mode is only available when DMAU is in ",PD71071 compatibility mode; ",PD71037 mode is always in bus release mode. 51 "PD70236 (V53) NEe External Bus Masters Figure 44. CPU Bus State Diagram At times, external bus masters will need to use the V53 BUSRO= 1 bus. There are two methods provided for that purpose: CPUGT= 1 READY = 1 hold request and DMA cascade. Up to five external bus masters can be connected to the V53. Hold Request. The external bus master can request the bus using a hold request. Hold request is implemented using the HLDRQ and HLDAK signals. The V53 grants the bus by floating many of its outputs and asserting HLDAK to notify the external device that the bus is now BUSRO= 1 CPUGT= 0 free. CPUGT= 1 READY = 1 DMA Cascade. DMA cascade is very similar to hold request; the difference is that a DMARQ/DMAAK signal pair requests and grants the bus. While DMA cas.cade is meant to be used to connect additional DMA controllers, it can be used by any type of external bus master. Since there are four DMA channels, each of which can be in cascade mode, up to four external masters can be connected by DMA cascade. BUSRO=O CPUGT= 1 BUSRO=O CPUGT= 1 Bus Cycle Descriptions READY = 1 Each of the internal bus masters uses the V53 bus TI Idle state interface 'in a different way: DMA bus cycles have a T1 Start bus cycle T2 Sample READY, DATA different structure than CPU bus cycles or REFU cycles. TW Wait for READY = 1 There are 18 different V53 bus cycles summarized previ- TH Bus hold state; release bus to external BAU ously in table 1. BUSRO = 1 when a read or write bus cycle is requested. CPUGT = 1 when BAU grants internal bus to CPU. CPU Bus Cycles 83YL-6548A The bus state diagram for CPU cycles is shown in figure The first state of every bus cycle is T1, and it is followed 44. CPU bus cycles are nominally two clock periods long, immediately by T2. READY is sampled on the rising and may be extended by adding wait states using either (middle) edge of T2. If READY is not asserted, the next the internal wait state generator or the external READY bus state will be the TW wait state. TWs will be inserted input. until READY is sampled low, after which the bus cycle will finish. TWs also will be inserted by the wait state generator, and the READY input is ignored until all TWs programmed in the wait state have been inserted. The dynamic bus sizing input, BS8/BS16, is sampled at the same time as READY. Note that dynamic bus sizing is only implemented for CPU cycles; DMAU or REFU cycles do not use this input. Address and bus status are output after the leading edge of T1, and maintained until after the cycle is completed. A strobe, BCYST, is asserted during T1 to indicate the beginning of a bus cycle. BCYST is output following the leading edge of T1 and deasserted after the leading edge ofT2. Write data is driven on Do-D15 following the rising (mid- dle) edge of T1, and maintained until after the rising edge of T2 or the last TW. Read data is sampled on the trailing 52 NEe pPD70236 (V53) edge of T2 or the last TW state. A strobe, OSTB, gives External logic requests an 8-bitdata path by driving the status of the V53 data bus. OSTB is asserted after BS8/BS16 low in time for the V53 to sample it on the the risi ng (m iddle) edge of T1. OSTB is oeasserted after rising edge of T2 (or TW). The. V53 will perform an the rising edge of T2 or the last TWfor a write cycle, and additional cycle if needed to finish the operation in after the trailing edge of T2 or the last TW for a read byte-wide pieces. cycle. If the bus operation is already 8 bits wide, no further I/O cycles are identical to memory cycles except for the bus cycles will occur (refer to tables 3 and 4). For a read encoding of the bus status lines. However, six idle cycle, the data will be sampled on 07-00. For a write states are inserted after every I/O bus cycle to provide cycle to an even address, data wi II be driven on OrOo. a recovery time for the I/O devices. On all byte writes to an odd address, the V53 will put the byte data on both the upper and lower data .buses so Dynamic Bus Sizing for CPU Cycles that the write data will be on OrOo as well as 015-08' The V53 supports dynamic bus sizing for CPU cycles. If the bus operation is 16-bit, two bus cycles will be On a cycle-by-cycle basis, the width of the data bus can be changed from 16 t08 bits. This simplifies connection required. The first one, in which BS8/BS16 is sampled with 8-bit I/O devices that may have internal registers at consecutive byte addresses. Other 16-bit CPUs re- quire two ROMs for startup code, but the V53 dynamic low, will handle the low byte. The second cycle will take the form of a byte read or write using 07- 0 0' III bus sizing makes it possible to use a single 8-bit wide ROM. Table 3. Write Cycle Bus Sizing 16-Bit Bus (BS8/BS16 = 1) 8-Bit Bus (BS8/BS16 = 0) Type Address Ao UBE Cycle 015- 0 8 07- 0 0 015- 0 8 01" 0 0 Byte Even 0 1st Invalid Lower Invalid Lower Odd 0 1st Lower Lower Lower Lower Word Even 0 0 1st Upper Lower Upper Lower 2nd Not needed for 16-bit bus Upper Upper Odd 0 1st Lower Lower Lower Lower 0 2nd Lower Upper Lower Upper Note: Lower = low-order byte; Upper = high-order byte Table 4. Read Cycle Bus Sizing 16-Bit Bus (BS8/BS16 = 1) 8-Bit Bus (BS8/BS16 = 0) Type Address Ao UBE Cycle 015- 0 8 01" 0 0 015- 0 8 01" 0 0 Byte Even 0 1st Not used Lower Not used Lower Odd 0 1st Lower Not used Not used Lower Word Even 0 0 1st Upper Lower Not used Lower 2nd Not needed for 16-bit bus Not used Upper Odd 0 1st Lower Not used Not used Lower 0 2nd Not used Upper Not used Upper Note: Lower = low-order byte; Upper = high-order byte CPU Bus Cycle Types. There are many types of CPU cessor data reads, and instruction fetch. All have the bus cycles (shown previously in table 2). They comprise general timing described previously. Coprocessor read, write, and acknowledge cycles. reads access the internal registers of an external co- processor. Coprocessor data reads transfer data from CPU Read Cycles. There are six CPU read cycles: memory to an internal coprocessor register. Instruc- memory, external I/O, internal I/O coprocessor, copro- tion fetches fill the V53's 8-byte instruction queue from 53 JlPD70236. (V53) NEe internal or external I/O device or a memory location. Dynamic bus sizing is ignored during the interrupt ac- During internal I/O reads, the lORD and BUFEN outputs knowledge cycles. Wait states can be inserted by the are not asserted. internal wait state generator or by the READY input. Dynamic bus sizing is ignored during internal I/O read Halt Acknowledge Cycle. When the CPU executes a cycles, and is not recommended for coprocessor data HALT instruction, a halt acknowledge bus cycle is issued read cycles. The wait state generator does not affect to notify external logic that the V53 is entering a standby internal I/O reads ()r coprocessor reads. READY is used mode. This cycle is always two clocks long; READY is for all CPU read cycles. ignored and DSTB is not asserted. The V53 has several standby modes. CPU Write Cycles. There are five types of CPU writes. Memory writes transfer data from the V53 to a memory DMA Unit Bus Cycles location. External and internal I/O writes transfer data from the V53 to external or internal I/O devices. During Figure 45 shows the bus state diagram for DMA bus internal 1/0 writes, the 10WR and BUFEN outputs are not cycles. There are eight different states. When the DMAU asserted. Coprocessor data writes transfer data from an is idle, it is in state SI. In this state, it is continually external coprocessor to a memory location. Coproces- sampling the four DMARQ inputs. When a request is sor writes transfer data from the V53 directly to a detected, the DMAU requests use of the V53 bus from coprocessor internal register: the BAU, and enters state SO. It remains in SO until the Dynamic bus sizing is ignored during internal I/O read/ BAU grants the bus to the DMAU, at which point the writes, and is not recommended for coprocessor data actual DMA bus cycle starts with state S1. Addresses write cycles. The wait state generator does not affect and control status are output along with BCYST and internal I/O writes or coprocessor writes. READY is used DMAAK. for all CPU write cycles. DMA bus cycles are nominally four clocks long, but they Interrupt Acknowledge Cycles. The CPU interrupt ac- can be stretched by the internal wait state generator or knowledge operation takes two consecutive bus cycles. READY. S1 always changes to S2 and then to S3. The first cycle freezes the state of the internal interrupt Memory and I/O strobes are asserted during S2, S3, and control unit (ICU) and any external slave p,PD71059 Sw. READY is sampled during S2 for use during S3. If interrupt controllers. The second bus cycle reads an waits are inserted, the SW state is entered. Control stays 8-bit vector number on 07-00, supplied by either the ICU in that state until no more waits are desired. If no waits or an· external slave. This vector number is then used by are inserted, S3 moves to S4 and the current cycle is the CPU as an index into the interrupt vector table to over: select an interrupt handler: The BUSLOCK output is Depending on the DMA mode, another DMA cycle might asserted for the first cycle, and remains asserted until be ready to start immediately (e.g., in burst mode), or after the second to guarantee that no other bus master another DMA request input may now be asserted. During will take control of the bus until the interrupt has been accepted. S4, a decision is made whether to begin another DMA cycle at S1, to return to SI, or to enter the bus wait state There are two types of interrupt acknowledge cycles S4W. The latter transition will be made if another DMA produced by the V53: a master and a slave. The INTAK cycle is ready to start but the BAU has taken the bus output is asserted for both types, and should be con- away from the DMAU. In S4W, the DMAU releases the nected to the interrupt acknowledge inputs of all slave bus, but is ready to begin as soon as the bus is granted devices. The master cycle is used for the first INTAK to again and the DMA request is still pending. both internal and external ICUs, and the second INTAK to the internal ICU. The slave cycle is used only for the second INTAK to an external slave device. During the slave cycle, the address of the slave device to be used is presented on A2-Ao. These address lines should be buffered and then connected to the slave address inputs of the external ICUs. Buffering is neces- sary because the slave address pins of external devices might be in an output state on power-up, producing a bus conflict on A2-Ao if they are connected directly. 54 NEe pPD70236 (V53) Figure 45. DMAU Bus Sta'e Diagram DMAGT=O READY =0 DMA incomplete; bus hold mode (block or demand modes only) DMA complete; or single mode DMA incomplete; bus release mode DMAGT=O DMAGT= 1 ED DMARQ= 1 DMAGT=O DMARQ=O 81 Idle state; sample DMA requests. 80 Wait for BAU to grant bus to DMAU. 81 Output DMA memory address. 82 Assert strobes; sample READY, END. 83 Check READY. 84 End of DMA cycle; check DMA completion. S4W Bus wait state; release bus to BAU. 8W Walt for READY = 1. 83YL·6330B DMA Read Cycle. The DMAU performs "fly-by" DMA. long access time. The write data may not be valid when During one DMA read bus cycle, .data moves from the the normal CAS signal is asserted. source address in memory to the destination 1/0 device. Dynamic bus sizing cannot be used for DMA operations. The V53 puts the memory address on A23-Ao, and asserts MRD. At the same time, 10WR is asserted. Memory will The internal wait state generator and READY can be drive the DMA data onto the bus, and the 10WR signal used to stretch the cycle. will latch the data into the 1/0 device. DMAAK should be DMA Cascade. During DMA cascade, the DMA state used to control chip select at the 1/0 device. Since the machine releases the V53 bus to an external bus master V53 does not use the data, BUFEN is not asserted during such as a p.PD71071 or p.PD71037 DMA controller. DMA bus cycles. DMAAK is connected to the HLDAK input of the external DMA Write Cycle.The DMAU performs "fly-by" DMA. device. DMAAK will stay asserted until the external During one DMA write bus cycle, data moves from the master deasserts DMARQ. If the V53 BAU needs to give source 1/0 device to the destination address in memory. the bus to a higher priority bus master, DMAAK will be The V53 puts the memory address on A23-Ao, and asserts deasserted. The external bus master is expected to then MWR. At the same time, lORD is asserted. The 1/0 device deassert the DMARQ input, at which point the bus will be will drive the DMA data onto the bus; and the MWR given to the higher priority bus master. signal will latch the data into memory. DMAAK should be used to control chip select at the 1/0 device. Since the Refresh Unit Bus Cycles V53 does not use the data, BUFEN is not asserted during The refresh unit performs memory read cycles from DMA bus cycles consecutive memory addresses. These bus cycles are Note that when DMA writes are made to DRAM, it may be the same as CPU memory read cycles, except that the necessary to generate a delayed CAS strobe because RE FRQ output is asserted. External logic should use the the data is being supplied by an 1/0 device that may have RE FRQ logic to enable RAS for all memory banks, regardless of the address decoding scheme, so that all banks are refreshed. 55 pPD70236 (V53) NEe Dynamic bus sizing cannot be used during refresh Interfacing the #,PD72291 AFPP operations. The internal wait state generator and The AFPP is a very-high-performance floating-point READY can be used to stretch the cycle. coprocessor able to process more than 530K floating- point operations per second at 16 MHz. SYSTEM INTERFACE The AFPP is programmed as an extension of the V53 System Memory Access Time instruction set. The AFPP executes floating-point op- Table 5 shows the system memory access time re- erations, computes transcendental functions, and per- quired for 12.5-MHz and 16-MHz V53 systems to run forms vector multiplications. with zero, one, two, and three wait states. This is the AFPP instructions use the FP01 and FP02 formats. time from when the address bus is valid to when the When one of these opcodes is encountered and an external system must present the read data on the data AFPP is connected, a coprocessor protocol routine is bus. These numbers are based on the preliminary ac entered. The V53 computes any effective addresses timing given in this document and are sUbject to required, reads or writes the operands for the AFPP, change. and tells the AFPP which operation should be per- formed. Table 5. Performance VS. Wait States The AFPP responds by asserting its BUSY output when 12.5 MHz 16 MHz it starts the operation. The V53 will not start another Memory System Relative Memory System Relative AFPP operation until BUSY is deasserted, but may Number Cycle Access Perfor- Cycle Access Perfor- execute CPU instructions. When BUSY is deasserted r of Wait Time Time mance Time Time mance the V53 will transfer the AFPP status to the AW register: States (ns) (ns) (%) (ns) (ns) (%) 0 160 113 78 125 78 100 Figure 46 shows how to connect a V53 CPU to a pPD72291 AFPP. The CPU reads and writes status and 240 193 64 187.5 140.5 82 commands to the AFPP using coprocessor read and 2 320 273 52 250 203 67 write cycles, which always take two clocks. AFPP oper- 3 400 353 43 312.5 265.5 56 ands are written using coprocessor memory write/read cycles, which always require one wait state. The V53 Note: Performance is relative to the 0 wait state, 16 MHz. automatically inserts one wait state into these cycles so no external wait generation logic is required. Wait States On reset, CPBUSY is sampled. If it is high, the V53 Table 5 also illustrates the effect of wait states on assumes that a coprocessor is connected. CPERR is performance. The V53 CPU overlaps bus interface also sampled to determine what kind of coprocessor is operations in time with instruction execution. This connected as follows. greatly reduces the effect of wait states on perfor- mance. Each bus cycle is nominally two clocks long, CPBUSY CPERR Coprocessor Connected while the minimum instruction is two clocks with many o x None instructions taking longer. 1 0 pPD72291 There is some idle bus time when the CPU is processing 1 1 Another kind a long instruction and the prefetch queue is full. Wait Note: If no coprocessor will ever be used in the system, states can often fill these idle states. However, adding ground pins CPBUSY, CPERR, and CPREQ. wait states to bus cycles reduces the bus bandwidth AFPP memory operands must always begin on an even available for other bus masters, such as DMA control- address and may not reside in 8-bit wide memory. lers. This is because some of the idle time that would Dynamic bus sizing may not be used for AFPP oper- have been available to them is used for CPU cycles. ands. Note that in all cases, a 16-MHz V53 with N+ 1 wait states is faster than a 12.S-MHz device with N wait states but slower memory. Note also that the numbers are. for comparison only. Different results will be obtained for other program mixes. 56 NEe pPD70236 (V53) Figure 46. Connections Between the V53 Figure 47. Peripheral Relocation and pPD72291 64K-bytel/0 space FFFFH r - - - - - - - - - , 256-byte area IlPD70236 IlPD72291 Reserved V53 X1 Advanced System 1/0 Area FFOOH CPU 332MHZ Floating·Point X2 Processor 16MHZ ClKOUT ClK - - MIlO MIlO - RIW - RIW BUSST1 BUSST1 BUSSTO BUSSTO DSTB DSTB - - BCYST - - BCYST 83YL·6682A V DD -- CPBUSY ~O--GND i -- BUSY Table 6. System I/O Area _____________________________ I/O Address Register Name F_ig~u_r_e III FFFFH Reserved "- * FFFEH SCTL 48 Do-D15 Do -D15 FFFDH OPSEL 49 FFFCH OPHA 50 RESET RESET FFFBH DULA 50 RESET * * When only the ~PD72291 socket is provided and the ~PD72291 is not connected, switch CPBUSY to GND. 1 83YL·6550A FFFAH FFF9H FFF8H FFF7H FFF6H TULA SULA WCY4 IULA Reserved 50 50 50 61 FFF5H WCY3 60 SYSTEM CONTROL I/O FFF4H WCY2 59 On-Chip Control Registers FFF3H WMB1 55 The V53 provides many on-chip control registers. Some FFF2H RFC 62 of these reside in the 256-byte system I/O area (I/O FFF1H SBCR 110 space addresses FFOO to FFFF). These are shown in FFFOH TCKS 51 table 6. Other registers reside in small blocks associ- ated with an on-chip peripheral (addresses are pro- F FEFH-F FE EF Reserved grammable). There are register blocks for DMAU, TCU, FFEDH WAC 56 ICU, and SCU. The base addresses for these register FFECH WCYO 57 blocks are programmable using the OPHA, DULA, FFEBH WCY1 58 TULA, and SULA registers in the system I/O area. See figure 47. FFEAH WMBO 54 FFE9H BRC 52 FFE8H Reserved FFE7H-FFE2H Reserved 57 pPD70236 (V53) NEe TableS. System I/O Area (conI) Figure 411. On-Chlp Peripheral Selection 110 Address Register Name Figure Regl.ter (OPSEL) FFE1H BADR 102 I 7 - I I - I - ssI TS IS OS I 0 FFEOH BSEL 103 FFDFH-FF81H Reserved SS SCU Operation FFBOH XAM (Read Only) 39 0 Disabled FF7FH-FFOOH PGR64-PGR1 39 1 Enabled Note: All registers are Read/Write except XAM. TS TCU Operation 0 Disabled System Control Register (SCTL) 1 Enabled The SCTL register (figure 48) selects the 8-bit or 16-bit IS ICU Operation boundary of an internal peripheral relocation address. It 0 Disabled also sets the internal DMAU in the #,PD71071 or 1 Enabled #,PD71037 modes. In #,PD71037 mode, SCTL controls DS DMAU Operation propagation of carry from A15 to A16 or from A19 to A20. 0 Disabled SCTL selects the baud rate generator or TOUT as the 1 Enabled SCU clock. Figure 48. System Control Regl.ter (SCTLJ Internal Peripheral Relocation Registers I I 1 - I sc I CE1 I CEO IDMAM Ii00G I The five internal peripheral registers fix the I/O ad- dresses of the DMAU, leU, TCU, and SCU. Register 7 0 Address FFFEH OPHA fixes the high-order byte of the 16-bit I/O ad- dresses. Registers DULA, IULA, TULA, and SULA select SC SCU Input Clock the .Iow-order byte of the I/O addresses for the DMAU, 0 TOUT1 leU, TCU, and SCU peripherals, respectively. 1 From baud rate generator The formats ofthe individual internal peripheral registers CE1 Carry to A20 In "PD71037 are shown in figure 50. Since address checking is not 0 Does not propagate performed, two peripheral I/O address spaces should 1 Propagates not be overlapped. CEO Carry to A16 In "PD71037 0 Does not propagate 1 Propagates DMAM DMAU Mode 0 "PD71071 1 "PD71037 10AG Internal 1/0 Address 0 Even or odd (16-bit boundary) 1 Contiguous (a-bit boundary) On-Chip Peripheral Selection Register (OPSEL) The OPSEL registers (figure 49) controls the V53 internal peripherals. Any of the four peripherals (DMAU, TCU, leU, or SCU) can be independently enabled or disabled by setting the appropriate OPSEL bit. 58 NEe pPD70236 (V53) Figure 50. Internal Peripheral Relocation The IOAG bit of the SCTL register changes how the Registers DULA, IULA, TULA, and SULA registers are used. When OPHA Register IOAG = 1, the DAMU, ICU, TCU, and SCU registers are on contiguous bytes. When IOAG = 0, each of these I A15 I A14 I A13 I A12 I A11 I A10 I Ag A8 byte-wide registers is put on a word boundary. Bit Ao 7 I/O Address FFFCH 0 selects the low or high byte of the word. This allows code DULA Register written for a 16-bit system to be ported to a V53 design 10AG = x* A7 Ae A5 I~ I I with no modifications. Because the DMAU registers in JlPD71071 mode are 16-bit, the IOAG bit in figure 50 is noted as "x" (don't care). Timer Clock Selection Register (TCKS) 10AG = 0 # I A7 Ae A5 Ao The TCKS register (figure 51) selects the clock source for 7 I/O Address FFFBH o the timer/counters as well as the divisor for the internal * J.IPD71071 mode clock prescaler. The clock source for each timer/counter III # J.IPD71037 mode IULA Register is independently selected from an internal clock (figure 43) or an external clock source (TCLK). The frequency of the internal clock selected by bits 2, 3, 10AG = 0 A7 Ae A5 ~ A3 Ao and 4 is programmable. The PS bits allow the clock to be set to the external osci Ilator frequency divided by 4, 8, 7 I/O Address F F FAH o 16, or 32. TULA Register 10AG = 1 Figure 51. Timer Clock Selection Register (TCKS) I- I I - I CS2 I CS1 I CSO I PS I Ao 7 I/O Address FFFOH 0 10AG = 0 7 I/O Address FFF9H o CS2 Clock Input to TCT2 S ULA Register 0 Internal clock TCLK pin 10AG ='1 CS1 Clock Input to TCT1 0 Internal clock 10AG = 0 Ao 1 TCLK pin 7 I/O Address FFF8H o CSO Clock Input to TCTO 0 Internal 1 TCLK pin PS Prescale Divisor of External Oscillator 00 4 01 8 10 16 11 32 59 IIPD70236 (V53) NEe Baud Rate Counter (BRC) Figure 53•. Memory Spsce Division The BRC. (figure 52) is an a-bit, frequency-division counter for the dedicated baud rate generator. It sets the value by which an internal frequency is to be divided to provide the SCU with its baud rate clock. 16M Bytes Figure 52. Bsud Rsl. Counler(BRC) Do I 7 I/O Address FFE9H o Low Table 7 illustrates the relationship between the .baud , rate and the value set in the BRC. 83YL·6547A rsbl.7. Bsud Rsle Setting by BRC The WCU can insert waits into memory or external I/O Oscillation frequency 24.576 MHz 29.4912 MHz cycles, but not into coprocessor, internal I/O, or halt acknowledge cycles. Oscillation frequency + 2 12.288 MHz 14.7456 MHz Baud rate factor (+) 16 64 16 64 Eight system I/O registers (figures 54-61) control the WCU. They are the wait state memory boundary regis- Internal frequency 0.768 0.192 0.9216 0.2304 ters (WMBO and WMB1), the WCU address control reg- Baud Rate Number of Counts Set In BRC ister (WAC), and the wait state cycle count registers 1200 160 192 (WCYO-WCY4). 2400 80 96 Memory Boundary Registers (WMBO, WMB1) 4800 160 40 192 48 9600 80 20 96 24 The WMBO register divides the entire .16M-byte address space into three sections. The EL MB and EUMB fields 19,200 40 10 48 12 specify the size of the upper and lower memory blocks. 38,400 20 5 24 6 The middle block is the area left in between. The WCYO and WCY1 registers specify the wait states of each WAIT CONTROL UNIT expanded memory block. The wait control unit (WCU) inserts from 0 to 7 wait In addition to dividing expanded memory, a specific states (TW) into a bus cycle to· compensate for the 1M-byte memory area can also be partitioned into three varying access times of different memory and I/O de- blocks for wait state generation. rhe WAC register deter- vices. Each wait state is equivalent to one CPU clock mines which 1M-byte area is referenced. The WMB1 cycle. rhe number· of wait states can be individually register divides this area into three blocks in the same programmed for CPU, DMAU, RE FU, INTAK, and exter- manner as described above for WMBO. Registers WCY2 nall/O cycles. The INTAK cycles can be programmed for and WCY3 specify the wait states for each block and 2-7 wait states. also I/O. For memory accesses, the address space is divided into a total of six sections (labeled High, Middle, and Low in figure 53). A different number of wait states can be programmed for each section, allowing much flexibility in the system design. The WCU works with the external READY input. After the proper number of rws have been inserted into the bus cycle, READY will be sampled, and wait states will be inserted until it is asserted. 60 NEe ,.,PD70236 (V53) Figure 54. Memory Boundary Register 0 (WMBO) After RESET, the WCY registers are set to all 1s, thereby I- I ELMS I- I EUMS I inserting seven waits into all cycles. This allows the use of slow ROMs. Initialization code must set the WCY 7 I/O Address FFEAH 0 registers to their values. ELMB/EUMB Memory Block Size (Bytes) 000 1M Figure 57. WCYO Register 001 010 2M 3M I- I I- I- I- I EUMW 011 4M 7 I/O Address FFECH o 100 5M EUMW ·Walt States 101 6M 110 7M 000 0 111 8M 001 1 010 2 011 3 Figure 55. Memory Boundary Register 1 (WMB1) 100 4 I- I LMS I- I UMS I 101 110 5 6 7 I/O Address FFF3H 0 111 7 LMB/UMB Memory Block Size (Bytes) * Upper section of 16M-byte memory space 000 32K 001 64K Figure 58. WCY1 Register 010 011 96K 128K I- I EMMW I- I ELMW 100 192K 7 I/O Address FFEBH o 101 256K EMMW/ELMW ·Walt States 110 384K 111 512K 000 0 001 1 010 2 Figure 56. WCU Address Control Register (MC) 011 3 I I I I I UWA I 100 101 4 5 7 I/O Address FFEDH 0 110 6 UWA '" Upper 4 bits of expanded address specifying a 1M-byte 111 7 memory space * Middle and lower sections of 16M-byte memory space Wait State Cycle Count Registers eyiCYO-WCY4) Figure 59. WCY2 Register Each WCY register has one or two 3-bit fields that set the I- I MMW I- I LMW 7 I/O Address FFF 4H o number of waits for a particular kind of cycle or the number of waits to be inserted into cycles during which MMW/LMW ·Walt States certain memory blocks are accessed. 000 0 001 1 (1) WCYO and WCY1 (figures 57 and 58) pertain to the 010 2 16M-byte memory space set by the WMBO register. 011 3 (2) WCY2 and WCY3 (figures 59 and 60) pertain to the 100 4 1M-byte memory space set by the WMB1 register. 101 5 110 6 (3) Also, the lOW field of WCY3 sets the numberof waits 111 7 for external I/O cycles and interrupt acknowledge * Middle and lower sections of 1M-byte memory space cycles. (4) The waits set by WCY3 cannot be inserted into the internal I/O area read/write cycle. (5) WCY4 (figure 61) sets the number of waits for DMA cycles and refresh cycles. 61 ,.,PD70236 (V53) t\'EC Figure flO. WCY3 Register REFU is given the highest bus priority. .The REFU gets I I lOW I- I UMW control of the bus, performs a burst of four refreshes, and then falls back to the lowest priority. This refresh 7 I/O Address FFF5H o queue ensures that refresh cycles are not lost even when Walt State. the V53 is busy for long periods of time. lOW Ext 1/0 Cycle. Int Ack Cycle. Refresh Control Register (RFC) 000 0 2 001 1 3 The RFC (figure 62) controls the refresh control unit. The 010 2 2 RE bit enables or disables the REFU. The refresh interval 011 3 3 is set by the RTM field by choosing refresh interval factor 100 4 4 N, which determines how many CPU clock cycles elapse 101 5 5 110 6 6 between refreshes. 111 7 7 Refresh interval = 16 x N x tcyc UMW *Walt State. With a 16-MHz CPU clock, this allows a range of intervals 000 0 from 1 to 32 p,s. After RESET, N will be 9, which gives an 001 1 010 2 interval of 9 p,s. 011 3 Since the V53 may operate with either 8- or 16-bit 100 4 memory devices, the refresh address can be incre- 101 5 110 6 mented by 1 (for 8-bit memory) or by 2 (for 16-bit 111 7 memory). The ROB8 bit in the RFC makes the selection. * Upper section of 1M-byte memory space In the word mode, UBE is always low (active) for refresh cycles. In the byte mode, UBE is asserted only for Figure 61. WCY4 Register refreshes to an odd address. I- I DMAW I - I RFW Figure 62. Refresh Control Register (RFC) o 7 I/O Address FFF6H I RE IROBS I I RTM I DMAW/RFW *Walt State. 7 I/O Address FFF2H 0 000 0 RE Refre.h 001 1 010 2 o Disable 011 3 1 Enable 100 4 ROBS lCU Clock for Channel 2 101 5 110 6 o Increment by 2 ((J'i3E = low leveO 111 7 1 Increment by 1 ((J'i3E = high level for even addresses and low level for odd-addresses) * DMA cycle or refresh cycle. RTM Refre.h Interval Factor N RE FRESH CONTROL UNIT 00000 1 00001 2 The refresh control unit (REFU) refreshes external dy- 00010 3 namic devices by periodically performing a memory 00011 4 read cycle from consecutive, incrementing addresses. A 00100 5 16-bit counter provides the refresh address. The upper bits (A23-A16) are low during refreshes. Each refresh bus cycle has two wait states inser:ted, so that it will be a 11110 31 minimum of 4 clocks long. Refresh cycles can be distin- 11111 32 guished from other memory reads by the assertion of the REFRQ output or by the bus status code. TIMER/COUNTER UNIT If the V53 is busy when it is time to perform a refresh, the The timer/counter unit (TCU) provides a set of three refresh request is placed in a refresh queue until the bus independent 16-bit timer/counters. Each timer has an is no longer busy. Normally, the RE FU has the lowest bus individual output and gate control input. The clock priority. However, after seven refreshes are queued, the source for each channel is set individually to either the 62 NEe JlPD70236 (V53) prescaled CPu clock or the external TCLK. TOUn is Because RESET leaves the TCU in an uninitialized state, also internally connected to supply the baud rate clock each timer/counter must be initialized by specifying an to the SCU. Figure 63 is the TCU block diagram. operating mode and a count. Once programmed, a timer/counter will continue to operate in that mode until The TCU has the following features. another mode is selected. When the count has been written to the counter and transferred to the down • Three 16-bit timer/counters counter, a new count operation starts. Both the current • Six programmable count modes count and the counter status can be read while count • Binary/BCD counting operations are in progress. Figure 64 is a flow diagram • Multiple latch command for TCU operations. • Count latch command • Choice of two clock sources • 16-MHz operation • Functionally compatible with "PD71054 {8254} Figure 63. 1CU Block Dillgrsm TCLK (External) Clock TCTLO (External) TCTL1 (External) TCTL2 (External) III TOUT1 TOUT2 TOUTO (External) (External) Internal Signal (External) r-------~~------, __ AD A1 lORD IOWR (A 1) (A2) TUS j j j j j TCTO r--- - ------------- ------- -------- ReadlWrite Control Status Register TCT1 TCT2 TMD Status (Mode Register) Latch Count Latch '---______-+__---j (8) 1--------1 (8) f--------j (8) f-----------~-; Internal Data Bus 83YL-6218B 63 IIPD70236 (V53) NEe Figure 64. TCU Operating Procedure more timer/counters. Figures 65, 66, and 67 show three configurations of the TMD register. Figure 65. TMD Regl.ter; "ode IIbnt _ OUT I so I RNM I OMODE BD I Instruction 7 o SC Counter 00 TOTO _ OUT Instruction 01 TCT1 10 TCT2 11 Multiple latch command RWM Read/Wrlte Mode 00 Oounter latch command 01 Lower byte only 10 Upper byte only 11 Lower byte followed by upper byte _ OUT CMODE Count Mode Instruction 000 Mode 0 001 Mode 1 _IN x10 Mode 2 Instruction x11 Mode 3 100 Mode 4 101 Mode 5 BD Count o Binary count 1 BOD count x = Don't care. Figure 66. TMD Regl.ter; Count Latch Command 83YL-SS12A I SO I 0 I 0 I 0 I 0 I 0 I 0 I 7 0 TCU Commands SC Oounter To Be Latched The TeU is programmed by issuing I/O instructions to 00 TOTO the I/O port addresses programmed in the OPHA and 01 TOT1 10 TOT2 TULA registers. The individual TeU registers are se- lected by address bits A2 and A1 or (Ad and (Ao) as follows. Figure 67. TMD Regi.terj "ultiple Latch Command A2 (A1) A1 (Ao) Register Operation I I eL I SL CT2 CT1 CTO o 0 0 TCTO Read/write 7 o TSTO Read OL Latches Count Data 0 TCT1 Read/write TST1 Read o Yes 1 No 0 TCT2 Read/write SL Latches Status TST2 Read o Yes TMD Write 1 No eTn Selects Counter TCTn Timer Mode Register (TMD) o No The TMD register selects the operating mode for each 1 Yes timer/counter and issues the latch command for one or 64 NEe pPD70236 (V53) Timer/Counter Registers (TCT) Count· Modes Writes to the timer/counter registers (TCTO-TCT2) stores There are six programmable timer/counter modes. The the new count in the appropriate timer/counter. The timing waveforms for these modes are shown in figure count latch command is used before reading count data 69. to latch the current count and prevent inaccuracies. Mode 0 (Interrupt on End of Count). In mode 0, TOUT Timer Status Registers (TST) changes from low to high level when the specified count is reached. This mode is available on all timer/counters. The timer status registers (T5TO-T5T2) contain status Mode 1 (Retrlggerable One-Shot). In mode 1, a low- information for the specified counter. See figure 68. The level, one-shot pulse triggered by TCTl is output from the latch command is used to latch the appropriate counter TOUT pin. status before reading status information. If both status and counter data are latched for a counter, the first read Mode 2 (Rate Generator). In mode 2, TOUT cyclically operation returns the status data and subsequent read goes low for one clock period when the counter reaches operations obtain the count data. the 0001 H count. A counter in this mode operates as a frequency divider. Figure 68. Timer St.tus Registers (TS Tn) Mode 3 (Square-Wave Generator). Mode 3 is a f r e - I I I I OL I NC I RNM I CMODE I SD I quency divider similar to mode 2, but the output has a 7 0 symmetrical duty cycle. OL TOUTn Level Mode 4 (Software-Triggered Strobe). In mode 4, when 0 Low the specified count is reached, TOUT goes low for the 1 High duration of one clock pulse. NC Null Count Mode 5 (Hardware-Triggered Strobe). Mode 5 is simi- 0 Valid lar to mode 4 except that operation is triggered by the 1 Invalid TCTl input and can be retriggered. RWM Read/Wrlte Mode Same as TMD register. CMOOE Count Mode Same as TMD register. BO Count Same as TMD register. 65 "P070236 .(V53) NEe Figure 69. Timer Counter Unit (1CU) Waveforms (Sheet 1 of 3) ModeO ClK IOWR TOUT Count Value IOWR ~ TOUT Count Value IOWR ~ TCTL2 LJ TOUT2 Count Value OOOOH IFFFFH IFFFEH IFFFDH IFFFCH Mode1 TCTl2 ---------1 t1---------------\ t1--------------\ t1------\ t1---------- TOUT2 Count Value n I n-1 I n-2 IOWR~ LJ TCTl2 - - - - - - - - \ Il----------------\ Il--------------------- TOUT2 Count Value n I n-1 I n-2 83-001851 B 66 NEe pPD70236 (V53) Figure 69. Timer Counter Unit (IClJ) _reforms (Sheet 2 of 3) Mode 2 ClK TCTL LJ TOUT Count Value --\::j IOWR TOUT Count I 0006H I 0005H I 0004H I 0003H I 0002H Value Mode 3 n-1 III ClK IOWR l lB=4 TCTL LJ TOUT U 0004H Count Value n n-1 0004H 0002H 0004H I 0002H 0004H I 0002H I 0004H 0004H I IOWR 1 lB=5 TOUT L 0004H Count Value n-1 0004H I 0002H I OOOOH 0004H I 0002H 0004H 0002H I OOOOH I 83-0018536 67 pPD70236 (V53) NEe Figure till. Timer Counter Unit (TCU) IItIvelorms(Sheet 3013) Mode 4 TOUT Count Value n-1 I 0004H I 0003H I 0002H I 0001H OOOOH I FFFFH FFFEH FFFDH FFFCH I I TCTl TOUT Count Value n n-1 I 0004H I 0004H I 0004H I 0003H I 0002H I 0001H --, LB=5, IOWR L....J TOUT n I n-1 I 0005H I 0004H I 0003H I 0002H I 0003H I 0002H I 0001H OOOOH FFFFH ModeS TCTL2 -- - - - - - - - - - - - -; n----------------1 n------l n ------ TOUT2 Count Value n I n-1 I n-2 I n-3 I 0002H I 0001 H' TCTl2 - - - - - - - - -; n---------------- --------l n---------- ~ TOUT2 Count Value n I n-1 I 0004H I 0003H I 0002H I 0001 H I L.JI OOOOH FFFFH FFFEH I I 0003H I 0002H 83-001855B 68 NEe "PD70236 (V53) SERIAL CONTROL UNIT the V53 and an external device. The SCU is similar to the ~PD71051 Serial Control Unit except for the lack of The serial control unit (SCU) is a single asynchronous synchronous communication protocols. Figure 70 is a channel that performs serial communication between block diagram of the SCU. Figure 70. SCU Block DllIIJram Reset Clock ReadlWrite Control ...---- :~:~} / + - - - - A1(A2) Internal Signals SST (Status Register) . . . - - - - AO(A1) SUS SCM (Command Register) III RTCLK (From TOUT1) Receiver (Including RxRDY (External) SRB I./'--....,."...-----i Receiver Buffer) "'--+---0 RxD (External) (Receive Data Buffer) STB (Transmit Data Buffer) TxD (External) SMD (Mode Register) SIMK SINT (External) (Interrupt Mask Register) CTS (External) Transmissionl RTS (External) Reception Control t---_oO DTR (External) DST (External) 83YL-6219B The SCU has the following features. The SCU contains four separately addressable registers for reading/writing data, reading status, and controlling • Full-duplex, asynchronous serial controller operation Qfthe SCU. The serial receive buffer (SRB) and • Clock rate divisor: 16 or 64 the serial transmit buffer (STB) store the incoming and • Baud rates to 640 kb/s (external clock), 500 kb/s outgoing character data. The serial status register (SST) (internal clock) allows software to. determine the current state of both • Dedicated baud-rate generator or can use timer 1 the transmitter and the receiver: • Full modem signaling support (ATS, CTS, DSR, DTR) The serial command (SCM) and serial mode registers • Character length: 7 or 8 bits (SMD) determine the operating mode of the SCU while • Stop bit length: 1 or 2 bits the serial interrupt mask register (SIMI<) allows software control of the SCU receive and transmit interrupts. • Break transmission and detection • Full-duplex, double-buffered transmitter/receiver Serial Data Format • Even, odd, or no parity Figure 71 shows the format of the serial data processed • Parity, overrun, and framing error detection by the SCU. In this serial data, the character bits are • Receiver-full/transmitter-empty interrupt 69 pPD70236 (V53) NEe transferred between the cpu· and SCU. The start bit, (1) The receiver is enabled, the SRB is full, and receive parity bit, and stop bit(s) sandwiching the character bits interrupts are unmasked. are control information necessary for serial data com- (2) The transmitter is enabled, the STB is empty, and munications. They are automatically appended when transmit interrupts are unmasked. data is transmitted or deleted when data is received by the SCU. SCU Registers and Commands Figure 71. Serial Data Format I/O instructions to the I/O addresses selected by the OPHA and SULA registers are used to read/write the No Parity SCU registers. Address bits A2 and A1 (or A1 and Ao) and 01 On-1 On > __ _ the read/write lines select one of the six internal registers c+{~te~ bitS: Is~rr= as shown below. Parity A2 (A1) A1 (Ao) Register Operation 0 -0-- srur- Read 0 0 STB Write 0 1 SST Read 0 1 SCM Write n = 6or7 0 SMD Write Stop bit = 1 or 2 bits 1 83YL-6514A SIMK Read/write The baud rate counter (BRC) register is fixed at address Receiver Operation FFE9H in the system I/O area. While the RxD pin is high, the receiver is in an idle state. The SRB and STB are a-bit registers. When the character A transition on RxD from high to low indicates the start length is 7 bits, the lower 7 bits of the SRB register are of new serial data. When a complete character has been valid and bit 7 is cleared to o. If programmed for 7-bit received, it is transferred to the SRB register. The receive characters, bit 7 of the STB is ignored. buffer ready (RBRDY) bit in the SST register is set and (if The SST register (figure 72) contains the status of the unmasked) an interrupt is generated. The SST also transmit and receive data buffers and the error flags. latches any parity, overrun, or framing errors at this time. Error flags are persistent. Once an error flag is set, it The receiver detects a break condition when a null remains set until a clear error flags command is issued. character with zero parity is received. The BRK bit is set for as long as the subsequent receive data is low and SCU Initialization resets when RxD returns to a high level. After a hardware reset, the SCU is set to the following condition. Transmitter Operation Baud rate factor x64 TxD is kept high while the STB register is empty. When Character length 7 bits the transmitter is enabled and a character is written to the STS register, the data is converted to serial format Stop bit 1 bit and output on the TxD pin. The start bit indicates the Transmit/receive Disabled start oft he transmission and is followed by the character Break detection No stream (LSB to MSB) and an optional parity bit. One or Errors No RTS, DTR pins High level two stop bits are then appended, depending on the programmed mode. When the character has been trans- ferred from the STB, the TBRDY bit in the SST is set and if unmasked, a transmit buffer empty interrupt is gener- ated. Serial data can be transmitted and received by polling the SST register and checking the TBRDY or RBRDY fl~gs. Data can· also be transmitted and received by SCU-:generated interrupts. The SCU generates an inter- rupt in either of these conditions: 70 NEe pPD70236 (V53) Figure 72. Serial Stalus Reglsler (SS T) Figure 73. Serial Comlllllnd Regisler (SCII) I DSR I BKD I FE lOVE I PE I I RBRDVI TBROVI I - I - I RTS I ECL ISBRK I RE I DTR I TE I 7 0 7 0 DSR I)S1Ilnput Pin RTS Controls RTS Output Pin 0 High level 0 High level 1 Low level 1 Low level BKD Break Detection ECL Clears Error Flags 0 Normal reception 0 No operation 1 Break status detected 1 Clears error flags FE Framing Error SBRK Break Transml .. lon 0 No error 0 TxD pin operates normally 1 Error 1 TxD pin outputs low level OVE Overrun Error RE Enables/DI ..bles Reception 0 No error 0 Disables 1 Error 1 Enables PE Parity Error DTR Controls D'i"R Pin 0 No error 0 High level 1 Error 1 Low level RBRD'f Receive Data Buffer TE enables/Disables Transmission 0 SRB empty 0 Disables 1 SRB full 1 Enables TBRD'f Transmit Data Buffer STBfull Figure 74. Seriaillode Reglsler (SliD) 0 1 STB empty I STL I PS I CL I BF I 7 0 The SCM register (figure 73) stores the command word that controls transmission, reception, error flag reset STL Number of Stop Bits and break transmission. xO Illegal 01 1 stop bit The SMD register (figure 74) stores the mode word that 11 2 stop bits determines serial characteristics such as baud rate divi- PS Parity Selection sor, parity, character length, and stop bit length. xO Parity disabled Initialization software should first program the SMD 01 Odd parity register followed by the SCM register. Unlike the 11 Even parity ~PD71051, the SMD register can be modified anytime CL Character Length without resetting the SCU. xO Illegal 10 7 bits 11 8 bits BF Baud Rate Ox Illegal 10 RTCLK frequency/16 11 RTCLK frequency 64 The SIMK register (figure 75) controls the occurrence of RBRDY and TBRDY interrupts. When an interrupt is masked, it is prevented from propagating to the interrupt control unit. 71 pPD70236 (V53) NEe Figure 75. Serial Interrupt lIasle Register (SIIIK) internal baud rate generator is discussed in the System I- I- I- I- I I I TM I RMI I/O section, and timer 1 is described in the TCU section. The SCTL system I/O register controls the selection of 7 0 the baud rate clock. TM TBRDY Interrupt Mask 0 Unmasked INTERRUPT CONTROL UNIT 1 Masked The interrupt control unit (ICU) is a programmable inter- RM RBRDY Interrupt Mask rupt controller equivalent to the p.PD71059. The ICU 0 Unmasked arbitrates up to eight interrupt inputs, generates a CPU 1 Masked interrupt request, and outputs the interrupt vector num- ber on the internal data bus during an interrupt acknowl- Baud Rate Clock edge cycle. Cascading up to seven external slave p.PD71059 interrupt controllers permits the V53 to sup- The baud rate clock may come from either of two port up to 56 interrupt sources. Figure 76 is the block sources: the internal baud rate generator or timer 1. The diagram for the ICU. Figure 76. ICU Block Diagram lORD ~~~ SA2 } To BIU -+- {= ~~ -..0 A2 IOWR (External Signals) In.ternal A1{A2) ReadlWrite Signals Control ( AO{A1) IUS INTLO INTPO INTL1 INTP1 INTL2 INTP2 INTL3 INTP3 External INTL4 Pins INTP4 INTL5 INTP5 INTL6 INTP6 INTL7 INTP7 83YL·6220B To reduce current drain in the standby modes, the V53 ICU Registers does not have internal pullup resistors on the INTPO- Use I/O instructions to the I/O addresses selected by the INTP7 pins. This is different from the p.PD71059 and OPHA and IULA registers to read from a,nd write to the V40N50. ICU registers. Address bit A1 and the command word The ICU has the following features. select an ICU internal register. See table 7. • Eight external interrupt request inputs • Cascadable with p.PD71059 interrupt controllers • Programmable edge- or level-triggered interrupts (TeU, edge-triggered only) • Individually maskable interrupt requests • Programmable interrupt request priority • Polling mode 72 1ttlEC pPD70236 (V53) Table 7. ICU Register Selection Figure 77. InitialiZlltion Sequence A1 (Ao) Other Condition Operation Bits SNGL and 114 are set. Read 0 IMO selects IRQ CPU - IRQ data The default initialization 0 IMO selects liS CPU -liS data is performed. 0 *Polllng phase CPU - Polling data CPU -IMKW Write 0 04 = 1 CPU -IIW1 0 04 =0 and 03 = 0 CPU -IPFW 0 o 04 = and 03 = 1 CPU-IMOW 114= 1 114= 0 During Initialization CPU-IIW2 CPU -IIW3 CPU -IIW4 After initialization CPU-IMKW * In the poliing phase, polling data has priority over the contents of the IRQ or liS register when read. Initializing the leu The ICU is always used to service maskable interrupts in a V53 system. Prior to accepting maskable interrupts, the ICU must first be initialized. See figure 77. Note that RESET does not initialize the ICU. Figure 78. ICU Initialize, IIbnl1 (IIW1) Interrupt Initialization Words 1-4. W:>rds IIW1-IIW4 (figures 78-81) indicate whether external p.P071059s are I- I- I- I I LEV I ISNGL I 114 I connected as slaves, select the base interrupt vector, 07 DO and select edge- or level-triggered inputs for INT1-INT7. LEV Input Trigger Mode Interrupt sources from the TCU are fixed as edge- triggering. INTO is internally connected to TOUTO, and o Rising-edge trigger 1 High-level trigger INT2 may be connected to TOUT1 by the IRSW field in the OPCN. SNGL Mode o Expanded mode (slave controllers) The initialization words are written in consecutive order 1 Single mode (no slave controllers) starting with IIW1. IIW2 sets the interrupt vector. IIW3 114 Write to W4 specifies which interrupts are connected to slaves. IIW3 is only required in extended systems. The ICU will only o IiW4 not required 1 IiW4 required expect to receive IIW3 if SNGL = 0 (bit 01 of IIW1). IIW4 is only written if 114 = 1 (bit Do of IIW1). Figure 79. ICU Initialize, IIbnl2 (l1W2) I~ I~ I~ I~ I~ I- I 07 DO V7-V3 = Higher 5 bits of Interrupt vector number 73 IIPD70236 (V53) NEe Figure 80. ICU Initialize, Word 3 (IIW3) Figure 83. Command Word IPFW o I RP I SIL I FI I 0 I 0 I IL2 IL1 ILO 07 DO 07 DO Slave Connection RP Rotate Priority o INTn is not a slave input o No rotation 1 INTn is a slave input Rotation' SIL Level Figure 81. ICU Initialize, Word 4 (IIW4) o Not specified I 0 I 0 I 0 I EXTN I I I SFI Specified 07 DO FI Finish Interrupt EXTN External Nesting Mode o Non-FI command 1 FI command o Normal I L2-1 LO Interrupt Level Expanded 000 INTO SFI Self-Finish Interrupt 001 INT1 o FI command mode 010 INT2 1 Self-finish mode 011 INT3 100 INT4 Command Words. The interrupt mask word (MKW) 101 INT5 contains programmable mask bits for each of the eight 110 INT6 interrupt inputs. The interrupt priority and finish word 111 INT7 (IPFW) is used by the interrupt handler to terminate processing of an interrupt or change interrupt priorities. Figure 84. Command Word IMOW The interrupt mode word (IMDW) selects the polling register, interrupt request (IRQ) or interrupt in-service I - I SNM IEXCN I 0 I I POL SR IS/IR 07 DO (liS) register, and the nesting mode. See figures 82-84. SNM EXCN Nesting Mode 2 Figure 82. Command Word IMKW 0 No operation M1 Mo 0 Release exceptional nesting mode Set exceptional nesting mode. D7 DO POL Polling Mode 0 No operation Mn Interrupt Request Mask Polling command o INTn not masked SR IStlR Register to Be Read 1 INTn masked 0 No operation 0 Interrupt request register (IRQ) 1 Interrupt in-service register (liS) I'PD71059 Cascade Connection To increase the number of maskable interrupts, up to seven slave JlPD71059 interrupt controllers can be cascaded. During cascade operation, each slave JlPD71059 INT output is routed to one of the V53 INTP inputs. During the second interrupt acknowledge bus cycle, the leu places the slave address on the address lines Ao-A2' Each slave compares this address with the slave address programmed using interrupt initialization word 3 (IIW3). If the same, the slave will place the interrupt vector on pins 00-07 during the second inter- rupt acknowledge bus cycle. 74 1ttfEC "PD70236 (V53) DMA CONTROL UNIT • "PD71037 or "PD71071 compatibility modes The DMA control unit (DMAU) is a high-speed DMA • Cascade mode for slave DMA controllers controller compatible with the "PD71071 and "PD71037 • 24-bit address registers DMA controllers. The DMAU has four independent DMA • 16-bit transfer count registers channels and performs high-speed data transfers be- • Single, demand, and block transfer modes tween memory and external peripheral devices at • Autoinitialization speeds as high as 4M words/second in a 16-MHz system. • Address increment/decrement Figure 85 is the block diagram for the DMAU. • Fixed/rotating channel priorities The DMAU has the following features. • TC output at transfer end • Four independent DMA channels • Forced termination of service by END input Figure 85. DMAU Block DlllIIram Address DMAU Address Bus Incrementerl Internal Address Bus Decrementer (24) Internal Bus Control Registers Interface Internal Control Bus Address Register Channel (4) Base Address (24 x 4) BUSRQ Device Control (10) BAU { BUSAK Status (8) Mode Control (7 x 4) Base Count(16 x 4) Mask (4) Count Register Current Count (16 x 4) DMARQ3-DMARQO Priority External DMAAK3-DMAAKO Control PinS { Terminal Count ENDtTc 83YL·6221B "PD71071·and "PD71037 Mode Comparison In applications where DMA software compatibility is not an issue, programming flexibility is greater in the The DMAU has two operating modes selected by the "PD71071 mode. However, the software DMA request SCTL system control register. Respectively, the capability of the "PD71037 mode is often useful. "PD71071 and "PD71037 modes offer hardware and software compatibility. with existing systems based on The following compares the major functional differences the "PD71071 DMA controller (also the V40N50 micro- between the two modes. processor) and the "PD8237 DMA controller. 75 "PD70236 (V53) NEe Function "PD71037 "PD71071 Mode the DMARQ input of that channel is masked. Otherwise, Mode the current count and address registers are reloaded DMA channel Mode control Referenced by from the base registers, and new DMA transfers are again selection register by channel register enabled. write data (DCH) (operand); DMA Transfer Type other registers have a unique The type of transfer the DMAU performs depends on the address following conditions. Base and Consecutive 16-bit quantities • Transfer direction (each channel) current register 8-bit quantities • Bus mode access • Transfer mode (each channel) Base registers Write only Read and write DMA Bus release Bus release and Transfer Direction termination mode bus hold modes All DMA transfers use memory as a reference point. Software DMA Yes No Therefore, a DMA read operation (figure 86) transfers requests data from memory to 1/0 port and writes the data into DMA transfers Byte Byte or word memory. During memory-to-I/O transfer, the DMA mode The DMAU is intended for high-speed data transfers register (DMD) is used to select the transfer directions between memory and peripherals with minimum latency. for each channel and activate the appropriate control Neither mode provides memory-to-memory DMA trans- signals. fers because the powerful string moves of the CPU can accomplish block memory transfers as fast as dedicated Operation Transfer Signals Activated DMA hardware could. The DMAU does not provide com- DMA read Memory to 1/0 10WR, MRD pressed timing as do the "PD71071 and "PD71037. DMAwrite 1/0 to memory lORD, MWR DMA verify No transfer Addresses only Master/Slave Mode Bus Mode The DMAU operates in either master or slave mode. In slave mode, the DMAU samples the four DMARQ input The two available modes for determining how the DMAU pins every clock. If one or more inputs are active, the releases the CPU bus are bus release and bus hold. In corresponding DMA request bits are set and the DMAU "PD71037 mode, the DMAU always functions in bus sends a bus request to the BAU while continuing to release mode. In "PD71071 mode, the DMAU is program- sample the DMA request inputs. mable for bus release or bus hold mode via the DMA device control (DOC) register: After the BAU returns the DMA bus acknowledge signal, the DMAU stops DMA request sampling, selects the DMA In bus release mode, bus control is always relinquished channel with the highest priority, and enters the bus each time the service has completed. Therefore, if mul- master mode to perform the DMA transfer: While in the tiple DMA requests are generl;itedsimultaneously, a bus bus master mode, the DMAU controls the external bus cycle other than that for the DMAU is inserted between and performs DMA transfers based on the prepro- consecutive DMA services (see figure 87). Consequently, grammed channel information. in certain applications DMA response may be delayed. See figure 45 and the associated text for a detailed However, bus release mode gives better assurance that description of DMA bus cycles. the CPU will continue to execute programs in DMA intensive environments. Terminal Count In bus hold mode, if another DMA request is generated The DMAU ends DMA service when the terminal count before the end of one service, that request can be condition is generated or when the END input is as- serviced without the DMAU relinquishing the bus. How- serted. A terminal count (TC) is produced when the ever, the same channel cannot be serviced consecu- contents of the current count register underflows from tively. This mode provides better DMA response but may zero. If autoinitialization is not enabled when DMA ser- prevent CPU bus activity for extended periods of time. vice terminates, the mask bit of the channel is set and 76 NEe pPD70236 (V53) Figure 86. TypiCIII Memory-to-l/O DMA Cycle The operation of single, demand, and block transfers depends on whether the DMAU is in bus release or bus I S1 I S2 I S3 I S4 I hold mode. Figure 88 shows the operations flow for the six possible transfer and bus mode operations in DMA transfer. Figure 87. Bus Modes - ~ - Bus Release Mode Right to Use MRD Bus CPU - - , n n n r- Service DMAU LJ L...I LJ LJ I Channel CHO CH1 CH2 CH3 \ '-- -- ~ - Bus Hold Mode 1/ RIW - ~ Right to Use Bus CPU ----, I 1/ DMAU ''''~'n - ~ Service CHO, CH1 , CH2 ,CH3 EI Channel 83SL-6687A ~------------------------------------~ READY H rJ DMAAK II ENDfTC \0.- - 1/ BUFEN "H" * Dotted line shows effect of selecting "Early Write" timing in DDC register or command register. 83YL·6515A Transfer Modes The DMAU has three transfer modes as listed below. In 14PD71071 mode, bits 6 and 7 (TMODE) of the mode control register (DMD) select the transfer mode. In 14PD71037 mode, bits 6 and 7 of the channel mode register specify the mode. Transfer mode operation is the same in both 14PD71071 and 14PD71037 modes. Transfer Mode Termination Conditions Single After each byte/word transfer END input Terminal count Demand END input Terminal count Service channel DMARQ dropped Generation of a higher priority DMARQ (bus hold mode) Block END input Terminal count 77 pPD70236 .(V53) NEe Figure 88. Transfer Modes Single Transfer Mode Bus Release Mode Bus Hold Mode No No Demand Transfer Mode Bus Release Mode Bus Hold Mode Block Transfer Mode Bus Release Mode Bus Hold Mode ( Idle State 78 NEe pPD70236 (V53) Sing Ie Transfer Mode. In bus release mode, when a When a mode register enables autoinitialize for a chan- channel completes transfer of a single byte or word, the nel, the DMAU automatically reinitializes the address DMAU enters the slave mode regardless of the state of and count registers when END is asserted or the termi- DMA request inputs. In this manner, other lower priority nal count condition is reached. The contents of the base bus masters can access the bus. address and base count registers are transferred to the In bus hold mode (p.PD71071 mode only), when a chan- current address and current count registers, and the nel completes transfer of a single byte or word, the applicable bit of the mask register remains cleared. DMAU terminates the channel's service even if the Channel Priority DMARQ request signal is asserted. The DMAU will then service any other requesting channel. If there are no Each of the four DMAU channels is assigned a priority. requests from any other DMA channels, the DMAU re- When multiple DMA requests from several channels leases the bus and enters the idle state. occur simultaneously, the channel with the highest pri- Demand Transfer Mode. In bus release mode, the ority will be serviced first. currently active channel continues to transfer data as The device control register selects one of two priority long as the DMA request of that channel is active, even schemes: fixed or rotating (figure 89). In fixed priority, though other DMA channels are issuing higher priority channel 0 is assigned the highest priority, and channel 3, .:!II requests. When the DMA request of the serviced channel becomes inactive, the DMAU releases the bus and the lowest. In. rotating priority, priority order is rotated E.II after each service so that the channel last serviced enters the idle state. receives the lowest priority. This method prevents the In bus hold mode (not available in p.PD71037 mode), exclusive servicing of higher priority channels and the when the active channel completes a single transfer, the lockout of lower priority DMA channels. DMAU cheeks the other DMA request lines without The rotating priority feature is selected by programming ending the current service. If there is a higher priority the DMA device control (DDC) register in p.PD71071 DMA request, the DMAU stops the service of the current . mode or by a write to the command register in p.PD71037 channel and starts servicing the highest priority channel mode. requesting service. If there is no higher request than the current one, the DMAU continues to service the currently Figure 89. Priority Order active channel. Lower priority DMA requests are honored without releasing the bus after the current channel Fixed Priority service is complete. Highest Block Transfer Mode. In bus release mode, the current channel continues DMA transfers until a terminal count or the external END input becomes active. During this time, the DMAU ignores all other DMA requests. After completion of the block transfer, the DMAU releases the bus and enters the idle state, even if DMA requests from Lowest other channels are active. In bus hold mode (p.PD71071 mode only), the current Rotation Priority channel transfers data until an internal or external END Highest Highest signal becomes active. When the service is complete, the DMAU checks all DMA requests without releasing the bus. If there is an active request, the DMAU immedi- ately begins servicing the request. The DMAU releases the bus after it honors all DMA requests or a higher priority bus master requests the bus. Autoinitiali ze This function is enabled by programming the mode 83SL·6688A register (p.PD71071 and p.PD71037 modes). 79 pPD70236 (V53) NEe Cascade Connection Figure 91. Bus Waiting Operation Slave DMA controllers can be cascaded to easily expand the system DMA chanrlel capacity to 16 DMA channels. Other Bus Master I DMAU I RCU I DMAU I Other Bus Master Figure 90 shows an example of cascade connection. During cascade operation, the DMAU acts as a mediator DMARQ _ _..oJ between the BAU and the slave DMA controller. During DMA cascade mode operation, it is the responsibility of DMABUSAK _ _..oJ external logic to isolate the cascade bus master from the V53 control outputs. These outputs are listed near the ~ ~ Approx 2 clocks beginning of this document. DMA BUSRQ _ _..oJ The DMAU always operates in the bus release mode ~ ~ Bus waiting state while a cascade channel is in service, even when the bus 83YL-6684A hold mode is programmed. Other DMA requests are held pending while a slave DMA controller channel is in Address and Count Registers service. When the cascaded device ends service and moves into the idle state, the DMAU also moves to the Each DMA channel has a 24-bit base address register idle state and releases the bus. The DMAU continues to and a 24-bit current address register. In addition, each operate normally with the other noncascaded channels. channel also has its own 16-bit current count register and base count register: The base registers hold a value Figure 90. pPD71071 Cascade EXllmple determined by the CPU and transfer this value to the current registers during autoinitialization. These regis- ters are available in both p.PD71071 mode and p.PD71037 ~DMA1 mode, but the method of accessing these registers V53 DMAU ~DMA2 changes with compatibility mode. (Master) The BN KR registers extend the p.PD71037 mode ad- ~DMA3 dresses from 16 to 24 bits. In p.PD71071 mode, the count register and lower word of the address registers can be Cascade {DMAAK HLDAK DMA4 accessed in 16-bit quantities. In p.PD71037 mode, these Channels DMARQ 1.....1 - - - _ . 1 HLDRQ registers must be accessed in 8-bit quantities. . DMAS ~PD71071 (Slave) Programming the DMAU DMA6 To prepare a channel for DMA transfer, the following DMA7 characteristics must be programmed. • Starting address for the transfer 83SL-6686A • Transfer count • DMA operating mode Bus Waiting Operation • Transfer size (byte/word in p.PD71071 mode) The DMAU automatically performs a bus waiting opera- The contents of the OPHA and DULA registers determine tion (figure 91) whenever the RE FU refresh request the base I/O port address of DMAU. Addresses A3-Ao are queue fills. When the DMA bus acknowledge goes inac- used to select a particular register. There are two register tive, the DMAU enters the bus waiting mode and inacti- sets, one for p.PD71071 mode and the other for p.PD71037 vates the DMA bus request signal. Control of the bus is mode. then transferred to the higher priority RE FU by the BAU. I'PD71071 Mode Two clocks later, the DMAU reasserts its internal DMA bus request. The bus waiting mode is continued until the The p.PD71071 mode is selected by programming the DMA bus acknowledge signal again becomes active and DMAU bit of the SCTLregister to zero. The register set the interrupted DMA service is immediately restarted. for this mode (table 7) is mapped into ~-Ao regardless of the IOAG value in the SCTL register. 80 NEe pPD70236 (V53) Table 7. Regl.teT Selection (pPD71071I1ode) FlguTe 92. DIIA Initialize Command Regl.teT A3-Ao Addres. Register Operation Note. (DICM); pPD71071 Mode 0000 OH DICM Write I I I- I~ I- I R~ 0001 1H Read/Write 1 7 Address OH 0 DCH Byte OUT Instruction 0010 2H DBC/DCC Oow) Read/Wrlte 2 RES Reset 0011 3H DBC/DCC (hIgh) Read/Wrlte 2 0100 4H DBNQCA Oow) Read/Write 2 o No operation 1 Reset DMAU 0101 5H DBNQCA (hIgh) Read/Write 2 0110 6H DBNQCA (upper) Read/Write 1,2 Channel Register. Writes to the DMA channel register 0111 7H Reserved (DCH) select one of the four DMA channels for program- ming and also the base/current registers. Reads of the 1000 8H DOC Oow) Read/Write DCH register return the currently selected channel and 1001 9H DOC (hIgh) Read/Write the register access mode. See figure 93. 1010 AH DMD Read/Write 1,2 1011 1100 BH CH DST Reserved Read FlguTe 93. DIIA Channel Regl.teT (DCH); -~--- pPD71071110de Channel Register Read ED 1101 DH Reserved 1110 EH Reserved I BASE I SEL3 I SEL2 I SEL 1 I SELO I 7 Address 1H 0 1111 FH DMK Read/Write Byte IN Instruction Notes: BASE Access Conditions (1) Register can be accessed only with byte In/Out instructions. All o Read: current only others can be accessed with 16-bit In/Out Instructions. Write: base and current (2) There are four such registers, one for each DMA channel. The Read/Wrlte: base only particular register accessed Is determined by the DCH register. SEL3-SELO Selected Channel 0001 o DMAU Registers In "PD71071 Mode 0010 1 0100 2 Initialize. The DMA initialize command register (DICM) 1000 3 performs a software reset of the DMAU. The DICM is accessed using the byte OUT instruction. See figure 92. Channel Register Write The DMAU initializes the registers as follows. - I- I- I BASE I SELCH Register Name Operation 7 Address 1H 0 Byte OUT Instruction DICM Initialize Clear DCH Channel Select channel 0 BASE Access Conditions DBC, DCC Count No change o Read: current only DBA, DCA Address No change Write: base and current DDC Device control Clear Read/write: base only DMD Mode control Clear SELCH Selected Channel DST Status Clear 00 Channel 0 DMK Mask Set (mask all channels) 01 Channel 1 10 Channel 2 11 Channel 3 Count Registers. When bit 2 of the DCH register is cleared, a write to the DMA count register (figure 94) updates both the DMA base count (DBC) and the DMA current count (DCC) registers with a new count. If bit 2 of the DCH register is set, a write to the DMA count register affects only the DBC·register. 81 pPD70236 (V53) NEe The DBC register holds the initial count value until a new controls the bus mode, write timing, priority logic, and count is specified. If autoinitialization is enabled, this enable/disable of the DMAU See figure 97. value is transferred to the DCC register when a terminal count or END condition occurs. For each DMA transfer, Figure IJ6. DMA Device Control Regl.ter (DDC); the current count register is decremented by 1. The pPD71071 lIode count value loaded into the DBC/DCC register is 1 less than the desired transfer count. I EXW I ROT I ~ IDDMA I I - I 7 Address 8H o IN/OUT Instruction Figure S4. DMA Count Regl.ter. (DBC, DCC); pPD71071 lIode EXW Writing (Note 1) 0 Normal eol 1 Extended 7 Address 2H o ROT Priority IN/OUT Instruction 0 Fixed Ca I 1 Rotational 7 Address 3H o DDMA DMA Operation (Note 2) IN/OUT Instruction 0 Enable 1 Disable Address Register. Use either byte or word I/O instruc- tions with the lower 2 bytes (4H and 5H) of the DMA address register (figure 95). However, byte I/O instruc- I7 I- I I WEV I BHLD I Address 9H 0 tions must be used to access the high-order byte (6H) of IN/OUT Instruction this register. When bit 2 of the channel register is cleared, a write to the DMA address register updates both the WEV Walt During Verify (Note 3) DMA base address (DBA) and the DMA current address 0 Disable (DCA) registers with the new address. If bit 2 of the DCH 1 Enable register is set, a write to the DMA address register affects BHLD Bus Mode only the DBA register. 0 Bus release The DBA register holds the starting address value until a 1 Bus hold new address is specified. This value is transferred to the Notes: DCA register automatically if autoinitialization is se- (1) Disables BUSRQ to the BAU to prevent Incorrect DMA operation lected. For each DMA transfer, the current address whUe the DMAU registers are being Initialized or modified. register is updated by 2 during word transfers and by 1 (2) When EXW = 0, the write signal becomes active (normal write) during byte transfers. during S3 and Sw. When EXW = 1, the write signal becomes active during S2, S3, and SW (like the read slgnaQ. Figure 95. DMA Address Regl.'er. (DBA, DCA); (3) Walt states are generated by the READY signal during a verify pPD71071 Mode transfer. 7 Address 4H o IN/OUT Instruction I7 A15 A14 A13 I A12 I A11 I A10 A9 I As 0I Address 5H IN/OUT Instruction I A23 A22 A21 I A20 I A19 I A18 A17 A16 I 7 Address 6H 0 IN/OUT Instruction Device Control Register. The DMA device control reg- ister· (DDG) (figure ~) is used to program the DMA transfer characteristics common .to all DMA channels. It 82 NEe IIPD70236 (V53) Figure 97. EBrly Write Cycle Timing Ouring word transfers, two bytes starting at an even address are handled as a single word. If the starting I S1 I S2 I S3 I S4 I S1 I S2 I S3 I SW I S4 I address is odd, a OMA transfer is started after first decrementing the address by 1. For this reason, always Read select even addresses. The Ao and UBE outputs control byte and word OMA transfers. The following shows the relationship between the data bus width, Ao, and UBE Normal Write signals, and data bus status. . Ao UBE Oata Bus Status Early Write 0- -,-- DO-07 valid 1 0 0 8-015 valid o READY ------------~ n ~---- 83YL·6685A 0 00-015 valid Status Register. The OMA status register (OST) con- tains information about the current state of each OMA Mode Control Register. The DMA mode control register (OMO) selects the operating mode for each OMA chan- nel. The OCH register selects which OMO register will be channel. Software can determine if a termination condi- tion has been reached (TCO-TC3) or if a OMA service request is present (ROb-R03). The byte IN instruction ED must be used to read this register. See figure 99. accessed. A byte IN/OUT instruction must be used to access this register. See figure 98. Figure 99. OIlA Status Register (OS 1}; pPD71071 Mode Figure9B. OIlA Mode Control Register (OliO); pP071071 Mode 1 RCS 1 RQ2 I RC1 1 ROO I TCS I TC2 1 TC1 TCO 7 Address OBH 0 1 TMODE 1 ADIR I· AUTI 1 TDIR wiS 1 Byte IN Instruction 7 Address OAH o RQn DMA Request, Channel n TMODE Transfer Mode o No DMA request active 00 Demand 1 DMA request active 01 Single TCn Terminal Count, Channel n 10 Block 11 Cascade o Not ended (for each read) ADIR Address Direction 1 'E"ND or terminal count o Increment Mask Register. The OMA mask register (OMK) allows 1 Decrement software to individually enable and disable OMA chan- AUTI Autoinitialize nels. The OMK register can only be accessed via byte 1/0 o Disable instructions. See figure 100. 1 Enable TDIR Transfer Direction Figure 100. DIM lIask Register (OIlK); pPD71071 Mode 00 Verify 01 I/O-to-memory 1 1 - 1 - 1 M3 I M2 M1 MO 10 Memory-to-I/O 7 Address OFH a 11 Not allowed Byte IN/OUT Instruction W/B Word/Byte Transfer Mn DMARQ Mask, Channel n o Byte 1 Word o Not masked 1 Masked Addresses and count registers are updated as follows during byte/word transfers. Register Byte Transfer 'M>rd Transfer Address register ±1 ±2 Count register -1 -1 83 pPD70236 (V53) NEe "PD71037 Mode The commands and their corresponding, addresses (~­ Ao) are shown here. The p.PD71037 mode is selected by programming the DMAM bit of the SCTl register to 1. See figure 48. Note Command 10AG=O IOAG=1 that on RESET, the DMAU is put into p.PD71071 mode. Clear byte select flag x1100 1100x The register set for the p.PD11037 mode (table 8) is Initialize x1101 1101x mapped into A3-Ao(lOAG = 0) or ~-A1 (IOAG = 1). For Clear mask register x1110 1110x the case where 10AG = 1, the DUlA system I/O register determines whether the DMAU responds to Ao = 0 or 1. DMAU Registers In "PD71037 Mode TableS. Register Set for pPD71037 Mode Most of the DMAU registers ill this mode are the same as Channel Register Read/Wrlte Address those in the p.PD71071 mode, but with a different I/O 0 DCA R 0000 address or method of access. DCA, DCB W Count and Address Registers. The DCA, DBA, DCC, DCC R 0001 and DBC registers are 16 bits wide, but can only be' DCC, DBC W accessed in byte-wide chunks. The byte select flag (BSF) DCA R 0010 determines which byte is accessed. When the BSF is low, DCA, DCB W the low byte is used; when the BSF is higti, the high byte DCC R 0011 is used. The BSF cannot be read; to set it to a known DCC, DBC W state, a byte select flag clear command must be issued 2 DCA R 0100 by performing an 8-bit I/O write to address x1100b. To DCA, DCB W read or write one of these registers, first clear the BSF, DCC R 0101 and then perform two consecutive 8-bit I/O operations. DCC, DBC W The low byte will be accessed first and the high byte 3 DCA R 0110 second. DCA, DCB W Bank Registers. The DMA memory addresses in the DCC R 0111 p.PD71037 mode are 16 bits, compared with 24-bit ad- DCC, DBC W dresses in the p.PD71071 mode. To expand the 16-bit DST R 1000 addresses into the full 24-bit address space of the V53, a DDC W set of bank registers is provided, BN KRO-BN KR3, one per DSRQ W 1001 DMA channel. DSCM W 1010 Each 8-bit register contains the upper address bits, DMD W 1011 A23-A16, to be used when a DMA channel is active. DMA DMK W 1111 addresses are modified after each transfer to point to the next address in the DMA buffer. The SCTl system I/O The registers in table 8 can be accessed only by byte I/O register, CE1-CEO bits, control whether a carry is prop- operations. The 10AG bit of the SCTl register determines agated into the upper address bits when the DMA ad- whether these registers reside in contiguous bytes, or dress is incremented or decremented. CEO controls the whether they each occupy one-half word (i.e., whether carry propagation to A16 and CE1 controls the carry to the registers are byte or word aligned). If word aligned A20· (IOAG =1), the low bit of the DUlA register determines The BNKR registers are read 'or written using byte I/O whether the DMAU will use the upper or lower byte ofthe operations. See figure 101. As with other V53 internal word. In p.PD71071 mode, the setting of the 10AG bit registers, the I/O address to which the BNKR registers makes no difference; the register addresses do not respond is programmable. The BADR system I/O register change. (address FFE1H) sets the base address of the BNKR registers in the 256-byte block of I/O space selected by "PD71037 Commands the OPHA register. See figure 102. In addition to the registers explained above, three I/O Also, to allow maximum flexibility, the low two address addresses cause commands to be executed when they bits of each BN KR register are programmable. The BSEl are written to. The val ue of the data written is not system I/O register (address FFEOH) sets the low two important; it is the action of performing an I/O write to address bits for each BN KR register. See figure 103. As one of these addresses that initiates the desired action. with other programmable addresses, the 10AG bit of the 84 NEe pPD70236 (V53) SCTL register has the effect of shifting the settable Device Control Register. In p.PD71037 mode, there are address one bit position to the left. fewer device options. The wait during verify and bus hold control bits are not offered. The DMA device control The bank registers are only enabled in p.PD71037 mode. register (DOC) has only one byte to control early write In p.PD71071 mode, they cannot be read or written. cycles, channel priority, and global DMA enable. See figure 104. Figure 101. DMA Sank Registers (BNKR); pPD71037 Mode Figure 104. DMA Device Control Reglsler (ODC); I A23 A22 I A21 I A20BNKRO I A19 A18 A17 A16 I pPD71037 Mode a 7 IN/OUT I - I - I EXW I ROT I - IOOMA I I- I 7 Byte OUT Instruction a I A23 A22 A21 A20 I A19 A18 A17 A16 I EXW Write Timing (Note 1) 7 BNKR1 a IN/OUT a Normal 1 Early I A23 I I III A22 A21 A20 A19 A18 A17 A16 ROT Channel Priority 7 BNKR2 a a Fixed IN/OUT 1 Rotational - - - - - I A23 ~ A21 A20 I A19 A18 A17 A16 I oOMA a DMA Operation 7 BNKR3 a Enable IN/OUT 1 Disable Notes: Figure 102. Sank Address Register (SADR); (1) When EXW = a, the write signal becomes active during S3 and pPD71037 Mode = Sw. When EXW 1, the write strobe is asserted earlier during S2, S3. and SW (same as read strobe). I A7 As I As I ~ I A3 I A2 *A1 *~ 7 Address FFE1H a Channel Mode Registers. Each channel has a mode IOAG = a register allocated to it. All four registers are accessed using the same I/O address. The low two bits of the data written to the DMD register select the channel. Note that 7 Address FFE1H o byte transfers are supported but 16-bit transfers are not. IOAG = 1 Figure 105 shows the format of the channel mode regis- *Address bits are set by the BSEL register. ter. Figure 103. Sank Select Register (BSEL); pPD71037 Mode I ~~ I ~~ I ~~ ~~ 7 Address FFEOH 0 BN Kn *Address Bits InBADR Register 00 00 01 01 10 10 11 11 * Address bits are A1, ~ if 100G = a or A2, A1 if IOAG = 1. (iOAG is a bit in the SCTL register.) 85 "PD70236 (V53) NEe Figure 105. OMA Channel Mode Registers (0110); Figure 107. OMA Masle Register (OMK); pP071D37Mode pP071D37 Mode TMODE I ADIR I AUTI I TDIR SELCH I I I- I- I M3 I M2 M1 MO I 7 Byte OUT Instruction 0 7 Address OFH o Byte OUT Instruction TMODE Transfer Mode Mn DMARQ Mask, Channel n 00 Demand 01 Single o Not masked 10 Block 1 Masked 11 Cascade ADIR Addres. Direction Figure 108. OMA Single-Channel Masle Control o Increment Register (OSCM); pP071D3711ode 1 Decrement I I- I- I- I- I SMO I SELCH I AUTI Autoinitialize 7 Byte OUT Instruction 0 o Disable 1 Enable SMQ Mask Setting TDIR Transfer Direction o Clear mask bit 1 Set mask bit 00 Verify 01 I/O-to-memory SELCH DMARQ Mask Channel Selection 10 Memory-to-1/0 00 Channel 0 11 Not allowed Channel 1 01 SELCH Channel Selection for Mode Change 10 Channel 2 11 Channel 3 00 Channel 0 01 Channel 1 10 Channel 2 Software DMA Request Register. The DSRQ register is 11 Channel 3 used by software to trigger a DMA operation. One application is to simulate the assertion of a hardware Status Register. This DST register (figure 74) is identi- DMA request for diagnostic purposes. This register is cal to the #,PD71071 mode DST register, but is at 1/0 written with the number of the targeted channel and a bit address x1000b. that sets or clears an internal request flag associated with that channel. Figure 109 shows the format of this Figure 106. OMA Status Registers (DS7); register. pP071D3711ode I R03 I RQ2 I R01 I ROO I TC3 I TC2 I TC1 TCO Figure 109. Software 01fA Request Register (OSRQ); pP071D37Mode 7 Address x1000b o Byte IN Instruction I- I I - I - I -. I - I SRO I SELCH I 7 Byte OUT Instruction 0 RQn DMA Request, Channel n o No DMA request active SRQ Request 1 DMA request active o Clear request bit TCn Terminal Count, Channel n 1 Set request bit o Not ended (for each read) SELCH Software DMARQ Channel Selection 1 END or terminal count 00 Channel 0 01 Channel 1 Mask Register and Single-Channel Mask Control 10 Channel 2 Register. The format and 1/0 address of this DMK 11 Channel 3 register (figure 107) is the same as in #,PD71071 mode except that it cannot be read; it is a write-only register. Initialization. In #,PD71037 mode, there is no DICM The DMK register can be put into a known state by initialize register. Instead, the DMAU is initialized by writing to it directly, by using the clear mask register performing an 1/0 write to address x1100b. command, or by using the single-channel mask control register (DSCM) at 1/0 address x1010b to set or clear the enable bit for an individual channel (figure 108). 86 NEe I'PD70236 (V53) POWER CONSERVATION entered by setting the STOP bit in the SBCR to 0 and executing a HALT instruction. (See table 1 for output The V53 has three power conservation features. pin states.) • Scalable system clock The V53 will come out of HALT standby mode in • Low-power HALT standby mode response to RESET, NMI, or an interrupt from the • Very-low-power STOP mode internal interrupt control unit. If interrupts were en- abled (IE= 1) before HALT mode was entered, an ICU These features give three levels of power reduction, interrupt wakeup will result in the interrupt handler making the V53 ideal for use in portable or other being entered; if interrupts were not enabled (IE= 0), low-power applications. The standby control register then execution will resume at the instruction following (SBCR) at address OF F F1H in the system I/O area the HALT that put the CPU in the standby mode. If NMI controls all three functions. See figure 110. wakes up the CPU, the NMI handler is always entered. Scalable System Clock The bus hold (HLDRQ/HLDAK) function still operates during standby mode. External bus masters can take The V53 is a CMOS device and power consumption is the bus from V53. Also, refresh and DMA cycles can still directly proportional to clock frequency. By reducing the frequency, power use can be significantly de- creased. The system clock is used by the CPU and occur. The SCU and TCU can both be active, and can supply the wakeup interrupt if desired. III internal peripherals. The CLKC field in the SBCR se- STOP Mode lects a scale factor that divides the oscillation fre- quency by 2, 4, 8, or 16 to produce the system clock. This mode provides the maximum power reduction. The This value can be changed dynamically to adjust the clock generator is disabled; the oscillator circuit is clock rate to the most efficient performance level for turned off. Power usage is minimal. STOP mode is the task at hand. entered by setting the STOP bit in the SBCR to 1 and exec uti ng a HALT instruction. Since the system clock is Caution: The system clock must not be set to less than the not active, none of the on-Chip peripherals can be used. minimum frequency specified in the AC Characteris- tics table. If the timer units TCLK input is used and driven by an external oscillator, the timer will continue to function Figure 110. Standby Control Register (SBCR) and consume power. I I I I CLKC I WT I STOP I The output pins in STOP mode are in the same state as 7 Address F F F1 H 0 in HALT mode. Refer to table 1. The V53 will wake up from STOP mode in response to a RESET, NMI, or CLKC System Clock Frequency felK INTPn. The CPU may be in EI or 01 state. The INTP line should be held active through oscillator stabilization 00 fClK = Osc freq -+- 2 01 fClK = Osc freq -+- 4 time until it is acknowledged. 10 fClK = Osc freq -+- 8 11 fClK = Osc freq -+- 16 Oscillator Stabilization Time WT * Oscillation Stabilization Time When the V53 is reset or when it wakes up from STOP 00 2 19 -+- fClK mode, the oscillator circuit is started up. This circuit 01 2 18 -+- fClK can take a relatively long time to come up to speed and 10 217 -+- felK to stabilize. The oscillator stabilization time field (WT) 11 2 16 -+- fClK in the SBCR does not affect the physical startup time; it STOP When HALT Instruction Is Executed determines how long the V53 will wait for the clock 0 Sets HALT mode generator oscillator circuit to stabilize. The user should Sets STOP mode determine the worst case stabilization time and select * For example, if WT = 11 and fClK = 16 MHz, time = 4.096 ms a longer value of WT. HALT Standby Mode RESET FUNCTION Power can be further reduced by putting the CPU in The V53 is reset when a falling edge is input to the HALT standby mode. In this mode, the CPU is not RESET pin and is subsequently held low for six clocks operating, but all the internal peripherals are still or longer than the oscillator stabilization time and then enabled and may be drawing power. HALT mode is made high. 87 pPD70236 (V53) NEe CPU Operations Figure 112. Register Reset Status (conI) Initial Value, Bits 7-0 When the V53 is reset, the CPU is initialized as shown in figure 111 and starts prefetching instructions from ad- Register 7 6 5 4 3 2 o dress FFFFOH. Serlsl Control Unit SMD 0 o o o Figure 111. CPU Reset Status SCM o o o o o o Prefetch Pointer PFP OOOOH SIMK Program Counter , PC OOOOH SST o o o 0, o o Program Segment Register PS FFFFH DMA Control Unit Stack Segm$nt Register SS OOOOH Data Segment 0 Register DSO OOOOH DCH o o o o Data Segment 1 Register DS1 OOOOH DMD 0 o o o o o o Queue Cleared DDC o o o (8H) Program Status Word PSW DDC o o I B~K0 I V OIR IE (9H) I 0 0 0 DST o o o o o o o o 15 DMK I S 0 z 0 0 AC 0 0 P 0 I ~Y I INSTRUCTION SET HIGHLIGHTS 7 0 Enhanced Instructions Internal Register Operations In addition to the "P08088/86 instructions, the Some internal registers are also initialized by the RESET "P070236 has enhanced instructions listed in table 8. input signal. See figure 112. The rest of the registers retain the status they had immediately before the RESET Table B. Enhanced Instruction signal was applied, but their contents are undefined at Instruction Function power up. PUSH Imm Pushes Immediate data onto stack Figure 112. Register Reset Status PUSHR Pushes 8 general registers onto stack Initial Value, Bits 7-0 PO P R Pops 8 general registers onto stack Register 7 6 5 4 3 2 0 MULlmm Executes 16-bit multiply of register or memory contents by Immediate data System 110 Ares SHLimm8 Shifts/rotates register or memory by immediate SCTL 0 0 0 0 0 SHR imm8 value OPSEL 0 0 0 0 SHRA ImmS ROLlmmS WCYO 1 ROR ImmS WCY1 ROLClmm8 RORC ImmS WCY2 CHKlND Checks array index against designated WCY3 boundaries WCY4 INM Moves a string from an I/O port to memory WMBO OUTM Moves a string from memory to an I/O port WMB1 1 1 PREPARE Allocates an area for a stack frame and copies WAC 0 0 0 0 previous frame pointers TCKS 0 0 0 0 0 DISPOSE Frees the current stack frame on a procedure exit RFC 0 0 0 0 0 SBCR 0 0 0 0 0 88 NEe IIPD70236 (V53) Enhanced Stack Operation Instructions Stack Frame Instruction PUSH Imm. This instruction allows immediate data to PREPARE Imm16,lmmS. This instruction is used to be pushed onto the stack. generate the stack frames required by block-structured languages, such as PASCAL and Ada. The stack frame PUSH R; POP R. These instructions allow the contents consists of two areas. One area has a pointer that points of the eight general registers to be pushed onto or to another frame which has variables that the current popped from the stack with a single instruction. frame can access. The other is a local variable area for the current procedure. Enhanced Multiplication Instructions DISPOSE. This instruction releases that last stack frame MUL reg16, Imm16; MUL mem16, Imm16. These in- generated by the PREPARE instruction. It returns the structions allow the contents of a register or memory stack and base pointers to the values they had before location to be multiplied by immediate data. the PREPARE instruction was used to call a procedure. Enhanced Shift and Rotate Instructions Unique Instructions SHL reg, ImmS; SHRreg, ImmS; SHRA reg, ImmS. In addition to the p.PD8088/86 instructions and the en- These instructions allow the contents of a register to be shifted by the number of bits defined by the immediate hanced instructions, the p.PD70236 has the unique in- .:!t structions listed in table 9. ~ data. ROL reg, immSj ROR reg immSj ROLC reg, ImmS; Table 9. Unique Instructions RORC reg, ImmS. These instructions allow the contents Instruction Function of a register to be rotated by the number of bits defined INS Insert bit field by the immediate data. EXT Extract bit field Check Array Boundary Instruction ADD4S Adds packed decimal strings SUB4S Subtracts one packed decimal string from CHKIND reg16, mem32. This instruction is used to another verify that index values pointing to the elements of an array data structure are within the defined range. See CMP4S Compares two packed decimal strings figure 113. The lower limit of the array should be in ROL4 Rotates one BCD digit left through AL lower 4 bits memory location mem32, the upper limit in mem32 + 2. If ROR4 Rotates one BCD digit right through AL lower 4 bits the index value in reg16 is not between these limits when BRKXA Break and enable expanded addressing CHKIND is executed, a BRK 5 will occur. This causes a jump to the location in interrupt vector 5. RETXA Return from break and disable expanded addressing Figure 113. Check Array Boundary TEST1 Tests a specified bit and sets/resets Z flag NOT1 Inverts a specified bit Memory CLR1 Clears a specified bit SET1 Sets a specified bit Upper Limit 15 mem32 + 2 (Upper Limit) REPC Repeats next Instruction until CY flag Is cleared ~ Array ~ Low"umlt~ mem32 (Lower Limit) REPNC Repeats next instruction until CY flag Is set FP02 Additional floating-point processor call 49NR-336A variable Length Bit Field Operation Instructions Block I/O Instruction This category has two instructions: IN S (Insert Bit Field) and EXT (Extract Bit Field). These instructions are OUTM DW, src-block; INM dist-block, ow, These in- highly effective for computer graphics and high-level structions are used to output or input a string to or from languages. They can, for example, be used for data memory, when preceded by a repeat prefix. structures such as packed arrays and record type data used in PASCAL. 89 pPD70236 (V53) NEe IN S reg8, regs; IN S regS, Imm4. This instruction trans- Figure 115. Bit Field Extraction fers low bits from the 16-bit AW register (the number of bits is specified by the second operand) to the memory Bit Bit Byte ; ~. OOjr~t~M'=. location specified by the segment base (DS1 register) plus the byte offset (IV register). The starting bit position within this byte is specified as an offset by the lower 4 bits of the first operand. See figure 114. After each complete data transfer, the IV register and the 15 1 0 Byte Boundary Segment Base [OSO] register specified by the first operand are automatically Awl·oV//I 49NR-342A updated to point to the next bit field. Either immediate data or a register may specify the Packed BCD Operation Instructions number of bits transferred (second operand). Because the maximum transferable bit length is 16 bits, only the The instructions described here process packed BCD lower 4 bits of the specified register (OOH to OFH) will be data either as strings (ADD4S, SUB4S, CMP4S) or byte- valid. format operands (ROR4, ROl4). Packed BCD strings may be from 1 to 254 digits in length. Bit field data may overlap the byte boundary of memory. When the number of digits is even, the zero (Z) and carry Figure 114. Bit Field Insertion (CY) flags will be set according to the result of the operation. When the number of digits is odd, the Z and Bit CV flags may not be set correctly. In this case (Cl = ~ odd), the Z flag will not be set unless the upper 4 bits of the highest byte are all Os. The CV flag will not be set Awi' 0 dJ' Bit O~~_!I: O""'t[1Y] ~F---:----r-~~f:'-"-l--~~1--/-iqM.mo. .yre unless there is a carry out of the upper 4 bits of the highest byte. When Cl is odd, the contents of the upper 4 bits of the highest byte of the result are undefined. ADD4S. This instruction adds the packed BCD string addressed by the IX index register to the packed BCD Byte Segment Base string addressed by the IV index register, and stores the Boundary [OS1] 49NR-341A result in the string addressed by the IV register. The length of the string (number of BCD digits) is specified EXT regS, regs; EXT regS, Imm4. This instruction by the Cl register, and the result of the operation will loads to. the AW registers the bit field data whose bit affect the V (overflow), Cv, and Z flags. length is specified by the second operand of the instruc- BCD string (Iv, Cl) - BCD string (IV, Cl) + BCD string tion from the memory location that is specified by the (IX, CL) DSO segment register (segment base), the IX index register (byte offset), and the lower 4 bits of the first SUB4S. This instruction subtracts the packed BCD operand (bit offset). See figure 115. string addressed by the IX index register from the packed BCD string addressed by the IV register, and After the transfer is complete, the IX register and the stores the result in the string addressed by the IV lower 4 bits of the first operand are automatically up- register. The length of the string (number of BCD digits) dated to point to the next bit field. is specified by the Cl register, and the result of the Either immediate data or a register may be specified for operation will affect the V, Cv, and Z flags. the second operand. Because the maximum transfer- BCD string (Iv, el) - BCD string (Iv, el) - BCD string able bit length is 16 bits, however, only the lower 4 bits of (IX, Cl) the specified register (OOH to OFH) will be valid. CMP4S. This instruction performs the same operation Bit field data may overlap the byte boundary of memory. as SUB4S except that the result is not stored and only the V, CY, and Z flags are affected. BCD string (Iv, el) - BCD string (IX, Cl) ROL4. This instruction treats the byte data of the regis- ter or memory operand specified by the instruction as 90 t-IEC pPD70236 (V53) BCD data and uses the lower 4 bits of the AL register mode. The IkPD70236 will begin fetching from the new (ALL) to rotate that data one BCD digit to the left. See PFP through the address translation table. That is, the figure 116. new PC is treated as a logical address and is translated to the new, larger physical address space. Figure 116. BCD Rotste Left This instruction does not save any return address infor- mation, such as PC, PS, or PSW to the stack. RETXA ImmS. This instruction is used to turn off ex- panded addressing. It is identical in operation to BRKXA, except that the expanded addressing mode is turned off before fetching from the new address. That is, the XA flag ROR4. This instruction treats the byte data of the regis- in the XAM register is set to 0, and the PC is loaded with ter or memory specified by the instruction as BCD data the value of the PC field in the interrupt vector selected and uses the lower 4 bits of the AL register (ALL) to rotate by the immediate data. that data one BCD digit to the right. See figure 117. This instruction does not save any return address infor- mation such as PC, PS, or PSW to the stack. Figure 117. BCD Rotste Right Porting I'PD70116/70108 Code to I'PD70236 The IkPD70236 is completely software compatible with III the IkPD70116/70108. However, thelkPD70236 offers some improvements that may affect .the porting of IkPD70116 code to the IkPD70236. These improvements are: Bit Manipulation Instructions (1) The IkPD70116 does not trap on undefined opcodes. TEST1. This instruction tests a specific bit in a register The IkPD70236 will trap, and also will trap when a or memory location. If the bit is 1, the Z flag is reset to O. register addressing mode is used for any of these If the bit is 0, the Z flag is set to 1. instructions: NOT1. This instruction inverts a specific bit in a register CHKIND LDEA or memory location. MOV DSO/DS1 BR 1,id CLR1. This instruction clears a specific bit in a register CALL 1,id or memory location. (2) During signed division (DIV), if the quotient is OOH SET1. This instruction sets a specific bit in a register or (byte operation) or 8000H (word), the IkPD70116 will memory location. take a Divide By 0 trap. The IkPD70236 will perform the calculation. Repeat Prefix Instructions (3) When the IkPD70116 executes the POLL instruction, REPC. This instruction causes the IkPD70236 to repeat it will wait for the POLL input signal to be asserted. the following primitive block transfer instruction until The IkPD70236 has no POLL input; instead, when this the CY flag becomes cleared or the CW register be- instruction is executed, if a coprocessor is not comes zero. connected, then a Coprocessor Not Present trap will be taken. If a coprocessor is attached, then no REPNC. This instruction causes the IkPD70236 to repeat operation takes place. the following primitive block transfer instruction until the CY flag becomes set or the CW register becomes The IkPD70116 accepts FP01 and FP02 as opcodes zero. for the iAPX8087 coprocessor. The IkPD70236 ac- cepts these as opcodes for the IkPD72291 coproces- Address Expansion Control Instructions sor, which is not compatible with the iAPXOO87. BRKXA immS. This instruction is used to turn on ex- (4) During the POP R instruction, the IkPD70116 does panded addressing. The 8-bit immediate data specifies not restore the SP register. The IkPD70236 does an interrupt vector. The PC field of this vector is loaded restore the SP. into the PC (and PFP). The XA flag in the XAM register is set to 1, thereby enabling the expanded addressing 91 pPD70236 (V53) NEe (5) When processing a divide error, the 14PD70116 saves INSTRUCTION SET the address of the next instruction. The 14PD70236 Symbols saves the address of the current instruction (the divide instruction). Preceding the instruction set, several tables explain symbols, abbreviations, and codes. (6) The p.PD70116 allows up to three prefix instructions in any combination. The 14PD70236 also allows three Clocks prefixes, but only one of each type can be used. The 14PD70236 could operate incorrectly if there are two In the Clocks column of the instruction set, the numbers prefixes of the same type. For example, consider: cover these operations: instruction decoding, effective address calculation, operand fetch, and instruction exe- REP cution. REPC CMPBK SS: src-block, dst-block Clock timings assume the instruction has been prefetched and is present in the 8-byte instruction If the compare operation is interrupted, then when it queue. Otherwise, add two clocks for each pair of bytes resumes following the interrupt service, execution not present. will begin at the REPC instruction, not the REP instruction, because two repeat prefixes were used. VVord operands require two additional clocks for each transfer to an unaligned (odd address) memory operand. (7) The 14PD70116 accepts NMI requests even while These times are shown on the right side of the slash (j). processin9..!!!..NMI. The 14PD70236 does not allow nes!l!:!9..of NMls; the NMI input will be ignored until For conditional control transfer or branch instructions, the NMI interrupt handler is exited. the number on the left side of the slash is applicable if the transfer or branch takes place. The number on the right side is applicable if it does not take place. If a range of numbers is given, the execution time depends on the operands involved. 92 NEe pPD70236 (V53) Symbols Symbol Meaning Symbol Meaning acc Accumulator(AW or AL) AL Accumulator ~ow byte) duso Displacement (8 or 16 bits) AW Accumulator (16 bits) dmem Direct memory address BH BW register (hIgh byte) dst Destination operand or address BL BW register Oow byte) ext-dlspS 16-bit displacement (sign-extension byte + 8- BP BP register bit displacement) BRK Break flag far-'abel Label within a different program segment BW BW register (16 bits) far_proc Procedure within a different program segment CH CW register (hIgh byte) fp_op Floating-point Instruction operation CL CW register Oow byte) Imm 8- or 16-blt immediate operand CW CW register (16 bits) Imm3/4 3- or 4-bit Immediate bit offset CV Carry flag Imm8 8-bit Immediate operand DH OW register (hIgh byte) Imm16 mem 16-bit Immediate operand Memory field (000 to 111); 8- or 16-bit memory location DIR DL Direction flag OW register Oow byte) ED DSO Data segment 0 register (16 bits) mem8 8-blt memory location DS1 Data segment 1 register (16 bits) mem16 16-bit memory location OW OW register (16 bits) mem32 32-bit memory location IE Interrupt enable flag memptr16 Word containing the destination address within the current segment IX Index register (source) (16 bits) memptr32 Double word containing a destination address in IV Index register (destination) (16 bits) another segment MD Mode flag mod Mode field (00 to 10) P Parity flag neaclabel Label within the current segment PC Program counter (16 bits) near_proc Procedure within the current segment PS Program segment register (16 bits) offset Immediate offset data (16 bits) PSW Program status word (16 bits) pop_value Number of bytes to discard from the stack R Register set reg Register field (000 to 111); 8- or 16-bit general- S Sign extend operand field purpose register S = No sign extension regS S-bit general-purpose register S = Sign extend Immediate byte operand reg16 16-bit general-purpose register S Sign flag regptr 16-bit register containing a destination address SP Stack pointer (16 bits) within the current segment SS Stack segment register (16 bits) regptr16 Register containing a destination address within V Overflow flag the current segment W Word/byte field (0 to 1) seg Immediate segment data (16 bits) X, XXX, YYY, ZZZ Data to identify the Instruction code of the shorUabel Label between-128 and + 127 bytes from the external floating-point arithmetic chip end of the current instruction XXH Two-digit hexadecimal value sr Segment register XXXXH Four-digit hexadecimal value src Source operand or address Z Zero flag temp Temporary register (8/16/32 bits) AC Auxiliary carry flag AH Accumulator (high byte) 93 pPD70236 (V53) NEe Flag Operations Register Selection (mod = 11) Symbol Meaning reg w=o W =1 (blank) No change 000 AL AW 0 Cleared to 0 001 CL CW Set to 1 010 OL OW x Set or cleared according to result 011 BL BW u Undefined 100 AH SP R Restored to previous state 101 CH BP 110 OH .IX Memory Addressing Modes 111 BH IY mem mod = 00 mod = 01 mod = 10 000 BW+ IX BW + IX + dlspS BW + IX + dlsp16 Segment Register Selection 001 BW+IY BW + IY + dlspS BW + IY + dlsp16 sr Segment Register 010 BP + IX BP + IX + dlspS BP + IX + dlsp16 00 OS1 011 BP + IY BP + IY + dlspS BP + IY + dlsp16 01 PS 100 IX IX + dlspS IX + dlsp16 10 SS 101 IV IY + dlspS IY + dlsp16 11 OSO 110 Direct BP + dlsp8 BP + dlsp16 111 BW BW + dlspS BW + dlsp16 Instruction Set Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1- 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Dsts Trsnsfer Instructions MOV reg, reg 0 0 0 0 1 W 1 1 reg reg 2 2 mem, reg 0 .0 0 1 0 0 W mod reg mem 3/5 2·4 reg, mem 1 0 0 0 1 0 W mod reg mem 5/7 2·4 mem,lmm .0 0 0 W mod 000 mem 3/5 3·6 reg,imm 0 1 W reg -2 2·3 acc, dmem 0 0 0 0 0 W 5/7 3 dmem, acc 0 1 0 0 0 W 3/5 3 sr, reg16 0 .0 0 0 1 1 0 sr reg 2 2 sr, mem16 0 .0 0 1 0 mod 0 sr mem 5/7 2·4 reg16, sr 0 .0 0 0 0 1 1 0 sr reg 2 2 mem16, sr 0 0 0 1 0 0 mod 0 sr mem 3/5 2·4 OSO, reg16, mem32 1 0 0 0 0 1 mod reg mem 1.0/14 2·4 OS1, reg16, mem32 1 0 0 0 1 0 0 mod reg mem 10/14 2·4 AH, PSW 0 0 1 1 2 PSw, AH .0 .0 1 0 2 x x x x x LOEA reg16, mem16 1 0 0 .0 1 1 .0 0 mod reg mem 2 2·4 TRANS src_table 1 1 .0 .0 1 1 1 5 94 NEe pPD70236 (V53) Instruction Set (cont) Opcode Flags Mnemonic Operand 7 8 5 4 3 2 1 o 7 8 5 4 3 2 1 0 Clocks BytnACCYVPSZ Dsts Trsnsfer Instructions (cont) XCH reg, reg 1 0 0 0 0 w reg reg 3 2 mem, reg 0 0 0 0 W mod reg mem 8112 2-4 AW, reg16 o 0 o reg 3 Repest Prefixes REPC 0 0 0 1 O· 1 2 REPNC 0 0 0 1 0 0 2 REP 0 0 2 REPE REPZ REPNE 1 0 0 1 0 2 REPNZ Block Trsnsfer Instructions MOVBK dst, src 1 0 1 0 0 1 0 W 1 3+4n(W=0) 3 + 4n (W = 1, even addresses) 3 + 8n (W = 1, odd addresses) 3 + 6n (W = 1, odd/even addresses) CMPBK dst, arc 1 0 1 o 0 1 1 W 1 x x xxxx 3+7n(W=O) 3 + 7n (W = 1, even addresses) 3 + 11 n (W = 1, odd addresses) 3 + 9n (W = 1, odd/even addresses) CMPM dst 1 0 1 o 1 1 W 1 x x xxxx 3 + 5r'1(W = 0) 3 + 5n (W = 1, even addresses) 3 + 7n (W = 1, odd addresses) LDM src 1 0 1 o 1 0 W 1 5+2n(W=0) 5 + 2n (W = 1, even addresses) 5 + 4n (W = 1, odd addresses) STM dst 1 0 1 o 1 0 1 W 1 3+2n(W=0) 3 + 2n (W = 1, even addresses) 3 + 4n (W = 1, odd addresses) n = number of returns String Instruction execution clocks for a single-Instruction execution are in parentheses. 95 IIPD70236 (V53) NEe Instruction Set (cont) Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z I/O Instructions (cont) IN acc.lmm8 0 0 0 W 5fT 2 acc. OW 0 1 0 W 3/5 OUT Imm8. acc 0 0 1 W 3/5 2 ow, acc 0 1 W 3/5 INM dst. OW 0 0 0 W 1 3 + 11n rN = 0) 3 + 8n rN = 1. even addresses) 3 + 22n rN = 1. odd addresses) 3 +20n rN = 1. odd/even addresses; odd for I/O) 3 + 13n rN = 1. odd/even addresses; odd for memory) OUTM Ow, src o 1 1 0 1 1 W 1 3 + 11n rN = 0) 3 + 8n rN = 1. even addresses) 3 + 22n rN = 1. odd addresses) 3 + 20n rN = 1. odd addresses; odd for I/O) 3 + 13n rN = 1. odd addresses; odd for memory) n = number of transfers String Instruction execution clocks for a single-Instruction execution are In parentheses. Use the right side of the slash (f) for OMA I/O accesses. BCD Instructions AOJBA 0 0 o 4 x x u u u u AOJ4A 0 0 0 o 2 x x u x x x AOJBS 0 0 1 4 x x u u u u AOJ4S 0 0 1 0 2 x x u x x x AOO4S dst. src 0 0 0 0 0 0 0 0 0 0 0 2 + 18n 2 u x u u u x SUB4S dst. src 0 0 0 0 0 0 0 0 0 0 2 + 18n 2 u x u u u x CMP4S dst. src 0 0 0 0 0 0 0 0 0 7 + 14n 2 u x u u u x ROL4 reg8 0 0 0 0 1 0 0 0 0 0 0 9 3 1 1 0 0 0 reg mem8 0 0 0 0 1 0 0 0 0 0 0 15 3·5 mod 0 0 0 mem ROR4 reg8 0 0 0 0 1 0 0 0 a 0 13 3 1 1 0 0 0 reg mem8 0 0 0 0 1 0 0 0 a 0 19 3·5 mod 0 0 0 mem n = number of BCD digits divided by 2 96 NEe IIPD70236 (V53) Instruction Set (cont) Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1 o 765 4 321 o Clocks Bytes AC CY V P S Z Dsts Type Conversion Instructions CVTBD 1 0 1 0 0 o o 0 0 0 o o 12 2 u u u x x x CVTDB o o 1 0 o 0 0 0 o o 8 2 u u u x x x CVTBW o 0 o 0 o 2 CVTWL o 0 o 0 2 Arithmetic Instructions ADD reg, reg 0 0 0 0 0 0 1 W reg reg 2 2 x x x x x x mem, reg 0 0 0 0 0 0 0 W mod reg mem 7/11 2-4 x x x x x x reg, mem 0 0 0 0 0 0 W mod reg mem 6/8 2-4 x x x x x x reg, Imm 0 0 0 0 0 S W 000 reg 2 3-4 x x x x x x mem, imm 1 0 0 0 0 0 S W mod 000 mem 7/11 3-6 x x x x x x mil _________a_~ __ ,_lm_m ____0___ 0__0___0__0_._____ ______________~_________2_________2_-3___,_x____x___x___x___ 0 __W x ~ x___ ADDC reg, reg 0 0 0 0 0 1 W reg reg 2 2 x x x x x x mem, reg 0 0 0 0 0 0 W mod reg mem 7/11 2-4 x x x x x x reg, mem 0 0 0 0 0 W mod reg mem 6/8 2-4 x x x x x x reg, Imm 0 0 0 0 0 S WOO reg 2 3-4 x x x x x x mem,lmm 0 0 0 0 0 S W mod 0 0 mem 7/11 3-6 x x x x x x a~i Imm 0 0 0 0 1 0 W 2 2-3 x x x x x x SUB reg, reg 00001W reg reg 2 2 x x x x x x mem, reg o 0 0 0 0 W mod reg mem 7/11 2-4 x x x x x x reg, mem o 0 1 0 1 0 1 W mod reg mem 6/8 2-4 x x x x x x reg,lmm o 0 0 0 0 S W 0 reg 2 3-4 x x x x x x mem,lmm 1 0 0 0 0 0 S W mod 0 mem 7/11 3-6 x x x x x x aee,lmm o 0 1 0 1 0 W 2 2-3 x x x x x x SUBC reg, reg 000 01W reg reg 2 2 x x x x x x mem, reg 0 0 0 0 0 W mod reg mem 7/11 2-4 x x x x x x reg, mem 0 0 0 0 W mod reg mem 6/8 2-4 x x x x x x reg, Imm 0 0 0 0 0 S W o reg 2 3-4 x x x x x x mem, imm 1 0 0 0 0 0 S W mod 0 mem 7/11 3-6 x x x x x x ace, imm o 0 0 0 W 2 2-3 x x x x x x INC regS o 000 reg 2 2 x x x x x mem W mod 000 mem 7/11 2-4 x x x x x reg16 o 000 reg 2 x x x x x DEC regS o o 0 reg 2 2 x x x x x mem 1 1 W mod 0 0 mem 7/11 2-4 x x x x x reg16 o 001 reg 2 x x x x x MULU regS o 1 0 o 0 reg 8 2 u x x u u u reg16 o o 0 reg 12 2 u x x u u u mem8 o o mod o 0 mem 12 2-4 u x x u u u mem16 o mod o 0 mem 16/18 2-4 u x x u u u 97 "PD70236 (V53) NEe Instruction Set (cont) Opcode Flag- Mnemonic Operand 7 6 543 2 1 0 7 6 5 4 3 2 1 0 Clock_ Byte_ AC CY V P S Z Arithmetic Instructions (cont) MUL regS 0 0 0 reg S 2 u x x u u u ----------------------------------------------------------------------------------- reg16 0 0 reg 12 2 u x xu' u u memS 0 0 mod 0 mem 12 2·4 u x x u u u mem16 1 0 mod 0 mem 16/18 2·4 u x x u u u reg16, reg16, Imm8 0 0 0 1 1 reg reg 12 3 u x x u u u reg16, mem16, ImmS 0 0 0 mod reg mem 16/1S 3-5 u x x u u u reg16, reg16, Imm16 0 0 0 0 1 1 reg reg 12 4 u x x u u u reg16, mem16, Imm16 0 0 0 0 mod reg mem 16/8 4·6 u x x u u u DIVU regS 0 0 0 reg 11 2 u u u u u u reg16 o 1 0 reg 19 2 u u u u u u mem8 o 0 mod 0 mem 15 2·4 u u u u u u mem16 o 1 mod 0 mem 23/25 2·4 u u u u u u DIV regS, o 0 reg 16 2 u u u u u u reg16 o .1 reg 24 2 u u u u u u memS o 0 mod mem 20 2·4 u u u u u u mem16 o mod mem 28/30 2·4 u u u u u u Comparison Instructions CMP reg, reg 0 0 0 1 W 1 1 reg reg 2 2 x: X X X X X ----------------------------------------------------------------------------------~ mem, reg o 0 0 0 W mod reg mem 6/8 2·4 x x x x x x reg, mem 001110 W mod reg mem 6/S 2·4 x x x x x x reg,lmm OOOOOSW 1 1 reg 2 3·4 x x x x x x mem,lmm 100000SW mod mem 6/S 3·6 x x x x x x acc,lmm o 0 0 W 2 2·3 x x x x x x Logics/Instructions NOT reg 0 W 1 1 0 reg 2 2 ----------------------------------------------------------------------------------- mem o W mod 0 0 mem 7/11 2·4 NEG reg o W 1 1 0 reg 2 2 x x x x x x mem 1 1 0 1 W mod 0 mem 7/11 2·4 x x x x x x TEST reg, reg. 0000 OW 1 1 reg reg 2 2 u o 0 x x x mem, reg 0000 OW mod reg mem 6/8 2·4 u o 0 x x x reg,lmm o W 1 1 0 0 0 reg 2 3·4 u o 0 x x x mem, imm 1 0 1 1 W mod 0 0 0 mem 6/8 3·6 u o 0 x x x ace, imm 100100W 2 2·3 u o 0 x x x AND' reg, reg 00 0001 W 1 1 reg reg 2 2 u o 0 x x x memo reg o 0 0 0 0 0 W mod reg mem 7/11 2·4 u o 0 x x x reg, mem 001000 W mod reg mem 6/8 2·4 u o 0 x x x reg, imm OOOOOOW 11 o 0 reg 2 3·4 u o 0 x x x mem, imm 1 0 0 0 0 0 0 W mod o 0 mem 7/11 3·6 u o 0 x x x ace, imm 0000 OW 2 2·3 u o 0 x x x 98 NEe pPD70236 (V53) Instruction Set (cont) Opcode Flag. Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clock. Byte. AC CY V P S Z Logicsllnstructlons (cont) OR reg, reg 0 0 0 0 o 1 W 1 1 reg reg 2 2 u o 0 x x x mem, reg 0 0 0 0 o 0 W mod reg mem 7/11 2·4 u o 0 x x x reg, mem o 0 0 0 0 W mod reg mem 6/8 2·4 u o 0 x x x reg,imm 1 000 0 0 0 W 1 1 0 0 reg 2 3·4 u o 0 x x x mem,imm 1 000 0 0 0 W mod 0 0 mem 7/11 3·6 u o 0 x· x x ace, imm 00001 OW 2 2·3 u o 0 x x x XOR reg, reg o 0 0 0 1 W 1 1 reg reg 2 2 u o 0 x x x mem, reg o 0 0 0 0 W mod reg mem 7/11 2·4 u o o x x x reg, mem 001100 W mod reg mem 6/8 2·4 u o o x x x reg,imm OOOOOOW 1 1 o reg 2 3·4 u o oxx: mem, imm ace, imm 1000000W o 0 0 0 W mod o mem 7/11 2 3·6 2·3 u u o o o x x o x x x 1II Bit Msnlpulstlon Instructions INS reg8, reg8 0 0 0 0 001 100 0 37·61/ 3 1 1 reg reg 39·77 rega, imm4 o 0 0 0 1 o 0 o 0 37·69/ 4 1 1 0 0 0 reg 39·77 EXT rega, reg8 o 0 0 0 o 0 o 0 29·61/ 3 1 1 reg reg 33·63 rega, imm4 o 0 0 0 o 0 o 29·61/ 4 1 1 0 0 0 reg 33·63 TEST1 reg, CL o 0 001 000 o 0 0 W 4 3 u 0 0 u u x o 0 0 reg mema, CL o 0 001 000 o 0 0 0 a 3·5 u 0 0 u u x mod 000 mem mem16, CL o 000 000 000 8/10 3·5 u 0 0 u u x mod 000 mem reg, imm3/4 o 0 001 000 o 0 W 4 4 u 0 0 u u x 1 1 0 0 0 reg mem8, imm3 0 0 0 0 000 o 0 0 13 4·6 u 0 0 u u x mod 0 0 0 mem mem16, imm4 0 0 0 0 1 000 o 0 8/10 4·6 u 0 0 u u x mod 000 mem SET1 reg, CL o 0 0 0 000 o o W 4 3 000 reg mem,CL o 0 0 0 000 o o W 9 3·5 mod 000 mem reg, imm3/4 o 0 0 0 000 1 o W 4 4 o 0 0 reg 99 pPD70236 (V53) NEe Instruction Set (cont) Opcode Flags Mnemonic Operand 7 8 5 4 3 2 1 0 7 8 5 4 3 2 1 0 Clocks Bytes AC CV V P S Z Bit Manipulation Instructions (cont) SET1 (cont) mem8,lmm3 0 0 0 0 1 1 1 1 0 0 0 0 0 9 4-6 mod 0 0 0 mem mem16,Imm4 0 0 0 0 1 1 1 1 0 0 0 1 1 0 9/13 4·6 mod 0 0 0 mem cv 0 0 2 CIR 1 1 1 1 0 2 CLR1 reg, CL 0 0 0 0 1 0 0 0 0 0 W 4 3 0 0 0 reg mem8, CL 0 0 0 0 1 0 0 0 0 0 0 9 3·5 mod 0 0 0 mem mem16, CL 0 0 0 0 1 1 1 1 0 0 0 0 0 9/13 3·5 mod 0 0 0 mem reg,lmm3/4 0 0 0 0 0 0 0 0 W 4 4 1 1 0 0 0 reg mem8,lmm3 0 0 0 0 1 1 0 0 0 0 0 9 4·6 mod 0 0 0 mem mem16,lmm4 0 0 0 0 1 1 1 1 0 0 0 1 1 0 1 9/13 4·6 mod 0 0 0 mem CV 1 0 0 0 2 0 CIR 1 1 1 0 0 2 1 NOT1 reg,CL 0 0 0 0 1 0 0 0 0 W 4 3 1 0 0 0 reg mem8, CL 0 0 0 0 1 1 0 0 0 0 0 9 3·5 mod 0 0 0 mem mem16, CL 0 0 0 0 1 1 1 0 0 0 0 9/13 3·5 mod 0 0 0 mem reg, imm3/4 0 0 0 0 1 0 0 0 W 4 4 1 1 0 0 0 reg mem8,imm3 0 0 0 0 1 0 0 0 W 9 4·6 mod 0 0 0 mem mem16, imm4 0 0 0 0 1 1 1 1 0 0 0 1 1 1 9/13 4-6 mod 0 0 0 mem Cy 1 1 1 1 0 1 0 1 2 x 100 NEe pPD70236 (V53) Instruction Set (cont) Opcode Flags MnemonIc Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Shift/Rotste Instructions SHL reg. 1 1 o o 0 0 W o 0 reg 2 2 u x x x x x mem.1 0 0 0 0 W mod 0 0 mem 7/11 2-4 u x x x x x reg. CL 0 0 0 WOO reg 2 + n 2 u x u x x x memo CL 0 0 0 1 W mod 0 0 mem 6/10 + n 2-4 u x u x x x reg. immS 0 0 0 0 0 WOO reg 2 + n 3 u x u x x x memo ImmS 0 0 0 0 0 W mod 0 0 mem 6/10 + n 3-5 u x u x x x SHR reg. 1 0 0 0 0 W 0 1 reg 2 2 u x x x x x memo 1 0 0 0 0 W mod 0 mem 7/11 2-4 u x x x x x reg. CL 0 0 0 W 0 reg 2 + n 2 u x u x x x _ reg. immS 1 __0___ _m_e_m_._C_L_________0___ 0 _____ 0 0 0 0 0 W w____m_o_d_____o~______m_e_m reg __~6_11_0_+ __n____2:.4____U____X___u___ 2 + nux xx ~ x __x____ u x x EM memo immS 0 0 0 0 0 W mod 0 mem· 6/10 + n 3-5 u x u x x x SHRA reg. 1 0 0 0 0 W reg 2 2 u x o x x x memo 1 0 0 0 0 W mod mem 7/11 2-4 u x o x x x reg. CL 0 0 0 W reg 2 + n 2 u x u x x x memo CL 0 1 0 0 1 W mod mem 6/10 + n 2-4 u x u x x x reg. ImmS 0 0 0 0 0 W reg 2 + n 3 u x u x x x memo ImmS 0 0 0 0 0 W mod 1 1 mem 6/10 + n 3-5 u x u x x x ROL reg. 1 0 0 0 0 WOO 0 reg 2 2 x x mem.1 0 0 0 0 W mod 0 0 0 mem 7/11 2-4 x x reg. CL 0 0 0 WOO 0 reg 2 + n 2 x u memo CL 0 1 0 0 W mod 0 0 0 mem 6/10 + n 2-4 x u reg. imm 0 0 0 0 0 WOO 0 reg 2 + n 3 x u memo imm 0 0 0 0 0 W mod 0 0 0 mem 6/10 + n 3-5 x u ROR reg. 1 0 0 0 0 WOO reg 2 + n 2 x u memo 1 0 0 0 0 W mod 0 0 mem 7/11 2-4 x x reg. CL o 0 0 WOO reg 7 + n 2 x u mem.CL o 0 0 1 W mod 0 0 mem 6/10 + n 2-4 x u reg. imm8 o 0 0 0 0 WOO reg 2 + n 3 x u memo immS o 0 0 0 0 W mod 0 0 1 mem 6/10 + n 3-5 x u ROLC reg. 1 o 0 0 0 WOO reg 2 2 x x mem.1 o 0 0 0 W mod 0 0 mem 7/11 2-4 x x reg. CL o 0 0 WOO reg 2+n 2 x u mem.CL o o 0 W mod 0 0 mem 6/10 + n 2-4 x u reg, imm8 o 0 0 0 0 W o o reg 2+n 3 x u mem.immS o 0 0 0 0 W mod 0 o mem 6/10 + n 3-5 x u n = number of shifts 101 pPD70236 (V53) NEe Instruction Set (cont) Opcode Flags Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z Shift/Rotate Instructions (cont) RORC reg, 1 0 0 0 0 W 1 1 0 reg 2 2 x x mem, 1 0 0 0 0 W mod 0 mem 7/11 2-4 x x reg, CL 0 0 0 W 1 1 0 reg 2+n 2 x u mem,CL 0 0 0 1 W mod 0 mem 6/10 + n 2-4 x u reg,lmmS 0 0 0 0 0 W .1 1 0 reg 2+n 3 x u mem,lmmS 0 0 0 0 0 W mod 0 mem 6/10 + n 3-5 x u n = number of shifts Stack Manipulation Instructions PUSH mem16 1 1 1 1 1 mod 1 1 0 mem 5/9 2-4 reg16 0 1 0 0 reg 3/5 sr 0 0 0 sr 1. 0 3/5 PSW 0 0 1 1 1 0 0 3/5 R 0 0 0 0 0 0 20/36 Imm 0 0 0 S 0 3/5 2-3 POP mem16 1 0 0 0 mod 0 0 0 mem 5/9 2-4 reg16 0 0 reg 5/7 sr 0 0 0 sr 1 5/7 PSW 0 0 1 1 0 5/7 R R R R R R R 0 0 0 0 0 22/38 PREPARE Imm16,lmmS 0 0 0 0 0 * 4 *immS = 0:15 immS~ 1: 17 + 12 QmmS -1) odd, 15 + S QmmS-1) even DiSPOSE 1 0 0 1 0 0 6/10 1 Control Transfer Instructions CALL near_proc 0 0 0 0 7/9 3 regptr16 0 0 reg 7/9 2 memptr16 mod 0 0 mem 11/15 2-4 faLproc 0 0 0 0 9/13 5 memptr32 1 1 mod 0 mem 15/23 2-4 RET 0 0 0 0 10/12 pop_value 0 0 0 0 1 0 10/12 3 0 0 0 12/16 pop_value 0 0 0 0 12/16 3 BR near_label 0 0 0 7 3 shorLiabel 0 0 1 7 2 regptr16 0 0 reg 7 2 memptr16 mod 0 0 mem 11/13 2-4 faLlabei 0 0 0 7 5 memptr32 mod 0 mem 13/17 2-4 102 NEe pPD70236 (V53) Instruction Set (cont) Opcode Flag. Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clock. Byte. AC CY V P S Z Control Transfer Instructions (cont) BV shorLJabel 0 0 0 0 0 3/6 2 BNV shorLJabel 0 0 0 0 1 3/6 2 BC,BL shorLJabel 0 0 0 0 3/6 2 BNC, BNL shorLJabel 0 0 0 1 1 3/6 2 BE,BZ shorLJabel 0 0 0 0 3/6 2 BNE, BNZ shorLJabel 0 0 0 3/6 2 BNH shorLJabel 0 0 0 3/6 2 BH shorLJabel 0 1 0 3/6 2 BN shorLJabel 0 0 0 0 3/6 2 BP shorLJabel 0 0 0 1 3/6 2 BPE BPO shorLJabel shorLJabel 0 0 0 0 0 3/6 3/6 2 2 ED Interrupt Instructions BlT shorLJabel 0 0 0 3/6 2 BGE shorLJabel 0 0 1 3/6 2 BlE shorLJabel 0 0 3/6 2 BGT shorLJabel 0 1 1 1 1 1 3/6 2 OBNZNE shorLJabel 0 0 0 0 0 3/6 2 OBNZE shorLJabel 0 0 0 0 3/6 2 OBNZ shorLJabel 0 0 0 0 3/6 2 BCWZ shorLJabel 1 0 0 0 3/6 2 BRK 3 0 0 0 0 18/24 Imm8 0 0 0 18/24 2 BRKV Imm8 0 0 0 20/26 RETI 0 0 13/19 R R R R R R CHKlNO reg16, mem32 0 1 1 0 0 0 1 0 mod reg mem 24-26/ 2-4 30-32 CPU Control Instructions HALT 0 1 0 0 2 BUSlOCK 0 0 0 0 2 FP01 fp_op 1 1 0 1 1 X X X 1 1 Y Y Y Z Z Z * 2 fp_op, mem 1 0 1 X X X mod Y y y mem * 2-4 FP02 fp_op 0 0 0 X 1 1 Y Y Y Z Z Z * 2 fp_op, mem 0 0 0 X mod Y Y Y mem * 2-4 POll 0 0 0 2 + 5n n = number of times POll pin Is sampled. NOP 0 0 0 0 0 0 3 1 01 0 0 2 EI 0 2 103 pPD70236 (V53) !\fEe Instruction Set (cont) Opcode Flag. Mnemonic Operand 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Clocks Bytes AC CY V P S Z CPU Control Instructions (cont) 050:,051:, P5:, 55: 0 0 1 seg 1 1 0 2 (segment override prefixes) Address Expansion Control Instructions BRKXA ImmS 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 12 3 ImmS. RETXA ImmS o 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 12 3 ImmS 104 NEe i6-Bit Microcomputers 4-1 16·Bit Microcomputers NEe Section 4 16-Bit Microcomputers "PD70320/70322 (V25) 4a 16-Bit Microcomputers: Single-Chip, CMOS "PD70330/70332 (V35) 4b 16-Bit Microcomputers: Advanced, Single-Chip, CMOS "PD70P322 4C 16-Bit Microcomputer: Single-Chip, CMOS, With EPROM for V25N35 Modes "PD70325 (V25 Plus) 4d 16-Bit Microcomputer: High-Speed DMA, Single~Chip, CMOS "PD70335 (V35 Plus) 4e 16-Bit Microcomputer: Advanced, High-Speed DMA, Single-Chip, CMOS "PD70327 (V25 Software Guard) 4f 16-Bit Microcomputer: Software-Secure, Single-Chip, CMOS "PD70337 (V35 Software Guard) 4g 16-Bit Microcomputer: Software-Secure, Single-Chip, CMOS "PD79011 4h 16-Bit Microcomputer: Single-Chip, CMOS, With Bui It-In RTOS "PD79021 4i 16-Bit Microcomputer: Single-Chip, CMOS, With Bui It-In RTOS 4-2 NEe NEe Electronics Inc. pPD70320/70322 (V25) is-Bit Microcomputers: Single-Chip, CMOS Description o DRAM refresh pulse output o Two standby modes The tJPD70320 and tJPD70322 (V25™) are high-per- -HALT formance, 16-bit, single-chip microcomputers with an -STOP 8-bit external data bus. They combine the instruction o Internal clock generator set of the tJPD70108 (V20®) with many of the on-chip - 5-MHz maximum CPU clock frequency (O.4-tJs peripherals in NEC's 78000 series. instruction cycle time) - 8-MHz maximum CPU clock frequency (0.25-tJs The tJPD70320/322 processor has software compati- instruction cycle time) bility with the V20 (and subsequently the 8086/8088), o Programmable wait state generation faster memory accessing, superior interrupt processing o Separate address/data bus interface ability, and enhanced control of internal peripherals. o CMOS technology A variety of on-chip components, including 16K bytes Ordering Information of mask programmable ROM (tJPD70322 only), 256 bytes of RAM, serial and parallel I/O, comparator port Part Number Clock IMHz) Package Type ROM lines, timers, and a DMA controller make thetJPD70320/ pPD70320L 5 84-pin PLCC ROM-less 322 a sophisticated microsystem. Eight banks of registers are mapped into internal RAM below an additional 256-byte special function register L-8 GJ GJ-8 8 5 8 94-pin plastic QFP 1m (SFR) area that is used to control on-chip peripherals. pPD70322L-xxx 5 84-pin PLCC Mask ROM I nternal RAM and the SFR area are together relocatable to anywhere in the 1M-byte address space. This L-8-xxx 8 maintains compatibility with existing system memory GJ-xxx 5 94-pin plastic QFP maps. GJ-8-xxx 8 pPD70P322KE-8 8 84-pin LCC EPROM ThetJPD70322 is the mask ROM version, thetJPD70320 (UV erasable) is the ROM-less version, and the tJPD70P322 is the EPROM version. PLCC = plastic leaded chip carrier LCC = ceramic leadless chip carrier (with window) Features o Complete single-chip microcomputer -16-bit ALU - 16K bytes of ROM (tJPD70322) - 256 bytes of RAM o 6-byte instruction prefetch queue o 24 parallel 110 lines o Eight analog comparator inputs with programmable threshold level o Two independent DMA channels o Two 16-bit timers o Programmable time base counter o Two full-duplex UARTs o Programmable interrupt controller - Eight priority levels - Five external, 12 internal sources - Register bank (eight) context switching - Eight macro service function channels V20 is a registered trademark and V25 is a trademark of NEC Corporation. 50002-2INECEL-583l pPD70320/322 (V25) NEe Pin Configurations 84-Pln PLCC and LCe P07/CLKOUT 74 PT7 DO 73 PT6 01 72 PT5 02 71 PT4 03 70 PT3 04 69 PT2 05 68 PT1 Os 67 PTO 07 66 P17/REAOY Ao 65 P16/SCKO A1 64 P15/TOUT A2 63 P14/1NT/POLL A3 62 P13/1NTP2/1NTAK A4 61 P12/1NTP1 A5 60 P11/1NTPO As 59 P10/NMI A7 58 P27/HLORO A8 57 P2s/HLOAK Ag 56 P25/TC1 A10 55 P24/0MAAK1 A11 54 P23/0MAR01 ~ M ~ ~ ~ ~ ~ ~ 0 01z t) 0 '-1'- e 10 T 0 0 0 .;.;.;.;.;.;.;.;~ I/) o I/) 0 S! c ~ 0 S! >c I- >c a: a: Cl >C I- a: 0 I- > :: t: 0"" ~ "0 ~ I:t ~~ N N Q, Q, 'Pin functions for normal operation of the pP070P322 are changed as follows for programming. Pin No. Symbol Function 3 Vpp Write power supply input 45 OE Output enable signal input 46 CE Chip enable signal input 83-0039608 2 ~ ~ I !~ 'b ii' fI) ::!: ~ (') "C "C ~ ~I> N;!:; ~> ;!:; I~ ~ < < ~ 0 ~ ~ 0 ~ ~ 01~Z~CC_~O~OO~ZO~~~~~~~Z~ 0 c e o 0 ......1. . 0 01 0 0 C CD Q) .... en U1 .... ... 0 '" DDDDDDDDDDDDDDDDD[ N N N N ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ W N ~ 0 ~ ~ ~ m ~ ~ W N ~ 0 IC 24 P23/0MAR01 25 A11 P24/0MAAK1 26 NC P2s/TC1 27 A10 P26/HLOAK 28 91 A9 P27/HLORO 29 AS P10/NMI 30 A7 P11/1NTPO 31 A6 P12/1NTP1 32 AS P13/1NTP2/1NTAK 33 A4 P14/1NT/POLL 34 A3 P1s/TOUT 35 A2 P16/SCKO 36 A1 P17/REAOY 37 AD PTO 38 81 07 PT1 39 06 PT2 40 Os PT3 41 D4 PT4 42 D3 PT5 43 D2 't: NC PT6 PT7 IC 44 45 46 47 D1 DO P07/CLKOUT P06 "a--a 0 .... m .... W U1 0 U1 ~ U1 N U1 W U1 ~ U1 ~ U1 m U1 ~ = U1 U1 W m m m m m m m m m m .... .... 0 ~ N ~ ~ ~ m ~ m W 0 ~ W ~ < Z Z ~ ~ x x < < ~I ~I ~ :i 0 0 Z Z ... N g g rn ~ =el ~ ill > 8 !: ~ 8 ~ n 0Z"C ;!:;151;!:;1 ml"C"C"C"C"C & 0 c c ~ ~ (J) m ~ 0 '- W ~ ~ ........ < ~ (II u.:> l'" ......,. m ------ - - pPD70320/322 (V25) NEe Pin Identification Pin Functions Symbol Function Ao-A19 [Address Bus] Address bus outputs CLKOUT System clock output Ao-A19 is the 20-bit address bus used to access all external devices. CTSO Clear to send channel 0 input CTS1 Clear to send channel 1 input CLKOUT [System Clock] Bidirectional data bus This is the internal system clock. It can be used to EA External access synchronize external devices to the CPU. 10STB I/O strobe output ---- ---- CTSn, RxDn, TxDn, SCKO [Clear to Send, MREQ Memory request output Receive Data, Transmit Data, Serial Clock Out] MSTB Memory strobe output I/O port 0 The two serial ports (channels 0 and 1) use these lines for transmitting and receiving data, handshaking, and P10/NMI Port 1 input line/Nonmaskable interrupt input serial clock output. Port 1 input lines/External Do- D7 [Data Bus] interrupt input lines P13/INTP2/INTAK Port 1 input line/External 0 0-0 7 is the 8-bit external data bus. interrupt input line/Interrupt acknowledge output DMARQn, DMAAKn, TCn [DMA Request, DMA I/O port 1/Interrupt request input/ Acknowledge, Terminal Count] I/O poll input These are the control signals to and from the on-chip P15/TOUT I/O port 1/Timer out OMA controller. P16/SCKO I/O port 1/Serial clock out I/O port 1/Ready input EA [External Access] P20/DMARQO I/O port 2/DMA request 0 If this pin is low on reset, the pP070322 will execute I/O port 2/DMA acknowledge 0 program code from external memory instead of from I/O port 2/DMA terminal count 0 internal ROM. I/O port 2/DMA request 1 HLDAK [Hold Acknowledge] I/O port 2/DMA acknowledge 1 The HLOAK output (active low) informs external P25ITC1 I/O port 2/DMA terminal count 1 devices that the CPU has released the system bus. P26/HLDAK I/O port 2/Hold acknowledge output I/O port 2/Hold request input HLDRQ [Hold Request] PTO-PT7 Comparator port input lines The HLORO input (active high) is used by external REFRQ Refresh pulse output devices to request the CPU to release the system bus to RESET an external bus master. The following lines go into a Reset input high-impedance state with internal 4.7-kO pullup RxDO Serial receive data, channel 0 input resistors: Ao-A19, 00-07, MREO, R/W, MSTS, REFRO, RxD1 Serial receive data, channel 1 input and IOSTS. R/W Read/Write output TxDO Serial transmit data, channel 0 output TxD1 Serial transmit data, channel 1 output X1,X2 Crystal connection terminals VDD Positive power supply voltage Threshold voltage input GND Ground IC Internal connection 4 NEe pPD70320/322 (V25) INT [Interrupt Request] POLL [Poll] INT is a maskable, active-high, vectored interrupt Upon execution of the POLL intruction, the CPU request input. After assertion, external hardware must checks the status of this pin and, if low, program provide the interrupt vector number. execution continues. If high, the CPU will check the level of the line every five clock cycles until it is low. INTAK [Interrupt Acknowledge] POLL can be used to synchronize program execution to external conditions. After INT is asserted, the CPU will respond with INTAK (active low) to inform external devices that the interrupt PTO-PT7 [Comparator Port] request has been granted. PTO-PT7 are inputs to the analog comparator port. INTPO-INTP2 [External Interrupt] READY [Ready] INTPO-INTP2 allow external devices to generate inter- rupts. Each can be programmed to be rising or falling After READY is de-asserted low, the CPU will synchro- edge triggered. nize and insert at least two wait states into a read or write cycle to memory or 1/0. This allows the processor 10STB [I/O Strobe] to accommodate devices whose access times are longer than normal execution allows. 10STB is asserted during read and write operations to external 1/0. REFRQ [Refresh] MREQ [Memory Request] This active-low output pulse can refresh nonstatic RAM. It can be programmed to meet system specifica- MREQ (active low) informs external memory that the tions and is internally synchronized so that refresh current bus cycle is a memory access bus cycle. cycles do not interfere with normal CPU operation. MSTB [Memory Strobe] RESET [Reset] MSTB (active low) is asserted during read and write A low on RESET resets the CPU and all on-chip operations to external memory. peripherals. RESET can also release the standby modes. After RESET returns high, program execution NMI [Nonmaskable Interrupt] begins from address FFFFOH. NMI cannot be masked through software and is typi- cally used for emergency processing. Upon execution, R/W [Read/Write] the interrupt starting address is obtained from interrupt An R/W output allows external hardware to determine vector number 2. NMI can release the standby modes if the current operation is a read or write cycle. It can and can be programmed to be either rising or falling also control the direction of bidirectional buffers. edge triggered. TOUT [Timer Out] POO-P07 [Port 0] TOUT is the square-wave output signal from the POO-P07 are the lines of port 0, an 8-bit bidirectional internal timer. parallel I/O port. X1, X2 [Crystal Connections] P1o-P17 [Port 1] The internal clock generator requires an external The status of P1 O-P13 can be read but these lines are crystal across these terminals as shown in figure 36. always control functions. P14-P17 are the remaining By programming the PRC register, the system clock lines of parallel port 1, each line individually program- frequency can be selected as the oscillator frequency mable as either an input, an output, or a control (fosd divided by 2, 4, or 8. function. Voo [Power Supply] P2o-P27 [Port 2] Two positive power supply pins (VDD) reduce internal P2o-P27 are the lines of port 2, an 8-bit bidirectional 1/0 noise. port. The lines can also be used as control signals for the on-chip DMA controller. 5 pPD70320/322 (V25) NEe VTH [Threshold Voltage] GND The comparator port uses this pin to determine the Two ground connections reduce internal noise. analog reference point. The actual threshold to each comparator line is programmable to VTH x n/16, where IC [Internal Connection] = n 1 to 16. Allie pins should be together and pulled up to VDD with a 10K-20K resistor. Block Diagram Stag- Stag- P20/DMARQO ing ing A19-AO Latch Latch P21/DMAAKO P22/TCO P23/DMARQ1 P24/DMAAK1 P25/TC1 TxDO RxDO P16/SCKO- CTSO TxD1 RxD1 RESET HLDAK/P26 P10/NMI HLDRQ/P27 P11/1NTPO READY/P17 P1211NTP1 MSTB P13I1NTP2IINTAK • Macro Service P1411NT/POLL Channel Instruction Decoder X1- Micro Sequencer Micro ROM Clock POLLIINT/P14 Generator X2- TOUT/P15 REFRQ CLKOUT/P07 83-001993C 6 NEe pPD70320/322 (V25) Functional Description Loop Counter [LC1. The dedicated hardware loop counter counts the number of loops for string operations and Architectural Enhancements the number of shifts performed for multiple bit shift/ The following features enable the pPD70320/322 to rotation instructions. The loop counter works with perform high-speed execution of instructions: internal dedicated shifters to speed the processing of multiplication/division instructions. • Dual data bus • 16-/32-bit temporary registers/shifters (TA, TB, Program Counter and Prefetch Pointer [PC and PFP1. TA+TB) The hardware PC addresses the memory location of • 16-bit loop counter (LC) the instruction to be executed next. The hardware PFP • Program counter (PC) and prefetch pointer (PFP) addresses the program memory location to be accessed • Internal ROM pass bus (pPD70322 only) next. Several clocks are saved for branch, call, return, and break instructions compared with processors Dual Data Bus. The pPD70320/322 has two internal having only one instruction pointer. 16-bit data buses: the main data bus and a subdata bus. This reduces the processing time required for addition/ Internal ROM Pass Bus. The pPD70322 features a subtraction and logical comparison instructions by dedicated data bus between the internal ROM and the one-third over single-bus systems. The dual data bus instruction pre-fetch queue. This allows internal ROM method allows two operands to be fetched simulta- opcode fetches to be performed in a single clock cycle neously from the general-purpose registers and (200 ns at 5 MHz); it also makes it possible for opcode transferred to the ALU. fetches to be performed while the external data bus is 16-/32-Bit Temporary Registers/Shifters. The 16-bit temporary registers/shifters (TA, TB) allow high-speed execution of multiplication/ division and shift/rotation busy. This feature gives the V25 a 10-20% performance increase when executing from the internal ROM. Register Set III instructions. By using the temporary registers/shifters, Figure 1 shows the pPD70320/322 has eight banks of the pPD70320/322 can execute multiplication/division registers functionally mapped into internal RAM. Each instructions about four times faster than with the bank contains general-purpose registers, pointer and microprogramming method. index registers, segment registers, and save areas. Figure 1. Register Banks in Internal RAM AW XXFOOH XXEFEH CW Bank 7 CH Data Register 32 bytes DW AH XXEEOH BW XXEF8H Bank 6 SP 6H BP XXECOH 4H Index Register IX 2H IV XXEFOH ~ DS1 EH PS CH Segment Register SS XXE40H AH DSO XXEE8H Bank1 Save PC 6H XXE20H SavePSW 4H Vector PC BankO 2H Reserved XXEEOH XXEOOH Internal RAM 49-001342B 7 pPD70320/322 (V25) NEe General-Purpose Registers [AW, BW, CW, OW]. There Program Counter [PC]. The PC is a 16-bit binary are four 16-bit g~neral-purpose registers that can each. counter that contains the offset ad.dress from the serve as individual 16-bit registers or two independent program segment of the next instruction to be executed. a-bit registers (AH, AL, BH, BL, CH, CL, DH, DL). The It is incremented every time an instruction is received following instructions use the general-pu rpose registers from the queue. It is loaded with a new location for default: whenever a branch, call, return, break, or interrupt is executed. AW Word multiplication/division, word I/O, data conversion Program Status Word [PSW]. The PSW contains the following status and control flags. AL Byte multiplication/division, byte I/O, BCD rotation, data conversion, translation 15 PSW a AH Byte multiplication/division RB2 I RB1 RBO I V I DIR IE BRK I BW Translation 7 o CW Loop control branch, repeat prefix I s I z I F1 AC FO p I BRKI I CY I CL Shift instructions, rotation instructions, BCD Status Flags Control Flags operations DW Word multiplication/division, indirect address- V Overflow bit DIR Direction of string ing I/O processing S Sign . Pointers [SP,BP] and Index Registers [IX, IV]. These IE Interrupt enable Z Zero registers are used as 16-bit base pointers or index BRK Break (after every registers in based addressing, indexed addressing, AC Auxiliary carry instruction) and based indexed addressing. The registers are used P Parity as default registers under the following conditions: RBn Current register CY Carry bank flags SP Stack operations BRKI I/O trap enable (see IX Block transfer (source), BCD string opera- software interrupts) tions FO, F1 General-pu rpose IY Block transfer (destination), BCD string user flags (accessed operations through the Flag Segment Registers. The segment registers divide the special function 1M-byte address space into 64K-byte blocks. Each register) segment register functions as a base address to a The eight low-order bits of the PSW can be stored in block; the effective address is an offset from that base. Physical addresses are generated by shifting the asso- the AH register and restored by a MOV instruction execution. The only way to alter the RBn bits via ciated segment register left four binary digits and then software is to execute an RETRBI or RETI instruction. adding the effective address. The segment registers are: Segment Register Default Offset PS (Program segment) PC SS (Stack segment) SP, Effective address DSO (Data segment-O) IX, Effective address DS1 (Data segment-1) . IY, Effective address Save Registers. Save PC and Save PSW are used as save areas during register bank context switching. The Vector PC save location contains the effective address of the interrupt service routine when register bank switching is used to service interrupts. a NEe pPD70320/322 (V25) Memory Map In larger-scale systems where internal RAM is not required for data memory, the internal RAM can be The jlPD70320/322 has a 20-bit address bus that can removed completely from the address space and directly access 1M bytes of memory. Figure 2 shows that dedicated entirely to registers and control functions the 16K bytes of internal ROM (JIPD70322 only) such as macro service and DMA channels. Clearing the are located at the top of the address space from FCOOOH RAMEN bit in the processor control register achieves to FFFFFH. this. When the RAMEN bit is cleared, internal RAM can Figure 2 shows the internal data area (IDA) is a 256- only be accessed by register addressing or internal byte internal RAM area followed consecutively by a control processes. Many instructions are executed 256-byte special function register (SFR) area. All the faster when the internal RAM is disabled. data and control registers for on-chip peripherals and 1/0 are mapped into the SFR area and accessed as Instruction Set RAM. For a description of these functions, see table 6. The jlPD70320/322 instruction set is fully compatible The IDA is dynamically relocatable in 4K-byte incre- with the V20 native mode instruction set. The V20 ments by changing the value in the internal data base instruction set is a superset of the jlPDBOB61BOBB (IDB) register. Whatever value is in this register will be instruction set with different execution times and assigned as the uppermost eight bits of the IDA mnemonics. address. The IDB register can be accessed from two different memory locations, FFFFFH and XXFFFH, The jlPD70320/322 does not support the V20 BOBO where XX is the value in the IDB register. emulation mode. All of the instructions pertaining to this have been deleted from the jlPD70320/322 in- ~ On reset, the internal data base register is set to FFH struction set. ~ which maps the IDA into the internal ROM space. However, since the jlPD70322 has a separate bus to Enhanced Instructions internal ROM, this does not present a problem. When these address spaces overlap, program code cannot be In addition to the jlPDBOB6/88 instructions, the executed from the IDA and internal ROM locations jlPD70320/322 has the following enhanced instructions. cannot be accessed as data. You can select any of the I nstruction Function eight possible register banks, which occupy the entire internal RAM space. Multiple register bank selection PUSH imm Pushes immediate data onto stack allows faster interrupt processing and facilitates multi- tasking. PUSH R Pushes eight general registers onto stack Figure 2. Memory Map POP R Pops eight general registers from stack MUL imm Executes 16-bit multiply of register or FFFFFH memory contents by immediate data Internal ROM SHL immB Shifts/rotates register or memory by ......-----1 FCOOOH SHR immB immediate value SHRA immB t---------/ ROL immB / ROR immB XXFFFH Special Function ROLC immB Registers [256 Bytes] 1-- RORC immB XXFOOH 1/" XXEFFH CHKIND Checks array index against designated External Internal RAM Area XXEOOH [256 Bytes] ,- boundaries INM Moves a string from an 1/0 port to memory OUTM Moves a string from memory to an 1/0 port PREPARE Allocates an area for a stack frame and copies previous trame pOinters OOOOOH DISPOSE Frees the current stack frame on a 1 Mbyte Memory Space procedure exit 49-001343A 9 pPD70320/322 (V25) NEe Unique Instructions effective forgraphics, high-level languages, and packingl unpacking applications. The pPD70320/322 has the following unique instructions. Bit field insertion copies the bit field of specified length from the AW register to the bit field addressed by Instruction Function DS1 :IV:reg8 (8-bit general-purpose register). The bit INS Inserts bit field field length can be located in any byte register or supplied as immediate data. Following execution, both EXT Extracts bit field the IV and reg8 are updated to point to the start of the ADD4S Performs packed BCD string addition next bit field. SUB4S Performs packed BCD string subtraction Bit field extraction copies the bit field of specified CMP4S Performs packed BCD string length from the bit field addressed by DSO:IX:reg8 to comparison the AW register. If the length of the bit field is less than 16 bits, the bit field is right justified with a zero fill. The ROL4 Rotates BCD digit left bit field length can be located in any byte register or ROR4 Rotates BCD digit right supplied as immediate data. Following execution, both TEST1 Tests bit IX and reg8 are updated to point to the start of the next bit field. SET1 Sets bit Figures 3 and 4 show bit field insertion and bit field CLR1 Clears bit extraction. NOT1 Complements bit BTCLR Tests bit; if true, clear and branch Packed Be 0 Instructions REPC Repeat while carry set Packed BCD instructions process packed BCD data either as strings (ADD4S, SUB4S, CMP4S) or byte REPNC Repeat while carry cleared format operands (ROR4, ROL4). Packed BCD strings may be 1 to 254 digits in length. The two BCD rotation Variable Length Bit Field Operation Instructions instructions perform rotation of a single BCD digit in Bit fields are a variable length data structure that can the lower half of the AL register through the register or range in length from 1 to 16 bits. The pPD70320/322 the memory operand. supports two separate operations on bit fields: insertion (INS) and extraction (EXT). There are no restrictions Bit Manipulation Instructions on the position of the bit field in memory. Separate The pPD70320/322 has five unique bit manipulation segment, byte offset, and bit offset registers are used instructions. The ability to test, set, clear, or comple- for insertion and extraction. Following the execution of ment a single bit in a register or memory operand these instructions, both the byte offset and bit offset increases code readability as well as performance over are left pointing to the start of the next bit field, ready the logical operations traditionally used to manipulate for the next operation. Bit field operation instructions bit data. This feature further enhances control ove,r are powerful and flexible and are therefore highly on-chip peripherals. Figure 3. Bit Field Insertion Bit length 15 o AW Bit offset Memory Byte boundary Segment base (OS1) 83-0001068 10 NEe pPD70320/322 (V25) Figure 4. Bit Field Extraction Bit length Bit offset Byte boundary Segment base (OSO) 83-000107B Additional Instructions Table 2. Bank Switch Instructions Besides the V20 instruction set, the pPD70320/322 Instruction Function has the four additional instructions described in table 1. BRKCS reg 16 Performs a high-speed software interrupt with context switch to the register bank indicated by the lower 3-bits of reg 16. This operation is identical to II ~. Table 1. Additionallnstructions the interrupt operation shown in figure 9. Instruction Function TSKSW reg 16 Performs a high-speed task switch to the register bank indicated by the lower 3-bits of reg 16. The PC BTCLR var,immB, Bit test and if true, clear and branch; and PSW are saved in the old banks. PC and PSW short label otherwise, no operation save registers and the new PC and PSW values are STOP (no operand) Power down instruction, stops oscillator retrieved from the new register bank's save areas. See figure 10. RETRBI (no operand) Return from register bank context switch interrupt MOVSPA Transfers both the SS and SP of the old register bank to the new register bank after the bank has FINT (no operand) Finished interrupt. After completion of a been switched by an interrupt or BRKCS instruction. hardware interrupt request, this instruction must be used to reset the current priority MOVSPB Transfers the SS and the SP of the current register bit in the in-service priority register (ISPR). * bank before the switch to the SS and SP of the new register bank indicated by the lower 3-bits of reg 16. *00 not use with NMI or INTR interrupt service routines. Repeat Prefixes Table 3. Software Interrupts Two new repeat prefixes (REPC, REPNC) allow con- Interrupt Description ditional block transfer instructions to use the state of the CY flag as the termination condition. This allows Divide error The CPU will trap if a divide error occurs as the result of a DIV or DIVU instruction. inequalities to be used when working on ordered data, thus increasing performance when searching and Single step The interrupt is generated after every instruction if sorting algorithms. the BRK bit in the PSW is set. Overflow By using the BRKV instruction, an interrupt can be Bank Switch Instructions generated as the result of an overflow. Interrupt The BRK 3 and BRK immB instructions can gene- The V25 has four new instructions that allow the instructions rate interrupts. effective use of the reg ister ban ks for software i nterru pts Array bounds The CHKIND instruction will generate an interrupt if and multitasking. These instructions are shown in specified array bounds have been exceeded. table 2. Also, see figures 8 and 10. Escape trap The CPU will trap on an FP01,2 instruction to allow software to emulate the floating point processor. Interrupt Structure I/O trap If the I/O trap bit in the PSW is cleared, a trap The pPD70320/322 can service interrupts generated will be generated on every IN or OUT instruction. both by hardware and by software. Software interrupts Software can then provide an updated peripheral are serviced through vectored interrupt processing. address. This feature allows software inter- changeability between different systems. See table 3 for the various types of software interrupts. 11 pPD70320/322 (V25) NEe When executing software written for another system, it Table 4. Interrupt Vectors is better to implement I/O with on-chip peripherals to Address Vector No. Assigned Use reduce external hardware requirements. However, since pPD70320/322 internal peripherals are memory 00 0 Divide error mapped, software conversion could be difficult. The 04 Break flag 1/0 trap feature allows easy conversion from external 08 2 NMI peripherals to on-chip peripherals. OC 3 BRK3 instruction Interrupt Vectors 10 4 BRKV instruction The starting address of the interrupt processing 14 5 CHKIND instruction routines may be obtained from table 3. The table 18 6 General purpose begins at physical address OOH, which is outside the 1C 7 FPO instructions internal ROM space. Therefore, external memory is 20-2C 8-11 General purpose required to service these routines. By servicing inter- rupts via the macro service function or context 30 12 INTSERO (Interrupt serial error, channel 0) switching, this requirement can be eliminated. 34 13 INTSRO (Interrupt serial receive, channel 0) Each interrupt vector is four bytes wide. To service a 38 14 INTSTO (Interrupt serial transmit, channel 0) vectored interrupt, the lower addressed word is trans- 3C 15 General purpose ferred to the PC and the upper word to the PS. 40 16 INTSER1 (Interrupt serial error, channel 1) See figure 5. 44 17 INTSR1 (Interrupt serial receive, channel 1) Figure 5. Interrupt Vector 0 48 18 INTST1 (Interrupt serial transmit, channel 1) 4C 19 1/0 trap Vector 0 50 20 INTDO (Interrupt from DMA, channel 0) OOOH : I 00lH 54 21 INTD1 (Interrupt from DMA, channel 1) 58 22 General purpose 002H 003H 5C 23 General purpose PS <- (OO3H, 002H) 60 24 INTPO (Interrupt from peripheral 0) PC <- (OO1H, OOOH) 64 25 INTP1 (Interrupt from peripheral 1) 83-000112A 68 26 INTP2 (Interrupt from peripheral 2) Execution of a vectored interrupt occurs as follows: 6C 27 General purpose (SP-1, SP-2) - PSW 70 28 INTTUO (Interrupt from timer unit 0) (SP-3, SP-4) - PS 74 29 INTTU1 (Interrupt from timer unit 1) (SP-5, SP-6) - PC . SP +- SP-6 78 30 INTTU2 (Interrupt from timer unit 2) IE-O,BRK-O 7C 31 INTTB (Interrupt from time base counter) PS +- vector high bytes 080-3FF 32-255 General purpose PC - vector low bytes Hardware Interrupt Configuration The V25 features a high-performance on-chip con- troller capable of controlling multiple processing for interrupts from up to 17 different sources (5 external, 12 internal). The interrupt configuration includes system interrupts that are functionally compatible with those of the V20IV30 and unique high-performance microcontroller interrupts. 12 NEe pPD70320/322 (V25) Interrupt Sources NMI, INTPO, and INTP1 are edge-sensitive interrupt inputs. By selecting the appropriate bits in the interrupt The 17 interrupt sources (table 5) are divided into mode register, these inputs can be programmed to be groups for management by the interrupt controller. either rising or falling edge triggered. ESO-ES2 corre- Using software, each of the groups can be assigned a spond to INTPO-INTP2, respectively. See figure 6. priority from 0 (highest) to 7 (lowest). The priority of individual interrupts within a group is fixed in hardware. Table 5. Interrupt Sources If interrupts from different groups occursimultaneously and the groups have the same assigned priority level, Interrupt Source the priority followed will be as shown in the Default (Priority Within Group) Default Group 1 2 3 Priority Priority column of table 5. Non-maskabie interrupt NMi 0 The ISPR is an .8-bit special function register; bits Timer unit iNTTUO INTTU1 INTTU2 1 PRo-PR7 correspond to the eight possible interrupt request priorities. The ISPR keeps track of the priority DMA controller INTDO INTD1 2 of the interrupt currently being serviced by setting the External peripheral iNTPO iNTP1 INTP2 3 appropriate bit. The address of the ISPR is X;XFFCH. interrupt The ISPR format is shown below. Serial channel 0 INTSERO INTSRO INTSTO 4 Seriai channel 1 iNTSER1 INTSR1 INTST1 5 Time base counter INTTB 6 NMI and INTR are system-type external vectored interrupts. NMI is not maskable via software. INTR is maskable (IE bit in PSW) and requires that an external device provide the interrupt vector number. It allows interrupt request INTR 7 II expansion by the addition of an external interrupt controller (j.tPD71059). Figure 6. Interrupt Mode Register (INTM) 7 6 5 4 3 2 o INTM I 0 I ES2 I 0 I ES, I 0 I ESo I 0 I ES NMI Trigger Mode 0 Falling Edge 1 Rising Edge 0 Falling Edge 1 Rising Edge 0 Falling Edge 1 Rising Edge 0 Falling Edge 1 Rising Edge 49-0013826 13 pPD70320/322 (V25) NEe Interrupt Processing Modes Register Bank Switching Interrupts, with the exception of NMI, INT, and INTTB, Register bank context switching allows interrupts to be have high-performance capability and can be pro- processed rapidly by switching register banks. After an cessed in any of three modes: standard vector inter- interrupt, the new register bank selected is that which rupt, register bank context switching, or macro service has the same register bank number (0-7) as the priority function. The processing mode for a given interrupt of the interrupt to be serviced. The PC and PSWare can be chosen by enabling the appropriate bits in the automatically stored in the save areas of the new corresponding interrupt request control register. As register bank and the address of the interrupt routine is shown in table' 6, each individual interrupt, with the loaded from the vector PC storage location in the new exception oflNTR and NMI, has its own associated IRC register bank. As in the vectored mode, the IE and BRK register. The format for all IRC registers is shown in bits in the PSW are cleared to zero. After interrupt figure 7. processing, execution of the RETRBI(return from register bank interrupt) returns control to the former All interrupt processing routines other than those for register bank and restores the former PC and PSW. NMI and INT must end with the execution of an FINT Figures 8 and 9 show register bank context switching instruction. Otherwise, subsequently, only interrupts and register bank return. of a higher priority will be accepted. In the vectored interrupt mode, the CPU traps to the vector location shown in table 4. Figure 7. Interrupt Request Control Registers (lRC) 7 IRC I FLAG I MASK I MSI INT I ENCS I 0 I PR2 I I I PR1 PRo I PR 2 1 0 Priority 000 Highest .. 1 1 1 Lowest ENCS Context Switch 0 Vectored Interrupt Mode 1 Bank Switching MS/INT Macro Service or Interrupt 0 Interrupt 1 Macro Service xxMKn Interrupt Mask 0 Mask Open: Interrupts Enabled 1 Mask Closed: Interrupts Disabled xxFn Interrupt Request Flag 0 No Request 1 Interrupt Requested 49-0013838 14 NEe pPD70320/322 (V25) Figure 8. Register Bank Context Switching Macro Service Function The macro service function (MSF) is a special micro- RBi RBj program that acts as an internal DMA controller be- AW AW tween on-chip peripherals (special function registers, CW CW SFR) and memory. The MSF greatly reduces the DW DW software overhead and CPU time that other processors BW BW would require for register save processing, register SP SP returns, and other handling associated with interrupt BP IX c) BP IX processing. If the MSF is selected for a particular interrupt, each IV IV time the request is received, a byte or word of data will DS1 DS1 be transferred between the SFR and memory without PS PS interrupting the CPU. Each time a request occurs, the SS SS macro service counter is decremented. When the DSO DSO counter reaches zero, an interrupt to the CPU is Save PC ~ Save PC generated. The MSF also has. a character search SavePSW r-- ~ SavePSW option. When selected, every byte transferred will be Vector PC Vector PC t-- compared to an a-bit search character and an interrupt Reserved Reserved will be generated if a match occurs or if the macro r-- service counter counts out. y PC Like the NMI, INT and INTTB, the two DMA controller interrupts (INTDO, INTD1) do not have MSF capability. Y PSW There are eight a-byte macro service channels mapped 49-001344A into internal RAM from XXEOOH to XXE3FH. Each macro service channel contains all of the necessary Figure 9. Register Bank Return information to execute the macro service process. Figure 11 shows the components of each channel. RBi RBj AW AW Figure 10. Task Switching CW CW CURRENT NEW DW DW AW AW BW BW SP SP cw CW DW DW BP BP IX IV 0 IX IV BW SP BP [) BW SP BP DS1 DS1 PS PS IX IX SS SS IV IV DS1 DS1 DSO DSO PS PS Save PC r--- Save PC SavePSW r-- - SavePSW SS SS DSO DSO Vector PC Vector PC ~ PC Save r-- PC Save Reserved Reserved .-1- PSWSave - PSWSave VPC VPC Lr PC Reserve Reserve ~ PSW y PC j.- 49-001346A VPC: Vector PC L-{ PSW I- RB: Register ba nk field RBL Reg 16 83-MBOOS273A 15 pPD70320/322 (V25) NEe Figure 11. Macro Service Channels On-Chip Peripherals Timer Unit t Upt03FH The tlPD70320/322 (figure 13) has two programmable 16-bit interval timers (TMO, TM1) on-chip, each with XXE08H variable input clock frequencies. Each of the two 16-bit MSS M.S. Channel 0 timer registers has an associated 16-bit modulus register (MDO, MD1). Timer 0 operates in the interval MSP timer mode or one-shot mode; timer 1 has only the interval timer mode. Resl'lvcci I SCHR Interval Timer Mode. In this mode, TMO/TM1 are SFRP MSC XXEOOH [Internal RAM] decremented by the selected input clock and, after 1 counting out, the registers are automatically reloaded ~16Bits-l from the modulus registers and counting continues. Each time TM1 counts out, interrupts are generated MSS = Macro service segment through TF1 and TF2 (Timer Flags 1, 2). When TMO MSP = Macro service pointer counts out, an interrupt is generated through TFO. SCHR = Search character The timer-out signal can be used as a square-wave SFRP = Special function register pOinter output whose half-cycle is equal to the count time. MSC = Macro service counter 49-001345A There are two selectable input clocks (SCLK: system clock = fosc/2; fosc = 10 MHz). Setting the macro service mode for a given interrupt Clock Timer Resolution Full Count requires programming the corresponding macro ser- SCLK/6 1.2 tiS 78.643 ms vice control register. Each individual interrupt, exclud- SCLK/128 25.6 tiS 1.678 s ing INTR, NMI and TBC, has its own associated MSC register. See table 6. Format for all MSC registers is shown in figure 12. Figure 12. Macro Service Control Registers (MSC) 7 6 4 o xxMSn I MSM2 I MSM1 I MSMo I DIR I 0 I CH2 I CH1 I CHo I I 2 1 0 Macro Service Channel .. 0 0 0 Channel 0 ··· 1 1 1 Channel 7 Transfer Direction 0 From Memory to SFR 1 From SFR to Memory Transfer Mode- 0 () 0 8-bit Transfer 0 0 1 16-bit Transfer * 1 0 0 8-bit Transfer with Character Search * All other combinations are reserved 49-001384B 16 NEe pPD70320/322 (V25) Figure 13. Timer Unit Block Diagram ,------- "I I I I fose /S I fose/ 128 I I fose/ 12 I fosC/ 128 I I I fose /S Output 1---~nTO fose/ 12 Control --11------------ foSc/128 L ___ _ --~ Internal Bus ~ 49-0013478 17 pPD70320/322 (V25) NEe One-Shot Mode. In the one-shot mode, TMO and MOO Clock Timer Resolution Full Count operate as independent one-shot timers. Starting with SCLK/12 2.4 p.s 157.283 ms a preset value, each is decremented to zero. At zero, SCLK/128 25.6 P.S 1.678 s counting ceases and an interrupt is generated by TFO (from TMO) or TF1 (from MOO). One-shot mode allows Setting the desired timer mode requires programming two selectable input clocks (fosc = 10 MHz). the timer control register. See figures 14 and 15 for format. Figure 14. Timer Control Register 0 7 6 o I TSO I TCLKO I MSO I MCLK I ENTO I ALV I MOD1 MODO I I MOD1 MODO Timer Mode 0 0 Interval Timer Mode 0 1 One-shot Timer Mode 1 X Reserved Active Level of TOUT 0 TOUT initial level = 0 1 TOUT initial level = 1 Enable Timer-Out Signal 0 Disable Timer Out 1 Enable Timer Out One-shot Mode Modulus Register Clock 0 SCLK/12 1 SCLK/128 Modulus Start (One-shot Mode) 0 Stop Modulus Register Count 1 Start Modulus Register Count TM Register Clock Select MOD1 MODO TCLK 0 0 0 SCLK/6 Interval Timer Mode 0 0 1 SCLK/128 0 1 0 SCLK/12 One-shot Mode 0 1 1 SCLK/128 Timer Start Bit 0 Stop Timer" 1 Start Timer" "Starts and stops TMO in one-shot mode ~,H)01387B Figure 15. Timer Control Reg/ster 1 7 4 3 2 o I TS1 I TCLK1 I 0 I 0 I 0 I 0 I 0 I 0 I o I SCLK/6 TM1 Clock Select 1 I SCLK/128 Timer Start Bit o I Stop TM1 counting 1 I Start TM1 counting 49-0013898 18 NEe pPD70320/322 (V25) Time Base Counter/Processor Control Register The TBC (figure 18) uses the system clock as the input frequency. The system clock can be changed by The 20-bit free-running time base counter controls programming the PCKO and PCK1 bits in the processor internal timing sequences and is available to the user control register (PRC). Reset initializes the system as the source of periodic interrupts at lengthy intervals. clock to fasc/8 (fasc = external oscillator frequency). One of four interrupt periods can be selected by pro- gramming the TBO and TB1 bits in the processor Figure 18. Time Base Counter (TBC) Block Diagram control register (PRC). The TBC interrupt is unlike the others in that it is fixed as a level 7 vectored interrupt. Macro service and register bank switching cannot be used to service this interrupt. See figures 16 and 17. SCLK The RAMEN bit in the PRC register allows the internal RAM to be removed from the memory address space to implement faster instruction execution. 49-001348A Figure 16. Time Base Interrupt Request Control Register 7 6 4 2 I TBF I TBMK I 0 I 0 I 0 I 1 I 1 I 1 I Time Base Interrupt Mask Bit o I Unmasked 1 I Masked Time Base Interrupt Flag o I No Interrupt Generated 1 I Interrupt Generated 49-0013936 Figure 17. Processor Control Register (PRC) 7 o PRC I 0 I RAMEN I 0 I 0 I TB1 TBO I PCK1 I I PCKO I I I System Clock Select PCK1 PCKO 0 0 fosc/2 0 1 fOSC/4 1 0 fOSC/8 1 1 Reserved Time Base Interrupt Period TB1 TBO 0 0 21O/fCLK 0 1 213/fCLK 1 0 216/fCLK 1 1 22O /fCLK Internal RAM Enable 0 Disabled 1 Enabled 49-0013958 19 pPD70320/322 (V25) NEe Refresh Controller Each baud rate generator has. an 8-bit baud rate generator (BRGn) data register, which functions as a The pP070320/322 has an on-chip refresh controller prescaler to a programmable input clock selected by for dynamic and pseudostatic RAM mass storage the serial communication control (SCCn) register. memories. The refresh controller generates refresh Together these must be set to generate a frequency addresses and refresh pulses. It inserts refresh cycles equivalent to the desired baud rate. between the normal CPU bus cycles ~ccording to refresh specifications. The baud rate generator can be set to obtain the desired transmission rate according to the following The refresh controller outputs a 9-bit refresh address formula: on address bits Ao-As during the refresh bus cycle. Address bits Ag-A19 are all 1'so The 9-bit refresh B G = SCLK X 106 address is automatically incremented at every refresh X 2n + 1 timing for 512 row addresses. The a-bit refresh mode (RFM) register (figure 19) specifies the refresh opera- where B = baud rate tion and allows refresh during both CPU HALT and G = baud rate generator register (BRGn) HOLD modes. Refresh cycles are automatically timed value to REFRQ following read/write cycles to minimize the n = input clock specifications (n between effect on system though put. o and 8) This is the value that is loaded into the SCCn register (see figure 23). The following shows the REFRQ pin level in relation to SCLK = system clock frequency (MHz) bits 4 (RFEN) and 7 (RFLV) of the refresh mode register. Based on the above expression, the following table shows the baud rate generator values used to obtain RFEN RFLV REFRQ Level standard transmission rates when SCLK = 5 MHz. -- -- 0 0 0 0 1 1 Baud Rate BRGn Value Error 1%) 1 0 0 110 7 178 0.25 1 1 Refresh pulse output 150 7 130 0.16 Serial Interface 300 6 130 0.16 600 5 130 0.16 ThepP070320/322 hastwo full-duplex UARTs, channel o and channel 1. Each serial port channel has a 1200 4 130 0.16 transmit line (TxOn), a receive line (RxOn), and a clear 2400 3 130 0.16 to send (CTSn) input line for handshaking. Communi- 4800 2 130 0.16 cation is synchronized by a start bit, and you can 9600 1 130 0.16 program the ports for even, odd, or no parity, character lengths of 7 or a bits, and 1 or 2 stop bits. 19,200 0 130 0.16 38,400 0 65 0.16 ThepP070320/322 has dedicated baud rate generators for each serial channel. This eliminates the need to 1.25M 0 2 0 obligate the on-chip timers. The baud rate generator allows a wide range of data transfer rates (up to 1.25 Mb/s). This includes all of the standard baud rates without being restricted by the value of the particular external crystal. 20 NEe pPD70320/322 (V25) Figure 19. Refresh Mode Register (RFM) 7 5 4 2 RFM I RFLV I HLDRF I HLTRF I RFEN I RFW1 RFWO I RFT1 RFTO I I Refresh Cycle Speed RFT1 RFTO Refresh Period 0 0 16JSCLK 0 1 32JSCLK 1 0 64JSCLK 1 1 128JSCLK Refresh Cycle Wait States RFW1 RFWO Number of Wait States 0 0 0 0 1 1 1 0 2 1 1 2 Refresh Enable 0 Refresh Pin RFLV 1 Refresh Enabled Halt Refresh Enable 0 Refresh During Halt Disabled 1 Refresh During CPU HALT Hold Refresh Enable 0 Hold Refresh Disabled 1 Refresh During Hold Refresh level output to RFSH pin when RFEN = 0 49-001392B 21 pPD70320/322 (V25) NEe In addition to the asynchronous mode, channel 0 has a synchronous 1/0 interface mode. In this mode, each bit of data tranferred is synchronized to a serial clock (SCKO). This is the same as the NEC pCOM75 and pCOM87 series, and allows easy interfacing to these devices. Figure 20 is the serial interface block diagram; figures21, 22, and 23 show the three serial communica- tion registers. Figure 20. Serial Interlace Block Diagram TxDO RxDO CTSO Baud Rate SCKO Generator TxD1 RxD1 CTS1 Baud Rate TxC1 Generator 49-0013498 22 NEe pPD70320/322 (V25) Figure 21. Serial Communication Mode Register (SCM) o SCM I TxROY I RxE I PRTY1 PRTYO I CLITSK I SLlRSCK I MD1 MOO I I I I M01 MOO Mode 0 0 I/O Interface [Note 1) 0 1 Asynchronous 1 X Reserved Stop Bit Length/Rcv Clk [Note 3) 0 1 Stop Bit/Ext Clk [input on CTSO) 1 2 Stop Bits/lnt Clk [output on CTSO) Char Length/Trans Shift Clk [Note 3) 0 7 Bits/No Effect 1 8 Bits/Trigger Transmit PRTY t--r-- Parity Control 1 0 0 0 No Parity 0 1 o Parity [Note 2) 1 0 Odd Parity 1 1 Even Parity Receiver Control 0 Disable 1 Enable Transmitter Control 0 Disable 1 Enable Notes. (1) Only Channel 0 has I/O interface mode. (2) When 0 parity is selected, the parity is 0 during transmit and is ignored during receive. (3) Applies only to I/O interface mode. 49·0013858 Figure 22. Serial Communication Error Registers (SCE) 3 2 SCEn I RxO I 0 I 0 I 0 I 0 I ERP I ERF J ERO L I 1 Overrun Error Flag Overrun has occurred o I Overrun has not occurred Framing Error 1 I Stop bit not detected o I Framing error has not occurred Parity Error 1 I Parity error has occurred oj No parity error has occurred RxD Line Status 1 I RxDLine = 1 o I RxDLine = 0 49·001386A 23 pPD70320/322 (V25) NEe Figure 23. Serial Communication Control Register (SCC) 7 4 3 2 scc I 0 I 0 I 0 I 0 I PRS3 1 PRS2 PRS1 1 PRSo PRS Input clock for baud 321 0 rate generator 0000 SCLK/2 0001 SCLK/4 001 0 SCLK/8 00 1 1 SCLK/16 01 00 SCLK/32 o1 0 1 SCLK/64 o1 1 0 SCLK/128 o1 1 1 SCLK/256 *AII oth er combinations after 1000 are illegal 1 000 SCLK/512* 49-0013888 DMA Controller Transfers Between 1/0 and Memory. In single-transfer The pPD70320/322 has a two-channel, on-chip DMA mode, one DMA transfer occurs after each rising edge controller. This allows rapid data transfer between of DMARa. After the transfer, the bus is returned to the memory and auxiliary storage devices. The DMA con- CPU. In demand release mode, the rising edge of troller supports four modes of operation, two for DMARa enables DMA cycles, which continue as long memory-to-memory transfers and two for transfers as DMARa is high. between 1/0 and memory. See figures 24, 25, and 26 for In all modes, the TC (terminal count) output pin will a graphic representation of the DMA registers. pulse low and a DMA completion interrupt request will be Memory-to-Memory Transfers. In the single-step mode, generated after the predetermined number of DMA when one DMA request is made, execution of one cycles has been completed. instruction and one DMA transfer are repeated alter- The bottom of internal RAM contains all the necessary nately until the prescribed number of DMA transfers address information for the designated DMA channels. has occurred. Interrupts can be accepted while in this The DMA channel mnemonics are as follows: mode. In burst mode, one DMA request causes DMA TC Terminal counter transfer cycles to continue until the DMA terminal SAR Source address register counter decrements to zero. Software can also initiate SARH Source address register high memory-to-memory transfers. DAR Destination address register DARH Destination address register high Figure 24. DMA Channels The DMA controller generates physical source addresses by offsetting SARH 12 bits to the left and then adding the SAR. The same procedure is also used TC1 XXEOEH to generate physical destination addresses. You can SARH1 I DARHt program the controller to increment or decrement DAR1 source andlor destination addresses independently SAR1 Channel 1 during DMA transfers. TCO Channel 0 When the EDMA bit is set, the internal DMARa flag is SARHOI DARHO cleared. Therefore, DMARas are only recognized after DARO the EDMA bit has been set. SARO XXEOOH See Execution Clock Counts for Operation and Bus Controller Latency tables for DMA latency and transfer 1-16Bits-J rate information. 49-001350A 24 NEe pPD70320/322 (V25) Figure 25. DMA Mode Registers (DMAM) 4 o I I IMD2 MD1 I MDo I W I EDMA I TDMA I 0 I 0 DMAMO DMAM1 I Trigger DMA [Note 1] o I No Effect 1 I TriggerDMA Enable DMA [Note 2] o I Disable DMA 1 I Enable DMA Word/byte o I Byte Transfers 1 I Word Transfers DMAMode MD2 MD1 MDo 0 0 0 Single Step (Mem to Mem) 0 0 1 Demand Release (110 to Mem) 0 1 0 Demand Release (Mem to 110) 0 1 1 Reserved 1 0 0 Burst Mode (Mem to Mem) Notes: 1 0 1 Single Transfer (110 to Mem) [1] Valid only during single-step and burst modes. 1 1 0 Single Transfer (Mem to 110) [2] Cleared when TC = 0; cleared when DMA 1 1 1 Reserved transfer is aborted by NMI. 49·0013908 Figure 26. DMA Address Control Registers (DMAC) 7 DMACO I 0 I 0 I PD1 PD~ I 0 I 0 I PS1 I PSO DMAC1 I I I I Source Address Increment/Decrement Control I PS1 PSO 0 0 Source Address not Incremented/Decremented 0 1 Increment Source Address 1 0 Decrement Source Address 1 1 Source Address not Incremented/Decremented Destination Address Increment/Decrement Control PD1 PD~ 0 0 Destination Address not Incremented/Decremented 0 1 Increment Destination Address 1 0 Decrement Destination Address 1 1 Destination Address not Incremented/Decremented 49-0013918 25 pPD70320/322 (V25) NEe Parallel Ports Use the associated port mode and port mode control registers to select the mode for a given I/O line. The pPD70320/322 has three a-bit parallel I/O ports: PO, P1, and P2. Refer to figures 27 through 31. Special function register (SFR) locations can access these ports. The port lines are individually programmable as inputs or outputs. Many of the port lines have dual functions as port or control lines. Figure 27. Port Mode Registers 0 and 2 (PMO, PM2) 7 6 - 2 o PMO PM2 Output Port Mode Input Port Mode 49-001377B Figure 28. Port Mode Register 1 (PM 1) 7 6 4 2 PM1 I PM17 I PM16 PM1s I PM14 I 1 I 1 1 1 1 1 1 I I I I PMC1 n PM1 n Port P1 n 0 0 Output 0 1 Input n = 7, 6, 5, or 4 83-004537B Figure 29. Port Mode Control Register 0 (PMCO) 7 4 49-001378B 26 NEe pPD70320/322 (V25) Figure 30. Port Mode Control Register 1 (PMC1) 7 5 4 o I PMC 17 I PMC 1S I PMC 1S I PMC 14 I PMC13 I PMC12 I PMC 11 I PMC 10 I - Port/Control Bit Selection X NMIIP10 Input X INTPO/P11 Input X INTP1/P12 Input 0 INTP2/P13 Input 1 INTAK Output 0 P14 1/0 or POLL Input 1 INT Input 0 P1S"0 1 TOUT Output 0 P1S"0 1 SCKO Output 0 P17110 1 READY Input 49-0013796 Figure 31. Port Mode Control Register 2 (PMC2) 7 6 4 3 2 o PMC2 I PMC27 I PMC 26 I PMC2s I PMC24 I PMC23 I PMC 22 I PMC 21 I PMC 20 Port/Control Bit Selection 0 110 Port 1 DMARQO Input 0 110 Port 1 DMAAKO Output 0 110 Port 1 TCOOutput 0 110 Port 1 DMARQ1 Input 0 110 Port 1 DMAAK1 Output 0 110 Port 1 TC10utput 0 110 Port 1 HLDAK Input 0 110 Port 1 HLDRQ Output 49-0013806 27 pPD70320/322 (V25) NEe The analog comparator port (PT) compares each input Figure 33. Programmable' Walt State Generation line to a reference voltage. The reference voltage is programmable to be the VTH input x n/16, where n = 1 FFFFFH to 16. See figure 32. 256K Programmable Wait State Generation COOOOH You can generate wait states internally to further reduce the necessity for external hardware. Insertion ., L" L.o ~ of these wait states allows direct interface to devices 40000H whose access times cannot meet the CPU read/write 128K timing requirements. 20000H When using this function, the entire 1M-byte memory 128K OH address space is divided into 128K-blocks. Each block can be programmed for zero, one, ortwo wait states, or 49-001351A two plus those added by the extenal READY signal. The top two blocks are programmed together as one unit. The appropriate bits in the wait control word (WTC) control wait state generation. Programming the upper two bits in the wait control word will set the wait state conditions for the entire I/O address space. Figure 33 shows the memory map for programmable wait state generation; see figure 34 for a graphic representation of the wait control word. Figure 32. Port Mode Register T (PMT) 7 3 o I 0 I 0 I 0 I 0 I PMT3 I PMT2 I PMT1 I PMTo PMT I J Comparator Port Threshold Selection 0 0 0 0 VTH x 16/16 0 0 0 1 VTH x 1/16 0 0 1 0 VTH x 2/16 0 0 1 1 VTH x 3/16 0 1 0 0 VTH x 4/16 0 1 0 1 VTH x 5/16 0 1 1 0 VTH x 6/16 0 1 1 1 VTH x 7/16 1 0 0 0 VTH x 8/16 1 0 0 1 VTH x 9/16 1 0 1 0 VTH x 10/16 1 0 1 1 VTH x 11/16 1 1 0 0 VTH x 12/16 1 1 0 1 VTH x 13/16 1 1 1 0 VTH x 14/16 1 1 1 1 VTH x 15/16 49-001381 B 28 NEe pPD70320/322 (V25) Standby Modes STOP Mode. The two low-power standby modes are HALT and The STOP mode allows the largest power reduction STOP. Software causes the processor to enter either while maintaining RAM. The oscillator is stopped, mode. halting all internal peripherals. Internal status is main- tained. Only a reset or NMI can release this mode. HALT Mode. A standby flag in the SFR area is reset by rises in the In the HALT mode, the processor is inactive and the supply voltage. Its status is maintained during normal chip consumes much less power than when opera- operation and standby. The STBC register (figure 35) tional. The external oscillator remains functional and is not initialized by RESET. Use the standby flag to all peripherals are active. Internal status and output determine whether program execution is returning port line conditions are maintained. Any unmasked from standby or from a cold start by setting this flag interrupt can release this mode. In the EI state, inter- before entering the STOP mode. rupts subsequently will be processed in vector mode. In the 01 state, program execution is restarted with the instruction following the HALT instruction. Figure 34. Walt Control Word Wait Control High 7 o Wait Control Low 7 4 o I BLK31 I BLK30 I BLK21 I BLK20 I BLK11 I BLK10 I BLK01 I BLKOO l BLKn1 BLKnO Mode 0 0 No Waits 0 1 1 Wait 1 0 2 Wait 1 1 2 Waits + Ext. Ready 49-0013948 Figure 35. Standby Register 7 5 4 o o o o o SBF I STBC L 1 Standby Flag I No changes in supply voltage (standby) o I Rising edge on supply voltage (cold start) 49-0013968 29 pPD70320/322 (V25) NEe Special Function Registers Reset By tel Value R/W Table 6 shows the special function register mnemonic, Name Word Address (Note 2) (Note 1) Function type, address, reset value, and function. The 8 high- order bits of each address (xx) are specified by the I DB RXBO B xxF60H R Receive buffer 0 register. TXBO B xxF62H W Transfer buffer 0 SFR area addresses not listed in table 6 are reserved. If SRMSO B xxF65H R/W Serial receive macro service 0 read, the contents of these addresses are undefined, and any write operation will be meaningless. STMS1 B xxF66H R/W Serial transmit macro service 1 Table 6. Special Function Registers SCMO B xxF68H OOH R/W Serial communication mode 0 Reset Bytel Value R/W SCCO B xxF69H OOH R/W Serial communication Name Word Address (Note 2) (Note 1) Function control 0 PO B xxFOOH R/W Port 0 BRGO B xxF6AH OOH R/W Baud rate generator 0 PMO B xxF01H FFH W Port mode 0 SCEO B xxF6BH OOH R Serial communication error 0 PMCO B xxF02H OOH W Port mode control 0 SEICO B xxF6CH 47H R/W Serial error interrupt P1 B xxF08H R/W Port 1 control 0 PM1 B xxF09H FFH W Port mode 1 SRICO B xxF6DH 47H R/W Serial receive interrupt PMC1 B xxFOAH OOH W Port mode control 1 control 0 P2 B xxF10H R/W Port 2 STICO B xxF6EH 47H R/W Serial transmit interrupt control 0 PM2 xxF11H FFH W Port mode 2 RXB1 B xxF70H R Receive buffer 1 PMC2 B xxF12H OOH W Port mode control 2 TXB1 B xxF72H W Transmit buffer 1 PT B xxF38H R PortT SRMS1 B xxF75H R/W Serial receive macro PMT xxF3BH OOH R/W Port mode T service 1 INTM B xxF40H OOH R/W Interrupt mode STMS1 B xxF76H R/W Serial transmit macro EMSO B xxF44H R/W External interrupt service 1 macro service 0 SCM1 B xxF78H OOH R/W Serial communication EMS1 B xxF45H R/W External interrupt mode 1 macro service 1 SCC1 B xxF79H OOH R/W Serial communication EMS2 xxF46H R/W External interrupt control 1 macro service 2 BRG1 B xxF7AH OOH R/W Baud rate generator EXICO xxF4CH 47H R/W External interrupt register 1 control 0 SCE1 B xxF7BH OOH R Serial communication EXIC1 xxF4DH 47H R/W External interrupt error 1 control 1 SEIC1 B xxF7CH 47H R/W Serial error interrupt EXIC2 xxF4EH 47H R/W External interrupt control 1 control 2 SRIC1 B xxF7DH 47H R/W Serial receive interrupt control 1 Notes: STIC1 B xxF7EH 47H R/W Serial transmit interrupt (1) Indicates if register is available for read/write operations. control 1 (2) Reset values not specified are undefined. TMO W xxF80H R/W Timer register 0 TMOL B xxF80H R/W Timer register 0 low TMOH B xxF81H R/W Timer register 0 high MDO W xxF82H R/W Modulo register 0 30 NEe pPD70320/322 (V25) Table 6. Special Function Registers (cant) Absolute Maximum Ratings TA = 25°C Reset Bytel Value R/W Supply voltage, VDD -0.5 to +7.0 V Name Word Address (Note 2) (Note 1) Function Input voltage, VI -0.5 to VDD + 0.5 V (::::: +7.0 V) MDOL B xxF82H R/W Modulo register 0 low Output voltage, Vo -0.5 to VDD + 0.5 V (::::: +7.0 V) MDOH B xxF83H R/W Modulo register 0 high Threshold voltage, VTH -0.5 to VDD + 0.5 V (::::: +7.0 V) TM1 W xxF88H R/W Timer register 1 Output current, low; IOL TM1L B xxF88H R/W Timer register 1 low Each output pin 4.0 rnA TM1H B xxF89H R/W Timer register 1 high Total 50 rnA MD1 W xxF8AH R/W Modulo register 1 Output current, high; IOH Each output pin -2.0 rnA MD1L B xxF8AH R/W Modulo register 1 low -20 rnA Total MD1H B xxF8BH R/W Modulo register 1 high Operating temperature range, TOPT -40 to +85°C TMCO B xxF90H OOH R/W Timer control 0 Storage temperature range, TSTG -65 to +150 °C TMC1 B xxF91H OOH R/W Timer control 1 Comment: Exposure to Absolute Maximum Ratings for extended TMMSO B xxF94H R/W Timer macro service 0 periods may affect device reliability; exceeding the ratings could TMMS1 B xxF95H R/W Timer macro service 1 cause permanent damage. TMMS2 B xxF96H R/W Timer macro service 2 TMICO TMIC1 B B xxF9CH xxF9DH 47H 47H R/W Timer interrupt control 0 R/W Timer interrupt control 1 DC Characteristics VDD = +5 V ±10%; TA = -10 to +70°C (Note 1) limits Test ED TMIC2 B xxF9EH 47H R/W Timer interrupt control 2 Typ Parameter Symbol Min Max Unit Conditions DMACO B xxFAOH R/W DMA control 0 43 Supply current, IDD1 100 rnA fCLK = 5 MHz DMAMO B xxFA1H OOH R/W DMA mode 0 operating 58 120 rnA fCLK = 8 MHz DMAC1 B xxFA2H R/W DMA control 1 Supply current, IDD2 17 40 rnA fCLK = 5 MHz HALT mode 21 50 rnA fCLK = 8 MHz DMAM1 B xxFA3H OOH R/W DMA mode 1 Supply current, IDD3 10 30 J1A STOP mode DICO B xxFACH 47H R/W DMA interrupt control 0 Threshold current ITH 0.5 1.0 rnA VTH = 0 to VDD DICI B xxFADH 47H R/W DMA interrupt control 1 Input voltage, VIL 0 0.8 V STBC B xxFEOH R/W Standby control low RFM B xxFE1H OFCH R/W Refresh mode Input voltage, VIH1 2.2 VOD V ~utsexcept WTC W xxFE8H FFH R/W Wait control high RESET, P10INMI, X1, X2 WTCL B xxFE8H FFH R/W Wait control low VIH2 0.8 x VOD V RESET, P10INMI, WTCH B xxFE9H FFH R/W Wait control high X1, X2 VDD FLAG B xxFEAH OOH R/W Flag register Output voltage, VOL 0.45 V IOL = 1.6 rnA PRC B xxFEBH 4EH R/W Processor control low TBIC B xxFECH 47H R/W Time base IRC register Output voltage, VOH VDD V IOH = -0.4 rnA high -1.0 ISPR B xxFFCH R In service priority register Input current liN ±20 J1A EA, P10/NMI; IDB B xxFFFH R/W Internal data area base VI = 0 to VDD FFFFFH Input leakage III ±10 J1A All except EA, current P10/NMI; VI = 0 to VDD Output leakage ILO ±10 J1A Vo = 0 to VDD current Data retention VDDDR 2.5 5.5 V voltage Notes: (1) The standard operating temperature range is -10 to +70°C. However, extended temperature range parts (-40 to +85 0c) are available. 31 pPD70320/322 (V25) NEe Supply Current vs Clock Frequency AC Characteristics Voo = +5 V ±10%; TA = -10 to +70°C; CL = 100 pF (max) 150 TA = 25°C limits Test 140 r - - Voo = 5 v Parameter . Symbol Min Max Unit Conditions Typ. Sample 130 splc.- Voo rise, tRVO, tFVO 200 /lS STOP mode Point fall time 120 Input rise, tlR, tlF 20 ns ~xcept X1, X2, 110 fall time ESET, NMI Spec. Point Input rise, 30 ns RESET, NMI 100 tIRS, tlFS fall time (Schmitt) 90 Output rise, tOR, tOF 20 ns Except CLKOUT C( 80 fall time E. X1 cycle time tCYX 98 250 ns Note 3 Q .E 70 62 250 ns Note 4 60 ./ X1 width, low tWXL 35 ns Note 3 /"'" V 50 20 ns Note 4 .,/" 40 ~ X1 width, high tWXH 35 ns Note 3 /"'" 20 ns Note 4 30 /"'" X1 rise, tXR, tXF 20 ns 20 fall time 10 CLKOUT cycle tCYK 200 2000 ns Note 3 time 125 2000 ns Note 4 o o 4 5 6 9 CLKOUT width, tWKL 0.5T -15 ns Note 1 felK [MHz] low 83-004331 A CLKOUT width, tWKH 0.5T -15 ns high Comparator Characteristics CLKOUT rise, tKR, tKF 15 ns Voo = +5 V ±10%; TA = -10 to +70°C fall time limits Test Address delay 15 90 ns tOKA Parameter Symbol Min Max Unit Conditions time Accuracy VACOMP ±100 mV Address hold tHMA 0.5T - 30 ns time Threshold voltage VTH 0 VOO V +0.1 Address valid to tOAOR T(n + 1.5) ns Note 2 input data valid -90 Comparison time tCOMP 64 65 tCYK MREQ to data tOMRO T(n+ 1) ns PT input voltage VIPT 0 VOO V delay -75 PTn leakage ILC ±10 pA MSTB to data T(n +0.5) ns tOMSO current delay -75 MREQ to MSTB. tOMRMS 0.5T 0.5T ns CapaCitance Characteristics delay -35 +35 Voo = 0 v; TA = 25°C MREQ width, T(n + 1) ns tWMRL Limits low -30 Test Parameter Symbol Min Max Unit Conditions Input data hold tHMOR 0 ns time Input capacitance CI 10 pF fc = 1 MHz; Unmeasured pins Next control tscc T -25 ns Output capacitance Co 20 pF returned to 0 V setup time 1/0 capacitance CIO 20 pF Notes: (1) T = CPU clock period (tCYK)' (2) n = number of wait states inserted. (3) For 5 MHz parts (J.IPD70320/322). (4) For 8 MHz parts (J.IPD70320/322-8). 32 NEe pPD70320/322 (V25) AC Characteristics (cont) AC Characteristics (cont) Limits Test Limits Test Parameter Symbol Min Max Unit Conditions Parameter Symbol Min Max Unit Conditions RESET width low tWRSL1 30 ms STaPf MREQ to TC tOMRTC 0.5T + 50 ns paR delay time (Power- Address data tOAOW 0.5T + 50 ns on reset) output tWRSL2 5 /15 System MREQ delay time tOAMR 0.5T - 30 0.5T + 30 ns reset MSTB delay time tOAMS T -30 T +30 ns MREQ, 10STB to READY tSCRY T(n -1) ns n2::2 setup time -100 MSTB width, tWMSL T(n + 0.5) ns low - 30 MREQ, 10STB to READY tHCRY T(n -1) ns n2::2 Data output T(n + 1) ns hold time tSOM setup time - 50 HLDRQ setup time tSHQK 30 ns Data output tHMOW 0.5T - 30 ns HLDAK output delay tOKHA 80 ns hold time Bus control float to tCFHA T -50 ns 10STB delay time tOAIS 0.5T - 30 0.5T + 30 ns HLDAK~ 10STB to data tDiSO T(n + 1) ns HLDAK t to control output tOHAC T -50 ns input - 90 time 10STB width, low Address hold tWISL tHISA T(n + 1) -30 0.5T - 30 ns ns HLDRQ to HLDAK delay HLDRQ ~ to control float tOHQHA tOHQC 3T +30 3T + 160 ns ns Em HLDRQ width, low tWHQL 1.5T ns time HLDAK width, low tWHAL T ns Input data tHISOR 0 ns hold time INTp, DMARQ setup tSIQK 30 ns Output data tSOIS T(n + 1) ns INTP, DMARQ width, high tWIQH 8T ns setup time -50 INTp, DMARQ width, low tWIQL 8T ns Output data tHISOW 0.5T - 30 ns POLL setup time tSPLK 30 ns hold time Next DMARQ NMI width, high tWNIH 5 /15 tSOAOQ T ns Demand mode setup time NMI width, low tWNIL 5 /15 DMARQ hold tHOAOQ 0 ns Demand mode CTS width, low tWCTL 2T ns time INTR setup time tSIRK 30 ns DMAAK read tWOMRL T(n + 1.5) ns - 30 INTAK delay time tOKIA 80 ns width, low INTR hold time tHIAIQ 0 ns DMAAK write tWOMWL T(n + 1) ns width, low - 30 INTAK width, low tWIAL 2T -30 ns DMAAK to TC tOOATC 0.5T + 50 ns INTAK width, high tWIAH T -30 ns delay time INTAK to data delay tDiAO 2T -130 ns TC width, low tWTCL 2T - 30 ns INTAK to data hold tHIAO 0 0.5T ns REFRQ delay tOARF 0.5T - 30 ns SCKO (TSCK) cycle time tCYTK 1000 ns time REFRQ width, SCKO (TSCK) width, high tWSTH 450 ns tWRFL T(n + 1) ns low - 30 SCKO (TSCK) width, low tWSTL 450 ns Address hold tHRFA 0.5T - 30 ns TxD delay time tOTKO 210 ns time TxD hold time 20 ns tHTKO CTSO (RSCK) cycle time tCYRK 1000 ns CTSO (RSCK) width, high tWSRH 420 ns CTSO (RSCK) width, low tWSRL 420 ns RxD setup time tSROK 80 ns RxD hold time tHKRO 80 ns 33 pPD70320/322 (V25) NEe Figure 36. External System Clock Control Source r Recommended Crystal Configuration External Oscillator Configuration 10 pF Osc X1 ~ ~F pt. X1 74HC10 ~7 ...X_2_ _ _ _---' -X2 -=- resonant crystal Note: When using a quartz crystal, it is recommended that 15 pF capacity be used. 83-0045748 Recommended Ceramic Resonator and Capacitance Requirements Recommended Constants Recommended Constants Manufacturer Product Number Cl(pF) C2(pF) Product Number Cl(pF) C2(pF) Kyocera KBR-10.0M 33 33 Murata Manufacturing CSA.10.0MT 47 47 CSA 16.0MX040 30 30 TDK FCR10.0M2S 30 30 FCR16.0M2S 15 6 Timing Waveforms Stop Mode Data Retention Timing AC Input Waveform 2 (RESET, NMI) ~ VOO 0.8 V tRVO - tlRS It-tiFS 83-00430SA 83-o04333A AC Input Waveform 1 (Except X1, X2, iiESEf, NMI) AC Output Test Point (Except CLKOUT) ~ 2.4V 4 2.2 V 0.8 V 0.8 V 0.4V tlR tOR li=-tOF 83-004305A 83-004307A Clock In and Clock Out CLKIN1 [X1] j4------ tC Y X - - - - . 1 - I-- tKR - -tKF CLKOUT \ / \ 2.2V 0.8 V tWKL tCYK tWKH . 83-004308A 34 NEe pPD70320/322 (V25) Timing Waveforms (coni) Memory Read ~I--------B1--------rl--------B2------~ CLKOUT~~~~~~:K~~~~~~~~~~~~ tOKA- ) K tOAOR . r I+--tOMRO- - tHMOR .. R/W / tOAMR J tWMRL tscc- I " -tOMRMS- tOMSO I+--- ~ r\ '\ i t O A M S - I----tWMSL----...J ~ 1\ -tOMRTC \1+---.- --tWT-CL- ------+l( 83-004309C 35 pPD10320/322 (V25) NEe Timing Waveforms (coni)· Memory Write 1----81-----+1---- 82 - - - - I C~OUT ~t----\~YK)__\~I \------/ tOKA- )k K I+-tOAOW .... r tHMA .... '. 07- 0 0 I ~IH.oWy l-. tSOM R/W \ c+-toAMRl tWMRL ~tscc- " -tOMRMS- 1I \ 1\ V tOAMS~ l = - t W M S L _ i\ i\ ----~tW-TCL_-____+l( I-- tOMRTC TC1-TCO .\1+--- 83-004310C 36 NEe pPD70320/322 (V25) Timing Waveforms (cont) 110 Read B1 I B2 I ICYK J I CLKOUT / ~ ) K I--IOAOR_ rIHISA- IDiSO I.IHISOR. R/W / l\- I-- IOA,s-:-1 IWISL ISCC- \ It l\- I\. 83-004311C 37 pPD70320/322 (V25) NEe Timing Waveforms {cont} 110 Write 81 I 82 I tCYK I I CLKOUT J ~ ). l( tDADW rtHISA-- tSDIS . tHISDW R/W \ V r\ I-tDAIS--1 tWISL . I+---tscc_ " ~ \ r\ 83-004312C 38 NEe pPD70320/322 (V25) Timing Waveforms (coni) DMA, 110 to Memory 1r-----B1----+I----B2------i t=1+----tCYK---J~ CLKOUT ~~~\'-------J ----"\\'-------J!~\'--------J!~~\ tOKA_ J 'K 07-00 Riw \ V I--tOAMR-+ tWMRL I--tHMA-- i\ I ~ -tOMRMS- tscc- 1\ V t O A M S - / . - tWMSL-+ 1\ _tSOAOQ_ DMARQO- DMARQ1 ~ I--tHOAOQ ...... \ if tWOMRL 1\ -tODATC- I tWTCL II 83-004313C 39 pPD70320/322 (V25) NEe Timing Waveforms (coni) DMA, Memory to 110 ~-------B1------~--------B2-------- 1 + - - - - - - - teYK - - - - + I CLKOUT I+--tOKA_ ~ K R/W / I-tOAMR- \ tWMRL II " I--tHMA_ 1\ tOAMS '\ , !--tWMSL---=:.j tsee l" DMAROO I--tSOAOO __ " DMAR01- ~ I+-tHOAOO~ " tWOMWL--=1 N: I+- tOOATC-. I tWTCL J 83-004314C 40 NEe pPD70320/322 (V25) Timing Waveforms (coni) Refresh 1---'----81----+-----82------1 1+----teYK-----'--~ CLKOUT I--tOKA .... )~ A19-AO K )'1 R/W 1\ ED ~ " 1"----- I-tOARF1 tWRFL -tHRFA_ \ ~ tsee ) ~ 83-00431SC CLKOUT------------------------------------~~--J ~ tWRSL1 RESET Y R 83-0043168 41 pPD70320/322 (V25) NEe Timing Waveforms (cont) RESET 2 CLKOUT __ ~tWRSU~r-----_ RESET· ~ ~ 83-0043176 READY 1 ~----B1-----+-----BAW-----+-----BAW-----r-----B2_____1 / ~CRY~ \ - tHCRY----j I READY ____________________ ~~ ~~_________________________________________ 83-0043186 READY 2 ~----B1----_+-----BAW----+-----BAW----~-----BW----~-----B2_____1 - n=2 n=3 :---tHCRY' tSCRY' L n=2 In=3 READY \ ,V I • tSCRY [READY setup time) and tHCRY [READY hold time) are a function of T and n. Timings shown are examples for n = 2 and n = 3. 83-0043196 42 NEe pPD70320/322 (V25) Timing Waveforms (cont) HLDRQ/HLDAK 1 Bus control' ~----tDHQHA-----~ 'A19-AO, 07"00, MREO, MSTB, IOSTB, R/W J..--------twHAL-------+J ~ L-_____________________________________________________~83~-0~04=32~08 ~ HLDRQ/HLDAK 2 CLKOUT HLORO ~-----tWHQL----~ Bus control' --~----------."I----+----------------_lC IDKH~----~U}---:~~~~~~~~----~-----tD-H-Q-C----------_-~_-_-_-_-_-_~_ _ _ _ _ ___ 83-0043218 INTp, DMARQ Input CLKOUT J..------------tWIQH---------~ ~ -~- - - - - - - - - - - - -~t~W~IQ-L- - - - - - - - - - - - - ~ INTp, OMARO' 'INTP2-INTPO, OMARQ1-0MARQO 83-0043228 pPD70320/322 (V25) NEe Timing Waveforms (cont) POLL Input CLKOUT _ l.--tSPLK _ _ POLL~ _ _ _--JI 83-0043236 NMllnput CLKOUT NM, --1t+-:---tWN'H--~ht+--.======-tWN-IL====--=--:r 83-0043246 CTS Input CLKOUT 1~-.~tW-CTL-==r 83-0043256 44 NEe pPD70320/322 (V25) Timing Waveforms (coni) INTRIINTAK eLKOUT r~---+--~ INTR IOKIA IHIAIQ D7-DO------------~i~------------~~------------------------{1 83-004326B Serial Transmit CLKOUT ICYTK \ j \ _I IHTKO IWSTL I IWSTH TxD IOTKO ~ C 83-004441B 45 pPD70320/322 (V25) ttiEC Timing Waveforms (cont) Serial Receive CLKOUT tCYRK \ ,j \ tWSRL tWSRH RxD ~ K I--tSRDK- tHKRD 83-0043329 46 NEe pPD70320/322 (V25) Instruction Set Identifier Description Instructions, grouped according to function, are dst-block Name of block addressed by the IV register described in a table near the end of this data sheet. near-proc Procedure within the current program segment Descriptions include source code, operation, opcode, far-proc Procedure located in another program segment number of bytes, and flag status. Supplementary information applicable to the instruction set is con- near-label Label in the current program segment tained in the following tables. short-label Label between -128 and +127 bytes from the end of instruction • Symbols and Abbreviations far-label Label in another program segment • Flag Symbols memptr16 Word containing the offset of the memory location within the current program segment to which control • 8- and 16-Bit Registers. When mod = 11, the register is to be transferred is specified in the operation code by the byte/word operand (W = 0/1) and reg (000 to 111). memptr32 Double word containing the offset and segment base address of the memory location to which control is to • Segment Registers. The segment register is speci- be transferred fied in the operation code by sreg (00, 01, 10, or 11). regptr16 16-bit register containing the offset of the memory location within the program segment to which control • Memory Addressing. The memory addressing mode is to be transferred is specified in the operation code by mod (00, 01, or pop-value Number of bytes of the stack to be discarded (0 to 10) and mem (000 through 111). 64K bytes, usually even addresses) • Instruction Clock Count. This table gives formulas fp-op Immediate data to identify the instruction code of the for calculating the number of clock cycles occupied external floating point operation by each type of instruction. The formulas, which R Register set depend on byte/word operand and RAM enable/dis- W Word/byte field (0 to 1) able, have variables such as EA (effective address), W (wait states), and n (iterations or stringinstruc- reg Register field (000 to 111) tions). mem Memory field (000 to 111) mod Mode field (00 to 10) Symbols and Abbreviations S:W When S:W = 01 or 11, data = 16 bits. At all Identifier Description other times, data = 8 bits. reg 8- or 16-bit general-purpose register X, XXX, VVV, ZZZData to identify the instruction code of the external floating pOint arithmetic chip reg8 8-bit general-purpose register AW Accumulator (16 bits) reg16 16-bit general-purpose register AH Accumulator (high byte) dmem 8- or 16-bit direct memory location AL Accumulator (low byte) mem 8- or 16-bit memory location BP Base pointer register (16 bits) mem8 8-bit memory location BW BW register (16 bits) mem16 16-bit memory location BH BW register (high byte) mem32 32-bit memory location BL BW register (low byte) ~ sfr 8-bit special function register location CW CW register (16 bits) imm Constant (0 to FFFFH) CH CW register (high byte) imm16 Constant (0 to FFFFH) CL CW register (low byte) imm8 Constant (0 to FFH) OW OW register (16 bits) imm4 Constant (0 to FH) DH OW register (high byte) imm3 Constant (0 to 7) DL OW register (low byte) acc AW or AL register SP Stack pointer (16 bits) sreg Segment register PC Program counter (16 bits) src-table Name of 256-byte translation table PSW Program status word (16 bits) src-block Name of block addressed by the IX register 47 pPD70320/322 (V25) NEe Symbols and Abbreviations (cont) Flag Symbols Identifier Description Identifier Description IX Index register (source) (16 bits) (blank) No change IV Index register (destination) (16 bits) o Cleared to 0 PS Program segment register (16 bits) Set to 1 SS Stack segment register (16 bits) X Set or cleared according to the result DSo Data segment 0 register (16 bits) U Undefined DS1 Data segment 1 register (16 bits) R Value saved earlier is restored AC Auxiliary carry flag CV Carry flag 8- and 16-81t Registers (mod = 11) P Parity flag reg w=o W=1 S Sign flag 000 AL AW Z Zero flag 001 CL CW DIR Direction flag 010 DL OW IE Interrupt enable flag 011 BL BW V Overflow flag 100 AH SP BRK Break flag 101 CH BP MD Mode flag 110 DH IX (... ) Values in parentheses are memory contents 111 BH IV disp Displacement (8 or 16 bits) ext-disp8 16-bit displacement (sign-extension byte + 8-bit displacement) Segment Registers temp Temporary register (8/16/32 bits) sreg Register tmpcy Temporary carry flag (1-bit) 00 DS1 seg Immediate segment data (16 bits) 01 PS offset Immediate offset data (16 bits) 10 SS Transfer direction 11 DSo + Addition Subtraction Memory Addressing x Multiplication mem mod = 00 mod = 01 mod = 10 Division' 000 BW+IX BW + IX + disp8 BW + IX + disp16 % Modulo 001 BW+IV BW + IV + disp8 BW + IV + disp16 AND Logical product 010 BP+ IX BP + IX + disp8 BP + IX + disp16 OR Logical sum 011 BP+ IV BP + IV + disp8 BP + IV + disp16 XOR Exclusive logical sum 100 IX IX + disp8 IX + disp16 XXH Two-digit hexadecimal value 101 IV IV + disp8 IV + disp16 XXXXH Four-digit hexadecimal value 110 Direct BP + disp8 BP + disp16 111 BW BW + disp8 BW + disp16 48 NEe pPD70320/322 (V25) Instruction Clock Count Mnemonic Operand Clocks Mnemonic Operand Clocks ADD regS, regS 2 BRK 3 55+10W [43+10W] reg16, reg16 2 immS 56+10W [44+10W] regS, memS EA+6+W BRKCS 15 reg16, mem16 EA+S+2W BRKV 55+10W [43+10W] memS, regS EA+S+2W [EA+6+W] BTCLR 29 mem16, reg16 EA+12+4W [EA+S+2W] BUSLOCK 2 regS, immS 5 reg16, immS 5 CALL near-proc 22+2W [1S+2W] reg16, imm16 6 regptr16 22+2W [1S+2W] memS, immS EA+9+2W [EA+7+2W] memptr16 EA+26+4W [EA+24+4W] mem16, immS EA+9+2W [EA+7+2W] far-proc 36+4W [34+4W] mem16, imm16 EA+14+4W [EA+ 10+4W] memptr32 EA+36+8W [EA+24+SW] AL, immS 5 CHKIND EA+26+4W AW, imm16 6 CLR1 CY 2 ADD4S 22+(27+3W)n [22+(25+3W)n] DIR 2 ADDC Same as ADD regS, CL S reg16, CL S ADJ4A 9 ADJ4S ADJBA ADJBS 9 17 17 memS, CL mem16, CL regS, imm3 reg16, imm4 EA+14+2W [EA+12+W] EA+1S+4W [EA+14+2W] 7 7 II AND regS, regS 2 memS, imm3 EA+11+2W [EA+9+W] reg16, reg16 2 mem16, imm4 EA+15+4W [EA+10+2W] regS, memS EA+6+W CMP regS, regS 2 reg16, mem16 EA+S+2W reg16, reg16 2 memS, regS EA+S+2W [EA+6+W] regS, memS EA+6+W mem16, reg16 EA+12+4W [EA+S+2W] reg16, mem16 EA+S+2W regS, immS 5 memB, regB EA+6+W reg16, imm16 6 mem16, reg16 EA+B+2W memS, immS EA+9+2W [EA+7+2W] regS, immS 5 mem16, imm16 EA+14+4W [EA+10+4W] reg16, immS 5 reg16, imm16 6 Bcond (conditional branch) S or 15 memS, immS EA+7+W BCWZ Sor 15 mem16, immB EA+10+2W BR near-label 12 mem16, imm16 EA+10+2W short-label 12 AL, immS 5 regptr16 13 AW, imm16 6 memptr16 EA+17+2W CMP4S 22+(23+2W)n far-label 15 CMPBK memS, memS 23+2W [19+2W] memptr32 EA+25+4W mem16, mem16 27+4W [21+2W] Notes: (1 ) If the number of clocks is not the same for RAM enabled and RAM disabled conditions, the RAM enabled value is listed first, followed by the RAM disabled value in brackets; for example, EA+8+2W [EA+6+W). (2) Symbols in the Clocks column are defined as follows. EA= additional clock cycles required for calculation of the effective address = 3 (mod 00 or 01) or 4 (mod 10) W = number of wait states selected by the WTC register n = number of iterations or string instructions 49 pPD70320/322 {V25} NEe Instruction Clock Count (cant) Mnemonic Operand Clocks Mnemonic Operand Clocks CMPBKB 16+(21+2W)n INM memS, DW 19+2W [17+2W] mem16, DW 21+4W [17+4W] CMPBKW 16+(25+4W)n memS, DW 1S+(13+2W)n [1S+(11+2W)n] CMPM memS 17+W mem16, DW 1S+(15+4W)n [1S+(11 +4W)n] mem16 19+2W INS regS, regS 63-155 CMPMB 16+(15+W)n regS, imm4 64-156 CMPMW 164-(17+2W)n LDEA EA+2 CVTBD 19 LDM memS 12+W CVTBW 3 mem16 16+(12+2W)n CVTDB 20 LDMB mem16 14+2W CVTWL 8 LDMW mem8 16+(10+W)n DBNZ S or 17 MOV regS, regS 2 DBNZE S or 17 reg16, reg16 2 DBNZNE S or 17 regS, memS EA+6+W reg16, mem16 EA+S+2W DEC regS 5 reg16 2 mem8, reg8 EA+4+W [EA+2] mem16, reg16 EA+6+2W [EA+2] memS EA+11+2W [EA+9+2W] mem16 EA+15+4W [EA+11+4W] regS, immS 5 reg16, imm16 6 DI 4 memS, immS EA+5+W DISPOSE 12+2W mem16, imm16 EA+5+2W DlV AW, regS 46-56 AL, dmemS 9+W AW,memS EA+4S+W to EA+5S+W AW, dmem16 11+2W DW:AW, reg16 54-64 dmemS, AL 7+W [5] DW:AW, mem16 EA+5S+2W to EA+6S+2W dmem16, AW 9+2W [5] DIVU AW, regS 31 sreg, reg16 4 AW,memS EA+33+W sreg, mem16 EA+10+2W DW:AW, reg16 39 reg16, sreg 3 DW:AW, mem16 EA+43+2W mem16, sreg EA+7+2W [EA+3] DSO: 2 AH, PSW 2 DS1: 2 PSW, AH 3 EI 12 DSO, reg16, memptr32 EA+19+4W DS1, reg16, memptr32 EA+19+4W EXT regS, regS 41-121 regS, imm4 42-122 MOVBK memS, memS 20+2W [16+W] mem16, mem16 16+(20+4W)n [16+(12+2W)n] FINT 2 MOVBKB memS, memS 16+(16+2W)n [16+(12+W)n] FP01 60+10W [4S+10W] MOVBKW mem16, mem16 24+4W [20+2W] FP02 60+10W [4S+10W] MOVSPA 16 HALT 0 MOVSPB 11 IN AL, immS 14+W AW, immS 16+2W MUL AW, AL, regS 31-40 AW, AL, memS EA+33+W to EA+42+W AL, DW 13+W AW,DW 15+2W DW:AW, AW, reg16 39-4S DW:AW, AW, mem16 EA+43+2W to EA+52+2W INC regS 5 reg16 2 reg16, reg16, immS 39-49 reg16, mem16, immS EA+43+2W to EA+53+2W memS EA+11+2W [EA+9+2W] mem16 EA+15+4W [EA+11+4W] reg16, reg16, imm16 40-50 reg16, mem16, imm16 EA+44+2W to EA+54+2W 50 NEe pPD70320/322 (V25) Instruction Clock Count (cont) Mnemonic Operand Clocks Mnemonic Operand Clocks PREPARE imm16, immB immB = 0: 27+2W MULU regB 24 immB= 1: 39+4W memB EA+26+W immB= n > 1: 46+19 (n-1)+4W reg16 32 PS: 2 mem16 EA+34+2W PUSH reg16 10+2W [6] NEG regB 5 mem16 EA+18+4W [EA+14+4W] reg16 5 DS1 11+2W [7] memB EA+11+2W [EA+9+W] PS 11+2W [7] mem16 EA+15+4W [EA+11+2W] SS 11+2W [7] NOP 4 DSO 11+2W [7] NOT regB 5 PSW 10+2W [6] reg16 5 R B2+16W [50] memB EA+11+2W [EA+9+W] immB 13+2W [9] mem16 EA+15+4W [EA+11+2W] imm16 14+2W [10] NOT1 CY 2 REP 2 regB, CL 7 REPE 2 reg16, CL 7 REPZ 2 memB, CL EA+13+2W [EA+11+W] mem16, CL regB, imm3 reg16, imm4 6 6 EA+17+4W [EA+13+2W] REPC REPNC REPNE 2 2 2 ED memB, imm3 EA+10+2W [EA+B+W] REPNZ 2 mem16, imm4 EA+14+4W [EA+10+2W] RET null 20+2W OR regB, regB 2 pop-value 20+2W reg16, reg16 2 null 29+4W regB, memB EA+6+W pop-value 30+4W reg16, mem16 EA+B+2W RETI 43+6W [35+2W] memB, regB EA+B+2W [EA+6+W] mem16, reg16 EA+12+4W [EA+B+2W] RETRBI 12 regB, immB 5 ROL regB,1 B reg16, imm16 6 reg16, 1 B memB, immB EA+9+2W [EA+7+2W] memB,1 EA+14+2W [EA+12+W] mem16, imm16 EA+14+4W [EA+10+4W] mem16,1 EA+1B+4W [EA+14+2W] AL, immS 5 regB, CL 11+2n AW, imm16 6 reg16, CL 11+2n OUT immB, AL 10+W memB, CL EA+17+2W+2n [EA+15+W+2n] immB, AW 10+2W mem16, CL EA+21+4W+2n [EA+ 17+2W+2n] DW,AL 9+W regB, immB 9+2n DW,AW 9+2W reg16, immB 9+2n OUTM DW,memB 19+2W [17+2W] memB, immB EA+13+2W+2n [EA+11+W+2n] DW, mem16 21+4W [17+4W] mem16, immB EA+17+4W+2n [EA+ 13+2W+2n] DW,memB 1B+(13+2W)n [1B+(11+2W)n] ROL4 regB 17 DW, mem16 1B+(15+4W)n [1B+11+4W)n] memB EA+1B+2W [EA+16+2W] POLL 0 ROLC Same as ROL POP reg16 12+2W ROR Same as ROL mem16 EA+16+4W [EA+12+2W] ROR4 regB 21 DS1 13+2W memB EA+24+2W [EA+22+2W] SS 13+2W RORe Same as ROL DSO 13+2W SET1 CY 2 PSW 14+2W DIR 2 R B2+16W [5B] 51 pPD70320/322 (V25) NEe Instruction Clock Count (cant) Mnemonic Operand Clocks Mnemonic Operand Clocks SET1 (cont) reg8, CL 7 XCH reg8, reg8 3 reg16, CL 7 reg16, reg16 3 mem8, CL EA+13+2W [EA+11+W] reg8, mem8 EA+10+2W [EA+8+2W] mem16, CL EA+17+4W [EA+13+2W] reg16, mem16 EA+14+4W [EA+10+4W] reg8, imm3 6 mem8, reg8 EA+10+2W [EA+8+2W] reg16, imm4 6 mem16, reg16 EA+14+4W [EA+10+4W] mem8, imm3 EA+10+2W [EA+8+W] AW,reg16 4 mem16, imm4 EA+14+4W [EA+10+2W] reg16, AW 4 SHL Same as ROL XOR Same as AND SHR Same as ROL SHRA Same as ROL SS: 2 STM mem8 12+2 [10] mem16 16+(10+2Wln [16+(6+2Wln] STMB mem8 16+(8+Wln [16+(6+W)n] STMW mem16 14+2W [10] STOP 0 SUB Same as ADD SUB4S 22+(27+3Wln [22+(25+3Wln] SUBC Same as ADD TEST reg8, reg8 4 reg16, reg16 4 reg8, mem8 EA+8+W reg16, mem16 EA+10+2W mem8, reg8 EA+8+W mem16, reg16 EA+10+2W reg8, imm8 7 reg16, imm16 8 mem8, imm8 EA+11+W mem16, imm16 EA+11+2W AL, imm8 5 AW, imm16 6 TEST1 reg8, CL 7 reg16, CL 7 mem8, CL EA+11+W mem16, CL EA+13+2W reg8, imm3 6 reg16, imm4 6 mem8, imm3 EA+8+W mem16, imm4 EA+10+2W TRANS 10+W TRANSB 10+W TSKSW 11 52 NEe pPD70320/322 (V25) Execution Clock Counts for Operations Byte Word RAM Enable RAM Disable RAM Enable RAM Disable Context switch interrupt (Note 1) 27 27 DMA (Single-step mode) (Note 2) 20+2W 20+2W 24+4W 24+4W DMA (Demand release mode) 15+W 15+W 17+2W 17+2W DMA (Burst mode) (12 + 2W)n (12 + 2W)n (12 + 4W)n (12 + 4W)n DMA (Single-transfer mode) 33+W+N 33+W+N 35 + 2W + N 35 + 2W + N Interrupt (lNT pin) 62+6W 62+6W Macro service, sfr - mem (Note 2) 24+W 19+W 26+2W 21 +2W Macro service, mem - sfr 22+W 20+W 22+2W 22+2W Macro service (Search char mode), sfr - mem 27+W 27+W Macro service (Search char mode), mem - sfr 37+W 34+W Priority vectored interrupt, including NMI (Note 1) 58 + 10W 58 + 10W N = number of clocks to complete the instruction currently executing. Notes: (1) Every interrupt (except NMI) has an additional associated (2) The DMA and macro service clock counts listed are the required ~ latency time of 27 + N clocks. During the 27 clocks, the interrupt number of CPU clocks for each transfer. IiiiI controller performs some overhead tasks such as arbitrating (3) When an external interrupt is asserted, a maximum of 6 clocks is priority. This time should be added to the above listed interrupt required for internal synchronization before the interrupt request and macro service execution times. NMllatency time is 18 + N flag is set. For an internal interrupt, a maximum of 2 clocks clocks. is required. Bus Controller Latency Mode Clocks HLDRQ latency 7+2W DMA request latency (Note 1) Burst 29+ N Single step 29+ N Demand release 29+ N Single transfer 31 + N Notes: (1) The listed DMA latency times are the maximum number of clocks when a DMA request is asserted until DMAAK or MREQ goes low in the corresponding DMA cycles. The test conditions are no wait states, no interrupts, no macro service requests, and no hold requests. 53 0'1 .J:>. Instruction Set 1:: Mnemonic Operand Data Transfer Operation Operation Code 7 6 5 4 3 2 0 6 5 4 3 2 1 0 No. of Bytes AC Flags CY V P S z "..... D 0 MOV reg, reg reg - reg 000 o1 W reg reg 2 W mem, reg (mem) - reg 000 o 0 W mod reg mem 2-4 N reg, mem reg - (mem) 000 1 0 W mod reg mem 2-4 0 mem, imm (mem)-imm 000 W mod 000 mem 3-6 "- W reg, imm reg - imm 0 1 W reg 2-3 N N acc, dmem When W = 0 AL - (dmem) 0 o0 0 0 W 3 ....... dmem, acc When W = 1 AH - (dmem + 1), AL - (dmem) < N When W = 0 (dmem) - AL 0 000 W 3 (II When W = 1 (dmem + 1) - AH, (dmem) - AL ...... sreg, reg16 sreg - reg16 sreg : SS, OSO, OS1 000 0 1 1 0 sreg reg sreg, mem16 sreg - (mem16) sreg : SS, OSO, OS1 000 1 0 mod 0 sreg mem 2-4 reg16, sreg reg16 - sreg 000 o0 1 1 0 sreg reg 2 mem16, sreg (mem16) - sreg 000 1 o 0 mod 0 sreg mem 2-4 OSO, reg16, reg16 - (mem32) 000 0 mod reg mem 2-4 mem32 OSO - (mem32 + 2) OS1, reg16, reg16 - (mem32) 000 o 0 mod reg mem 2-4 mem32 OS1 - (mem32 + 2) AH, PSW AH - S, Z, x, AC, x, P, x, CY o0 1 1 PSW, AH S, Z, x, AC, x, P, x, CY - AH o0 1 1 0 x x x x x LOEA reg16, mem16 reg16 -+- mem16 000 1 0 mod reg mem 2-4 TRANS src-table AL-(BW+AL) 0 0 1 XCH reg, reg reg-reg 000 0 W1 1 reg reg 2 mem, reg (mem)-reg 000 0 W mod reg mem 2-4 or reg, mem AW, reg16 AW-reg16 o0 0 reg or reg16, AW Repeat Prefixes REPC While CW op 0, the next byte of the primitive block o1 1 o0 1 o1 transfer instruction is executed and CW is ~ decremented (- 1). If there is a waiting interrupt, it is processed. When CY op 1, exit the loop. REPNC While CW op 0, the next byte of the primitive block o1 1 o0 1 o0 transfer instruction is executed and CW is decremented (- 1). If there is a waiting interrupt, it is processed. When CY op 0, exit the loop. ~ ~ Instruction Set (cont) Operation Code No. of Flags Mnemonic Operand Operation 7 6 5 4 3 2 07654321 0 Bytes AC CY V P S Z ~ Repeat Prefixes (cont) REP While CW =F 0, the next byte of the primitive block o0 REPE transfer instruction is executed and CW is REPZ decremented (- 1). If there is a waiting interrupt, it is processed. If the primitive block transfer instruction is CMPBK or CMPM and Z =F 1, exit the loop. REPNE While CW =F 0, the next byte of the primitive block 1 1 1 1 o 0 1 0 REPNZ transfer instruction is executed and CW is decremented (- 1). If there is a waiting interrupt, it is processed. If the primitive block transfer instruction is CMPBK or CMPM and Z =F 0, exit the loop. Primitive Block Transfer MOVBK dst-block, When W = 0 (IV) - (IX) 1 o 1 o 0 10 W src-block DIR = 0: IX - IX + 1, IV - IV + 1 DIR = 1: IX -IX -1, IV -IV-1 When W = 1 (IV + 1, IV) - (IX + 1, IX) DIR = 0: IX - IX + 2, IV - IV + 2 DIR = 1: IX -IX - 2, IV - IV - 2 CMPBK src-block, When W = 0 (IX) - (IV) 1 0 1 o 0 1 1 W x x x x x x dst-block DIR = 0: IX -IX + 1, IV -IV + 1 DIR = 1: IX - IX - 1, IV - IV - 1 When W = 1 (IX + 1, IX) - (IV + 1, IV) DIR = 0: IX - IX + 2, IV - IV + 2 DIR = 1: IX - IX - 2, IV - IV - 2 CMPM dst-block When W = 0 AL - (IV) 1 o 1 o 1 1 1 W x x x x x x DIR = 0: IV - IV + 1; DlR = 1: IV - IV -1 When W = 1 AW - (IV + 1, IV) DIR = 0: IV - IV + 2; DIR = 1: IV - IV - 2 1::: LDM src-block W~en W = 0 AL - (IX) 1 0 1 0 1 1 0 W DIR = 0: IX -IX + 1; DlR = 1: IX -IX-1 WhenW=1 AW-(IX+1,IX) DIR = 0: IX - IX + 2; DlR = 1: IX - IX - 2 "...... D 0 STM dst-block When W = 0 (IV) - AL 1 o 1 0 1 o1 W W DIR = 0: IV - IV + 1; DIR = 1: IV - IV -1 ~ When W = 1 (IY + 1, IY) - AW DIR = 0: IV -IV + 2; DlR = 1: IV -IV - 2 0 Bit Field Transfer "- W INS reg8, reg8 16-Bit field - AW o 0 0 0 1 1 1 1 o0 o 0 3 ~ 1 1 reg reg ~ ........ reg8, imm4 16-Bit field - AW o 0 0 0 1 1 1 1 o0 0 4 < 1 1 000 reg ~ OJ CIt OJ ........ II 01 0') Instruction Set (cont) 'l::: Operation Code No. of Flags 11 Mnemonic Operand Operation 7 654 3 2 0 65432 0 Bytes AC CY V P S Z a .-.. Bit Field Transfer (cont) 0 EXT regS, regS AW -16-Bit field o 0 0 0 0 o0 3 W 1 1 reg reg ~. regS, imm4 AW - 16-Bit field o 0 0 0 1 1 1 1 1 1 000 reg 0 o 1 4 ,W 0 I/O N IN acc, immS When W = 0 AL - (immS) o 0 o W 2 N When W = 1 AH - (immS + 1), AL - (immS) -""""'" acc, OW When W = 0 AL - When W = 1 AH - (OW) (OW +1), AL - (OW) 0 o W < N ell OUT immS, acc When W= 0 (immS) - AL o 0 W 2 "-'" When W = 1 (immS + 1) - AH, (immS) - AL OW, acc When W = 0 (OW) - AL 0 W - Primitive Block I/O Transfer When W = 1 (OW + 1) - AH, (OW) - AL INM dst-block, OW When W = 0 (lY) - (OW) o 1 1 0 1 10 W OIR = 0: IY .(.-IY + 1; OIR = 1: IY -IY-1 When W = 1 (IY + 1, IY) - (OW + 1, OW) OIR;= 0: IY -IY + 2; OIR = 1: IY -IY - 2 OUTM OW, src-block When W = 0 (OW) - (IX) o 1 1 0 1 1 1 W OIR = 0: IX -IX + 1; OIR = 1: IX -IX-1 When W = 1 (OW + 1.. OW) - (IX + 1, IX) OIR = 0: IX - IX + 2; DIR = 1: IX - IX - 2 Addition/Subtraction AOO reg, reg reg - reg + reg o 0 000 W 1 1 reg reg 2 x x x x x x mem, reg (mem) - (mem) + reg o 0 0 0 0 0 0 W mod reg mem 2-4 x x x x x x reg, mem reg - reg + (mem) o 0 o 0 0 1 W mod reg mem 2-4 x x x x x x reg, imm reg - reg + imm OOOOOSW1 1 000 reg 3-4 x x x x x x mem, imm (mem)-(mem)+imm o 0 0 0 0 S W mod 0 0 0 mem 3-6 x x x x x x acc, imm When W = 0 AL - AL + imm o0 0 0 0 oW 2-3 x x x x x x When W = 1 AW -:- AW + imm ~ ~ ~ Instruction Set (cont) Operation Code No. of Flags Mnemonic Operand Operation 7 654 3 2 0 5 4 3 2 1 0 Bytes AC CV V P S Z Addition/Subtraction (cont) reg + reg + CY o 0 x x x x ~ ADDC reg, reg reg - 000 W reg reg x x mem, reg (mem) - (mem) + reg + CY 000 o 0 0 W mod reg mem 2-4 x x x x x x reg, mem reg - reg + (mem) + CY o 0 0 1 o 0 1 W mod reg mem 2-4 x x x x x x reg, imm reg - reg + imm + CY OOOOOSW1 1 0 0 reg 3-4 x x x x x x mem, imm (mem) - (mem) + imm + CY 1o 0 0 0 0 S W mod o 1 0 mem 3-6 x x x x x x ace, imm When W = 0 AL - AL + imm + CY 000 0 o W 2-3 x x x x x x When W = 1 AW - AW + imm + CY SUB reg, reg reg - reg - reg o 0 0 0 W 1 1 reg reg 2 x x x x x x mem, reg (mem) - (mem) - reg o 0 0 o 0 W mod reg mem 2-4 x x x x x x reg, mem reg - reg - (mem) o 0 0 o 1 W mod reg mem 2-4 x x x x x x reg, imm reg - reg - imm OOOOOSW1 1 1 0 reg 3-4 x x x x x x mem, imm (mem)-(mem)-imm 1 o 0 0 0 0 S W mod 1 o 1 mem 3-6 x x x x x x ace, imm When W = 0 AL - AL - imm o 0 0 o W 2-3 x x x x x x When W = 1 AW - AW - imm SUBC reg, reg reg - reg - reg - CY 000 o1 W 1 1 reg reg x x x x x x mem, reg (mem) - (mem) - reg - CY 000 o 0 W mod reg mem 2-4 x x x x x x reg, mem reg - reg - (mem) - CY o 0 0 1 o 1 W mod reg mem 2-4 x x x x x reg, imm reg - reg - imm - CY OOOOOSW1 1 o 1 1 reg 3-4 x x x x x x mem, imm (mem) -- (mem) - imm - CY o 0 0 0 0 S W mod o 1 1 mem 3-6 x x x x x x ace, imm When W = 0 AL - AL - imm - CY 000 1 0 W 2-3 x x x x x x When W = 1 AW - AW - imm - CY 1::: "a ~ 0 w ~ 0 "- W ~ ~ ....... < ~ (Jl --..J en ..., I (]1 ex> Instruction Set (cont) l::: Mnemonic Operand BCD Operation Operation Operation Code 7 654 3 2 0 5 4 3 2 1 0 No. of Bytes AC CV Flags V P S Z "a..... 0 ADD4S dst BCD string - dst BCD string o0 0 0 o0 000 0 2 x u u u x W + src BCD string ~ SUB4S dst BCD string - dst BCD string o0 0 0 o0 000 0 2 x u u u x 0 - src BCD string '-- W CMP4S dst BCD string - src BCD string o0 0 0 o0 o0 1 0 2 x u u u x ~ ROL4 reg8 o0 0 0 1 o0 0 0 0 3 ~ AL reg 1 1 000 reg ......... ALL H Upper 4 bits I Lower 4 bits ~ < ~ UI ......, mem8 AL mem o 0 0 0 1 1 1 1 o 0 1 0 1 000 3-5 0 mod 000 mem ALL H Upper4bits I Lower 4 bits I· I ROR4 reg8 o0 0 0 1 1 1 1 o0 1 o1 o1 0 3 AL reg 1 1 000 reg ALL H Upper 4 bits I Lower 4 b~ I t mem8 o0 0 0 1 1 1 o0 1 o 1 0 1 0 3-5 AL mem mod o 0 mem ALL t H Upper 4 bits I Lower 4 bits I I BCD Adjust ADJBA When (AL AND OFH) >9 or AC = 1, o0 1 1 o1 1 1 x x u u u u AL - AL + 6, AH - AH + 1, AC - 1, GY - AG, AL - AL AND OFH ADJ4A When (AL AND OFH) >9 or AC = 1, o0 1 o0 1 1 1 x x u x x x AL - AL + 6, CY - CY OR AC, AC - 1, When AL > 9FH, or CY = 1 AL - AL + 60H, CY - 1 ~ ADJBS When (AL AND OFH) >9 or AC = 1, o0 x x u u u u CY -- AC, AL - AL AND OFH ADJ4S When (AL AND OFH) >9 or AG = 1, o0 0 x x u x x x AL - AL - 6, CY - CY OR AC, AC -- 1, ~ When AL > 9FH, or CY = 1 AL - AL + 60H, CY - 1 ~ Instruction Set (cont) Operation Code No. of Flags Mnemonic Operand Operation 7 6 543 2 1 0 65432 1 0 Bytes AC CY V P S Z Increment/Decrement INC reg8 reg8 - reg8 + 1 0 1 1 000 reg x x x x x mem reg16 (mem) - reg16 - (mem) + 1 reg16 + 1 0 1 1 1 o0 0 reg W mod o0 0 mem 2-4 x x x x x x x x x x ~ OEC reg8 regB - reg8 - 1 1 1 0 1 1 o0 reg x x x x x mem (mem) - (mem) - 1 1 1 W mod o0 mem 2-4 x x x x x reg16 reg16 - reg16 - 1 0 o0 reg x x x x x Multiplication MULU reg8 AW - AL x reg8 1 1 1 1 0 1 1 0 1 1 1 0 0 reg 2 x x u u u AH = 0: CY - 0, V - 0 AH ¥ 0: CY - 1, V - 1 memB AW - AL x (memB) 1 1 1 1 0 1 1 0 mod 1 0 0 mem 2-4 x x u u u AH = 0: CY - 0, V - 0 AH ¥ 0: CY - 1, V - 1 reg16 OW, AW - AW x reg16 1 1 1 1 0 1 1 1 1 1 1 0 0 reg x x u u u OW = 0: CY - 0, V - 0 OW ¥ 0: CY - 1, V - 1 mem16 OW, AW - AW x (mem16) 1 1 1 1 0 1 1 1 mod 1 0 0 mem 2-4 x x u u u OW = 0: CY - 0, V - 0 OW ¥ 0: CY -- 1, V - 1 MUL reg8 AW - AL x reg8 1 1 1 1 0 1 1 0 1 1 1 0 1 reg 2 x x u u u AH = AL sign expansion: CY - 0, V - 0 AH ¥ AL sign expansion: CY - 1, V - 1 mem8 AW - AL x (mem8) 1 1 1 1 0 1 1 0 mod 1 0 1 mem 2-4 x x u u u AH = AL sign expansion: CY - 0, V - 0 "t:: AH ¥ AL sign expansion: CY - 1, V - 1 reg16 OW, AW - AW x reg16 OW = AW sign expansion: CY - 0, V - 0 1 1 1 1 0 1 1 1 1 1 1 0 1 reg 2 x x u u u " a OW ¥ AW sign expansion: CY -1, V-1 0 mem16 OW, AW - AW x (mem16) 1 1 1 1 0 1 1 1 mod 1 0 1 mem 2-4 x x u u u --- (.) OW = AW sign expansion: CY - 0, V - 0 N OW ¥ AW sign expansion: CY -1, V-1 0 reg16, reg16 - reg16 x imm8 0 1 1 0 1 0 1 1 1 1 reg reg 3 x x u u u "- (.) reg16, Product::; 16 bits: CY - 0, V - 0 immB Product> 16 bits: CY - 1, V - 1 N N reg16, reg16 - (mem16) x imm8 0 1 1 0 1 0 1 1 mod reg mem 3-5 x x u u u ....... mem16, immB Product::; 16 bits: CY - 0, V -- 0 Product> 16 bits: CY - 1, V - 1 < N 01 ell c.o "-'" B 0> o Instruction Set (cont) Operation Code 7 6 5 4 3 2 o No. of Flags ,.a 1::: Mnemonic Operand Operation 6543210 Bytes AC CY V P S Z .... Multiplication· (cont) o o o0 o MUL (cant) reg16, reg16 +- reg16 x imm16 reg reg 4 x x u u u W reg16, Product::; 16 bits: CY +- 0, V+-~ N imm16 Product> 16 bits: CY +- 1, V+-1 o reg16, mem16, reg16 +- (mem16) x imm16 Product::; 16 bits:CY +- 0, V+-O o 1 1 0 1 0 0 1 mod reg mem 4-6 x xuuu "- W imm16 Product> 16 bits: CY .:- 1, V+-1 N Unsigned Division N DIVU regS temp +- AW When temp -:- regS> FFH 1 1 1 1 0 1 1 0 1 1 1 1 0 reg u u u u < """'""" N (SP-1, SP - 2) +- PSW, (SP - 3, SP - 4) +- PS ell (SP - 5, SP - 6) +- PC, SP +- SP - 6 ......, IE +- 0, BRK +- 0, PS +- (3, 2), PC +- (1, 0) All other times AH +- temp % regS, AL +- temp -:- regS memS temp +- AW 1 1 1 1 0 1 1 0 mod 1 1 0 mem 2-4 u u u u When temp -:- (memS) > FFH (SP -1, SP - 2) +- PSW, (SP - 3, SP - 4) +- PS (SP - 5, SP - 6) +- PC, SP +- SP - 6 IE +- 0, BRK +- 0, PS +- (3, 2), PC +- (1, 0) All other times AH .;..- temp % (memS), AL +- temp -:- (memS) reg16 temp +- AW 1 1 1 1 0 1 1 1 1 1 1 1 0 reg 2 u u u u When temp -:- reg16> FFFFH (SP -1, SP - 2) +- PSW, (SP - 3, SP - 4) +- PS (SP - 5, SP - 6) .;..- PC, SP +- SP - 6 IE +- 0, BRK +- 0, PS +- (3, 2), PC +- (1, 0) All other times AH +- temp % reg16, AL +- temp -:- reg16 mem16 temp +- AW 1 1 1 1 0 1 1 1 mod 1 1 0 mem 2-4 u u u u u When temp -:- (mem16) > FFFFH (SP -1, SP- 2) +- PSW, (SP - 3, SP - 4) +- PS (SP - 5, SP - 6) +- PC, SP +- SP - 6 IE +- 0, BRK +- 0, PS +- (3, 2), PC +- (1, 0) All other times AH +- temp % (mem16), AL +- temp -:- (mem16) ~ ~ ~ Instruction Set (cont) Operation Code No. of Flags Mnemonic Operand Operation 765432 0 654321 0 Bytes AC CY V P S Z Signed Division ~ DIV reg8 temp-AW 0 0 reg 2 u u u u u When temp -;- reg8 > 0 and temp -;- reg8 > 7FH or temp +- reg8 < 0 and temp -;- reg8 < 0 - 7FH - 1 (SP -1, SP - 2) - PSW, (SP - 3, SP - 4) - PS (SP - 5, SP - 6) - PC, SP -+- SP - 6 IE -+- 0, BRK - 0, PS - (3, 2), PC - (1, 0) All other times AH - temp % reg8, AL - temp -;- reg8 mem8 temp - AW 1 1 1 1 0 1 1 0 mod 1 11 mem 2-4 u u u u When temp -;- (mem8) > 0 and (mem8) > 7FH or temp -;- (mem8) < 0 and temp -;- (mem8) < 0 - 7FH - 1 (SP ~ 1, SP - 2) -+- PSW, (SP - 3, SP - 4) -+- PS (SP - 5, SP - 6) - PC, SP -+- SP - 6 IE - 0, BRK +- 0, PS - (3, 2), PC - (1, 0) All other times AH - temp % (mem8), AL - temp -;- (mem8) reg 16 temp - DW,AW 1 1 1 1 0 1 1 1 1 1 1 11 reg u u u u When temp +- reg 16> 0 and reg 16> 7FFFH or temp -;- reg 16 < 0 - 7FFFH - 1 (SP -1, SP - 2) - PSW, (SP - 3, SP - 4) - PS (SP - 5, SP - 6) - PC, SP - SP - 6 IE - 0, BRK - 0, PS - (3, 2), PC - (1, 0) All other times AH - temp % reg. 16, AL - temp -;- reg 16 mem 16 temp - DW, AW 1 1 1 1 0 1 1 1 mod 1 11 mem 2-4 u u u u When temp -;- (mem 16) > 0 and (mem 16) > 7FFFH or temp -;- (mem 16) < 0 and temp -;- [mem 16] <0 - 7FFFH-l (SP - 1, SP - 2)) - PSW, (SP -3, SP - 4) -+- PS ,. 1::: a (SP - 5, SP - 6) -+- PC, SP -+- SP - 6 IE -+- 0, BRK -+- 0, PS -+- (3, 2), PC -+- (1, 0) .... All other times o AH - temp % (mem 16), AL -+- temp -;- (mem 16) w ~ o "- W N N ....... < N UI ~ -..... II 0> I\) Instruction Set (cont) Mnemonic Operand Operation Operation Code 7 654 3 2 076 5 4 3 2 o No. of Bytes AC Flags CY V P S Z ,.a l::: Data Conversion --a CVTBD o o o o AH - AL + OAH, AL - AL %OAH 01000000 2 u u x x x W CVTDB AH - 0, AL - AH x OAH + AL o 01010000 o o 2 u u x x x N CVTBW When AL < 8OH, AH - 0, o0 000 o CVTWL all other times AH - FFH When AL < 8OOOH, OW - 0, 001100 "W N all other times OW - FFFFH ~ Comparison ---. CMP reg, reg reg - reg 0 0 0 1 W 1 1 reg reg 2 x x x x x x < N mem, reg (mem) - reg 0 0 0 0 W mod reg mem 2-4 x x x x x x en ~ reg, mem reg - (mem) 0 0 1 1 1 0 1 W mod reg mem 2-4 x x x x x x reg, imm reg - imm 1 0 0 0 0 0 S W 1 1 1 1 1 reg 3-4 x x x x x x mem, imm (mem) - imm 1 0 0 0 0 0 S W mod 1 1 1 mem 3-6 x x x x x x ace, imm When W = 0, AL - imm 0 0 1 1 1 1 0 W 2-3 x x x x x x When W = 1, AW - imm Complement NOT reg reg - reg 0 W 1 1 0 0 reg 2 mem (mem) - (mem) 0 W mod 0 0 mem 2-4 NEG reg reg - reg + 1 1 1 1 1 0 1 1 W 1 1 0 1 1 reg 2 x xxxxx mem (mem) - (mem) + 1 1 1 1 1 0 1 1 W mod 0 1 1 mem 2-4 x x x x x x Logical Operation TEST reg, reg reg AND reg 0 0 0 0 0 W 1 1 reg reg 2 0 0 x x x mem, reg (mem) AND reg 0 0 0 0 0 W mod reg mem 2-4 0 0 x x x or reg, mem reg, imm reg AND imm o 1 1 W1 1 0 0 0 reg 3-4 o 0 x x x mem, imm (mem) AND imm o 1 1 W mod 0 0 0 mem 3-6 o 0 x x x ace, imm When W= 0, AL AND imm8 o o1 00 W 2-3 o 0 x x x When W = 1, AW AND imm8 AND reg, reg reg - reg AND reg 0010001W11 reg reg 2 u o 0 x x x mem, reg reg, mem (mem) - reg - (mem) AND reg reg AND (mem) o 0 1 0 0 0 0 W mod o 0 1 0 0 0 1 W mod reg reg mem mem 2-4 2-4 u u o 0 x x x o 0 x x x ;( ~ reg, imm reg - reg AND imm 000000W11 o0 reg 3-4 u o 0 x x x mem, imm (mem)-(mem)ANDimm 1 0 0 0 0 0 0 W mod 1 0 0 mem 3-6 o 0 x x x ace, imm When W = 0, AL - AL AND imm8 0010010W 2-3 o 0 x x x When W = 1, AW - AW AND imm16 ~~ Instruction Set (cant) Operation Code No. of Flags Mnemonic Operand Operation 7 654 3 2 076543210 Bytes AC CY V P S Z Logical Operation (cant) OR reg, reg reg - reg OR reg 0 0 o0 o W mem, reg (mem) - (mem) OR reg 0 0 0 0 1 0 0 W mod reg mem 2-4 0 0 x x x reg, mem reg - reg OR (mem) 0 0 0 0 1 0 1 W mod reg mem 2-4 0 0 x x x reg, imm reg - reg OR imm 1 0 0 0 0 0 0 W 1 1 0 0 1 reg 3-4 0 0 x x x mem, imm (mem) - (mem) OR imm 1 0 0 0 0 0 0 W mod 0 0 1 mem 3-6 0 0 x x x ace, imm When W = 0, AL - AL OR imm8 0 0 0 0 1 1 0 W 2-3 0 0 x x x When W = 1, AW - AW OR imm16 XOR reg, reg reg - reg XOR reg o0 1 1 0 0 1 W1 1 reg reg 2 o 0 x x x mem, reg (mem) - (mem) XOR reg o 0 1 1 0 0 0 W mod reg mem 2-4 o 0 x x x reg, mem reg - reg XOR (mem) o 0 1 1 0 0 1 W mod reg mem 2-4 o 0 x x x reg, imm reg - reg XOR imm 000000W11110 reg 3-4 o 0 x x x mem, imm (mem) - (mem) XOR imm 1 0 0 0 0 0 0 W mod 1 1 0 mem 3-6 o 0 x x x ace, imm When W = 0, AL - AL XOR imm8 0011010W 2-3 o 0 x x x When W= 1, AW - AW XOR imm16 Bit Operation 2nd byte* 3rd byte* TEST1 reg8, CL regS bit no. CL = 0: Z - 1 000 o0 0 0 1 1 0 0 0 reg 3 o 0 u u x regS bit no. CL = 1: Z - 0 memS, CL (memS) bit no. CL = 0: Z - 1 000 o 0 0 0 mod 0 0 0 mem 3-5 o 0 u u x (mem8) bit no. CL = 1: Z - 0 reg16, CL mem16, CL reg16 bit no. CL = 0: Z - reg16 bit no. CL = 1: Z - (mem16) bit no. CL = 0: Z - 1 0 1 000 000 000 000 1 1 0 0 0 mod 0 0 0 reg mem 3 3-5 u o 0 u u x o 0 u u x ,. 1::: D (mem16) bit no. CL = 1: Z - 0 regS, imm3 reg8 bit no. imm3 = 0: Z - 1 000 00011000 reg 4 u o 0 u u x o--- reg8 bit no. imm3 = 1:Z - 0 w mem8, imm3 (mem8) bit no. imm3 = 0: Z - 1 000 o 0 0 mod 0 0 0 mem 4-6 o 0 u u x ~ (mem8) bit no. imm3 = 1: Z - 0 o reg16, imm4 reg16 bit no. imm4 = 0: Z - 1 000 o0 1 1 0 0 0 reg 4 o 0 u u x "- w reg16 bit no. imm4 = 1: Z - 0 ~ mem16, imm4 (mem16) bit no. imm4 = 0: Z - 1 000 o 0 mod 0 0 0 mem 4-6 o 0 u u x ~ (mem16) bit no. imm4 = 1: Z - 0 ......... 2nd byte* *Note: First byte = OFH 3rd byte· < ~ en c.J en ....... m C> .;.. Instruction Set (cant) Mnemonic Operand Operation Operation Code 7654321 07654321 0 No. of Bytes AC CY Flags V P S Z ,.a "t:: Bit Operation (cant) --a 0 2nd byte* 3rd byte* W N NOT1 reg8, CL reg8 bit no. CL - reg8 bit no. CL 000 0 o 1 1 000 reg 3 0 mem8, CL (mem8) bit no. CL - (mem8) bit no. CL 000 0 o mod 0 0 0 mem 3-5 "- W reg16, CL reg16 bit no. CL - reg16 bit no. CL 000 0 1 1 000 reg 3 N mem16, CL (mem16) bit no. CL - (mem16) bit no. CL 000 0 mod 000 mem 3-5 N reg8, imm3 reg8 bit no. imm3 - reg8 bit no. imm3 000 o 1 1 000 reg 4 ...-..- mem8, imm3 (memS) bit no. imm3 - (mem8) bit no. imm3 000 o mod 0 0 0 mem 4-6 < N reg16, imm4 mem16, imm4 reg16 bit no. imm4 - (mem16) bit no. imm4 - (reg16) bit no. imm4 (mem16) bit no. imm4 000 000 1 1 000 mod 0 0 0 reg mem 4 4-6 '" ...... 2nd byte* 3rd byte* *Note: First byte = OFH CY CY-Cy 1 1 1 1 o1 o 1 x 2nd byte* 3rd byte* CLR1 reg8, CL reg8 bit no. CL - 0 000 o0 o 1 1 000 reg 3 mem8, CL (memS) bit no. CL - 0 000 o0 0 mod 000 mem 3-5 reg16, CL reg16 bit no. CL - 0 000 o0 1 1 000 reg 3 inem16, CL (mem16) bit no. CL - 0 000 o0 1 mod 0 0 0 mem 3-5 reg8, imm3 reg8 bit no. imm3 - 0 000 0 o 1 1 000 reg 4 mem8, imm3 (mem8) bit no. imm3 - 0 000 0 0 mod 000 mem 4-6 reg16, im'm4 reg16 bit no. imm4 - 0 000 0 1 1 000 reg 4 mem16, imm4 (mem16) bit no. imm4 - 0 000 0 mod 0 0 0 mem 4-6 2nd byte* 3rd byte* *Note: First byte = OFH CY CY-O 1 1 1 1 1 0 0 0 0 DlR DIR-O 1 1 1 1 1 1 o0 ~ ~ ~ Instruction Set (cont) Operation Code No. of Flags Mnemonic Operand Operation 7 6 5 4 3 0 5 4 3 2 1 0 Bytes AC CY V P S Z Bit Operation (cont) SET1 reg8, CL reg8 bit no. CL - 1 000 0 o0 000 reg 3 mem8, CL reg16, CL (mem8) bit no. CL-1 reg16 bit no. CL - 1 000 000 0 0 o 0 mod 000 0 1 1 000 mem reg 3-5 3 ~ mem16, CL (mem16) bit no. CL - 1 000 0 o 1 mod 000 mem 3-5 reg8, imm3 reg8 bit no. imm3 - 1 000 o 0 1 1 000 reg 4 mem8, imm3 (mem8) bit no. imm3 - 1 000 o 0 mod 000 mem 4-6 reg16, imm4 reg16 bit no. imm4 - 1 000 0 1 1 000 reg 4 mem16, imm4 (mem16) bit no. imm4 - 1 000 0 mod 000 mem 4-6 2nd byte* 3rd byte* *Note: First byte = OFH CY CY-1 1 1 1 1 1 o0 1 DIR DIR-1 1 1 0 Shift SHL reg, 1 CY - MSB of reg, reg - reg x 2 0 o0 0 W1 1 1 o0 reg x x x x x When MSB of reg # CY, V-1 When MSB of reg = CY, V - 0 mem,1 CY - MSB of (mem), (mem) - (mem) x 2 1 1 o 1 o 0 0 W mod 1 o 0 mem 2-4 x x x x x When MSB of (mem) # CY, V - 1 When MSB of (mem) = CY, V - 0 reg, CL temp - CL, while temp # 0, 1 1 o 1 o 0 1 W1 1 1 o 0 reg x u x x x repeat this operation, CY - MSB of reg, reg - reg x 2, temp - temp - 1 1::: mem, CL temp - CL, while temp # 0, 1 1 o 1 o 0 1 W mod 1 o 0 mem 2-4 x u x x x reg, imm8 repeat this operation, CY - MSB of (mem), (mem) - (mem) x 2, temp - temp - 1 temp - imm8, while temp # 0, 1 1 OOOOOW1 1 1 o 0 reg x u x x x " a --a 0 repeat this operation, CY - MSB of reg, W reg - reg x 2, temp + - temp - 1 ~ mem, imm8 temp + - imm8, while temp ¥- 0, 1 1 o 0 0 0 0 W mod 1 o 0 mem 3-5 x u x x x 0 repeat this operation, CY + - MSB of (mem), (mem) - (mem) x 2, temp - temp - 1 "- W SHR reg, 1 CY - LSB of reg, reg - reg -:- 2 1 1 o1 o0 0 W1 1 1 0 1 reg 2 x x x x x ~ When MSB of reg # bit following MSB ~ of reg: V-1 ~ When MSB of reg = bit following MSB of reg: V - 0 < ~ 0> CJ1 en ~ II 0> 0> Instruction Set (cont) Mnemonic Operation Code No. of Flags ,.a 'l::: Operand Operation 1 6 5 4 3 2 1 0 1 6 543 2 1 0 Bytes AC CY V P S Z Shift (cont) -.a 0 SHR(cont) mem, 1 CY - LSB of (mem), (mem) - (mem) -;- 2 1 1 0 1 o 0 0 W mod 1 0 1 mem 2-4 x x x x x CiI) When MSB of (mem) oF bit following MSB ~ of (mem): V - 1 0 When MSB of (mem) == bit following MSB of (mem): V - 0 "- W reg, CL temp - CL, while temp oF 0, 1 1 0 1 o 0 1 W1 1 1 0 1 reg 2 x u x x x ~ repeat this operation, CY - LSB of reg, ~ reg - reg -;- 2, temp - temp - 1 "'"""- mem, CL temp - CL, while temp oF 0, 1 1 0 1 o 0 1 W mod 1 0 1 mem 2-4 x u x x x < N repeat this operation, CY - LSB of (mem), (mem) - (mem) -;- 2, temp - temp - 1 ~ c.n reg, immB temp - immB, while temp oF 0, 1 1 o0 o0 0 W 1 1 1 0 1 reg 3 x u x x x repeat this operation, CY - LSB of reg, reg - reg -;- 2, temp - temp - 1 mem, immB temp - immB, while temp oF 0, 1 1 o 0 o 0 0 W mod 1 0 1 mem 3-5 x u x x x repeat this operation, CY - LSB of (mem), (mem) +- (mem) -;- 2, temp +- temp - 1 SHRA reg, 1 CY +- LSB of reg, reg +- reg -;- 2, V+-O 0 o0 0 W1 1 reg 2 x ox x x MSB of operand does not change mem,1 CY - LSB of (rriem), (mem) +- (mem) -;- 2, 0 o 0 0 W mod mem 2-4 x ox x x V +- 0, MSB of operand does not change reg, CL temp +- CL, while temp oF 0, 0 o0 W1 1 reg 2 x u x x x repeat this operation, CY +- LSB of reg, reg +- reg -;- 2, temp +- temp - 1 MSB of operand does not change mem,CL temp +- CL, while temp oF 0, 1 1 0 1 o 0 1 W mod 1 1 1 mem 2-4 x u x x x repeat this operation, CY +- LSB of (mem), (mem) +- (mem) -;- 2, temp +- temp - 1 MSB of operand does not change reg, immB temp +- immB, while temp oF 0, 1 1 00000W1 1 1 1 1 reg 3 x u x x x repeat this operation, CY +- LSB of reg, reg +- reg -;- 2, temp +- temp - 1 MSB of operand does not change mem, immB temp +- immB, while temp oF 0, 1 1 o 0 o 0 0 W mod 1 1 1 mem 3-5 x u x x x ~ repeat this operation, CY +- LSB of (mem), (mem) +- (mem) -;- 2, temp +- temp - 1 MSB of operand does not change I ~ ~~ Instruction Set (cont) Operation Code No. of Flags Mnemonic Operand Operation 765432 0 654321 0 Bytes AC CY V P S Z Rotation ROL reg, 1 CY +- MSB of reg, reg +- reg x 2 + CY 0 o 0 W o 0 reg x x MSB of reg -=F- CY: V+-1 MSB of reg = CY: V+-O mem, 1 CY +- MSB of (mem), 1 1 o 1 o 0 0 W mod 000 mem 2-4 x x (mem) +- (mem) x 2 + CY MSB of (mem) -=F- CY: V+-1 MSB of (mem) = CY: V+-O reg, CL temp +- CL, while temp -=F- 0, 1 1 o 1 o 0 1 W 1 1 000 reg 2 x u repeat this operation, CY +- MSB of reg, reg +- reg x 2 + CY temp +- temp - 1 mem, CL temp +- CL, while temp -=F- 0, 1 1 o 1 o 0 1 W mod 000 reg 2-4 x u repeat this operation, CY +- MSB of (mem), (mem) +- (mem) x 2 + CY temp +- temp - 1 reg, immB temp +- immB, while temp -=F- 0, 1 1 00000W1 1 000 reg 3 x u repeat this operation, CY +- MSB of reg, reg +- reg x 2 + CY temp +- temp - 1 mem, immB temp +- immB, while temp -=F- 0, 1 1 o 0 0 0 0 W mod 000 mem 3-5 x u repeat this operation, CY +- MSB of (mem), (mem) +- (mem) x 2 + CY temp +- temp - 1 ROR reg, 1 CY +- LSB of reg, reg +- reg -;- 2 1 1 o1 o0 0 W 1 1 o0 1 reg 2 x x MSB of reg +- CY MSB of reg -=F- bit following MSB of reg: V+-1 mem, 1 MSB of reg = bit following MSB of reg: V+-O CY +- LSB of (mem), (mem) - (mem) -;- 2 MSB of (mem) +- CY 1 1 o 1 o 0 0 W mod o 0 1 mem 2-4 x x ,. 1:::: D MSB of (mem) -=F- bit following MSB -III of (mem): V+-1 0 MSB of (mem) = bit following MSB W of (mem): V+-O ~ reg. CL temp +- CL, while temp -=F- 0, 1 1 o 1 o 0 1 W 1 1 o 0 1 reg x U 0 repeat this operation, CY +- LSB of reg. reg +- reg -;- 2, MSB of reg +- CY "- W temp +- temp - 1 ~ mem, CL temp +- CL, while temp -=F- 0, 1 1 o 1 o 0 1 W mod o 0 1 mem 2-4 x u ~ repeat this operation, CY +- LSB of (mem), ~ (mem) +- (mem) -;- 2, MSB of (mem) +- CY temp +- temp - 1 < ~ ()') ~ ~ en II 0) 0) Instruction Set (cont) 1:::: Mnemonic Operand Rotation (cont) Operation Operation Code 7 654 3 2 0 654321 0 No. of Bytes AC CV Flags V P S Z "....a 0 ROR (cont) reg, immB temp - immB, while temp #- 0, OOOOOW o0 reg 3 x u W repeat this operation, CY - LSB of reg, ~ reg - reg -;- 2, MSB of reg - CY 0 temp - temp - 1 mem, immB 1 1 o 0 0 0 0 W mod o 0 1 mem 3-5 x u "- W temp - immB, while temp #- 0, repeat this operation, CY - LSB of (mem), ~ (mem) - (mem) -;- 2 N temp - temp - 1 ......" Rotate < ~ ROLC reg, 1 tmpcy - CY, CY - MSB of reg 1 1 o1 o0 0 W 1 1 o 1 0 reg x x reg - reg x 2 + tmpcy MSB of reg = CY: V ~ 0 MSB of reg #- CY: V - 1 '" ........ mem,1 tmpcy - CY, CY - MSB of (mem) 1 1 o 1 o 0 0 W mod o 1 0 mem 2-4 x x (mem) - (mem) x 2 + tmpcy MSB of (mem) = CY: V - 0 MSB of (mem) #- CY: V - 1 reg, CL temp - CL, while temp #- 0, 1 1 o1 o0 1 W1 1 o 1 0 reg 2 x u repeat this operation, tmpcy - CY, CY - MSB of reg, reg - reg x 2 + tmpcy temp - temp - 1 mem, CL temp - CL, while temp #- 0, 1 1 o 1 o 0 1 W mod o 1 0 mem 2-4 x u repeat this operation, tmpcy +- CY, CY - MSB of (mem), (mem) - (mem) x 2 + tmpcy temp - temp - 1 reg, immB temp - immB, while temp #- 0, 1 1 00000W1 1 o1 0 reg 3 x u repeat this operation, tmpcy - CY, CY +- MSB of reg, reg - reg x 2 + tmpcy temp - temp - 1 mem, immB temp - immB, while temp ~ 0, 1 1 o 0 0 0 0 W mod o 1 0 mem 3-5 x u repeat this operation, tmpcy +- CY, CY - MSB of (mem) (mem) - (mem) x 2 + tmpcy temp - temp -;- 1 ;( ~ ~ ~ Instruction Set (cont) Operation Code No. of Flags Mnemonic Operand Operation 7 654 3 2 0 65432 1 0 Bytes AC CY V P S Z Rotate (cont) RORC reg, 1 tmpcy - CY, CY - LSB of reg 0 o0 0 W 0 reg 2 x x reg - reg -:-- 2, MSB of reg - tmpcy MSB of reg ~ bit following MSB of reg: V - MSB of reg = bit following MSB of reg: V - 1 0 ~ mem, 1 tmpcy - CY, CY - LSB of (mem) 1 1 o 1 o 0 0 W mod o 1 1 mem 2-4 x x (mem) - (mem) -:-- 2, MSB of (mem) - tmpcy MSB of (mem) ~ bit following MSB of (mem): V - 1 MSBof (mem) = bit following MSB of (mem): V - 0 reg, CL temp - CL, while temp ~ 0, 1 1 o 1 o 0 1 W1 1 o 1 1 reg 2 x u repeat this operation; tmpcy - CY, CY - LSB of reg, reg - reg -:-- 2, MSB of reg- tmpcy, temp - temp-1 mem, CL temp - CL, while temp ~ 0, 1 1 o 1 o 0 1 W mod o 1 1 mem 2-4 x u repeat this operation, tmpcy - CY, CY - LSB of (mem), (mem) - (mem) -:-- 2 MSB of (mem) - tmpcy, temp - temp - 1 reg, immB temp - immB, while temp ~ 0 1 1 000OOW1 1 o1 1 reg 3 x u repeat this operation, tmpcy - CY, CY - LSB of reg, reg - reg -:-- 2 MSB of reg - tmpcy, temp - temp - 1 mem, immB temp - immB, while temp ~ 0, 1 1 o 0 0 0 0 W mod o 1 1 mem 3-5 x u repeat this operation, tmpcy - CY, CY - LSB of (mem), (mem) - (mem) -:-- 2 MSB of (mem) - tmpcy, temp - temp - 1 Subroutine Control Transfer "t:: CALL near-proc (SP - 1, SP - 2) - PC - PC + disp PC, SP - SP - 2 0 000 3 a" --a regptr16 (SP - 1, SP - 2) - PC, SP - SP - 2 1 1 0 0 reg 2 PC - regptr16 0 W memptr16 (SP - 1, SP - 2) - PC, SP - SP - 2 mod 0 0 mem 2-4 N PC - (memptr16) 0 far-proc (SP - 1, SP - 2) - PS, (SP - 3, SP - 4) - PC o0 0 0 5 "- SP - SP - 4, PS - seg, PC - offset W memptr32 (SP - 1, SP - 2) - PS, (SP - 3, SP - 4) - PC mod o1 1 mem 2-4 N SP - SP - 4, PS - (memptr32 + 2), N PC +- (fnemptr32) ...... < N C> VI co --- II ....... 0 Instruction Set (cont) Mnemonic Operllnd Operation Operation Code 7654321 07654321 0 No. of Bytes AC CY Flags V P S Z ,.a 1:::- Subroutine Control Transfer (cont) ..... 0 RET PC - (SP + 1, SP), SP - SP + 2 o0 0 0 1 W pop-value PC - (SP + 1, SP) o0 0 0 0 3 N SP - SP + 2, SP - SP + pop-value 0 PC - (SP + 1, SP ), PS - (SP + 3, SP + 2) o0 0 "- W SP-SP+4 N pop-value PC - (SP + 1, SP), PS - (SP + 3, SP + 2) o0 0 0 3 N SP - SP + 4, SP - SP + pop-value --.. Stack Manipulation < N PUSH mem16 (SP -1, SP - 2) - (mem16), SP - SP - 2 1 1 1 mod 1 1 0 mem 2-4 en -...... reg16 (SP - 1, SP - 2) - reg16, SP - SP - 2 o 1 0 0 reg sreg (SP-1, SP- 2) - sreg, SP - SP - 2 o 0 0 sreg 0 PSW (SP - 1, SP - 2) - PSW, SP - SP - 2 1 o 0 1 1 1 o 0 R Push registers on the stack 0 00000 imm (SP -l;SP - 2) - imm 0 0 oS 0 2-3 SP - SP - 2, When S == 1, sign extension POP mem16 (mem16) - (SP + 1, SP), SP - SP + 2 1 000 mod 0 0 0 mem 2-4 reg16 reg16 - (SP + 1, SP), SP - SP + 2 o1 0 reg sreg sreg - (SP + 1, SP) sreg : SS, DSO, DS1 o 0 0 sreg 1 1 SP - SP+2 PSW PSW - (SP + 1, SP), SP - SP + 2 o0 1 1 1 0 R R R R R R R Pop registers from the stack 0 1 0 0 0 0 1 PREPARE imm16, immS Prepare new stack frame o0 000 4 DISPOSE Dispose of stack frame o0 o0 1 Branch BR near-label PC - PC+ disp 0 o0 3 short-label PC - PC + ext-dispS 0 0 regptr16 PC - regptr16 1 1 o0 reg memptr16 PC - (memptr16) 1 1 mod o0 mem 2-4 ~ far-label PS - seg, PC - offset 0 0 0 5 memptr32 PS - (memptr32 + 2), PC - (memptr32) mod 0 mem 2-4 I ~ ~ Instruction Set (cont) Operation Code No. of Flags Mnemonic Operand Operation 7 6 5 4 3 2 07654321 0 Bytes AC CY V P S Z Conditional Branch BV short-label if V = 1, PC - PC + ext-disp8 0 o0 0 0 BNV BC, Bl short-label short-label if V = 0, PC - if CY = 1, PC - PC + ext-disp8 PC + ext-disp8 0 0 000 o0 0 2 2 0 BNC,BNl short-label if CY = 0, PC - PC + ext-disp8 0 o0 2 BE,BZ short-label if Z = 1, PC - PC + ext-disp8 0 0 o0 BNE, BNZ short-label if Z = 0, PC - PC + ext-disp8 0 0 o1 BNH short-label if CY OR Z = 1, PC - PC + ext-disp8 0 o1 0 2 BH short-label if CY OR Z = 0, PC - PC + ext-disp8 0 o1 1 1 2 BN short-label if S = 1, PC - PC + ext-disp8 0 000 2 BP short-label if S = 0, PC - PC + ext-disp8 0 o0 2 BPE short-label if P = 1, PC - PC + ext-disp8 0 0 0 2 BPO short-label if ,P = 0, PC - PC + ext-disp8 0 o1 1 2 BLl short-label if S XOR V = 1, PC - PC + ext-disp8 0 o0 2 BGE short-label if S XOR V = 0, PC - PC + ext-disp8 0 o1 2 BlE short-label if (S XOR V) OR Z = 1, PC - PC + ext-disp8 0 0 2 BGT short-label if (S XOR V) OR Z = 0, PC - PC + ext-disp8 0 1 2 DBNZNE short-label CW-CW-1 00000 2 if Z = 0 and CW =P 0, PC - PC + ext-disp8 DBNZE short-label CW-CW-1 000 0 2 if Z = 1 and CW =P 0, PC - PC + ext-disp8 DBNZ short-label CW-CW-1 000 0 2 1::: if CW =P 0, PC - PC + ext-disp8 BCWZ BTClR short-label sfr. imm3, if CW= 0, PC - PC + ext-disp8 if bit no. imm3 of (sfr) = 1, 1 1 o0 0 0 000 1 0 0 1 1 1 o 0 2 5 "a.... 0 short-label PC - PC + ext - disp8, bitno. imm3 of (sfr) - 0 W Interrupt BRK 3 ($P-1, SP - 2) - PSW, (SP - 3, SP - 4) - (SP - 5, SP - 6) - PC, SP - SP - 6 PS, 1 1 o0 1 1 o0 ,N 0 W IE-O,BRK-O ~ PS -(15, 14), PC - (13, 12) N imm8 (SP -1, SP- 2) - PSW, (SP -3, SP -4) - PS. 1 1 o0 1 1 o1 2 ,.-.. (=p3) (SP - 5, SP - 6) - PC; SP - SP - 6 IE-O, BRK-O < N :1 PC - (n x 4, + 1, n x 4) en ....... PS - (n x 4 + 3, n x 4 + 2) n = imm8 II ....... I\) Instruction Set (cont) Mnamonle Operand Operation Operation Code 7 654 3 2 o7 6 5 4 3 2 1 0 No. of Flags Bylas AC CYVPSZ ,.a, 1::: Interrupt (cont) ..... 0 BRKV When V =.1 o0 1 0 w. (SP --, 1, SP - 2) - PSW, (SP - 3, SP - 4) - PS, ~ (SP - 5, SP - 6) - PC, SP - SP - 6 Q, IE:-O, BRK-O PS - (19, 18), PC- {17, 16) "- W RETI PC - (SP+ 1, SP), PS - (SP + 3, SP + 2), o0 R RR R R R N psw- (SP + 5, SP + 4), SP - SP + 6 N RETRBI PC - Save PC, PSW - Save PSW o0 0 0 o0 o0 0 1 2 R R R R R R ....... ~'NT Indicates that interrupt service routine to the o0 0 0 o0 o0 0 2 < N, interrupt controller built in the CPU has been completed en -..,., CHKINO reg16, When (mem32) > reg16 or (mem32 + 2) < reg16 o 1 1 0 0 0 1 0 mod reg mem 2-4 mem32 (SP -1, SP - 2) - PSW, (SP - 3;SP - 4) - PS, (SP -5,SP - 6) - PC, SP - SP - 6 IE - 0, BRK - 0, PS - (23, 22), PC - (21, 20) CPU Control HALT CPU Halt 1 1 0 o0 STOP CPU Halt o0 0 0 0 1 1 1 1 1 0 BUS LOCK Bus Lock Prefix 1 o0 0 0 FP01 (Note 1) fp-op No Operation 0 X X X YYYZZZ 2 fp-op,mem data bus""':' (mem) o 1 1 X X X mod Y Y Y mem 2-4 FP02 (Note 1) fp-op No Operation 0 o0 X 1 1 Y Y Y ZZ Z 2 fp-op,mem data bus - (mem) 011001 X mod Y Y Y mem 2-4 POLL Poll and wait o0 o1 1 NOP No Operation o0 o0 0 0 01 IE-O 0 0 EI IE-1 1 Q 1 OSO; OS1; Segment override prefix o0 sreg 0 PS;SS ~ Notes: (1) Does not execute on the V25, but does generate an interrupt. I ~ ~ Instruction Set (cont) Operation Code No. of Flags Mnemonic Operand Operation 7 6 5 4 3 2 o 7 6 5 4 3 2 0 Bytes AC CY V P S Z Register Bank Switching MOVSPA o0 0 0 o0 1 0 0 ~ 0 2 BRKCS reg16 o 000 o0 1 0 1 0 3 MOVSPB reg16 o0 0 0 o0 0 0 3 1 1 1 1 reg TSKSW reg16 o 000 1 1 o0 0 o0 3 x x x x x x 1 1 1 1 reg l::: '11 a o--- w ~ o "- w ~ ~ ........ ,: N -....I CII Ci.) "-'" II pPD70320/322 (V28) NEe 74 NEe NEe Electronics Inc. pPD70330/70332 (V35) is-Bit Microcomputers: Advanced, Single-Chip, CMOS Description o 24 parallel 1/0 lines The pPD70330170332 (V35™) is a high-performance, o Serial interface: two channels - Dedicated baud rate generator 16-bit single-chip microcomputer with a 16-bit external - Asynchronous mode, 1/0 interface mode data bus. The pPD70330170332 is fully software com- patible with pPD8086/8088 and pPD70108170116 o Interrupt controller - Programmable priority (eight levels) (V20®/30®) instruction set. - Three interrupt service functions The pPD70330 is a ROMless part. The pPD70332 has - Vectored interrupt, register bank switching, 16K ROM, while the pPD70P322 has 16K EPROM and macro service can be used as a pPD70330 (V35) or a pPD70320 o DRAM, pseudo SRAM refresh function (V25™). o Two DMA channels o Two 16-bit timers Features DOne 20-bit time base counter o Functionally compatible with pPD70320/322 (V25) o Clock generator o Internal 16-bit architecture and external 16-bit o Programmable wait function data bus o Low power modes -HALT o Software compatible with pPD8086/8088, -STOP pPD70108170116 (V20/30) in the native mode o New and enhanced instructions o 1.2-micron CMOS o Six-byte prefetch queue o Minimum instruction cycle: 500 ns at 8 MHz o Internal memory - ROM: 16K bytes (pPD70332 only) Ordering Information Part Number pPD70330L-8 Clock (MHz) 8 Package 84-pin PLCC Internal ROM ROMless Em - RAM: 256 bytes GJ-8 8 94-pin plastic QFP o Memory space: 1M bytes pPD70332L-8-xxx 8 84-pin PLCC 16K mask ROM o Input port with comparator (port T): eight bits o Bus interface optimized for use with dynamic GJ-8-xxx 8 94-pin plastic QFP RAMs pPD70P322KE-8 8 84-pin LCC 16K EPROM - Multiplexed address (UVerasable) - On-board refresh controller V20 and V30 are registered trademarks of NEC Corporation. V25 and V35 are trademarks of NEC Corporation. 50006-2 (NECEL-870) pPD70330/332 (V35) NEe Pin Configuration 84-Pln PLCC and 84-Pln LCC P07/CLKOUT 74 PT7 Do 73 PT6 01 72 PT5 02 71 PT4 03 70 PT3 04 69 PT2 Os 68 PT1 06 67 PTO 07 66 P17/REAOY 08 65 P16/SCKO 09 64 P15ITOUT 0 10 63 P14/1NT/POLL 011 62 P13/INTP2IINTAK 0 12 61 P12/1NTP1 013 60 P11/1NTPO 014 59 P10/NMI 015 58 P27/HLORO Ao 57 P26/HLOAK A9 /A 1 56 P25ITC1 A10/A2 55 P24/DMAAK1 A11 /A 3 54 P23/0MAR01 * Connect pin 9 to GNO through a 5-kn to 10-kn resistor. 83YL-6633B 2 NEe pPD70330/332 (V35) Pin Configuration (cont) 94-Pin Pla~tic QFP PO S A12/A4 NC NC A13 /A S * P0 4 A14 /A S P03 A1S/A7 P0 2 A1S /A S P0 1 A17 /A 1S POO A19 EX A1S /UBE MREQ RxDO IOSTB GND MSTB CTSO RtW TxDO REFRQ RxD1 RESET CTS1 TxD1 VOO P2Q/DMARQO VOO X2 IC X1 VDD GNO VDD GNO P21/DMAAKO NC NC NC P22ITCO VIN *Connect pin 69 to GND through a 5-kn to 10-kn resistor. 83YL-66348 3 pPD70330/332 (V35) NEe Pin Identification Symbol Function Symbol Function A19- AO Address bus outputs RxD1 Receive data input, serial channel 1 CLKOUT System clock output SCKO Serial clock output CTSO Clear-to-send input, serial channel 0 TCO Terminal count output; DMA completion, channel 0 CTS1 Clear-to-send input, serial channel 1 TC1 Terminal count output; DMA completion, D15- DO Bidirectional data bus channel 1 DMAAKO DMA acknowledge output, DMA controller TOUT Timer output channel 0 TxDO Transmit data output, serial channel 0 DMAAK1 DMA acknowledge output, DMA controller channel 1 TxD1 Transmit data output, serial channel 1 DMAROO DMA request input, DMA controller UBE Upper byte enable channel 0 X1, X2 Connections to external frequency control DMAR01 DMA request input, DMA controller source (crystal, ceramic resonator, or clock) channel 1 +5-volt power source input (two pins) Voo EA External access; clamped low or high Threshold voltage input to comparator according to program access requirements VTH circuits HLDAK Hold acknowledge output GND Ground reference (two pins) HLDRO Hold request input IC Internal connection; must be tied to Voo INT Interrupt request input externally through a pullup resistor INTAK Interrupt acknowledge output INTPO Interrupt request 0 input INTP1 Interrupt request 1 input INTP2 Interrupt request 2 input 10STB 110 read or write strobe output MREQ Memory request output MSTB Memory strobe output NMI Nonmaskable interrupt request POLL Input on POLL synchronizes the CPU and external devices P07-POO 110 port 0 P1rP10 110 port 1 P27-P20 110 port 2 PTO-PT? Comparator port input lines READY Ready signal input controls insertion of wait states REFRO DRAM refresh request output RESET Reset signal input R/W Readlwrite strobe output RxDO Receive data input, serial channel 0 4 NEe pPD70330/332 (V35) Pin Functions EA; External Access A19-AO; Addres$ Bus For the ROM-less pPD70330, connect this pin to To support dynamic RAMs, the 20-bit address is multi- ground. For the pPD70332, connect EAto ground if plexed on 11 lines. When MREQ is asserted, A17-A9 are program code is in external memory; connect EA to +5 valid. When MSTB or 10STB are asserted, A8-A1 and A18 volts if program code isin the internal ROM. are valid. A18 is also multiplexed with UBE and is valid when MREQ is asserted. ThereforeA18 is active throughout HLDAK; Hold Acknowledge the bus cycle. A 19 and Ao are not multiplexed but have The HlDAK output signal indicates that the hold dedicated pins and are valid throughout the bus cycle. request (HlDRQ) has been accepted. When HlDAK is active (low), the following lines go to the high-imped- CLKOUT; Clock Out ance state with internal 4700-0~lIup resistors: The system clock (ClK) is distributed from the internal A 1fLAO, DrDo, IOSTB, MREQ, MSTB, REFRQ, and clock generator to the CPU and output to peripheral R/W. hardware at the ClKOUT pin. HLDRQ; Hold Request CTSO; Clear-to-Send 0 The HlDRQ input from an external device requests This is the CTS pin of the channel 0 serial interface. In that the pPD70330/332 relinquish the address, data, asynchronous mode, a low-level input on CTSO and control buses to an external bus master. enables transmit operation. In 1/0 interface mode, INT; Interrupt CTSO is the receive clock pin. The INT input is a vectored interrupt request from an CTS1; Clear-to-Send 1 external device that can be masked by software. The active high level is detected in the last clock cycle of an This is the CTS pin of the channel 1 serial interface. In instruction. The external device confirms that the INT asynchronous mode, a low-level input on CTS1 interrupt request has been accepted by the INTAK enables transmit operation. signal output from the Cpu. 015-00; Data Bus The INT signal must be held high until the first INTAK signal is output. Together with INTAK, INT is used for D15-Do is the 16-bit data bus. operation with an interrupt controller such as pPD71059. DMAAKO and DMAAK1; DMA Acknowledge These are the DMA acknowledge outputs of the DMA INTAK; Interrupt Acknowledge controller, channels 0 and 1. Signals are not output The I NTAK output is the acknowledge signal for the during DMA memory-to-memory transfer operations software-maskable interrupt request INT. The INTAK (burst mode, single-step mode). signal goes low when the CPU accepts INT. The external device inputs the interrupt vector to the CPU OMARQO and DMARQ1; DMA Request via data bus D7-DO in synchronization with INTAK. These are the DMA request inputs of the DMA con- troller, channels 0 and 1. 5 pPD70330/332 (V35) NEe INTPO, INTP1, INTP2; Interrupt from P17-P10; Port 1 Peripheral 0, 1, 2 Lines P1rP14 are individually programmable as an The I'NTPn inputs (n = 0, 1, 2) are external interrupt input, output, or control function. The status of P13- requests that can be masked by software. The INTPn P10 can be read but these lines are always control input is detected at the effective edge specified by functions. external interrupt mode register INTM. P27-P20; Port 2 The INTPn input is also used to release the HALT mode. P27-P20 are the lines of port 2, an 8-bit bidirectional I/O port. These lines can also be used as control 10STS; 1/0 Strobe signals for the on-chip DMA controllers. See table 2-3. A low-level output on 10STB indicates that the I/O bus POLL; Poll cycle has been initiated and that the I/O add ress output on A15-AO is valid. The POLL input is checked by the POLL instruction. If the level is low, execution. of the next instruction is MREQ; Memory Request initiated. If the level is high, the POLL input is checked every five clock cycles until the level becomes low.. A low-level output on MREQ indicates that the memory or I/O bus cycle has started and that address bits Ao, The POLL functions are used to synchronize the CPU A1rA 9, A19and A 18 are valid: program and the operation of external devices. Note: POLL is effective when P1 ~ecified for the MSTB; Memory Strobe input port mode; otherwise, POLL is assumed to Togetherwith MREQ and R/W, MSTB controls memory be at low level when the POLL instruction is accessing operations. MSTB should be used either to executed. enable datahuffers or as a qata strobe. During memory write, a low-level output on MSTB indicates that data PTO-PT7; Port with Comparator on the data bus is valid. A low-level output on MSTB The PT input is compared witha threshold voltage that indicates that multiplexed address bits As-A1' A1S, is programmable to one of 16 voltage steps individually and USE are valid. for each of the eight lines. NMI; Nonmaskable Interrupt READY The NMI input is an interrupt request that cannot be After READY is de-asserted low, the CPU will synchro~ masked by software. The NMI is always accepted by nize and insert at least two wait states into a read or the CPU; therefore, it has priority over any other write cycle to memory or I/O. This allows the processor interrupt. to accommodate devices whose access times are The NMI input is detected at the effective edge speci- longer than normal execution allows. fied by external interrupt mode register INTM. Sampled in each clock cycle, NMI is accepted when the active REFRQ; Refresh Request level lasts for some clock cycles. When the NMI is This output pulse can refresh nonstatic RAM. It can be accepted, a number 2 vector interrupt is generated programmed to meet system specifications and is after completion of the instruction currently being internally synchronized so that refresh cycles do not executed. interfere with normal CPU operation. The NMI input is also used to release the CPU standby mode. This input signal is asynchronous. A low on RESET for P07-POO; Port 0 a certain duration resets the CPU and all on-chip Port 0 is an 8-bit bidirectional I/O port. peripherals regardless of clock operation. The reset operation has priority over all other operations. The reset signal is used for normal initialization/startup and also for releasing the STOP or HALT mode. After the reset signal returns high, program execution begins from address FFFFOH. 6. NEe pPD70330/332 (V35) R/W; Read/Write Strobe X1, X2; Clock Control When the memory bus cycle is initiated, the R/W signal The frequency of the internal clock generator is con- output to external hardware indicates a read (high trolled by an external crystal or ceramic resonator level) or write (low level) cycle. It can also control the connected across pins X1 and X2. The crystal fre- direction of bidirectional buffers. quency is the same as the clock generator frequency fx. Sy programming the PRC register, the system clock RxDO, RxD1; Receive Data 0,1 frequency fCLK is selected as fx divided by 2, 4, or B. These pins input data from serial channels 0 and 1. As an alternative to the crystal or ceramic resonator, the positive and negative phases of an external clock In the asynchronous mode, when receive operation is (with frequency fx) can be connected to pins X1 enabled, a low level on the RxDO or RxD1 input pin is and X2. recognized as the start bit and receive operation is initiated. Voo In the I/O interface mode (channel 0 only), receive data +S-volt power source (two pins). is input to the serial register at the rising edge of the receive clock. VTH SCKO; Serial Clock Comparator port PTO-PT7 uses threshold voltage VTH to determine the analog reference points. The actual The SCKO output is the transmit clock of serial thresholq to each comparator line is programmable to channelO. VTH x n/16 where n = 1 to 16. TCO, TC1; Terminal Count 0, 1 GND The TCO and TC1 outputs go low when the terminal Ground reference (two pins). count of DMA service channels 0 and 1, respectively, reach zero, indicating DMA completion. IC TOUT; Timer Output Internal connection; must be tied to VDD externally through a 10-kO to 20-kO resistor. The TOUT signal is a square-wave output from the internal timer. UBE, Upper Byte Enable TxDO, TxD1; Transmit Data 0,1 USE is a high-order memory bank selection signal output. USE and Ao are used to decide which bytes of These pins output data from serial channels 0 and 1. the data bus will be used. USE is used along with Ao to In the asynchronous mode, the transmit signal is in a select the even/odd banks as follows. frame format that consists of a start bit, 7 or 8 data bits (least significant bit first), parity bit, and stop bit. The Operand UBE AU Number of bus cycles TxDO and TxD1 pins become mark state (high level) Even address word 0 0 1 when transmit operation is disabled or when the serial Odd address word 0 2 register has no transmit data. In the I/O interface mode (channel 0 only), the frame Even address byte 1 has B data bits and the most significant bit is transmit- ted first. Odd address byte 0 7 pPD70330/332 (V35) NEe Block Diagram AO P20/DMAROO Ae l At-Ai6 1As P2 t /DMAAKO A17 / Ata ~/TCO At9 P23/DMARQt Ata/UBE P24 I DMAAKt RESET P%~:g.; =;:::===~ HLDAK/P22 HLDRQ/P27 RxDO READY IPt7 P16 ISCKO . . . - MREQ CTSO ...- MSTB TxDt _....1,-----, 1''rY' I 1-"-_ _--'\.1 R/W RxDt - - I05TB CTSt --a==,,",",,~==;;!J POLL liNT I P14 PtO I NMI Ptt/lNTPO EA Pt2/1NTPt Pt3/1NTP2 IINTAK Pt~ I POLL X1 X2 TOUTlPts REFRQ CLKOUT/P07 PO PI P2 PTO-PT7 VTH 83-0049658 Functional Description the JlPD70330/332 can execute multiplication/division instructions about four times faster than with the Architectural Enhancements microprogramming method. The following features enable the JlPD70330/332 to Loop Counter [LC]. The dedicated hardware loop counter perform high-speed execution of instructions: counts the number of loops for string operations and • Dual data bus the number of shifts performed for multiple bit shift/ • 16-/32-bit temporary registers/shifters (TA, TB, rotation instructions. The loop counter works with TA +TB) internal dedicated shifters to speed the processing of • 16-bit loop counter (LC) mu Iti pi ication/d ivision instructions. • Program counter (PC) and prefetch pointer (PFP) • Internal ROM pass bus (J1PD70332 only) Program Counter and Prefetch Pointer [PC and PFP]. The hardware PC addresses the memory location of Dual Data Bus. The JlPD70330/332 has two internal the instruction to be executed next. The hardware PFP 16-bit data buses: the main data bus and a subdata bus_ addresses the program memory location to be accessed This reduces the processing time required for addition/ next. Several clocks are saved for branch, call, return, subtraction and logical comparison instructions by and break instructions compared with processors one-third over single-bus systems. The dual data bus having only one instruction pointer. method allows two operands to be fetched simulta- Internal ROM Pass Bus. The JlPD70332 features a neously from the general-purpose registers and dedicated data bus between the internal ROM and the transferred to the ALU. instruction pre-fetch queue. This allows internal ROM 16-/32-Bit Temporary Registers/Shifters. The 16-bit opcode fetches to be performed in a single clock cycle temporary registers/shifters (TA, TB) allow high-speed (200 ns at 5 MHz); it also makes it possible for opcode execution of multiplication/division and shift/rotation fetches to be performed while the external data bus is instructions. By using the temporary registers/shifters, busy. This feature gives the V35 a 10-20% performance increase when executing from the internal ROM. 8 NEe pPD70330/332 (V35) Register Set Figure 1. Register Bank Configuration The J.lPD70330/70332 CPUs have general purpose register sets compatible with the J.lPD701 08/70116 and Eight ~2-Byte Register Banks the J.lPD70320/70322 microprocessors. Like the 15 0 J.lPD70320/70322, they also have a set of special function xxEFFH Register Bank registers for controlling the onboard peripherals. All xxEEOH 7 registers reside in the CPU's memory space. They are xxECOH 6 grouped in a 4K byte block called the internal data area (IDA). The 256 byte internal RAM is also in the IDA. The xxEAOH 5 addresses of the register are given as offsets into the 4 Banks 0-7 xxE80H IDA. The start address of the IDA is set by the Internal Data Area Base register (lOB), and may be programmed xxE60H 3 to any 4K boundary in the memory address space. 2 xxE40H Register Banks. Because the general purpose register 1 xxE20H set is in internal RAM, it is possible to have multiple banks of registers. TheJ.lPD70330/70332 CPU supports xxEOOH 0 up to 8 register banks. A bit field in the PSW selects L- Start address; xx =value specified by lOB register which bank is currently being used. Each bank con- tains the entire CPU register set plus additional information needed for context switching. Register 32-Byte Register Bank banks may be switched using special instructions 15 0 (TSKSW, BRKCS, MOVSPA, MOVSPB), or may switch AW +lEH AH I AL in response to an interrupt. This provides fast context CW switching and fast interrupt handling. During and after +lCH GH I GL. RESET, register bank 7 is selected. ow +lAH DH I DL. Figure 1 shows the configuration of a register bank and BW +18H BH I BL how the banks are mapped to internal RAM. The Vector SP PC treld contains the value that will be loaded into the +16H PC when a register bank switch occurs. The PC Save BP +14H and PSW Save fields contain the values of the PC and the PSW just before the banks are switched. The PSW IX +12H is left unmodified after a bank switch; the PSW Save IV +10H field is used to restore the PSW to its previous state is OS1 required. +OEH PS +OCH General-Purpose Registers [AW, BW, CW, OW]. These SS four 16-bit general-purpose registers can also serve as +OAH independent 8-bit registers (AH, AL, BH, BL, CH, CL, OSO +08H DH, DL). The instructions below use general-purpose PC .torage registers for default: +06H PSW Storage AW Word multiplication/division, word 110, data +04H conversion Vector PC +02H AL Byte multiplication/division, byte 110, BCD Re.erved rotation, data conversion, translation +OOH AH Byte multiplication/division L..= Offset from register bank start address BW Translation 83M-004643 CW Loop control branch, repeat prefix CL Shift instructions, rotation instructions, BCD operations OW Word multiplication/division, indirect address- ing I/O 9 pPD70330/332 (V35) NEe Pointers [SP, BPl and Index Registers [IX, IV]. These Program Status Word [PSW]. The PSW contains the' registers are used as 16-bit base pointers or index following status and control flags. registers in based addressing, indexed addressing, 15 PSW 8 and based indexed addressing. The registers are used as default registers under the following conditions: I 1 RB2 I, RB1 RBO I V DIR IE I BRK I SP Stack operations 7 o IX Block transfer (source), BCD string opera- I 's I z F1 AC FO I p I BRKI I Cy I tions IY Block transfer (destination), BCD string Status Flags Control Flags operations V Overflow bit DIR Direction of string processing Segment Registers. The segment registers divide the S Sign 1M-byte address space into 64K-byte blocks. Each IE Interrupt enable Z Zero segment register functions as a base address to a BRK Break (after every block; the effective address is an offset from that base. AC Auxiliary carry instruction) Physical addresses are generated by shifting the asso- P Parity ciated segment register left four binary digits and then RBn Current register adding the effective address. The segment registers CY Carry bank flags are: BRKI I/O trap enable (see Segment Register Default Offset software interrupts) PS (Program segment) PC FO, F1 General-purpose SS (Stack segment) SP, Effective address user flags DSO (Data segment-O) IX, Effective address DS1 (Data segment-1) IY, Effective address The eight low-order bits of the PSW can be stored in the AH register and restored by a MOV instruction execu- During RESET, PS is set to FFFFH; DSO, DS1 and SS tion. The only way to alter the RBn bits via software is to are set to OOOOH. . execute an RETRBI orRETI instruction. During RESET, PSW is set to F002H. The FO and F1 flags may be access- Program Counter [PC]. The PC is a 16-bit binary ed as bits in the FLAG special functioning register. counter that contains the offset address from the program segment of the next instruction to be executed. Memory Map It is incremented every time an instruction is received from the queue .. It is loaded with a new location The pPD70330/332 has a 20-bit address bus that can directly access 1M bytes of memory. Figure 2 shows that whenever a branch, call, return, break, or interrupt is the 16K bytes of internal ROM (pPD70332 only) executed. During RESET, PC is serto OOOOH. are located at the top of the address space from FCOOOH to FFFFFH .. 10 NEe pPD70330/332 (V35) Figure 2. Memory Map Eight 128K-Byte Memory Banks 16K"Byte Lr [1 M-ByteMemoryj Internal ROM [JlPD70322j 15 0 15 87 0 FFFFFH FFFH lOB Registeri Memory Bank FFFFBH 12 Byles EOOOOH 7 FFFEFH Use ProhibitEid DFFFFH FFEFFH COOOOH 6 16,128 Bytes BFFFFH FCOOOH 512-Byte AOOOOH 5 Internal Data Area 9FFFFH 15 0 Special Function { "FFFH 80000H 4 _ xxFOOH Registers, 256 Bytes 7FFFFH xxEFFH 256-Byte xxEOOH Internal RAM 60000H 3 5FFFFH 40000H 2 , 3FFFFH 1 K-Byte 1 Vector Area 20000H 15 0 lFFFFH { 003FFH General-Purpose Vectors OOOOOH 0 ~ OOOOOH Special-Purpose Vectors 32-Byte Register Bank 15 0 +lFH AW CW OW BW SP BP IX IV r--' DSl PS SS DSO PC Storage 8-Byte PSW Storage Macro Service Channel Vector PC 15 8 7 0 Eight 32-Byte ~{ +7H MSS Register Banks +OOH Reserved MSP 15 0 xxEFFH Register Bank Eight 8-Byte Reserved I SCHR xxEEOH 7 Macro Service Channels +OH SFRP I MSC 15 0 xxECOH 6 xxE3FH Macro Service Channel Two 8-Byte xxE38H 7 DMA Service Channels xxEAOH 5 15 8 7 0 xxE30H 6 xxE80H xxE60H 4 3 - xxE28H xxE20H 5 4 - xxEOFH Chan 1 SARH1 TCl I OARHl DARl ~ xxE18H 3 xxE08H SARl xxE40H 2 ]-I xxE07H TCO xxEl0H 2 xxE20H 1 1 ChanO SARHO I DARHO xxE08H DARO xxEOOH 0 xxEOOH 0 xxEOOH SARO 83-004644C 11 pPD70330/332 (V35) NEe Figure 2 shows the internal data area (IDA) is a 256- Instructions byte internal RAM area followed consecutively by a 256-byte special function register (SFR) area. All the The pPD70330/332 instruction set is fully compatible data and control registers for on-chip peripherals and with the V20 native mode instruction set. The V20 I/O are mapped into the SFR area and accessed as instruction set is a superset of the pPDBOB6/BOBB RAM. For a description of these functions, see table 6. instruction set with different execution times and The IDA is dynamically relocatable in 4K-byte incre- mnemonics. ments by changing the value in the internal data base The pPD70330/332 does not support the V20 BOBO (lOB) register. Whatever value is in this register will be emulation mode. All of the instructions pertaining to assigned as the uppermost eight bits of the IDA this have been deleted from the pPD70330/332 in- address. The lOB register can be accessed from two struction set. different memory locations, FFFFFH and XXFFFH, where XX is the value in the lOB register. Enhanced Instructions On reset, the internal data base register is set to FFH In addition to the pPDBOB6/BB instructions, the which maps the IDA into the internal ROM space. pPD70330/332 has the following enhanced instructions. However, since the pPD70332 has a separate bus to internal ROM, this does not present a problem. When Instruction Function these address spaces overlap, program code cannot be PUSH imm Pushes immediate data onto stack executed from the IDA and internal ROM locations cannot be accessed as data. PUSH R Pushes eight general registers onto stack Figure 2 shows that the internal data area is divided into 2 parts: the 256 byte internal RAM and the special POPR Pops eight general registers from stack function register area. MUL imm Executes 16-bit multiply of register or memory contents by immediate data The internal RAM area serves various purposes. When the RAMEN bit in the Processor Control Register is set, SHL immB Shifts/rotates register or memory by this area may be accessed as RAM and code may be SHR immB immediate value executed from it. Note that the processor may ru n SHRA immB slower when the RAMEN bit is set. See the Instruction ROL immB Clock Count table. I n addition, whether the RAMEN bit ROR immB is on or off, each of the B macroservice channels has an ROLC immB B byte control block that is assigned to a fixed location RORC immB in the low 64 bytes of the internal RAM. Similarly, the CHKIND Checks array index against designated two B byte DMA control blocks are assigned to the low boundaries 16 bytes of the RAM. The B CPU register banks use 32 INM Moves a string from an 110 port to bytes each. Since the RAM can't be used for more than memory one purpose, there are restrictions on how V35 features can be combined. For example, if register bank 0 is OUTM Moves a string from memory to an I/O used, then macroservice channels 0-3 and both DMA port channels cannot be used. If DMA channel 1 is used, PREPARE Allocates an area for a stack frame and then macroservice channel 1 cannot be used. copies previous frame pointers The special function register area contains the registers DISPOSE Frees the current stack frame on a used to control the onboard peripheral functions. procedure exit Table 6 shows the SFRs. The address shown in the table is an offset from the lOB register. MostSFRs can be both read and written, but some are read-only; others are write-only. Some SFRs may be accessed one bit at a time; others only B bits at a time, and some SFRs are 16 bits wide. 12 NEe pPD70330/332 (V35) Unique Instructions are left pointing to the start of the next bit field, ready for the next operation. Bit field operation instructions The pPD70330/332 has the following unique are powerful and flexible and are therefore highly instructions. effective for graphics, high-level languages, and packingl Instruction Fu nction unpacking applications. INS Inserts bit field Bit field insertion copies the bit field of specified length from the AW register to the bit field addressed by EXT Extracts bit field DS1:IY:reg8 (8-bit general-purpose register). The bit ADD4S Performs packed BCD string addition field length can be located in any byte register or SUB4S Performs packed BCD string subtraction supplied as immediate data. Following execution, both the IY and reg8 are updated to point to the start of the CMP4S Performs packed BCD string next bit field. comparison ROl4 Rotates BCD digit left Bit field extraction copies the bit field of specified ROR4 Rotates BCD digit right length from the bit field addressed by DSO:IX:reg8 to the AW register. If the length of the bit field is less than TEST1 Tests bit 16 bits, the bit field is right justified with a zero fill. The SET1 Sets bit bit field length can be located in any byte register or ClR1 Clears bit supplied as immediate data. Following execution, both IX and reg8 are updated to point to the start of the next NOT1 Complements bit bit field. BTClR Tests bit; if true, clear and branch Figures 3 and 4 show bit field insertion and bit field REPC Repeat while carry set extraction. REPNC Repeat while carry cleared Packed BCD Instructions Variable Length Bit Field Operation Instructions Packed BCD instructions process packed BCD data Bit fields are a variable length data structure that can either as strings (ADD4S, SUB4S, CMP4S) or byte range in length from 1 to 16 bits. The pPD70330/332 format operands (ROR4, ROl4). Packed BCD strings supports two separate operations on bit fields: insertion may be 1 to 254 digits in length. The two BCD rotation (INS) and extraction (EXT). There are no restrictions instructions perform rotation of a single BCD digit in on the position of the bit field in memory. Separate the lower half of the Al register through the register or segment, byte offset, and bit offset registers are used the memory operand. for insertion and extraction. Following the execution of these instructions, both the byte offset and bit offset Figure 3. Bit Field Insertion Bit length 15 o AW Bit offset Memory Byte boundary Segment base (OS1) 83-0001068 13 pPD70330/332 (V35) NEe Figure 4. Sit Field Extraction Bit length Bit offset Byte boundary Segment base (050) 83-0001076 Bit Manipulation Instructions Bank Switch Instructions The jlPD70330/332 has five unique bit manipulation The V35 has four new instructions that allow the instructions. The ability to test, set, clear, or comple- effective use of the reg ister ban ks for software i nterru pts ment a single bit in a register or memory operand and multitasking. These instructions are shown in increases code readability as well as performance over table 2. Also, see figures 8 and 10. the logical operations traditionally used to manipulate bit data. This feature further enhances control over Table 2. Sank Switch Instructions on-chip peripherals. Instruction Function BRKCS reg 16 Performs a high-speed software interrupt with Additional Instructions context switch to the register bank indicated Besides the V20 instruction set, the JlPD7033010332 by the lower 3-bits of reg 16. This operation is identical to the interrupt operation shown in has the eight additional instructions described in figure9. table 1. TSKSW reg 16 Performs a high-speed task switch to the register bank indicated by the lower 3-bits of Table 1. Additionallnstructions reg 16. The PC and PSW are saved in the old Instruction Function banks. PC and PSW save registers and the new PC and PSW values are retrieved from the new BTCLR var,imm8, Bit test and if true, clear and branch; register bank's save areas. See figure 10. short label otherwise, no operation MOVSPA Transfers both the SS and SP of the old STOP (no operand) Power down instruction, stops oscillator register bank to the new register bank after RETRBI (no operand) Return from register bank context switch the bank has been switched by an interrupt or interrupt BRKCS instruction. FINT (no operand) Finished interrupt. After completion of a MOVSPB Transfers the SS and the SP of the current hardware interrupt request, this instruction register bank before the switch to the SS and must be used to reset the current priority SP of the new register bank indicated by the bit in the in-service priority register (ISPR).* lower 3-bits of reg 16. *00 not use with NMI or INTR interrupt service routines. Interrupt Structure Repeat Prefixes The JlPD70330/332 can service interrupts generated Two new repeat prefixes (REPC; REPNC) allow con- both by hardware and by software. Software interrupts ditional block transfer instructions to use the state of are serviced through vectored interrupt processing. the CY flag as the termination condition. This allows See table 3 forthe various types of software interrupts. inequalities to be used when working on ordered data, thus increas'ing performance when searching and sorting algorithms. 14 NEe pPD70330/332 (V35) Table 3. Software Interrupts Figure 5. Interrupt Vector 0 Interrupt . Description Vector 0 Divide error The CPU will trap if a divide error occurs as the result of a DIV or DIVU instruction. OOOH :I 001H Single step The interrupt is generated after every instruction if the BRK bit in the PSW is set. 002H 003H Overflow By using the BRKV instruction, an interrupt can be PS +- (OO3H, 002H) generated as the result of an overflow. pc <- (OO1H, OOOH) Interrupt The BRK 3 and BRK imm8 instructions can 83-000112A instructions generate interrupts. Array bounds The CHKIND instruction will generate an interrupt Table 4. Interrupt Vectors if specified array bounds have been exceeded. Address Vector No. Assigned Use Escape trap The CPU will trap on an FP01,2 instruction to allow software to emulate the floating point 00 0 Divide error processor. 04 Break flag 1/0 trap If the 1/0 trap bit in the PSW is cleared, a trap will 08 2 NMI be generated on every IN or OUT instruction. Software can then provide an updated peripheral OC 3 BRK3 instruction address. This feature allows software 10 4 BRKV instruction interchangeability between different systems. 14 5 CHKIND instruction When executing software written for another system, it 18 6 General purpose m is better to implement liD with on-chip peripherals to 1C 7 FPO instructions reduce external hardware requirements. However, 20-2C 8-11 General purpose since J.lPD70330/332 internal peripherals are memory mapped, software conversion could be difficult. The 30 12 INTSERO (Interrupt serial error, channel 0) I/O trap feature allows easy conversion from external 34 13 INTSRO (Interrupt serial receive, channel 0) peripherals to on-chip peripherals. 38 14 INTSTO (Interrupt serial transmit, channel 0) Interrupt Vectors 3C 15 General purpose The starting address of the interrupt processing 40 16 INTSER1 (Interrupt serial error, channel 1) routines may be obtained from table 4. The table 44 17 INTSR1 (Interrupt serial receive, channel 1) begins at physical address OOH, which is outside the 48 18 INTST1 (Interrupt serial transmit, channel 1) internal ROM space. Therefore, external memory is required to .service these routines. By servicing inter- 4C 19 I/O trap rupts via the macro service function or context 50 20 INTDO (Interrupt from DMA, channel 0) switching, this requirement can be eliminated. 54 21 INTD1 (Interrupt from DMA, channel 1) Each interrupt vector is four bytes wide. To service 58 22 General purpose a vectored interrupt, the lower addressed word is 5C 23 General purpose transferred to the PC and the upper word to the PS. 60 24 INTPO (Interrupt from peripheral 0) See figure 5. 64 25 INTP1 (Interrupt from peripheral 1) 68 26 INTP2 (Interrupt from peripheral 2) 6C 27 General purpose 70 28 INTTUO (Interrupt from timer unit 0) 74 29 INTTU1 (Interrupt from timer unit 1) 78 30 INTTU2 (Interrupt from timer unit 2) 7C 31 INTTB (Interrupt from time base counter) 080-3FF 32-255 General purpose 15 pPD70330/332 (V35) NEe Execution of a vectored interrupt occurs as follows: If interrupts from different groups occur simultaneously (SP-1, SP-2) - PSW and the groups have the same assigned priority level, (SP-3, SP-4) - PS the priority followed will be as shown in the Default (SP-5, SP-6) - PC Priority column of table 5. SP +- SP-6 The ISPR is an 8-bit SFR; bits PRo-PR7 correspond to IE-O,BRK-O the eight possible interrupt request priorities. The PS +- vector high bytes ISPR keeps track of the priority of the interrupt cur- PC +- vector low bytes rently being serviced by setting the appropriate bit. The address of the ISPR is XXFFCH. The ISPR format Hardware Interrupt Configuration is shown below. The V35 features a high-performance on-chip con- troller capable of controlling multiple processing for interrupts from up to 17 different sources (5 external, I PR7 I PRs I PRs I PR4 I PR3 I PR2 I PR1 I PRo I 12 internal). The interrupt configuration includes NMI and INT are system-type external vectored system interrupts that are functionally compatible with interrupts. NMI is not maskable via software. INTR is those of the V20IV30 and unique high-performance maskable (IE bit in PSW) and requires that an external microcontroller interrupts. device provide the interrupt vector number. It allows expansion by the addition of an external interrupt Interrupt Sources controller (pPD71059). The 17 interrupt sources (table 5) are divided into NMI, INTPO, and INTP1 are edge-sensitive interrupt groups for management by the interrupt controller. inputs. By selecting the appropriate bits in the interrupt Using software, each of the groups can be assigned a mode register, these inputs can be programmed to be priority from 0 (highest) to 7 (lowest). The priority of either rising or falling edge triggered. ESo-ES2 corre- individual interrupts within a group is fixed in hardware. spond to INTPO-INTP2, respectively. See figure 6. Figure 6. Interrupt Mode Register (INTM) 7 6 o INTM I I I I I I I I I 0 ES2 0 ES1 0 ESo 0 ES NMI Trigger Mode 0 Falling Edge 1 Rising Edge 0 Falling Edge 1 Rising Edge 0 Falling Edge 1 Rising Edge 0 Falling Edge 1 Rising Edge 49-0013828 16 NEe pPD70330/332 (V35) Table 5. Interrupt Sources Priority Order Multiple External/ Macro Bank Setting Between Within Processing Interrupt Source Internal Vector Service Switching Possible Groups Groups Control NMI External 2 No No No 0 Not Nonmaskable interrupt accepted INTTUO Internal 28 Yes Yes Yes Accepted Interrupt from timer unit 0 INTTU1 Internal 29 Yes Yes Yes 2 Interrupt from timer unit 1 INTTU2 Internal 30 Yes Yes Yes 3 Interrupt from timer unit 2 INTDO Internal 20 No Yes Yes 2 Accepted Interrupt from DMA channel 0 INTD1 Internal 21 No Yes Yes 2 2 Interrupt from DMA channel 1 INTPO External 24 Yes Yes Yes 3 Accepted Interrupt from peripheral 0 INTP1 External 25 Yes Yes Yes 3 2 Interrupt from peripheral 1 INTP2 Interrupt from peripheral 2 External 26 Yes Yes Yes 3 3 1m INTSERO Internal 12 No Yes Yes 4 Accepted Interrupt from serial error on channel 0 INTSRO Internal 13 Yes Yes Yes 4 2 Interrupt from serial receiver of channel 0 INTSTO Internal 14 Yes Yes Yes 4 3 Interrupt from serial transmitter of channel 0 INTSER1 Internal 16 No Yes Yes 5 Accepted Interrupt from serial error on channel 1 INTSR1 Internal 17 Yes Yes Yes 5 2 Interrupt from serial receiver of channel 1 INTSn Internal 18 Yes Yes Yes 5 3 Interrupt from serial transmitter of channel 1 INTTB Internal 31 No No No 6 Accepted Interrupt from time (Preset to 7) base counter INT External Ext. No No No 7 Not Interrupt input accepted 17 pPD70330/332 (V35) NEe Interrupt Processing Modes Register Bank Switching Interrupts, with the exception of NMI, INT, and INTTB, Register bank context switching allows interrupts to be have high-performance capability and can be pro- processed rapidly by switching register banks. After an cessed in any of three modes: standard vectored inter- interrupt, the new register bank selected is that which rupt, register bank context switching, or macro service has the same register bank number (0-7) as the priority function; The processing mode for a given interrupt of the interrupt to be serviced. The PC and PSWare can be chosen by enabling the appropriate bits in the automatically stored in the save areas of the new corresponding interrupt request control register. As register bank and the address of the interrupt routine is shown in table 6, each individual interrupt, with the loaded from the vector PC storage location in the new exception of INTR and NMI, has its own associated IRC register bank. As in the vectored mode, the IEand BRK register. The format for all IRC registers is shown in bits in the PSW are cleared to zero. After interrupt figure 7. There is an IRC for every interrupt source processing, execution of the RETRBI (return from except NHI and INT. register bank interrupt) returns control to the former register bank and restores the former PC and PSW. All interrupt processing routines other than those for Figures 8 and 9 show register bank context switching NMI and INT must end with the execution of an FINT and register bank return. instruction. Otherwise, subsequently, only interrupts of a higher priority will be accepted. FINT allows the Specific IRC registers include the following. internal interrupt controller to begin looking for new Symbol IRC Register interrupts. DICO, DIC1 DMA In the vectored interrupt mode, the CPU traps to the EXICO-EXIC2 External vector location in the interrupt vector table. SEICO, SEIC1 Serial error SRICO, SRIC1 Serial receive STICO, STIC1 Serial transmit TMICO-TMIC2 Timer Figure 7. Interrupt Request Control Registers (lRC) 7 6 4 2 o IRC f FLAG 1 J I I I I I MASK MSI INT ENCS 0 PR2 L PR1 PRo J PR 2 1 0 Priority 000 Highest ··· 1 1 1 Lowest ENCS Context Switch 0 Vectored Interrupt Mode 1 Bank Switching MS/INT Macro Service or Interrupt 0 Interrupt 1 Macro Service xxMKn Interrupt Mask 0 Mask Open: Interrupts Enabled 1 Mask Closed: Interrupts Disabled xxFn Interrupt Request Flag 0 No Request 1 Interrupt Requested 49-0013838 18 NEe pPD70330/332 (V35) Figure 8.· Register Bank Context Switching Macro Service Function The macro service function (MSF) is a special micro- RBi RBj program that acts as an internal DMA controller be- AW AW tween on-chip peripherals (special function registers, CW CW SFR) and memory. The MSF greatly reduces the OW OW software overhead and CPU time that other processors BW BW would require for register save processing, register SP SP returns, and other handling associated with interrupt processing. BP IX IV Q BP IX IV If the MSF is selected for a particular interrupt, each time the request is received, a byte or word of data will OS1 OS1 be transferred between the SFR and memory without PS PS interrupting the CPU. Each time a request occurs, the SS SS macro service counter is decremented. When the OSO Save PC ,. OSO Save PC counter reaches zero, an interrupt to the CPU is generated. The MSF also has a character search SavePSW - f---+ SavePSW option. When selected, every byte transferred will be Vector PC Vector PC f-- compared to an a-bit search character and an interrupt Reserved Reserved will be generated if a match occurs or if the macro .---- service counter counts out. y PC I Like the NMI, INT and INTTB, the two DMA controller interrupts (INTDO, INTD1) do not have MSF capability. L-f PSW 49-001344A Figure 10. Task Switching Figure 9. .Register Bank Return CURRENT NEW AW AW RBi RBj CW cw AW AW OW OW CW CW BW BW OW OW SP SP BW SP BW SP BP (> BP IX IX BP BP IV IV IX IV ¢J IX IV OS1 PS OS1 PS OS1 OS1 SS SS PS PS oso oso SS SS r- PC Save ,----- PC Save OSO OSO ,-j-.; PSWSave .------'-- PSWSave Save PC .--- ~avePC VPC VPC SavePSW r--- +-- SavePSW Reserve Reserve Vector PC Vector PC ~ ~ Reserved Reserved PC VPC: Vector PC ~ PSW ~ lr PC RBL Reg 16 RB: Register b ank field L-J PSW 83-MB005273A 49-001346A 19 pPD70330/332 (V35) NEe There are eight 8-byte macro service channels mapped Interval Timer Mode. In this mode, TMO/TMl are into internal RAM from XXEOOH to XXE3FH. Figure 11 decremented by the selected input clock and, after shows the components of each channel. counting out, the registers are automatically reloaded from the modulus registers and counting continues. Setting the macro service mode for a given interrupt Each time TMl counts out, interrupts are generated requires programming the corresponding macro ser- through TFl and TF2 (Timer Flags 1, 2). When TMO vice control register. Each individual interrupt, exclud- counts out, an interrupt is generated through TFO. ing INTR, NMI and TBC, has its own associated MSC The timer-out signal can be used as a square-wave register. See table 6. Format for all MSC registers is output whose half-cycle is equal to the count time. shown in figure 12. There are two selectable input clocks (SCLK: system clock = fose/2; fose = 10 MHz). Figure 11. Macro Service Channels Clock Timer Resolution Full Count 15 8 7 o +7H SCLK/6 1.2J1s 78.643 ms MSS SCLK/128 25.6J1s 1.678 s MSP One-Shot Mode. In the one-shot mode, TMO and MOO Reserved SCHR operate as independent one-shot timers. Starting with a preset value, each is decremented to zero. At zero, SFRP MSC r +OH Offset from macro service channel start address. counting ceases and an interrupt is generated by TFO (from TMO) or TFl (from MDO). One-shot mode allows two selectable input clocks (fose = 10 MHz). Clock Timer Resolution Full Count MSS +6H Segment value of memory address used for data transfer. Memory address SCLK/12 2.4 JlS 157.283 ms will be MSS x 16 + MSP. SCLK/128 25.6 JlS 1.678 s MSP +4H Offset value of memory address used for data transfer. Setting the desired timer mode requires programming SCHR +2H B·bit data compared In character search. the timer control register. See figures 14 and 15 for format. SFRP +1H Offset value of special function register address, which is xxFOOH + SFRP. (xx is specified by 108 register). Time Base Counter/Processor Control Register MSC +OH Number of transfers performed in macro service The 20-bit free-running time base counter controls 83M·OO5285A internal timing sequences and is available to the user as the source of periodic interrupts at lengthy intervals. On-Chip Peripherals One of four interrupt periods can be selected by pro- Timer Unit gramming the TBO and TBl bits in the processor control register (PRC). The TBC interrupt is unlike the The JlP070330/332 (figure 13) has two programmable others in that it is fixed as a level 7 vectored interrupt. 16-bit interval timers (TMO, TM1) on-chip, each with Macro service and register bank switching cannot be variable input clock frequencies. Each of the two 16-bit used to service this interrupt. See figures 16 and 17. timer registers has an associated 16-bit modulus register (MOO, MOl). Timer 0 operates in the interval The RAMEN bit in the PRC register allows the internal timer mode or one-shot mode; timer 1 has only the RAM to be removed from the memory address space to interval timer mode. implement faster instruction execution. The TBC (figure 18) uses the system clock as the input frequency. The system clock can be changed by programming the PCKO and PCKl bits in the processor control register (PRC). Reset initializes the system clock to fose/8 (fose = external oscillator frequency). 20 NEe pPD70330/332 (V35) Figure 12. Macro Service Control Registers (MSC) 7 4 o xxMSn I MSM2 I MSM1 I MSMo I DIR I 0 I CH2 I CH1 I J CHo L 2 1 0 Macro Service Channel 0 0 ·· 0 . Channel 0 1 1· 1 Channel 7 Transfer Direction 0 From Memory to SFR 1 From SFR to Memory Transfer Mode 0 0 0 8-bit Transfer 0 0 1 16-bit Transfer * 1 0 0 8-bit Transfer with Character Search * All other combinations are reserved 49-001384B Figure 13. Timer Unit Block Diagram I fSCLK Idivided bY~ 12:~L..-"':""":""'-I 12~ 128 r----L~~r-~ 1-----oTO - - - - - - - - - L(";,.- - - - -. - - - - - - - - - - - - - V Internal Bus r 83SL--s746A 21 pPD70330/332 (V35) NEe Figure 14. Timer Control Register 0 6 5 4 2 o I TSO I TCLKO I MSO I MCLK I ENTO I ALV I MOD1 MODO I I MOD1 MODO Timer Mode 0 0 Interval Timer Mode 0 1 One-shot Timer Mode 1 X Reserved Active Level ofTOUT 0 TOUT initial level = 0 1 TOUT initial level = 1 Enable Timer-Out Signal 0 Disable Timer Out 1 Enable Timer Out One-shot Mode Modulus Register Clock 0 SCLK/12 1 SCLK/128 Modulus Start (One-shot Mode) 0 Stop Modulus Register Count 1 Start Modulus Register Count TM Register Clock Select MOD1 MODO TCLK 0 0 0 SCLK/6 Interval Timer Mode 0 0 1 SCLK/128 0 1 0 SCLK/12 One-shot Mode 0 1 1 SCLK/128 Timer Start Bit 0 Stop Timer" 1 Start Timer" "Starts and stops TMO in one-shot mode 49-0013878 Figure 15. Timer Control Register 1 7 6 5 4 3 2 o I TS1 I TCLK1 I 0 I 0 I 0 I 0 I 0 I 0 I o I SCLK/6 1 I SCLK/128 TM1 Clock Select Timer Start Bit o I Stop TM1 counting 1 I Start TM1 counting 49-0013898 22 NEe pPD70330/332 (V35) Figure 16. Time Base Interrupt Request Control Reg/ster 7 6 4 3 2 o I TBF I TBMK I 0 I 0 I 0 I 1 J 1 l 1 I Time Base Interrupt Mask Bit o I Unmasked 1 I Masked Time Base Interrupt Flag o I No Interrupt Generated 1 I Interrupt Generated 49-0013936 Figure 17. Processor Control Register (PRC) 7 6 5 4 3 o PRC I 0 I RAMEN I 0 I 0 I TB1 TBO I PCK1 I PCKO I I I I I System Clock,Select PCK1 PCKO 0 0 fosc/ 2 0 1 fosc/ 4 1 0 fosc/8 1 1 Reserved Time Base Interrupt Period TB1 TBO 0 0 21O /fCLK 0 1 213/fCLK 1 0 216/fCLK 1 1 22O/fCLK Internal RAM Enable 0 Disabled 1 Enabled 49-0013956 Figure 18. Time Base Counter (TBC) Block Diagram SCLK +210 + 213 +216 +220 49-001348A 23 pPD70330/332 (V35) NEe Refresh Controller HOLD modes. Refresh. cycles- are automatically timed to REFRQ following read/writecycles to minimize the The pPD70330/332 has an on-chip refresh controller effect on system though put. for dynamic and pseudostatic RAM mass storage memories. The refresh controller generates refresh The following shows the REFRQ pin level in relation to addresses and refresh pulses. It inserts refresh cycles bits 4 (RFEN) and 7 (RFLV) of the refresh mode between the normal CPU bus cycles according to register. refresh specifications. RFEN RFLV REFRQ Level The refresh controller outputs a9-:bitrefresh address -- 0 0 0 on address bits Ao-As during the refresh bus cycle. 0 1 1 Address bits Ag-A19 are all 1'So The 9-bit refresh 1 0 0 address is automatically incremented at every refresh 1 1 Refresh pulse output timing for 512 row addresses. The 8-bit refresh mode (RFM) register (figure 19) specifies the refresh opera- tion and allows refresh during both CPU HALT and Figure 19. Refresh Mode Register (RFM) 7 6 4 2 o RFM I RFLV I HLDRF I HLTRF I RFEN I RFW1 RFWO I RFT1 RFTO I I Refresh Cycle Speed RFT1 RFTO Refresh Period 0 0 16/SCLK 0 1 32/SCLK 1 0 64/SCLK 1 1 128/SCLK Refresh Cycle Wait States RFW1 RFWO Number of Wait States 0 0 0 0 1 1 1 0 2 1 1 2 Refresh Enable 0 Refresh Pin = RFLV 1 Refresh Enabled Halt Refresh Enable 0 Refresh Duringtialt Disabled 1 Refresh During CPU HALT Hold Refresh Enable 0 Hold Refresh Disabled 1 Refresh During Hold Refresh level output to RFSH pin when RFEN = 0 49-001392B 24 NEe pPD70330/332 (V35) Serial Interface Baud Rate BRGn Value Error (%) ThepPD70330/332 has two full-duplex UARTs, channel 110 7 178 0.25 o and channel 1. Each serial port channel has a 150 7 130 0.16 transmit line (TxDn), a receive line (RxDn), and a clear 300 6 130 0.16 to send (CTSn) input line for handshaking. Communi- cation is synchronized by a start bit, and you can 600 5 130 0.16 program the ports for even, odd, or no parity, character 1200 4 130 0.16 lengths of 7 or 8 bits, and 1 or 2 stop bits. 2400 3 130 0.16 ThepPD70330/332 has dedicated baud rate generators 4800 2 130 0.16 for each serial channel. This eliminates the need to 9600 1 130 0.16 obligate the on-chip timers. The baud rate generator 19,200 0 130 0.16 allows a wide range of data transfer rates (up to 1.25 Mb/s). This includes all of the standard baud rates 38,400 0 65 0.16 without being restricted by the value of the particular 1.25M 0 2 0 external crystal. In addition to the asynchronous mode, channel 0 has a Each baud rate generator has an 8-bit baud rate synchronous I/O interface mode. I n this mode, each bit generator (BRGn) data register, which functions as a of data tranferred is synchronized to a serial clock prescaler to a programmable input clock selected by (SCKO). This is the same as the NEC pCOM75 and the serial communication control (SCCn) register. pCOM87 series, and allows easy interfacing to these Together these must be set to generate a frequency devices. Figure 20 is the serial interface block diagram; equivalent to the desired baud rate. figures 21,22, and 23 show the three serial communica- The baud rate generator can be set to obtain the tion registers. desired transmission rate according to the following formula: DMA Controller B G = SCLK X 10 6 The pPD70330/332 has a two-channel, on-chip DMA X 2n + 1 controller. This allows rapid data transfer between memory and auxiliary storage devices. The DMA con- where B = baud rate troller supports four modes of operation, two for G = baud rate generator register (BRGn) memory-to-memory transfers and two for transfers value between I/O and memory. See figu res 24, 25, and 26 for n = input clock specifications (n between a graphic representation of the DMA registers. o and 8). This is the value that is loaded into the SCCn register. See figure 23. SCLK = system clock frequency (MHz) Based on the above expression, the following table shows the baud rate generator values used to obtain standard transmission rates when SCLK = 5 MHz. 25 pPD70330/332 (V35) NEe Figure 20. Serial Interface· Block Diagram TxDO RxDO CTSO Baud Rate SCKO Generator TxD1 RxD1 CTS1 Baud Rate Generator 49-001349B 26 NEe pPD70330/332 (V35) Figure 21. Serial Communication Mode Register (SCM) 7 4 3 SCM I TxRDY I RxE I PRTY1 PRTYO I CL/TSK I SL/RSCK I MD1 MDO I I I I MD1 MDO Mode 0 0 I/O Interface [Note 1] 0 1 Asynchronous 1 X Reserved Stop Bit Length/Rcv Clk [Note 3] 0 1 Stop Bit/Ext Clk [input on CTSO] 1 2 Stop Bits/lnt Clk [output on CTSO] Char Length/Trans Shift Clk [Note 3] 0 7 Bits/No Effect 1 8 Bits/Trigger Transmit PRTY Parity Control 1 0 0 0 No Parity 0 1 o Parity [Note 2] 1 0 Odd Parity 1 1 Even Parity Receiver Control 0 Disable 1 Enable Transmitter Control 0 Disable 1 Enable Notes. [1] Only Channel 0 has I/O interface mode. [2] When 0 parity is selected, the parity is 0 during transmit and is ignored during receive. [3] Applies only to I/O interface mode. 49-0013858 27 pPD70330/332 (V35) NEe Figure 22. Serial Communication Error Registers (SCE) 7 6 5 4 3 o SCEn I RxD I 0 I 0 I 0 I 0 I ERP I ERF I ERO L I 1 Overrun Error Flag Overrun has occurred o I Overrun has not occurred Framing Error 1 I Stop bit not detected o I Framing error has not occurred Parity Error 1 I Parity error has occurred o I No parity error has occurred RxD Line Status 1 1 RxD Line = 1 o I RxD Line = 0 49-001386A Figure 23. Serial Communication Control Register (SCC) 7 6 4 3 2 o sec l 0 I 0 I 0 I 0 I PRS3 I PRS2 PRS1 I PRSo I I PRS Input clock for baud 321 0 rate generator 0000 SCLK/2 0001 SCLK/4 00 1 0 SCLK/8 o0 1 1 SCLK/16 01 00 SCLK/32 01 01- SCLK/64 o 1 1 0 SCLK/128 o 1 1 1 SCLK/256 *AII oth er combinations after 1000 are illegal 1 000 SCLK/512* 49-0013888 28 NEe pPD70330/332 (V35) Figure 24. DMA Channels TC1 XXEOEH SARH1 I OARH1 OAR1 SAR1 Channel 1 TCO Channel 0 SARHO I OARHO OARO SARO XXEOOH 1-16 B i t s - J 49-001350A Figure 25. DMA Mode Registers (DMAM) 4 o OMAMO 1 M02 I ·1 MOl I MOo I 1 W 1 EOMA 1 TDMA 1 0 1 0 OMAM1 Trigger OMA [Note 1 J oJ No Effect 1 I Trigger DMA Enable DMA [Note 2J o I Disable DMA 1 I Enable DMA Word/byte o I Byte Transfers 1 I Word Transfers DMAMode MD2 MOl MOo 0 0 0 Single Step (Mem to Mem) 0 0 1 Demand Release (110 to Mem) 0 1 0 Demand Release (Mem to 1/0) 0 1 1 Reserved 1 0 0 Burst Mode (Mem to Mem) Notes: 1 0 1 Single Transfer (110 to Mem) [1 J Valid only during single-step and burst modes. 1 1 0 Single Transfer (Mem to 110) [2J Cleared when TC = 0; cleared when DMA 1 1 1 Reserved transfer is aborted by NMI. 49·001390B 29 pPD70330/332 (V35) !VEe Figure 26. DMA Control Registers (DMAC) 4 2 o DMACO I 0 I 0 I PD1 PD~ I 0 I 0 I PS1 I PSO DMAC1 I I I I I PS1 Source Address Increment/Decrement Control PSO 0 0 Source Address not Incremented/Decremented 0 1 Increment Source Address 1 0 Decrement Source Address 1 1 Source Address not Incremented/Decremented Destination Address IncrementlDecrement Control PD1 PD~ 0 0 Destination Address not Incremented/Decremented 0 1 Increment Destination Address 1 0 Decrement Destination Address 1 1 Des.tination Address not Incremented/Decremented 49-001391 B Memory-Io-Memory Transfers. In the single-step The DMA controller generates physical source mode, when one DMA request is made, execution of addresses by offsetting SARH 12 bits to the left and one instruction and one DMA transfer are repeated then adding the SAR. The same procedure is also used alternately until the prescribed number of DMA trans- to generate physical destination addresses. You can fers has occurred. Interrupts can be accepted while in program the controller to increment or decrement this mode. In burst mode, a DMA request causes DMA source andlor destination addresses independently transfer cycles to continue until the DMA terminal during DMA transfers. counter decrements to zero. Software can also initiate When the EDMA bit is set, the internal DMARa flag is memory-to-memory tranSfers. cleared. Therefore, DMARQs are only recognized after Transfers Between 1/0 and Memory. In single-transfer the EDMA bit has been set. mode, one DMA transfer occurs after each rising edge of DMARa. After the transfer, the bus is returned to the Parallel Ports CPU. In demand release mode, the rising edge of The pPD70330/332 has three 8-bit parallel 1/0 ports: DMARa enables DMA cycles, which continue as long PO, P1, and P2. Refer to figures 27 through 31. Special as DMARa is high. function register (SFR) locations can access these In all modes, the TC (terminal count) output pin will ports. The port lines are individually programmable as pulse low and a DMA completion 1/0 request will be inputs or outputs. Many of the port lines have dual generated after the predetermined number of DMA functions as port or control lines. cycles has been completed. Use the associated port mode and port mode control The bottom of internal RAM contains all the necessary registers to select the mode for a given I/O line. address information forthe designated DMA channels. The analog comparator port (PT) compares each input The DMA channel mnemonics are as follows: line to a reference voltage. The reference voltage is TC Terminal counter programmable to be the VTH input x n/16, where n = 1 SAR Source address register to 16. See figure 32. SARH Source address register high DAR Destination address register DARH Destination address register high 30 NEe pPD70330/332 (V35) Figure 27. Port Mode Registers 0 and 2 (PMO, PM2) 7 0 PMO PM2 Output Port Mode Input Port Mode 49-0013776 Figure 28. Port Mode Register 1 (PM 1) 5 4 PM1 I PM 17 I PM16 PM15 I PM14 I 1 I 1 1 1 I 1 I l J I j PMC1 n PM1 n Port P1 n 0 0 Output 0 1 Input n = 7, 6, 5, or 4 83-0045376 Figure 29. Port Mode Control Register 0 (PMCO) 7 6 4 o 49-0013786 31 pPD70330/332 (V35) NEe Figure 30. Port Mode Control Register 1 (PMC1) 7 4 o I PMC 17 I PMC 1S I PMC1S I PMC14 I PMC13 I PMC12 I PMC 11 I PMC10 I - Port/Control Bit Selection X NMI/P10 Input X INTPO/P11 Input X INTP1/P12 Input 0 INTP2/P13 Input 1 INTAK Output 0 P14 1/0 or POLL Input 1 INT Input 0 P1sI/0 1 TOUT Output 0 P1sI/0 1 SCKO Output 0 P171/0 1 READY Input 49-001379B Figure 31. Port Mode Control Register 2 (PMC2) 7 6 2 o PMC2 I PMC 27 I PMC2s I PMC2s I PMC24 I PMC 23 I PMC22 I PMC 21 I PMC20 Port/Control Bit Selection 0 110 Port 1 DMAROO Input 0 1/0 Port 1 DMAAKO Output 0 1/0 Port 1 TCOOutput 0 1/0 Port 1 DMAR01 Input 0 1/0 Port 1 DMAAK1 Output 0 1/0 Port 1 TC10utput 0 1/0 Port 1 HLDAK Input 0 1/0 Port 1 HLDRO Output 49-001380B 32 NEe pPD70330/332 (V35) Figure 32. Port Mode Register T (PMT) 7 6 4 I 0 I 0 I 0 I 0 I PMT3 I PMT2 I PMT1 I PMTo PMT I J Comparator Port Threshold Selection 0 0 0 0 VTH x 16/16 0 0 0 1 VTH x 1/16 0 0 1 0 VTH x 2/16 0 0 1 1 VTH x 3/16 0 1 0 0 VTH x 4/16 0 1 0 1 VTH x 5/16 0 1 1 0 VTH x 6/16 0 1 1 1 VTH x 7116 1 0 0 0 VTH x 8/16 1 0 0 1 VTH x 9/16 1 0 1 0 VTH x 10/16 1 0 1 1 VTH x 11/16 1 1 0 0 VTH x 12/16 1 1 0 1 VTH x 13/16 1 1 1 0 VTH x 14/16 1 1 1 1 VTH x 15/16 49-001381 B Programmable Wait State Generation Figure 33~ Programmable Wait State Generation You can generate wait states internally to further reduce the necessity for external hardware. Insertion FFFFFH of these wait states allows direct interface to devices 256K whose access times cannot meet the CPU read/write COOOOH timing requirements. When using this function, the entire 1M-byte memory address space is divided into 128K-blocks. Each block can be programmed for zero, one, or two wait states, or 40000H two plus those added by the extenal READY signal. 128K 20000H The top two blocks are programmed together as one unit. 128K OH The appropriate bits in the wait control word (WTC) 49-001351A control wait state generation. Programming the upper two bits in the wait control word will set the wait state conditions for the entire I/O address space. Figure 33 shows the memory map for programmable wait state generation; see figure 34 for a graphic representation of the wait control word. 33 pPD70330J:3'32 (V35) NEe Standby Modes halting all internal peripherals. Internal status is main- tained. Only a reset or NMI can release this mode. The two low-power standby modes are HALT and STOP. Software causes the processor to enter either A standby flag in the SFR area is reset by rises in the mode. supply voltage. Its status is maintained during normal operation and standby. The STBC register (figure 35) HALT Mode. is not initialized by RESET. Use the standby flag to In the HALTrriode, the processor is inactive and the determine whether program execution is returning chip consumes much less power than when opera- from standby or from a cold start by setting this flag tional. The external Qscillator remains functional and before entering the STOP mode. all peripherals are active. Internal status and output port line conditions are maintained. Any unmasked Special Function Registers interrupt-can release this mode. In the EI state, inter- Table 6 shows the special function register mnemonic, rupts subsequently will be processed in vector mode. type, address, reset value, and function. The 8 high- In the DI state, program execution is restarted with the order bits of each add ress (xx) are specified by the I DB instruction following the HALT instruction. register. STOP Mode. SFR area addresses not listed in table 6 are reserved. If The STOP mode allows the largest power reduction read, the contents of these addresses are undefined, while maintaining RAM. The oscillator is stopped, and any write operation will be meaningless. Figure 34. Wait Control Word Walt Contr.ol High Wait Control Low 7 6 5 .4 3 2 o I BLK31 I BLK30 I BLK21 I BLK20 I BLK11 I BLK10 I BLK01 I BLt<____--JX'-__________________---'X'-_______ tHCRY II .. ~tSCRY-----' \ .. tSRYK ~ l~ tHKRY READY 83SL-5392B ~8 NEe pPD70330/332 (V35) Timing Waveforms (cont) READY Timing 2 B1 B2IBAW BAW BAW/BW BW/B2 B3 (RIW) CLKOUT ADDRESS ~~______J)(~ __________________________________________________J)(~________ tHCRY III .. II ... ~tSCRY \ tSRYK ~ I·~SRYK,. READY \ 1I 1\ t HKRY, - * + - t HK RY,~ I+- 83SL·5393B m HLDRQ/HLDAK 1 CLKOUT ~K~_-+--~l-------I. HLORQ J------~ Bus control * 14----tDHQHA---~ *A19-AO, 07-00, MREQ, MSTB, IOSTB, R/W 14---------tWHAL--------~ 83·0043208 49 pPD70330/332;{V35) NEe Timing Waveforms (cont) HLDRQ/HLDAK 2 CLKOUT HLORQ ~-----tWHQL ____ ~ Bus control * ---I---------ll----+-----------....;..----( tDKH:;:-____~l~l---~-----------~---------~----t-D-H-Q-c~~~~~~~~~~_-_~________ * A19-AO, 07-00, MREQ, MSTB, IOSTB, R/W 83-0043216 INTp, DMARQ Input CLKOUT INTp, OMARQ* _ _- 1 14---------tW.lQH _________--1 :~~~~~~~~~_-_-_~-_-twl~I-Q-L========~~~~:. r * INTP2-INTPO, OMARQ1-0MARQO 83-0043226 POLL Input CLKOUT _PO_L_L~-t-S-PL-K-------------- ---~! 83-0043236 50 NEe pPD70330/332.(V35) Timing Waveforms (coni) NMllnput CLKOUT NMI ----1I4.------twNH-----+lnl4'-.~~~~~~~~~~~-=-tw-N-IL-----------------------+If 83-004324B CTS Input CLKOUT IN TRIINTAK eLKOUT INTR r'I--------I---' tOKIA tHIAIQ ~--------------------- D7-DO------------~~--------------~----------------------__{1 83-004326B 51 pPD70330/332 (V35) NEe Timing Waveforms (cont) Serial Transmit CLKOUT tCYTK -~ \ I tWSTL II tWSTH " tHT KD TXO )k I-tOTKO-+ K= 83MB-005283B Serial Receive CLKOUT tCYRK • \ i\ ~tWSRL_ " tWSRH RXD K !.:=tSROK __ tHKRD • 83MB-005284B 52 NEe pPD70330/332 (V35) Instruction Set Identifier Description Instructions, grouped according to function, are dst-block Name of block addressed by the IV register described in a table near the end of this data sheet. near-proc Procedure within the current program segment Descriptions include source code, operation, opcode, far-proc Procedure located in another program segment number of bytes, and flag status. Supplementary near-label Label in the current program segment information applicable to the instruction set is con- tained in the following tables. short-label Label between -128 and +127 bytes from the end of instruction • Symbols and Abbreviations far-label Label in another program segment • Flag Symbols memptr16 Word containing the offset of the memory location within the current program segment to which control • 8- and 16-Bit Registers. When mod = 11, the register is to be transferred is specified in the operation code by the byte/word memptr32 Double word containing the offset and segment base operand (W = 0/1) and reg (OOO to 111). address of the memory location to which control is to • Segment Registers. The segment register is speci- be transferred fied in the operation code by sreg (OO, 01,10, or 11). regptr16 16-bit register containing the offset of the memory location within the program segment to which control • Memory Addressing. The memory addressing mode is to be transferred is specified in the operation code by mod (OO, 01, or pop-value Number of bytes of the stack to be discarded (0 to 10) and mem (OOO through 111). 64K bytes, usually even addresses) • Instruction Clock Count. This table gives formulas fp-op Immediate data to identify the instruction code of the for calculating the number of clock cycles occupied external floating pOint operation by each type of instruction. The formulas, which R Register set depend on byte/word operand and RAM enable/dis- W Word/byte field (0 to 1) able, have variables such as EA (effective address), reg Register field (000 to 111) W (wait states), and n (iterations or string instruc- tions). mem Memory field (000 to 111) mod Mode field (00 to 10) Symbols and Abbreviations S:W When S:W = 01 or 11, data = 16 bits. At all Identifier Description other times, data = 8 bits. reg 8- or 16-bit general-purpose register x, XXX, VVV, ZZZData to identify the instruction code of the external floating point arithmetic chip reg8 8-bit general-purpose register AW Accumulator (16 bits) reg16 16-bit general-purpose register AH Accumulator (high byte) dmem 8- or 16-bit direct memory location AL Accumulator (low byte) mem 8- or 16-bit memory location BP Base pointer register (16 bits) mem8 8-bit memory location BW BW register (16 bits) mem16 16-bit memory location BH BW register (high byte) mem32 32-bit memory location BL BW register (low byte) sfr 8-bit special function register location CW CW register (16 bits) imm Constant (0 to FFFFH) CH CW register (high byte) imm16 Constant (0 to FFFFH) CL CW register (low byte) imm8 Constant (0 to FFH) OW OW register (16 bits) imm4 Constant (0 to FH) DH OW register (high byte) imm3 Constant (0 to 7) DL OW register (low byte) acc AW or AL register SP Stack pOinter (16 bits) sreg Segment register PC Program counter (16 bits) src-table Name of 256-byte translation table PSW Program status word (16 bits) src-block Name of block addressed by the IX register 53 pPD70330/332 (V35) NEe Symbols and Abbreviations (cont) Flag Symbols Identifier Description Identifier Description IX Index register (source) (16 bits) (blank) No change IV Index register (destination) (16 bits) o Cleared to 0 PS Program segment register (16 bits) Set to 1 SS Stack segment register (16 bits) X Set or cleared according to the result DSo Data segment 0 register (16 bits) U Undefined DS1 Data segment 1 register (16 bits) R Value saved earlier is restored AC Auxiliary carry flag CV Carry flag 8- and 16-81t Registers (mod = 11) P Parity flag reg w=o W=l S Sign flag 000 AL AW Z Zero flag 001 CL CW DIR Direction flag 010 DL OW IE Interrupt enable flag 011 BL BW V Overflow flag 100 AH SP BRK Break flag 101 CH BP MD Mode flag 110 DH IX (... ) Values in parentheses are memory contents 111 BH IV , disp Displacement (8 or 16 bits) ext-disp8 16-bit displacement (sign-extension byte + 8-bit displacement) Segment Registers temp Temporary register (8/16/32 bits) sreg Register tmpcy Temporary carry flag (1-bit) 00 DS1 seg Immediate segment data (16 bits) 01 PS offset Immediate offset data (16 bits) 10 SS Transfer direction 11 DSo + Addition Subtraction Memory Addressing x Multiplication mem mod = 00 mod = 01 mod = 10 Division 000 BW+IX BW + IX + disp8 BW + IX + disp16 % Modulo 001 BW+IV BW + IV + disp8 BW + IV + disp16 AND Logical product 010 BP+ IX BP + IX +~isp8 BP + IX + disp16 OR Logical sum 011 BP+IV BP + IV + disp8 BP + IV + disp16 XOR Exclusive logical sum 100 IX IX + disp8 IX + disp16 XXH Two-digit hexadecimal value 101 IV IV + disp8 IV + disp16 XXXXH Four-digit hexadecimal value 110 Direct BP + disp8 BP + disp16 111 BW BW + disp8 BW + disp16 54 NEe pPD70330/332 (V35) Instruction Clock Count Mnemonic Operand Clocks Mnemonic Operand Clocks ADD regS, regS 2 BRK 3 50+5W [3S+5W] reg16, reg16 2 immS 51+5W [39+5W] regS;memS EA+7+W BRKCS 15 reg16, mem16 EA+7+W BRKV 50+5W [3S+5W] memS, regS EA+10+2W [EA+7+W] BTCLR 29 mem16, reg16 EA+10+2W [EA+7+W] BUSLOCK 2 regS, immS 5 reg16, immS 5 CALL near-proc 21+W [17+W] reg16, imm16 6 regptr16 21+W [17+W] memS, immS EA+ 11+2W [EA+9+2W] memptr16 EA+24+2W [EA+22+2W] mem16, immS EA+9+2W [EA+7+2W] far-proc 36+2W [32+2W] mem16, imm16 EA+12+2W [EA+S+2W] memptr32 EA+32+4W [EA+20+4W] AL, immS 5 CHKIND EA+24+2W AW, imm16 6 CLR1 CY 2 ADD4S 22+(30+3W)n [22+(2S+3W)n] DIR 2 ADDC Same as ADD regS, CL S reg16, CL S ADJ4A 9 memS, CL EA+16+2W [EA+13+W] ADJ4S 9 mem16, CL EA+16+2W [EA+13+W] ADJBA 17 regS, imm3 7 1m ADJBS 17 reg16, imm4 7 AND regS, regS 2 memS, imm3 EA+13+2W [EA+10+W] reg16, reg16 2 mem16, imm4 EA+13+2W [EA+9+W] regB, memB EA+7+W CMP regS, regB 2 reg16, mem16 EA+7+W reg16, reg16 2 memB, regB EA+10+2W [EA+7+W] regB, memB EA+7+W mem16, reg16 EA+10+2W [EA+7+W] reg16, mem16 EA+7+W regB, immB 5 memB, regB EA+7+W reg16, imm16 6 mem16, reg16 EA+7+W memB, immB EA+ 11 +2W [EA+9+2W] regB, immB 5 mem16, imm16 EA+ 12+2W [EA+B+2W] reg16, immB 5 reg16, imm16 6 Bcond (conditional branch) Bor 15 BCWZ memB, immB EA+B+W Bor15 mem16, immB EA+9+W BR near-label 12 mem16, imm16 EA+9+W short-label 12 AL, immB 5 regptr16 13 AW, imm16 6 memptr16 EA+16+W CMP4S 22+(25+2W)n far-label 15 memptr32 CMPBK memB, memB 2S+2W [21+2W] EA+23+2W mem16, mem16 25+2W [19+2W] Notes: (1) If the number of clocks is not the same for RAM enabled and RAM disabled conditions, the RAM enabled value is listed first, followed by the RAM disabled value in brackets; for example, EA+8+2W [EA+6+W]. (2) Symbols in the Clocks column are defined as follows. EA = additional clock cycles required 'for calculation of the effective address = 3 (mod 00 or 01) or 4 (mod 10) W = number of wait states selected by the WTC register n = number of iterations or string instructions 55 pPD70330/332 (V35) NEe Instruction Clock Count (cont) Mnemonic Operand Clocks Mnemonic Operand Clocks CMPBKB 16+(23+2W)n INM mem8, OW 21+2W [19+2W] mem16, OW 19+2W [15+2W] CMPBKW 16+(23+2W)n mem8, OW 18+(15+2W)n [1B+(13+2W)n] CMPM mem8 18+W mem16, OW 1B+(13+2W)n [1B+(9+2W)n] mem16 19+2W INS regB, reg8 63-155 CMPMB 16+(16+W)n regB, imm4 64-156 CMPMW 16+(16+2W)n LOEA EA+2 CVTBO 19 LOM memB 13+W CVTBW 3 mem16 13+W CVTOB 20 LOMB mem16 16+ (11+W)n CVTWL B LOMW mem8 16+(10+W)n OBNZ 8 or 17 MOV regB, reg8 2 OBNZE 8 or 17 reg16, reg16 2 OBNZNE B or 17 reg8, memB EA+7+W reg16, mem16 EA+7+W DEC reg8 5 reg16 2 memB, reg8 EA+5+W [EA+2] mem16, reg16 EA+5+W [EA+2] mema EA+13+2W [EA+11+2W] mem16 EA+13+2W [EA+9+2W] regB, immB 5 reg16, imm16 6 01 4 mem8, imm8 EA+6+W DISPOSE 11+W mem16, imm16 EA+6+W OIV AW, regB 46-56 AL, dmem8 10+W AW,memB EA+49+W to EA+59+W AW, dmem16 10+W OW:AW, reg16 54-64 dmem8, AL B+W [5] OW:AW, mem16 EA+57+W to EA+67+W dmem16, AW B+W [5] OIVU AW, regB 31 sreg, reg16 4 AW,mem8 EA+34+W sreg, mem16 EA+9+W OW:AW, reg16 39 reg16, sreg 3 OW:AW, mem16 EA+43+2W mem16,sreg EA+6+W [EA+3] OSO: 2 AH, PSW 2 OS1: 2 PSW, AH 3 EI 12 OSO, reg16, memptr32 EA+17+2W OS1, reg16, memptr32 EA+17+2W EXT regB, reg8 41-121 reg8, imm4 42-122 MOVBK memB, memB 22+2W [17+W] mem16, mem16 22+2W [17+W] FINT 2 MOVBKB memB, memB 16+(1B+2W)n [16+(13+W)n] FP01 55+5W [43+5W] MOVBKW mem16, mem16 16+(1B+2W)n [16+(10+W)n] FP02 55+5W [43+5W] MOVSPA 16 HALT N/A MOVSPB 11 IN AL, immB 15+W AW, immB 15+W MUL AW, AL, regB 31-40 AW, AL, memB EA+34+W to EA+43+W AL, OW 14+W AW,OW 14+W OW:AW, AW, reg16 39-4B OW:AW, AW, mem16 EA+42+W to EA+51+W INC reg8 5 reg16 2 reg16, reg16, immB 39-49 reg16, mem16, immB EA+42+W to EA+52+W mem8 EA+13+2W [EA+11+2W] mem16 EA+13+2W [EA+9+2W] reg16, reg16, imm16 40-50 reg16, mem16, imm16 EA+43+W to EA+53+W 56 NEe pPD70330/332 (V35) Instruction Clock Count (cont) Mnemonic Operand Clocks Mnemonic Operand Clocks MULU regS 24 PREPARE imm16, immS immS = 0: 26+W memS EA+27+W immS = 1: 37+2W immS = n > 1: 44+19 (n-1)+2nW reg16 32 mem16 EA+33+W PS: 2 NEG regS S PUSH reg16 13+W [9+W] reg16 S mem16 EA+ 16+2W [EA+12+2W] memS EA+13+2W [EA+10+W] OS1 10+W [7] mem16 EA+13+2W [EA+10+W] PS 10+W [7] NOP 4 SS 10+W [7] NOT regS OSO 10+W [7] S reg16 S PSW 9+W [6] R 74+SW [SO] memS EA+13+2W [EA+10+W] mem16 EA+13+2W [EA+10+W] immS 12+W [9] imm16 13+W [10] NOT1 CY 2 REP 2 regS, CL 7 reg16, CL 7 REPE 2 memS, CL EA+1S+2W [EA+12+W] REPZ 2 mem16, CL EA+1S+2W [EA+12+W] REPC 2 regS, imm3 6 REPNC 2 reg16, imm4 6 OR memS, imm3 mem16, imm4 regS, regS EA+12+2W [EA+9+W] EA+12+2W [EA+9+W] 2 REPNE REPNZ RET null 2 2 19+W Em reg16, reg16 2 pop-value 19+W regS, memS EA+7+W null 27+2W reg16, mem16 EA+7+W pop-value 2S+W memS, regS EA+10+2W [EA+7+W] RETI 40+3W [34+W] mem16, reg16 EA+10+2W [EA+7+W] RETRSI 12 regS, immS S ROL regS, 1 S reg16, imm16 6 reg16,1 S memS, immS EA+11+2W [EA+9+2W] memS, 1 EA+16+2W [EA+13+W] mem16, imm16 EA+12+2W [EA+S+2W] mem16,1 EA+16+2W [EA+13+W] AL, immS S regS, CL 11+2n AW, imm16 6 reg16, CL 11+2n OUT immS, AL 11+W memS, CL EA+19+2W+2n [EA+16+W+2n] immS, AW 9+W mem16, CL EA+ 19+2W+2n [EA+16+W+2n] OW,AL 10+W regS, immS 9+2n OW,AW S+W reg16, immS 9+2n OUTM OW,memS 21+2W [19+2W] memS, immS EA+1S+2W+2n [EA+ 12+W+2n] OW, mem16 19+2W [1S+2W] mem16, immS EA+ 1S+2W+2n [EA+12+W+2n] OW,memS 1S+(1S+2W)n [1S+(13+2W)n] ROL4 regS 17 OW, mem16 1S+(13+2W)n [1S+(9+2W)n] memS EA+20+2W [EA+1S+2W] POLL N/A ROLC Same as ROL POP reg16 11+W ROR Same as ROL mem16 EA+14+2W [EA+11+W] ROR4 regS 21 OS1 12+W memS EA+26+2W [EA+24+2W] SS 12+W RORC Same as ROL OSO 12+W PSW 13+W SET1 CY 2 OIR 2 R 74+SW [SS] 57 pPD70330/332 (V35) NEe Instruction Clock Count (cont) Mnemonic Operand Clocks Mnemonic Operand Clocks XCH reg8, reg8 3 SET1 (cont) reg8, CL 7 reg16, reg16 3 reg16, CL 7 reg8, mem8 EA+12+2W [EA+9+W] mem8, CL EA+15+2W [EA+ 12+W] reg16, mem16 EA+12+2W [EA+9+W] mem16, CL EA+15+2W [EA+12+W] mem8, reg8 EA+12+2W [EA+9+W] reg8, imm3 6 mem16, reg16 EA+12+2W [EA+9+W] reg16, imm4 6 AW, reg16 4 mem8, imm3 EA+12+2W [EA+9+W] reg16, AW 4 mem16, imm4 EA+12+2W [EA+9+W] XOR Same as AND SHL Same as ROL SHR Same as ROL SHRA Same as ROL 55: 2 STM mem8 13+W [10] mem16 13+W [10] STMB mem8 16+(9+W)n [16+(7+W)n] STMW mem16 16+(9+W)n [16+(5+W)n] STOP N/A SUB Same as ADD SUB4S 22+(30+3W)n [22+(28+3W)n] SUBC Same as ADD TEST reg8, reg8 4 reg16, reg16 4 reg8, mem8 EA+12+W reg16, mem16 EA+11+2W mem8, reg8 EA+12+W mem16, reg16 EA+11+2W reg8, imm8 7 reg16, imm16 8 mem8, imm8 EA+9+W mem16, imm16 EA+10+W AL, imm8 5 AW, imm16 6 TEST1 reg8, CL 7 reg16, CL 7 mem8, CL EA+12+W mem16, CL EA+12+W reg8, imm3 6 reg16, imm4 6 mem8, imm3 EA+9+W mem16, imm4 EA+9+W TRANS 11+W TRANSB 11+W TSKSW 20 58 N'EC pPD70330/332 (V35) Instruction Clock Count for Operations Byte Word RAM Enable RAM Disable RAM Enable RAM Disable Context switch interrupt 27 27 DMA (Single-step mode) 20+2W 20+2W 20+2W 20+2W DMA (Demand release mode) 17.5+ W+ 17.5+ W+ 17.5 + W+ 17.5+ W+ (13+W).(n-1 ) (13+W).(n-1) (13+W).(n-1) (13+W).(n-1) DMA (Burst mode) 20.5 +2W+ 20.5 + 2W+ 20.5 + 2W+ 20.5 +2W+ (16+2W).(n-1 ) (16+2W).(n-1) (16+2W).(n-1) (16+2W).(n-) DMA (Single-transfer mode) 19.5 + W 19.5+W 17+W 17+W Interrupt (lNT pin) 57+3W 57+3W Macro service, sfr - mem 25+W 20+W 25+W 20+W Macro service, mem - sfr 22+W 21 +W 22+W 21 + W Macro service (Search char mode), sfr - mem 28+W 28+W Macro service (Search char mode), mem - sfr 38+W 35+W Priority interrupt (Vectored mode) 55+5W 55+5W NMI (Vectored mode) 53+5W 53+5W W = number of wait states inserted into external bus cycle n = number of iterations N = number of clocks to complete the instruction currently executing Notes: (1) Every interrupt (except NMI) has an additional associated (2) The DMA and macro service clock counts listed are the required latency time of 27 + N clocks. During the 2'7 clocks, the interrupt number of CPU clocks for each transfer. controller performs some overhead tasks such as arbitrating (3) When an external interrupt is asserted, a maximum of 6 clocks is priority. This time should be added to the above listed interrupt required for internal synchronization before the interrupt request and macro service execution times. NMllatency time is 18 + N flag is set. For an internal interrupt, a maximum of 2 clocks clocks. is required. Pin Request Latency Clocks Source Typ Max NMI pin 12 + N 18+ N INT pin 8+N 8+N All other interrupts 15+ N 27+ N DMARa pin 14+N HLDRa pin 7+2W 59 0> Instruction Set 0 "t:: Mnemonic Operand Data Transfer Operation Operation Code 7 6 5 4 3 2 07654321 0 No. of Bytes AC Flags CY V P S Z ".....a 0 MOV reg, reg reg - reg 000 o1 W reg reg 2 W mem, reg (mem) - reg o 0 0 1 0 0 W mod reg mem 2-4 W 0 reg, mem reg - (mem) 000101 W mod reg mem 2-4 mem, imm (mem)-imm 1 o 0 0 1 1 W mod 0 0 0 3-6 "- W mem (,) reg, imm reg - imm 0 1W reg 2-3 N acc, dmem When W = 0 AL - (dmem) 0 o 0 0 0 W 3 ........ When W = 1 AH - (dmem + 1), AL - (dmem) < W dmem, acc When W = 0 (dmem) - AL 0 000 W 3 When W = 1 (dmem + 1) - AH, (dmem) - AL ell -..... sreg, reg16 sreg - reg16 sreg : SS, OSO, OS1 000 o 1 1 0 sreg reg 2 sreg, mem16 sreg - (mem16) sreg : SS, OSO, OS1 000 1 o mod 0 sreg mem 2-4 reg16, sreg reg16 - sreg 000 o0 1 1 0 sreg reg 2 mem16, sreg (mem16) - sreg 000 o 0 mod 0 sreg mem 2-4 OSO, reg16, reg16 - (mem32) 000 0 mod reg mem 2-4 mem32 OSO - (mem32 + 2) OS1, reg16, reg16 - (mem32) 000 o 0 mod reg mem 2-4 mem32 OS1 - (mem32 + 2) AH, PSW AH - S, Z, x, AC, x, P, x, CY o0 1 PSW, AH S, Z, x, AC, x, P, x, CY - AH o 0 1 0 1 x x x x x LOEA reg16, mem16 reg16 - mem16 o 0 0 1 0 mod reg mem 2-4 TRANS src-table AL-(BW+AL) 1 o1 0 1 XCH reg, reg reg - - reg 000 0 W 1 1 reg reg 2 mem, reg (mem)--reg 000 0 W mod reg mem 2-4 or reg, mem AW, reg16 AW-- reg16 o0 0 reg or reg16, AW Repeat Prefixes REPC While CW 0# 0, the next byte of the primitive block o 11 0 0 1 o 1 transfer instruction is executed and CW is ~ decremented (- 1). If there is a waiting interrupt, it is processed. When CY #- 1, exit the loop. REPNC While CW #- 0, the next byte of the primitive block o1 1 0 0 1 o0 transfer instruction is executed and CW is decremented (- 1). If there is a waiting interrupt, it is processed. When .CY #- 0, exit the loop. 0 ~ Instruction Set (cont) Operation Operation Code No. of Flags Mnemonic Operand 7 654 3 2 076543210 Bytes AC CY V P S Z Repeat Prefixes (cont) REP While CW =;t. 0, the next byte of the primitive block 1 1 1 1 0 0 REPE REPZ transfer instruction is executed and CW is decremented (- 1). If there is a waiting interrupt, it is processed. If the primitive block transfer instruction ~ is CMPBK or CMPM and Z =;t. 1, exit the loop. REPNE While CW =;t. 0, the next byte of the primitive block 1 1 1 1 0 0 1 0 REPNZ transfer instruction is executed and CW is decremented (- 1). If there is a waiting interrupt, it is processed. If the primitive block transfer instruction is CMPBK or CMPM and Z =;t. 0, exit the loop. Primitive Block Transfer MOVBK dst-block, When W = 0 (IV) - (IX) 1010010W src-block DIR = 0: IX - IX + 1, IV - IV + 1 DIR = 1: IX -IX -1, IV -IV-1 When W = 1 (IV + 1, IV) - (IX + 1, IX) DIR = 0: IX - IX + 2, IV - IV + 2 DIR = 1: IX - IX - 2, IV - IV - 2 CMPBK src-block, When W = 0 (IX) - (IV) 1010011W x x x x x x dst-block DIR = 0: IX - IX + 1, IV -IV + 1 DIR=1: IX-IX-l, IV -IV-1 When W = 1 (IX + 1, IX) - (IV + 1, IV) DIR = 0: IX - IX + 2, IV - IV + 2 DIR = 1: IX - IX - 2, IV - IV - 2 CMPM dst-block When W = 0 AL - (IV) 1 0 1 0 1 1 1 W x x x x x x DIR = 0: IV -IV + 1; DIR = 1: IV - IV -1 When W = 1 AW - (IV + 1, IV) DIR = 0: IV - IV + 2; DIR = 1: IV - IV - 2 LDM src-block When W = 0 AL - (IX) 1010110W 1::: DIR = 0: IX -IX + 1; DIR = 1: IX -IX-1 When W = 1 AW - (IX + 1, IX) DIR = 0: IX - IX + 2; DIR = 1: IX - IX - 2 "oa STM dst-block When W = 0 (IV) - AL 1010101W --- w DIR = 0: IV -IV + 1; DIR = 1: IV -IV-1 w WhenW=1 (IV+1,IV)-AW DIR = 0: IV - IV + 2; DIR = 1: IV - IV - 2 o Bit Field Transfer '- w INS regS, regS 16-Bit field - AW 0000111100 000 3 w 1 1 reg reg ~ ..-" regS, imm4 16-Bit field - AW 0000111100 o 0 4 < 1 1 0 0 0 reg W ~ en "'-'" m 0> Instruction Set (cont) f\) "t::: Mnemonic Operand Bit Field Transfer (cont) Operation Operation Code 7 654 3 2 0 65432 0 No. of Bytes AC Flags CV V P S z ".... D 0 EXT reg8, reg8 AW - 16-Bit field o0 0 0 o0 o0 3 W 1 1 reg reg W reg8, imm4 AW - 16-Bit field o0 0 0 1 1 1 1 0 0 4 0 1 1 000 reg "- W 110 W IN acc, imm8 When W = 0 AL - (imm8) o0 oW 2 ~ When W = 1 AH - (imm8 + 1), AL - (imm8) .--. acc, OW When W = 0 AL - (OW) 0 oW < W When W = 1 AH - (OW + 1), AL - (OW) ell ....... OUT imm8, acc When W = 0 (imm8) - AL o0 W 2 When W = 1 (imm8 + 1) - AH, (imm8) - AL OW, acc When W = 0 (OW) - AL 0 W When W = 1 (OW + 1) - AH, (OW) - AL Primitive Block 110 Transfer INM dst-block, OW When W = 0 (IV) *- (OW) o1 1 0 1 10 W OIR = 0: IV -IV +' 1; OIR = 1: IV - IV -1 When W = 1 (IV + 1, IV) - (OW + 1, OW) OIR = 0: IV +- IV + 2; OIR = 1: IV - IV - 2 OUTM OW, src-block When W = 0 (OW) - (IX) o1 1 0 1 11 W OIR = 0: IX -IX + 1; OIR = 1: IX -IX-1 When W = 1 (OW + 1, OW) - (IX + 1, IX) OIR = 0: IX -IX + 2; OIR = 1: IX - IX - 2 n: number of transfers Addition/Subtraction ADD reg, reg reg - reg + reg o0 0 0 0 0 W1 1 reg reg 2 x x x x x x mem, reg (mem) - (mem) + reg o 0 0 0 0 0 0 W mod reg mem 2-4 x x x x x x reg, mem reg - reg +(mem) 0000001 W mod reg mem 2-4 x x x x x x reg, imm reg - reg + imm 0 000SW1 1 000 reg 3-4 x x x x x x mem, imm (mem)-(mem)+imm 1 0 0 0 0 0 S W mod 0 0 0 mem 3-6 x x x x x x acc, imm When W' = 0 AL - AL + imm 00OOO10W 2-3 x x x x x x When W = 1 AW - AW + imm ~ 0 Instruction Set (cont) ~ Operation Code No. of Flags Mnemonic Operand Operation 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Bytes AC CY V P S Z Addition/Subtraction (cont) ADDC reg, reg reg +- reg + reg + CY o 0 0 o 0 1 W 1 1 reg reg 2 x x x x x x mem, reg reg, mem (mem) +- (mem) + reg + CY reg +- reg + (mem) + CY o 0 0 o 0 0 W mod reg o 0 0 o 0 W mod reg mem mem 2-4 2-4 x x x x x x x x x x x x ~ reg, imm reg +- reg + i~m + CY o 0 0 S W1 1 0 0 reg 3-4 x x x x x mem, imm (mem) +- (mem) + imm + CY 1 o 0 0 S W mod 0 0 mem 3-6 x x x x ace, imm Wl'ten W = 0 AL +- AL + imm + CY 0 0 0 W 2-3 x x x x x x When W = 1 AW +- AW + imm + CY SUB reg, reg reg +- reg - reg 0 0 W1 1 reg reg 2 x x x x x x mem, reg (mem) +- (mem) - reg o0 0 o 0 W mod reg mem 2-4 x x x x x x reg, mem reg +- reg - (mem) o0 0 o 1 W mod reg mem 2-4 x x x x x x reg, imm reg +- reg - imm 1 0 o 0 o 0 S W1 1 0 reg 3-4 x x x x x x mem, imm (mem)+-(mem)-imm 1 0 0 o 0 S W mod 0 mem 3-6 x x x x x x ace, imm When W = 0 AL +- AL - imm o0 0 0 W 2-3 x x x x x When W = 1 AW +- AW - imm SUBC reg, reg reg +- reg - reg - CY o0 W1 1 reg reg 2 x x x x x reg (mem) +- (mem) - reg - CY 0 o 0 W mod reg mem 2-4 x x x x x reg, mem reg + - reg - (mem) - CY 0 0 0 1 o 1 W mod reg mem 2-4 x x x x x reg, imm reg +- reg - imm - CY . o0 o0 S W1 1 0 1 1 0 reg 3-4 x x x x x x mem, imm (mem) +- (mem) - imm - CY 1 0 o 0 o 0 S W mod 0 1 1 mem 3-6 x x x x x x ace, imm When W = 0 AL +- AL - imm - CY o0 0 0 W 2-3 x x x x x When W = 1 AW +- AW - imm - CY 1:: " a --I 0 W W 0 " W W N ,....... < W 0') (II UJ m "-'" (J') ~ Instruction Set (cont) l::: Mnemonic Operand BCD Operation Operation Operation Code 7 654 3 2 0765432 0 No. of Bytes AC Flags CV V P S Z "a ~ 0 ADD4S dst BCD string - dst BCD string o0 0 0 o0 o0 0 0 0 2 x u u u x W + src BCD string W SUB4S dst BCD string - dst BCD string o0 0 0 o0 000 0 2 x u u u x 0 - src BCD string "- W CMP4S dst BCD string - src BCD string o0 0 0 o0 o0 1 0 2 x u u u x W ROL4 reg8 o0 0 0 1 o0 0 0 0 3 N AL reg 1 1 000 reg ~ ALL I H Upper 4 bits I Lower 4 bits ~ < W en "'-'" mem8 AL mem o 0 0 0 1 1 1 1 o 0 1 0 1 000 3-5 mod 0 0 0 mem ALL H Upper 4 bits I Lower 4 bits I I ROR4 reg8 o0 0 0 1 1 1 1 o0 1 0 1 o1 0 3 AL reg 1 1 000 reg ALL H Upper 4 bits I Lower 4 bits I I mem8 AL mem o0 0 0 1 1 1 1 o0 1 0 1 o1 0 3-5 mod 0 0 0 mem ALL H Upper 4 bits I Lower 4 bits I I f BCD AdJust ADJBA When (AL AND OFH) >9 or AC= 1, o0 1 1 o1 1 1 x x u u u u A~ - AL + 6, AH - AH + 1, AC - 1, CY - AC, AL - AL AND OFH ADJ4A When (AL AND OFH) >9 or AC = 1, o0 1 0 0 1 1 1 x x u x x x AL - AL + 6, CY - CY OR AC, AC - 1, When AL> 9FH, or CY - = AL - AL + 60H, CY - 1 ~ ADJBS When (AL AND OFH) >9 or AC = 1, o0 x x u u u u CY - AC, AL - AL AND OFH ADJ4S When (AL AND OFH) >9 or AC = 1, o0 0 x x u x x x AL - AL - 6, CY - CY OR AC, AC - 1, When AL > 9FH, or CY - = AL - AL + 60H, CY - 1 ~ Instruction Set (cont) ~ Operation Code No. of Flags Mnemonic Operand Operation 7 6 543 2 0 6 543 2 1 0 Bytes AC CY V P S Z Increment/Decrement INC reg8 reg8 - reg8 + 1 1 0 000 reg 2 x x x x x mem reg16 (mem) - reg16 - (mem) + 1 reg16 + 1 1 0 000 1 1 W mod 000 reg mem 2-4 x x x x x x x x x x ~ OEC reg8 regS - reg8 - 1 1 1 1 0 1 1 o0 reg 2 x x x x x mem (mem) - (mem) - 1 1 1 1 1 W mod o 0 mem 2-4 x x x x x reg16 reg16 - reg16 - 1 0 o0 reg x x x x x Multiplication MULU regS AW - ALx reg8 o1 1 o1 1 1 o0 reg 2 x x u u u AH = 0: CY - 0, V - 0 AH ¥ 0: CY - 1, V - 1 memS AW - AL x (memS) 1 1 1 1 o 1 1 0 mod 1 o 0 mem 2-4 x x u u u AH = 0: CY - 0, V - 0 AH ¥ 0: CY - 1, V - 1 reg16 OW, AW - AW x reg16 1 1 1 1 o1 1 1 1 1 1 o0 reg 2 x x u u u OW = 0: CY - 0, V - 0 OW ¥ 0: CY - 1, V - 1 mem16 OW, AW - AW x (mem16) 1 1 1 1 o 1 1 1 mod 1 o 0 mem 2-4 x x u u u OW = 0: CY - 0, V - 0 OW ¥ 0: CY - 1, V - 1 MUL regS AW - ALx reg8 1 1 1 1 o1 1 0 1 1 1 o1 reg 2 x x u u u AH = AL sign expansion: CY - 0, V - 0 AH ¥ AL sign expansion: CY - 1, V - 1 memS AW - AL x (memS) 1 1 1 1 o 1 1 0 mod 1 o 1 mem 2-4 x x u u u AH = AL sign expansion: CY - 0, V - 0 AH ¥ AL sign expansion: CY - 1, V - 1 1::: reg16 OW, AW - AW x reg16 OW = AW sign expansion: CY - 0, V - 0 OW ¥ AW sign expansion: CY -1, V-1 1 1 1 1 o1 1 1 1 1 1 o1 reg 2 x x u u u "D --.. 0 mem16 OW, AW - AW x (mem16) 1 1 1 1 o 1 1 1 mod 1 o 1 mem 2-4 u x x u u u W OW = AW sign expansion: CY - 0, V - 0 W OW ¥ AW sign expansion: CY -1, V-1 0 reg16, reg16, imm8 reg16 - reg16 x immS Product:5 16 bits: CY - Product> 16 bits: CY - 0, V - 1, V - 0 1 o1 1 o1 o1 1 1 1 reg reg 3 u x x u u u " W W ~ reg16, reg16 - (mem16) x immB o 1 1 0 1 o 1 1 mod reg mem 3-5 x x u u u ....... mem16, immS Product:5 16 bits: CY - 0, V - 0 Product> 16 bits: CY - 1, V - 1 < W 0> 01 ~ en m ~ Instruction Set (cont) 1::: Mnemonic Operand Operation Operation Code 7 6 543 2 0 654321 0 No. of Bytes AC Flags CYVPSZ a" Multiplication (cont) 0 MUL (cont) reg16, reg16 - reg16 x imm16 0 0 o0 reg reg 4 x x u u u --- W reg16, Product::; 16 bits: CY - 0, V - 0 W imm16 Product> 16 bits: CY - 1, V - 1 0 reg16, reg16 - (mem16) x imm16 o 1 10 1 0 0 1 mod reg mem 4-6 x x u u u "- mem16, Product::; 16 bits: CY - 0, V - 0 W imm16 Product> 16 bits: CY - 1, V - 1 W I\) Unsigned Division ~ DIVU reg8 temp-AW When temp + reg8 > FFH 1 1 1 1 o 1 1 o 1 1 1 1 0 reg 2 u u u u u u < c.» (SP-1, SP - 2) - PSW, (SP - 3, SP-4) - PS UI (SP - 5, SP - 6) - PC, SP - SP - 6 IE -0, BRK - 0, PS - (3,2), PC - (1, 0) All other times --- AH - temp % reg8, AL - temp + reg8 mem8 temp-AW 1 1 1 1 o 1 1 0 mod 1 1 0 mem 2-4 u u u u u When temp + (mem8) > FFH (SP-1, SP- 2) - PSW, (SP - 3, SP-4) - PS (SP - 5, SP - 6) - PC, SP - SP - 6 IE -0, BRK -0, PS - (3, 2), PC - (1, 0) All other times AH - temp % (mem8), AL - temp + (mem8) reg16 temp -AW 1 1 1 1 o 1 1 1 1 1 1 1 0 reg 2 u u u u u When temp + reg16 > FFFFH (SP -1, SP- 2) - PSW, (SP -3, SP- 4) - PS (SP - 5, SP - 6) - PC, SP - SP - 6 IE - 0, BRK - 0, PS - (3, 2), PC - (1, 0) All other times AH - temp % reg16, AL - temp + reg16 mem16 temp-AW 1 1 1 1 o 1 1 1 mod 1 1 0 mem 2-4 u uu u u When temp + (mem16) > FFFFH (SP - 1, SP - 2) - PSW, (SP - 3, SP - 4) - PS (SP - 5, SP - 6) - PC, SP - SP - 6 IE -0, BRK-O, PS - (3, 2), PC - (1, 0) All other times AH - temp % (mem16), AL - temp + (mem16) ~ ~ ~ Instruction Set (cont) Operation Code No. of Flags Mnemonic Operand Operation 7 6 543 2 0 6543210 Bytes AC CY V P S Z Signed Division . DIV regS temp-- AW 0 0 reg u u u u u u When temp -;- regS> 0 and temp -;- regS> 7FH or temp -;- regS <0 and temp -;- regS < 0 - 7FH - 1 (SP -1, SP - 2) -- PSW, (SP - 3, SP - 4) -- PS ~ (SP - 5, SP - 6) -- PC, SP -- SP - 6 IE -- 0, BRK -- 0, PS -- (3, 2), PC -- .(1, 0) All other times AH -- temp % regS, AL -- temp -;- reg8 memS temp W -- 1 1 1 1 0 1 1· 0 mod 1 1 1 mem 2-4 u u u u When temp -;- (mem8) > 0 and (memS) > 7FH or temp -;- (memS) < 0 and temp -;- (mem8) < 0 - 7FH - 1 (SP - 1, SP - 2) -- PSW, (SP - 3, SP - 4) -- PS (SP - 5, SP - 6) -- PC, SP -- SP - 6 IE -- 0, BRK -- 0, PS -- (3, 2), PC -- (1, 0) All other times AH -- temp % (mem8), AL -- temp -;- (mem8) reg 16 temp -- AW 1 1 1 1 0 1 1 1 1 1 1 11 reg 2 u u u u When temp -;- reg 16> 0 and reg 16> 7FFFH or temp -;- reg 16 < 0 - 7FFFH - 1 (SP - 1, SP - 2) -- PSW, (SP - 3, SP - 4) -- PS (SP - 5, SP - 6) -- PC, SP -- SP - 6 IE -- 0, BRK -- 0, PS -- (3,2), PC -- (1,0) All other times AH -- temp % reg. 16, AL -- temp -;- reg 16 mem 16 temp -- AW 1 1 1 1 0 1 1 1 mod 1 1 1 mem 2-4 u u u u When temp -;- (mem 16) > 0 and (mem 16) > 7FFFH or temp -;- (mem 16) < 0 and temp -;- [mem 16] <0-7FFFH -1 1:: (SP -1, SP - 2)) -- PSW, (SP -3, SP - 4) -- PS (SP - 5, SP - 6) -- PC, SP -- SP - 6 IE -- 0, BRK -- 0, PS -- (3, 2), PC -- (1, 0) All other times " D o AH -- temp % (mem 16), AL -- temp -;- (mem 16) --- w w o "- w w ~ ....... < W C> ....., VI ....... m 0) (X) Instruction Set (cont) 1::: a" Operation Code No. of Flags Mnemonic Operand Operation 7 6 5 4 3 2 o 65432 o Bytes AC CY V P S Z Data Conversion ~ o o o o CVTBD AH - AL +- OAH, AL - AL %OAH 01000000 2 u x x x w CVTDB AH - 0, AL - AH x OAH + AL 1 0 01010000 o o 2 u x x x w CVTBW When AL < 80H, AH - 0, o 0 000 o all other times AH - FFH "'- w CVTWL When AL < 8000H, OW - 0, o0 1 1 0 0 W all other times OW - FFFFH N Comparison ........ CMP reg, reg reg - reg 0 0 0 W 1 1 reg reg 2 x x x x x x < W mem, reg (mem) - reg 0 0 0 0 W mod reg mem 2-4 x x x x x x (II ........ reg, mem reg - (mem) 0 0 1 1 1 0 1 W mod reg mem 2-4 x x x x x x reg, imm reg - imm 1 0 0 0 0 0 S W 1 1 1 1 1 reg 3-4 x x x x x x mem, imm (mem) - imm 1 0 0 0 0 0 S W mod 1 1 1 mem 3-6 x x x x x x ace, imm When W = 0, AL - imm 0 0 1 1 1 1 0 W 2-3 x x x x x x When W = 1, AW - imm Complement NOT reg reg - reg 0 W 1 1 0 0 reg 2 mem (mem) - (mem) 0 W mod 0 0 mem 2-4 NEG reg reg - reg + 1 0 W 1 1 0 reg 2 x x x x x x mem (mem) - (mem) + 1 0 W mod 0 mem 2-4 x x x x x x Logical Operation TEST reg, reg reg AND reg 0 0 0 0 0 W 1 1 reg reg 2 u 0 0 x x x mem, reg (mem) AND reg 0 0 0 0 0 W mod reg mem 2-4 0 0 x x x or reg, mem reg, imm reg AND imm o11 W1 1 0 0 0 reg 3-4 o 0 x x x mem, imm (mem) AND imm o 1 1 W mod 0 0 0 mem 3-6 o 0 x x x ace, imm When W = 0, AL AND imm8 o o1 00 W 2-3 o 0 x x x When W = 1, AW AND imm8 AND reg, reg reg - reg AND reg o0 000 W 1 1 reg reg 2 u o 0 x x x ~ mem, reg (mem) - (mem) AND reg o 0 1 0 0 0 0 W mod reg mem 2-4 o 0 x x x reg, mem reg - reg AND (mem) o 0 1 0 0 0 1 W mod reg mem 2-4 o 0 x x x reg, imm reg - reg AND imm OOOOOOW11100 reg 3-4 o 0 x x x mem, imm (mem)-(mem)ANDimm 1 0 0 0 0 0 0 W mod 1 0 0 mem 3-6 u o 0 x x x ace, imm When W = 0, AL - AL AND imm8 When W = 1, AW - AW AND imm16 0010010W 2-3 u o 0 x x x ~ ~ Instruction Set (cont) Operation Code No. of Flags Mnemonic Operand Operation 7 6 5 4 3 2 076543210 Bytes AC CY V P S Z Logical Operation (cont) OR reg, reg reg - reg OR reg 0 0 0 0 0 1 W 1 1 reg reg 2 0 0 x x x mem, reg reg, mem (mem) - reg - (mem) OR reg reg OR (mem) 0 0 0 0 0 0 W mod 0 0 0 0 1 0 1 W mod reg reg mem mem 2-4 2-4 u 0 0 0 x x x 0 x x x ~ reg, imm reg - reg OR imm 1 0 0 0 0 0 0 W 1 1 0 0 1 reg 3-4 u 0 0 x x x mem, imm (mem) - (mem) OR imm 1 0 0 0 0 0 0 W mod 0 0 1 mem 3-6 0 0 x x x ace, imm When W = 0, AL - AL OR imm8 0 0 0 0 1 lOW 2-3 0 0 x x x When W = 1, AW - AW OR imm16 XOR reg, reg reg - reg XOR reg o0 o 0 1 W 1 1 reg reg 2 u OOxxx mem, reg (mem) - (mem) XOR reg o0 o 0 0 W mod reg mem 2-4 0 0 x x x reg, mem reg - reg XOR (mem) o 0 1 1 0 0 1 W mod reg mem 2-4 o 0 x x x reg, imm reg - reg XOR imm o0 0 0 0 0 W 1 1 1 1 0 reg 3-4 o 0 x x x mem, imm (mem)-(mem)XORimm 1 0 0 0 0 0 0 W mod 1 1 0 mem 3-6 o 0 x x x ace, imm When W = 0, AL - AL XOR imm8 0011010W 2-3 o 0 x x x When W = 1, AW - AW XOR imm16 Bit Operation 2nd byte* 3rd byte* TEST1 reg8, CL reg8 bit no. CL = 0: Z - 1 000 o0 0 0 1 1 0 0 0 reg 3 o 0 u u x reg8 bit no. CL = 1: Z - 0 mem8, CL (mem8) bit no. CL = 0: Z - 1 000 o 0 0 0 mod 0 0 0 mem 3-5 o 0 u u x (mem8) bit no. CL = 1: Z - 0 reg16, CL reg16 bit no. CL = 0: Z - 1 000 000 1 1 0 0 0 reg 3 u o 0 u u x reg16 bit no. CL = 1: Z - 0 1::: mem16, CL (mem16) bit no. CL = 0: Z - (mem16) bit no. CL = 1: Z - 1 0 000 000 mod 0 0 0 mem 3-5 o 0 u u x " a reg8, imm3 reg8 bit no. imm3 = 0: Z - 1 000 00011000 reg 4 o 0 u u x o--- reg8 bit no. imm3 = 1: Z - 0 w mema, imm3 (mema) bit no. imm3 = 0: Z - 1 000 o 0 0 mod 0 0 0 mem 4-6 u o 0 u u x w (mem8) bit no. imm3 = 1: Z - 0 o reg16, imm4 reg16 bit no. imm4 = 0: Z-l 000 o 0 1 1 0 0 0 reg 4 o 0 u u x "- w reg16 bit no. imm4 = 1: Z - 0 W mem16, imm4 (mem16) bit no. imm4 = 0: Z - 1 000 o 0 mod 0·0 0 mem 4-6 o 0 u u x N (mem16) bit no. imm4 = 1: Z - 0 .--.. 2nd byte* *Note: First byte = OFH 3rd byte* < W 0"> <0 en ....... II -...,J 0 Instruction Set (cant) 1:: Mnemonic Operand Bit Operation (cant) Operation Operation Code 7 65 4 3 2 1 0 76 543 2 1 0 No. of Flags Bytes AC CYVPSZ " a .... 0 2nd byte* 3rd byte* W W NOT1 reg8, CL reg8 bit no. CL - reg8 bit no. CL 000 0 011000 reg 3 0 mem8, CL reg16, CL (mem8) bit no. CL - reg16 b:~ no. CL - (mem8) bit no. CL reg16 bit no. CL 000 000 0 0 o mod 0 0 0 11 0 0 0 mem reg mem 3-5 3 "W W ~ mem16, CL (mem16) bit no. CL - (mem16) bit no. CL 000 0 1 mod 0 0 0 3-5 reg8, imm3 reg8 bit no. imm3 - reg8 bit no. imm3 000 1 011000 reg 4 ...... mem8, imm3 (mern8) bit no. imm3 - (mem8) bit no. imm3 000 o mod 0 0 0 mem 4-6 < W reg16, imm4 reg16 bit no. imm4 - (reg16) bit no. imm4 000 1 1 0 0 0 reg 4 CD "-" mem16, imm4 (mem16) bit no. imm4 - (mem16) bit no. imm4 000 mod 0 0 0 mem 4-6 2nd byte* 3rd byte* *Note: First byte = OFH CV CV-CV 1 1 110101 x 2nd byte* 3rd byte* CLR1 reg8, CL reg8 bit no. CL - 0 000 o 0 -1 O· 1 1 0 0 0 reg 3 mem8, CL (mem8) bit no. CL - 0 000 o 0 o mod 0 0 0 mem 3-5 reg16, CL reg16 bit no. CL - 0 000 o0 1 1 0 0 0 reg 3 mem16, CL (mem16) bit nO.CL - 0 000 o 0 1 mod 0 0 0 mem 3-5 reg8, imm3 reg8 bit no. imm3 - 0 000 0 011000 reg 4 mem8, imm3 (mem8) bit no. imm3 - 0 000 0 o mod 0 0 0 mem 4-6 reg16, imm4 reg16 bit no. imm4 - 0 000 0 1 1 0 0 0 reg 4 mem16, imm4 (mem16) bit no. imm4 - 0 000 0 mod 0 0 0 mem 4-6 2nd byte* 3rd byte* *Note: First byte = OFH CV CV-O 1 1 1 1 1 0 0 0 0 DIR DIR-O 11111100 ~ ~ ~ Instruction Set (cont) ~ Operalion Code No. of Flags Mnemonic Operand Operation 7 6 5 4 3 2 076543210 Bytes AC CY V P S Z Bit Operation (cont) SET1 reg8. CL reg8 bit no. CL - 1 000 0 o0 000 reg 3 mem8. CL reg16. CL (mem8) bit no. CL - reg16 bit no. CL - 1 1 000 000 0 0 o 0 mod 0 0 0 0 1 1 0 0 0 mem reg 3-5 3 ~ mem16. CL (mem16) bit no. CL - 1 000 0 o 1 mod 0 0 0 mem 3-5 reg8. imm3 reg8 bit no. imm3 - 1 000 o 0 1 1 000 reg 4 memS. imm3 (mem8) bit no. imm3 - 1 000 o 0 mod 0 0 0 mem 4-6 reg16. imm4 reg16 bit no. imm4 - 1 000 0 1 1 000 reg 4 mem16, imm4 (mem16) bit no. imm4 - 1 000 0 mod 0 0 0 mem 4-6 2nd byte* 3rd byte* *Note: First byte = OFH CY CY-1 1 1 1 1 1 0 0 1 DlR DIR-1 1 1 1 1 o1 Shiff SHL reg. 1 CY - MSB of reg. reg - reg x 2 0 o00 W1 1 1 0 0 reg 2 u x x x x x When MSB of reg -F CY, V-1 When MSB of reg = CY, V - 0 mem.1 CY - MSB of (mem). (mem) - (mem) x 2 1 1 0 1 o 0 0 W mod 1 0 0 mem 2-4 u x x x x x When MSB of (mem) -F CY. V - 1 When MSB of (mem) = CY. V - 0 reg, CL temp - CL. while temp -F O. 1 101001W1 1 1 0 0 reg 2 u x u x x x repeat this operation. CY - MSB of reg. mem.CL reg - reg x 2. temp - temp - 1 temp - CL. while temp -F O. repeat this operation. CY - MSB of (mem). 1 1 o 1 o 0 1 W mod 1 o 0 mem 2-4 u x u x x x ,.a 't:: (mem) - (mem) x 2. temp - temp - 1 reg. imm8 temp - imm8. while temp -F O. 1 100000W1 1 1 0 0 reg 3 x u x x x --.. 0 repeat this operation. CY - MSB of reg. e.» reg·+-- reg x 2. temp - temp-1 e.» memo imm8 temp - imm8. while temp -F 0, 1 1 o 0 0 0 0 W mod 1 0 0 mem 3-5 u x u x x x 0 repeat this operation. CY - MSB of (mem). (mem) - (mem) x 2. temp - temp - 1 n: number of shifts '- e.» SHR reg. 1 CY - LSB of reg. reg - reg -:- 2 1 1 o1 o00 W1 1 1 o1 reg 2 u x x x x x e.» When MSB of reg -F bit following MSB t-) of reg: V-1 ...-. When MSB of reg = bit following MSB < e.» of reg: V - 0 ::1 CII ~ m ~ I\) Instruction Set (cont) Mnemonic Operand Operation Operation Code 7 654 3 2 1 0765432 1 0 No. of Bytes AC Flags CYVPSZ ,.a 't:: Shift (cont) 0 SHR (cont) mem,1 CV - LSB of (mem), (mem) - (mem) + 2 0 o 0 0 W mod 0 mem 2-4 u x x x x x --- W When MSB of (mem) "" bit following MSB W of (mem): V - 1 0 When MSB of (mem) =bit following MSB reg, CL of (mem): V - 0 temp - CL, while temp"" 0, repeat this operation, CV - LSB of reg, 1 1 o 1 o0 1 W1 1 1 o 1 reg 2 x u x x x "W W N reg - reg + 2, temp - temp - 1 ....." mem, CL temp- CL, while temp"" 0, 1 1 o 1 o 0 1 W mod 1 o 1 mem 2-4 u x u x x x W < repeat this operation, CV - LSB of (mem), (mem) - (mem) + 2, temp - temp - 1 UI "-'" reg, immB temp -immB, while temp #- 0, 1 1 OOOOOW1 1 1 o 1 reg 3 x u x x x repeat this operation, CV - LSB of reg, reg - reg + 2, temp - temp - 1 mem, immB temp- immB, while temp"" 0, 1 1 o 0 0 0 0 W mod 1 o 1 mem 3-5 u x u x x x repeat this operation, CV - LSB of (mem), (mem) - (mem) +2, temp - temp - 1 n: number of shifts SHRA reg, 1 CV '+- LSB of reg, reg"'::' reg + 2, V - 0 0 o0 0 W 1 1 reg 2 u x ox x x MSB of operand does not change mem,1 CV - LSB of (mem), (mem) - (mem) + 2, 0 o 0 0 W mod mem 2-4 x ox x x V - 0, MSB of operand does not change reg, CL temp - CL, while temp"" 0, 0 o0 W 1 1 reg 2 x u x x x repeat this operation, CV - LSB of reg, reg - reg + 2, temp - temp - 1 MSB of operand does not change mem, CL temp - CL, while temp"" 0, 1 1 o 1 o 0 1 W mod 1 1 1 mem 2-4 u x u x x x repeat this operation, CV - LSB of (mem), (mem) - (mem) + 2, temp - temp - 1 MSB of operand does not change reg, immB temp - immB, while temp"" 0, 1 1 OOOOOW1 1 1 1 1 reg 3 u x u x x x repeat this operation, CV - LSB of reg, reg - reg + 2, temp - temp - 1 MSB of operand does not change melTl; immB temp - immB, while temp"" 0, 1 1 o 0 0 0 0 W mod 1 1 1 mem 3-5 x u x x x I ~ repeat this operation, CV - LSB of (mem), (mem) - (mem) + 2, temp - temp - 1 MSB of operand does not change n: number of shifts ~ ~ Instruction Set (cont) ~ Operation Code No. of Flags Mnemonic Operand Operation 7 6 5 4 3 2 07654321 0 Bytes AC CY V P S Z Rotation ROL reg, 1 CY - MSB of reg, reg - reg x 2 + CY 0 o00 W 000 reg 2 x x MSB of reg ¥- CY: V - 1 MSB of reg = CY: V - 0 ~ mem, 1 CY - MSB of (mem), 1 1 o 1 o 0 0 W mod 0 0 0 mem 2-4 x x (mem) - (mem) x 2 + CY MSB of (mem) ¥- CY: V - 1 MSB of (mem) = CY: V - 0 reg, CL temp - CL, while temp ¥- 0, 1 1 o 1 o 0 1 W 1 1 000 reg 2 x u repeat this operation, CY - MSB of reg, reg - reg x 2 + CY temp - temp - 1 mem,CL temp - CL, while temp ¥- 0, 1 1 o 1 o 0 1 W mod 0 0 0 reg 2-4 x u repeat this operation, CY - MSB of (mem), (mem) - (mem) x 2 + CY temp - temp - 1 reg, immB temp - immB, while temp ¥- 0, 1 1 00000W1 1 000 reg 3 x u repeat this operation, CY - MSB of reg, reg - reg x 2 + CY temp - temp - 1 mem, immB temp - immB, while temp ¥- 0, 1 1 o 0 0 0 0 W mod 0 0 0 mem 3-5 x u repeat this operation, CY - MSB of (mem), (mem) - (mem) x 2 + CY temp - temp - 1 n: number of shifts ROR reg, 1 CY - LSB of reg, reg - reg -;- 2 1 1 o1 o00 W1 1 o0 1 reg 2 x x MSB of reg - CY MSB of reg ¥- bit following MSB of reg: V - 1 MSB of reg = bit following MSB of reg: V - 0 'l:::: mem, 1 CY - LSB of (mem), (mem) - (mem) -;- 2 1 1 o 1 o 0 0 W mod 0 0 1 mem 2-4 x " x MSB of (mem) - CY MSB of (mem) ¥- bit following MSB D of (mem): V - 1 0 MSB of (mem) = bit following MSB of (mem): V - 0 --- W reg, CL temp - CL, while temp ¥- 0, repeat this operation, CY - LSB of reg, reg - reg -;- 2, MSB of reg - CY 1 1 o1 o0 1 W1 1 o0 1 reg 2 x u ,W 0 W temp - temp - 1 W mem, CL temp - CL, while temp ¥- 0, 1 1 o 1 o 0 1 W mod 0 0 1 mem 2-4 x u t-) repeat this operation, CY - LSB of (mem), .--.. (mem) - (mem) -;- 2, MSB of (mem) - CY temp - temp - 1 n:number of shifts < W ......, (II ....... m (..) ;;! Instruction Set (cont) 1:: Mnemonic Operand Rotation (cont) Operation Operation Code 7 6 5 4 3 2 0 654321 0 No. of Bytes AC Flags CYVPSZ "a ~ 0 ROR (cont) reg, immB temp - immB, while temp # 0, 0 o00 W o0 reg 3 x u W repeat this operation, CY - LSB of reg, W mem, immB reg - reg +- 2, MSB of reg - CY temp - temp-1 temp - immB, while temp # 0, 1 1 o 0 0 0 0 W mod 0 0 1 mem 3-5 x u ,0 W repeat this operation, CY - LSB of (mem), W (mem) ' - (mem) +- 2 N temp -temp - 1 n: number of shifts ..-. Rotate W < ROLC reg, 1 tmpcy - CY, CY - MSB of reg 1 1 o1 o00 W1 1 o1 0 reg 2 x x en reg - reg x 2 + tmpcy "'-" MSB of reg = CY: V - 0 MSB of reg # CY: V - 1 mem, 1 tmpcy - CY; CY - MS6 of (mem) 1 1 o 1 o 0 0 W mod 0 1 0 mem 2-4 x x (mem) - (mem) x 2 + tmpcy MSB of (mem) = CY: V - 0 MSB of (mem) # CY: V - 1 reg, CL temp - CL, while temp # 0, 1 1 o1 o0 1 W1 1 o1 0 reg 2 x u repeat this operation, tmpcy - CY, CY - MSB of reg, reg - reg x 2 + tmpcy temp - temp - 1 mem, CL temp - CL, while temp #0, 1 1 o 1 o 0 1 W mod 0 1 0 mem 2-4 x u repeat this operation, tmpcy - CY, CY - MSB of (mem), (mem) - (mem)'x 2 + tmpcy temp - temp - 1 reg, immB temp - immB, while temp # 0, 1 1 00000W1 1 o1 0 reg 3 x u repeat this operation, tmpcy - CY, CY - MSB of reg, reg - reg x 2 + tmpcy temp - temp - 1 mem, immB temp - immB, while temp # 0, 1 1 o 0 0 0 0 W mod 0 1 0 mem 3-5 x u repeat this operation, tmpcy - CY, CY - MSB of (mem) (mem)-- (mem) x 2 + tmpcy temp - temp - 1 n: number of shifts ~ ~ t) Instruction Set (cont) ~ Operation Code No. of Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 6543210 Bytes AC CY V P S Z Rotate (cont) RORC reg, 1 tmpcy - CY, CY - LSB of reg 0 o00 W 0 reg 2 x x reg - reg -;- 2, MSB of reg - tmpcy MSB of reg # bit following MSB of reg: V - MSB of reg = bit following MSB of reg: V - 1 0 ~ mem, 1 tmpcy - CY, CY - LSB of (mem) 1 1 o 1 o 0 0 W mod 0 1 1 mem 2-4 x x (mem) - (mem) -;- 2, MSB of (mem) - tmpcy MSB of (mel]1) # bit following MSB of (mem): V - 1 MSB of (mem) = bit following MSB of (mem): V - 0 reg, CL temp - CL, while temp # 0, 1 1 o 1 o 0 1 W1 1 o 1 1 reg 2 x u repeat this operation, tmpcy - CY, CY - LSB of reg, reg - reg -;- 2, MSB of reg - tmpcy, temp - temp - 1 mem, CL temp - CL, while temp # 0, 1 1 o 1 o 0 1 W mod 0 1 1 mem 2-4 x u repeat this operation, tmpcy - CY, CY - LSB of (mem), (mem) - (mem) -;- 2 MSB of (mem) - tmpcy, temp - temp - 1 reg, immB temp - immB, while temp # 0 1 1 00000W1 1 o1 1 reg 3 x u repeat this operation, tmpcy - CY, CY - LSB of reg, reg - reg -;- 2 MSBof reg - tmpcy, temp - temp-1 mem, immB temp - immB, while temp # 0, 1 1 o 0 0 0 0 W mod 0 1 1 mem 3-5 x u repeat this operation, tmpcy - CY, CY - LSB of (mem), (mem) - (mem) -;- 2 MSB of (mem) - tmpcy, temp - temp - 1 Subroutine Control Transfer CALL near-proc (SP - 1, SP - 2) - PC - PC +disp PC, SP - SP - 2 0 000 3 ,. 1:: D regptr16 (SP - 1, SP - 2) - PC, SP - SP - 2 1 1 0 0 reg 2 ..... PC - regptr16 0 mod 0 0 mem 2-4 W memptr16 (SP - 1, SP - 2) - PC, SP - SP - 2 PC - (memptr16) W 0 far-proc (SP - 1, SP - 2) - PS, (SP - 3, SP - 4) - PC o0 0 0 5 "- SP - SP - 4, PS - seg, PC - offset W memptr32 (SP -1, SP -2) - PS, (SP -3, SP-4) - PC mod 0 1 1 mem 2-4 W SP - SP - 4, PS - (memptr32 + 2), N PC - (memptr32) ~ < W CIt ""-.I ....... m CJ'1 --...I Instruction Set (cont) "t:: 0) Operation Code No. of Flags -a Mnemonic Operand Operation 7 654 3 2 076543210 Bytes AC CYVPSZ a--I Subroutine Control Transfer (cont) 0 RET PC - (SP + 1, SP), SP - SP + 2 o0 0 0 1 W pop-value PC - (SP + 1, SP) o0 0 0 0 3 Q SP - SP + 2, SP - SP + pop-value 0 PC - (SP + 1, SP ), PS - (SP + 3, SP + 2) o0 0 "- W SP-SP+4 W pop-value PC - (SP + 1, SP), PS - (SP + 3, SP + 2) o0 0 0 3 ~ SP - SP + 4, SP - SP + pop-value .--. Stack Manipulation < W PUSH mem16 (SP -1, SP - 2) - (mem16), SP - SP - 2 1 1 1 mod 1 1 0 mem 2-4 en reg16 (SP -1, SP - 2) -reg16, SP - SP - 2 0 0 0 reg --- sreg (SP-1, SP- 2) - sreg, SP - SP - 2 o 0 0 sreg 1 0 PSW (SP -1, SP -2) - PSW, SP - SP - 2 1 0 0 1 1 1 0 0 R Push registers on the stack 0 00000 imm (SP ~ 1, SP - 2) - imm 0 0 oS 0 2-3 SP - SP - 2, When S = 1, sign extension POP mem16 (mem16) - (SP + 1, SP), SP - SP + 2 000 mod 0 0 0 mem 2-4 reg16 reg16 - (SP + 1, SP), SP - SP + 2 o1 0 reg sreg sreg - (SP + 1, SP) sreg : SS, DSO, DS1 o 0 0 sreg 1 1 SP-SP+2 PSW PSW - (SP + 1, SP), SP - SP + 2 1001110 R R R R R R R Pop registers from the stack 0 o0 0 0 1 PREPARE imm16, immS Prepare new stack frame 11001000 4 *: immS = 0: 16 immS> 1: 25 + 16 (immS -1) DISPOSE Dispose of stack frame 1001001 Branch BR near-label PC - PC+ disp 0 o0 3 short-label PC - PC + ext-dispS 0 0 2 o0 ~ regptr16 PC - regptr16 1 1 1 1 reg 2 memptr16 PC - (memptr16) 1 1 mod o0 mem 2-4 far-label PS - seg, PC - offset 0 0 0 5 memptr32 PS - (memptr32 + 2), PC - (memptr32) mod 0 mem 2-:4 t'l Instruction Set (cont) ~ Operation Code No. of Flags Mnemonic Operand Operation 7 6 543 2 076543210 Bytes AC CV V P S Z Conditional Branch BV short-label if V = 1, PC - PC + ext-dispS 0 o0 0 0 2 BNV BC,Bl short-label short-label if V = 0, PC - if CY = 1, PC - PC + ext-dispS PC + ext-dispS 0 0 o0 0 1 o0 0 2 ~ BNC,BNl short-label if CY = 0, PC - PC + ext-dispS 0 o0 1 1 2 BE,BZ short-label if Z = 1, PC - PC + ext-dispS 0 0 o0 2 BNE, BNZ short-label if Z = 0, PC - PC + ext-dispS 0 0 0 BNH short-label if CY OR Z = 1, PC - PC + ext-dispS 0 0 0 2 BH short-label if CY OR Z = 0, PC - PC + ext-dispS 0 o1 1 2 BN short-label if S = 1, PC - PC + ext-dispS 0 000 2 BP short-label if S = 0, PC - PC + ext-dispS 0 o0 1 2 BPE short-label if P= 1, PC - PC + ext-dispS 0 o1 0 2 BPO short-label if P= 0, PC - PC + ext-dispS 0 0 2 BLT short-label if S XOR V = 1, PC - PC + ext-dispS 0 o0 2 BGE short-label if S XOR V = 0, PC - PC + ext-dispS 0 o1 BlE short-label if (S XOR V) OR Z = 1, PC - PC + ext-dispS 0 0 2 BGT short-label if (S XOR V) OR Z = 0, PC - PC + ext-dispS 0 1 2 DBNZNE short-label CW-CW-1 00000 if Z = 0 and CW ¥- 0, PC - PC + ext-dispS DBNZE short-label CW-CW-1 o0 0 0 2 if Z = 1 and CW ¥- 0, PC - PC + ext-dispS DBNZ BCWZ short-label short-label CW-CW-1 if CW ¥- 0, PC - if CW = 0, PC - PC + ext-dispS PC + ext-dispS 000 1 1 1 0 0 0 0 2 ,.a 1::: BTClR sfr. imm3, if bit no. imm3 of (sfr) = 1, o0 0 0 1 0 1 1 1 1 0 0 5 ..... short-label PC - PC + ext - dispS, 0 bit no. imm3 of (sfr) - 0 W Interrupt W BRK 3 (SP -1, SP- 2) - PSW, (SP - 3, SP - 4) - PS, 1 1 0 0 1 1 0 0 0 (SP - 5, SP - 6) - PC, SP - SP - 6 "- W IE-O, BRK-O PS - (15, 14), PC - (13,12) W I\) immS (SP -1, SP- 2) - PSW, (SP - 3, SP - 4) - PS, 1 1 0 0 1 1 0 1 2 ---. (¥- 3) (SP - 5, SP - 6) - PC, SP - SP - 6 IE-O, BRK-O < W PC - (n x 4, + 1, n x 4) en '-I '-I PS - (n x 4 + 3, n x 4 + 2) n = immS ....... IfJ ....... (Xl Instruction Set (cont) Operation Code No. of Flags ,.a "t:: Mnemonic Operand Operation 7 654 3 2 076543210 Bytes AC CYVPSZ Interrupt (cont) -.a 0 BRKV When V = 1 o0 0 c.» (SP-1, SP -2) - PSW, (SP-3, SP-4) - PS, c.» (SP - 5, SP - 6) - PC, SP - SP - 6 0 IE-O, BRK"';"'O PS - (19,18), PC - (17, 16) "- c.» RETI PC - (SP+ 1, SP), PS - (SP+3, SP+2), o0 R R R R R R c.» PSW -- (SP + 5, SP + 4), SP - SP + 6 ~ RETRBI PC ....,. Save PC, PSW - Save PSW o0 0 0 o0 000 2 R R R R R R ...-.. FINT Indicates that interrupt service routine to the o0 0 0 o0 o0 0 2 < c.» interrupt controller built in the CPU has been (II completed "-'" CHKINO reg16, When (mem32) > reg16 or (mem32 + 2) < reg16 o 1 1 0 0 0 1 0 mod reg mem 2-4 mem32 (SP -1, SP-2) - PSW, (SP-3, SP-4) - PS, (SP - 5, SP - 6) - PC, SP - SP - 6 IE-O, BRK-O, PS - (23, 22), PC - (21, 20) CPU Control HALT CPU Halt 1 1 1 0 o0 STOP CPU Halt 00001111 0 1 1 1 1 1 0 BUS LOCK Bus Lock Prefix 1 o0 0 0 FP01 (Note 1) fp-op No Operation 0 X X X YYYZZZ 2 fp-op, mem data bus - (mem) 0 X X X mod Y Y Y mem 2-4 FP02 (Note 1) fp-op No Operation 0 o0 X11YYYZZZ 2 fp-op, mem data bus - (mem) o 1 o 0 1 X mod Y Y Y mem 2-4 POLL Poll and wait o0 1 0 1 NOP No Operation o0 o0 0 0 01 IE-O 1 1 0 0 EI IE-1 1 1 0 1 OSO; OS1; Segment override prefix o0 sreg 0 PS;SS I ~ Notes: (1) Does not execute on the V25, but does generate an interrupt. ~ NEe pPD70330/332 (V35) x x x x x x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "-01 "-01 ~ ~ 0 0 0 0 0..- 0..- 0..- 0..- 1m 0 0 0..- 0..- 0 0 0..- 0..- :c: ~ 01 ~ ~ 01 ~ (0 C, ~ as /XI ... .! «c.. ED c.. ~ en en en 3: 2» > u:::.::: > 0 en :::.::: 0 a: en a: ::!!: ED ::!!: I- 79 pPD70330/332 (V35) NEe 80 NEe NEG Electronics Inc. pPD70P322 16-Bit Microcomputer: Single-Chip, CMOS, With EPROM for V25N35 Modes Description Features The jiPD70P322 is a 16-bit, single-chip CMOS micro- o Reprogrammable EPROM appropriate for system computer operable as a jiPD70322 (V25™) or a evaluation of V25 or V35 jiPD70332 (V35™). The mask ROM of the V25N35 is o V25 mode (,uPD70322 equivalent) replaced in the jiPD70P322 by an EPROM. -Internal 16-bit architecture - External 8-bit data bus Ordering Information o V35 mode (,uPD70332 equivalent) Ext Input Int System -Internal 16-bit architecture Part Number Frequency Clock Package - External 16-bit data bus JiPD70P322K-8 16 MHz 8 MHz 84-pin ceram ic LCC with quartz window V25 and V35 are trademarks of NEC Corporation "PD70P322 Block Diagram ~ DMARQO Ao DMAAKO Ag-A 16 /A 1 -A 8 TCO A17 /A 18 DMARQ1 Controller A18 /UBE DMAAK1 A19 TC1 RESET TxDO HLDAK RxDO HLDRQ SCKO Internal EPROM READY CTSO 16K Bytes MREQ TxD1 MSTB RxD1 RlW CTS1 IOSTB POLL NMI INTPO Instruction Decoder V25N35 INTP1 Micro Sequencer PROG INTP2I Micro ROM CE INTAK OE INT Vpp DO-D7 (V25 Mode) Do-D15 (V35 Mode) X1 X2 - - - VDD TOUT CLKOUT PO P1 P2 PTO-PT7 V TH - - - GND 83YL-68178 50283-1 pPD70P322 N'EC Pin Configurations 84-Pin LCe, V25 Mode P07/CLKOUT 74 PT7 00 73 PT6 01 72 PT5 02 71 PT4 03 70 PT3 04 69 PT2 05 68 PT1 06 67 PTO 07 66 P17/REAOY Ao 65 P16/SCKO A1 64 P15fTOUT A2 63 P14/INT/POLL A3 62 P13/INTP2fINTAK A4 61 P12/INTP1 A5 60 P11/INTPO A6 59 NMI A7 58 P27/HLORQ A8 57 P26/HLOAK A9 56 P25~ A10 55 P24/0MAAK1 An P23/0MARQ1 81C.!'l CI~18Q a:~$l:$t::: ~a. ~gj e e a. ~ ~ Pin Symbol Connect to 3 V VOO 9 V25N35 High level (H) 49 PROG High level (H) 53,75 IC High level through pullup resistor 83YL-6794B 2 1t¥EC pPD70P322 84-Pin LCC, V35 Mode P07/ClKOUT 74 PT7 00 73 PT6 01 72 PT5 02 71 PT4 03 70 PT3 04 69 PT2 05 68 PT1 06 67 PTO 07 66 ,P17/REAOY 08 65 P16/SCKO 09 64 P15ITOUT 0 10 63 P14/1NT/POll 0 11 62 ---- P13/INTP2IINTAK 0 12 61 P12/1NTPl 0 13 60 Pl1 IINTPO 0 14 59 NMI 0 15 58 P27/HlORQ Ao 57 P26/HLDAK A9 /A l 56 P25ITCl A1O /A 2 55 P24/0MAAKl A11 /A 3 54 P23/0MARQl Pin Symbol Connect to 3 V VOO 9 V25N35 low level (l) 49 PROG High level (H) 53,75 IC High level through pullup resistor 83YL-6796B 3 pPD70P322 NEe 84-Pin Lee, EPROM Programming Mode 74 73 72 71 70 69 68 67 D7 66 Ao 65 A1 64 A2 ~ ~ ~ A4 ~ ~ 00 ~ ~ ~ ~ ~ ~ Open 56 A10 55 A11 54 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ c: ~ a Pin Symbol Connect to 9 V VDD 49 PROG Low level through pullup resistor L Low level through pullup resistor H High level through pullup resistor Open Do not connect to these pins. 83YL~795B 4 NEe pPD70P322 Pin Identification, V25N35 Mode Symbol I/O Function Also Used For Symbol I/O Function Also Used For Port Pins INTAK Out Interrupt acknowledge P13iINTP2 POo-P06 I/O Input or output mode can be INTPO In External interrupt request P1 1 specified per bit INTP1 P1 2 PO] CLKOUT (P1o) NMI In Non-maskable interrupt; INTP2 P13iINTAK cannot be used as a general- IOST8 Out I/O access strobe purpose port pin. MREQ Out Indicates memory bus cycle P11 In Port 1 input lines INTPO start P12 INTP1 MST8 Out Memory access strobe P13 INTP2 POLL In Wait insertion P14J'INT P14 I/O Input or output mode can be POLL/INT READY In External ready P17 specified per bit. P1s TOUT REFRQ Out DRAM refresh pulse P16 SCi<'--______________ A_dd_re_s_s_ln_pu_t_ _ _ _ _ _ _ _ _ _ _ _ _ L D D7- O ---<,-__ _...IH D_a_ta_l_np_u_t Data output ~~,-_ _ _D_a_ta_in_p_ut_ _- , ) ' - - - - - +12.5V ~ Vpp VDD RESET ~L _________________ ~'~ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ - )5 PROG ~'-_________________________~I~ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ . 55 83YL-6793B 8 NEe pPD70P322 Figure 3. EPROM Read Timing System Clock =x____ TA = -10 to + 70°C; Voo = + 5.0 V ±10% at 5 MHz, ±5% at 8 MHz Vss = OV;VTH = OtoV oo + 1 A A13- O X'-____ A_dd_r_es_s_in_p_u_t _ _- J p.PD70P322 p.PD70P322-8 Parameter Min Max Min Max Unit Internal Oscillator Frequency, fxx 4 10 4 16 MHz External Clock Frequency, fx 4 10 4 16 MHz OE \'--------J/ Rise/fall time, tRltF Xl input, high/low 0 35 10 250 0 20 10 250 ns ns level width, tOH/tOL 0TOO - - - - - - - - ( ' -__ o_at_a_ou_t_pu_t_..I))---- System Clock Control Circuit 83YL-S79OA Internal Oscillator INSTALLATION Di rect solderi ng to pi ns of the J-lPD70P322 is not allowed. The device must be installed in a socket. ELECTRICAL SPECIFICATIONS Absolute Maximum Ratings TA = 25°C Notes: Supply voltage, Voo -0.5 to + 7.0 V (1) Mount the capacitors and crystal or ceramic resonator as close to pins X1 and X2 as possible. Input voltage, VI -0.5 to VOO+ 0.5 :5 + 7.0 V (2) 00 not route other signal lines through the shaded Output voltage, Vo -0.5 to VOO+ 0.5 :5 + 7.0 V area. Threshold voltage, VT H -0.5 to V 00+ 0.5 :5 + 7.0 V Output current low, IOL Each output pin 4.0 rnA (total 50 rnA) External Clock t Output current high, IOH Each output pin -2.0 rnA (total-20 rnA) Clock X1 Operating temperature range, TOPT -40 to + 85°C Storage temperature range, TSTG -65 to + 150°C 74HC04 Exposure to Absolute Maximum Ratings for extended periods may affect device reliability; exceeding the ratings could cause permanent '-------I X2 damage. 83SL·7000A Capacitance TA = 25°C; Voo = 0 V Parameter Symbol Max Unit Conditions Input capacitance CI 10 pF fc = 1 MHz; unmeasured pins Output capacitance Co 20 pF returned to ground I/O capacitance CIO 20 pF 9 pPD70P322 NEe Recommended Oscillator Components Ceramic Resonator (Note 1) Capacitors Crystal (Note 2) Capacitors Manufacturer Product No. C1 (pF) C2 (pF) Manufacturer Product No. C1 (pF) C2 (pF) Kyocera KBR-10.0M 33 33 Kinseki HC-49/U 15 15 Murata Mfg. CSA.10.0MT 47 47 HC-43/U 15 15 CSA16.0MX040 30 30 Notes: TDK FCR10.M2S 30 30 (1) Ceramic resonator product no. includes the frequency: 10.0 or FCR16.0M2S 15 6 16.0 MHz. (2) Crystal frequencies: 10, 16 MHz. DC Characteristics 1; V25N35 Mode TA = -10 to +70°C; voo = +5.0 V ±10 % Parameter Symbol Min Typ Max Unit Conditions Input voltage, low VIL 0 0.8 V Input voltage, high VIH1 2.2 Voo V All except RESET, P101NMI, X1, X2 VIH2 0.8 Voo Voo V RESET, P101NMI, X1, X2 Output voltage, low VOL 0.45 V IOL = 1.6 mA Output voltage, high VOH Voo -1.0 V IOH = -0.4 mA Input current liN ±20 p.A EA,.P101NMI; VIN = 0 to Voo Input leakage current III ±10 p.A All except EA, P101NMI; VIN = 0 to Voo Output leakage current ILO ±10 p.A Vo = 0 to Voo VTH supply current ITH 0.5 1.0 mA VTH = Oto Voo Voo supply current, p.PD70P322 1001 50 100 mA Operation mode 1002 20 40 mA HALT mode 1003 10 30 p.A STOP mode Voo supply current, p.PD70P322-8 1001 65 120 mA Operation mode 1002 25 50 mA HALT mode 1003 10 30 p.A STOP mode DC Characteristics 2; EPROM Program Operation TA = 25 ±5°C; Voo = 6.0 ±0.25 V; Vpp = 12.5 ±0.3 V Parameter Symbol Min Typ Max Unit Conditions Input voltage, high VIH 2.2 Voo + 0.3 V Input voltage, low VIL -0.3 0.8 V Input leakage current III 10 p.A VIH = 0 to Voo Output voltage, high VOH Voo-1 V IOH = -400 p.A Output voltage, low VOL 0.45 V IOL = 1.6 mA Voo supply current 100 40 mA Vpp supply current Ipp 30 mA 10 NEe pPD70P322 DC Characteristics 3; EPROM Read Operation TA =25 ±5°C Parameter Symbol Min Typ Max Unit Conditions Power supply voltage VOO 4.5 5.0 5.5 V Write power supply voltage Vpp V Vpp = VOO Input voltage, high VIH 2.2 VOO + 0.3 V Input voltage, low VIL -0.3 0.8 V Input leakage current III 10 p.A VIN = 0 to VOO Output voltage, high VOH Voo-1 V IOH = -400 p.A Output voltage, low VOL 0.45 V IOL =1.6 mA Output leakage current ILO 10 p.A VOO supply current 100 40 mA Vpp supply current Ipp 100 p.A Vpp = Voo AC Characteristics 1; V25N35 Mode TA = -10 to + 70°C; fCLK = 0.5 to 5 MHz with Voo = 5 V ± 10%; fCLK = 5 to 8 MHz with Voo = 5 V ±5% 70P322 70P322-8 Parameter Symbol Min Max Min Max Unit Conditions ~ Input rise, fall times tlR, tlF 20 20 ns Except X1, X2, RESET, NMI Iii:I Input rise, fall times (Schmitt) tIRS, tlFS 30 30 ns RESET, NMI Output rise, fall times tOR, tOF 20 20 ns Except CLKOUT X1 cycle time tcyx 98 250 62 250 ns X1 width, low tWXL 35 20 ns X1 width, high tWXH 35 20 ns X1 rise, fall times tXR, tXF 20 20 ns CLKOUT cycle time tCYK 200 2000 125 2000 ns CLKOUT = fx/2 CLKOUT width, low tWKL 0.5T - 15 0.5T - 15 ns T = tcYK CLKOUT width, high tWKH 0.5T-15 0.5T -15 ns CLKOUT rise, fall times tKR, tKF 15 15 ns AC Characteristics 2; V25 Mode TA = -10 to +70°C; CL = 100 pF (max); T == tcYK; n = number of wait states inserted fCLK = 0.5 to 5 MHz with Voo = 5 V ±10%; fCLK = 5 to 8 MHz with Voo = 5 V ±5% Parameter Symbol Min Max Unit Conditions Address delay time tOKA 90 ns Address valid to input data valid tOAOR (n+1.5)T - 90 ns MREQ to data delay time tOMRO (n +1)T -75 ns MSTB to data delay time tOMS O (n +0.5)T - 75 ns MREQ to TC delay time tOMRTC 0.5T + 50 ns MREQ to ~ delay time tOMRMS 0.5T - 35 0.5T + 35 ns MREQ width, low tWMRL (n+1)T - 30 ns Address hold time tHMA 0.5T - 30 ns Input data hold time tHMoR 0 ns Next control setup time tscc T -25 ns TC width, low tWTCL 2T -30 ns 11 JlPD70P322 NEe AC Characteristics 2; V25 Mode (cont) Parameter Symbol Min Max Unit Conditions Address data output tOAOW 0.5T + 50 ns MREQ delay time tOAMR 0.5T -30 ns MSTB delay time tOAMS T -30 ns MSTB width, low tWMSL (n+0.5)T - ns 30 Data output setup time tSOM (n+1)T - 50 ns Data output hold time tHMoW 0.5T - 30 ns IOSTB delay time tOAIS 0.5T - 30 ns iOSfB to data input tOISO (n+1)T - 90 ns iOSfB width, low tWISL (n+1)T - 30 ns Address hold time tHISA 0.5T - 30 ns Data input hold time tHISOR 0 ns Output data setup time tSDlS (n+1)T - 50 ns Output data hold time tHISOW 0.5T -30 ns Next OMARa setup time tSOAOQ T ns Demand mode OMARa hold time tHOAOQ 0 ns Demand mode DMMK read width, low tWOMRL (n+1.5)T - ns 30 DMMK to fC delay time tOOATC 0.5T + 50 ns DMMK write width, low tWOMWL (n+1)T - 30 ns REFRQ delay time tOARF 0.5T -30 ns RE F RQ width, low tWRFL (n+1)T - 30 ns Address hold time tHRFA 0.5T - 30 ns RESET width, low tWRSL1 30 ms STOP mode release/Power-on reset RESET width, low tWRSL2 5 ~s System reset MREQ, IOSTB to READY setup time tSCRY (n -1)T -100 ns n ~ 2 MREQ, IOSTB to READY hold time tHCRY (n-1)T ns n ~ 2 H LDAK output delay time tOKHA 80 ns BUS control float to HLDAK.j. tCFHA T -50 ns HLDAK ito control output time tOHAC T-50 ns HLDRa .j. to control output time tOHQC 3T + 30 ns H LDAK width, low tWHAL T ns H LDRa setup time tSHQK 30 ns HLDRa to HLDAK delay time tOHQHA 3T + 160 ns H LORa width, low tWHQL 1.5T ns INTP, OMARa setup time tSIQK 30 ns INTP, DMARa width, high tWIQH 8T ns INTP, DMARa width, low tWIQL 8T ns POLL setup time tSPLK 30 ns NMI width, high tWNIH 5 ~s NMI width, low tWNIL 5 ~s Q'S width, low tWCTL 2T ns 12 NEe pPD70P322 AC Characteristics 2; V25 Mode (cont) Parameter Symbol Min Max Unit Conditions I NT setup time tSIRK 30 ns INT hold time tHIAIQ 0 ns INTAK width, low tWIAL 2T -30 ns INTAK delay time tOKIA 80 ns INTAK width, high tWIAH T -30 ns INTAK to data delay time tOIAO 2T -130 ns INTAK to data hold time tHIAO 0 0.5T ns SCKO cycle time tCYTK 1000 ns SCKO (TSCI<) width, high tWSTH 450 ns SCKO (TSCI<) width, low tWSTL 450 ns TxD delay time tOTKD 210 ns TxD hold time tHTKD 20 ns CTSO (RSCI<) cycle time tCYRK 1000 ns CTSO (RSCI<) width, high tWSRH 420 ns CTSO (RSCI<) width, low RxD setup time RxD hold time tWSRL tSROK tHKRO 420 80 80 ns ns ns II AC Characteristics 3; V35 Mode TA = -10 to +70°C; CL = 100 pF (max); T = tcYK; n = number of wait states inserted fCLK = 0.5 to 5 MHz with Voo = 5 V ±10%; fCLK = 5 to 8 MHz with Voo = 5 V ±5% Parameter Symbol Min Max Unit Conditions Address delay time tOKA 90 ns Address valid to input data tOAOR (n+1.5)T - 90 ns valid MREQ to data delay time tOMRO (n+2)T -75 ns MSTB to data delay time tOMSO (n+1)T -75 ns MREQ to TC delay time tOMRTC 0.5T + 50 ns MREQ to MSTB delay time tOMRMS1 T-35 T + 35 ns Read operation tOMRMS2 (n + 1)T - 35 (n + 1)T + 35 ns Write operation tOMRMS 0.5 T - 30 ns MREQ width, low tWMRL (n+2)T -30 ns Address hold time tHMA 0.5T - 30 ns Input data hold time tHMOR 0 ns Next control setup time tscc T-25 ns Te width, low tWTCL 2T-30 ns Address data output tOAOW 0.5T + 50 ns MREQ delay time tOAMR 0.5T -30 ns R/W to MSTB delay time tORMS 0.5T - 30 ns tOWMS (n + 0.5)T - 30 ns MSTB width, low tWMSL1 (n + 1)T - 30 ns Read operation tWMSL2 T-30 ns Write operation 13 pPD70P322 NEe AC Characteristics 3; V35 Mode (cant) Parameter Symbol Min Max Unit Conditions Data output setup time tsoM (n+2)T - 50 ns Data output hold time tHMOW 0.5T - 50 ns IOSTB delay time tOMRIS T -35 ns iOS'i'B to data input tOISO (n + 1) T -90 ns iOS'i'B width, low tWISL (n+1)T - 30 ns Address hold time tHISA 0.5T - 30 ns Data input hold time tHISOR 0 ns Output data setup time tSOIS (n+2)T -50 ns Output data hold time tHISOR 0 ns Next DMARQ setup time tSOAOQ T ns Demand mode DMARQ hold time tHoAOQ 0 ns Demand mode DMAAK read width, low tWOMRL (n+1.5)T - 30 ns DMAAK to fC delay time tOOATC 0.5T + 50 ns DMAAK write width, low tWOMWL (n+2)T -30 ns RE F RQ delay time tOARF 0.5T - 30 ns REFRQ width, low tWRFL (n+1)T -30 ns Address hold time tHRFA 0.5T - 30 ns RESET width, low tWRSL1 30 ms STOP mode release/Power-on reset RESET width, low tWRSL2 5 /Ls System reset MREQ, IOSTS to READY setup tSCRY nT -100 ns n ~ 2 time MREQ, IOSTS to READY hold tHCRY nT ns n ~ 2 time HLDAK output delay time tOKHA 80 ns BUS control float to H LDAK ~ tCFHA T -50 ns HLDAK ito control output time tOHAC T -50 ns HLDRQ J. to control output time tOHQC 3T + 30 ns H LDAK width, low tWHAL T ns H LDRQ setup time tSHQK 30 ns HLDRQ to HLDAK delay time tOHQHA 3T + 160 ns H LDRa width, low tWHQL 1.5T ns INTP, DMARa setup time tSTQK 30 ns INTP, DMARa width, high tWIQH 8T ns INTP, DMARQ width, low tWIQL 8T ns POLL setup time tSPLK 30 ns NMI width, high tWNIH 5 /Ls NMI width, low tWNIL 5 /Ls C'fS width, low tWCTL 2T ns INT setup time tSIRK 30 ns INT hold time tHAIQ 0 ns INTAK width, low tWIAL 2T- 30 ns INTAK delay time tOKlA 80 ns 14 NEe pPD70P322 AC Characteristics 3; V35 Mode (cont) Parameter Symbol Min Max Unit Conditions INTAK width, high tWIAH T -30 ns INTAK to data delay time tOIAO 2T - 130 ns INTAK to data hold time tHIAO 0 0.5T ns SCKO cycle time tCYTX 1000 ns SCKO (TSCI<) width, high tWSTH 450 ns SCKO (TSCI<) width, low tWSTL 450 ns TxD delay time tOTKD 210 ns TxD hold time tHTKD 20 ns CTSO (RSCI<) cycle time tCYRK 1000 ns CTSO (RSCI<) width, high tWSRH 420 ns CTSO (RSCI<) width, low tWSRL 420 ns RxD setup time tSROK SO ns RxD hold time tHKRO SO ns AC Characteristics 4; EPROM Program Operation TA = 25 ±5°C, VOO = 6.0 ±0.25 V; Vpp = 12.5 ±0.3 V Parameter Address setup time to CE .J. Symbol Min 2 Typ Max Unit Condition 1m tAS P.s OE setup time tOES 2 P.s Data input setup time to CE .J. tos 2 P.s Address retention time tAH 2 p.s Data input retention time tOH 2 p.s OE to data output float delay tOF 0 p.s Vpp setup time to CE .J. tvps 2 p.s VOO setup time to CE .J. tvos 2 p.s Initial program pulse width tpw 0.95 1.0 1.05 ms Additional program pulse width topw 2.S5 7S.75 ms OE to data output delay time tOE 2 p.s AC Characteristics 5; EPROM Read Operation TA = 25 ±5°C, VOO = 5.0 ±0.5 V; Vpp"" VOO Parameter Symbol Min Typ Max Unit Condition Address to data output delay time tACC 2 IJs CE = OE "" V1L CE to data output delay time icE 2 IJs OE "" VIL OE to data output delay time tOE IJs CE = V1L OE to data output float delay tOF 0 IJs CE = V1L Address to output retention tOH 0 IJs CE = "DE = V1L 15 pPD70P322 NEe Figure 4. EPROM Program Operation Timing + 12.SV Vpp VDD +6V VOD VDD V1H CE VIL tOES r.- V1H -------------,1 OE 83VL·6791 B Figure 5. EPROM Read Operation Timing Comparator Characteristics TA = -10 to 70°C; fCLK = 0.5 to 5 MHz with V DD = 5 V ±10%; fCLK = 5 to 8 MHz with Voo = 5 V ±5% Address input Parameter Symbol Min Max Unit Accuracy VACOMP ±100 mV Threshold voltage VTH 0 VDD +0.1 V Comparison time tCOMP 64 65 tCYK PT input voltage VIPT 0 VDD V Data Memory STOP Mode; Low Supply Voltage *OE Data Retention TA = -10 to +70°C Parameter Symbol Min Max Unit Data retention supply voltage VDDDR 2.5 5.5 V V DD rise, fall time tR\fD' tFVD 200 p.s o-,-DO ---.:!!-~-- Hi-Z Data output * To read within the range of tACC. set the delay of OE from CE fall to tACC - tOE(Max). 83VL·6792A 16 NEe NEG Electronics Inc. pPD70325 (V25 Plus) 16-Bit Microcomputer: High-Speed DMA, Single-Chip, CMOS Description o Internal 256-byte RAM memory The jiPD70325 0125 Plus) is a high-performance, 16-bit, o 1-megabyte memory address space single-chip microcomputer with an 8-bit external data o Eight internal memory-mapped register banks bus. The jiPD70325 is fully software compatible with o Four multifunction I/O ports the pPD70108/116 ry2Q®/30®) as well as the jiPD70320/ - 8-bit analog comparator port 330 ry25™ /35™). The V25 Plus microcomputer demon- - 20 bidirectional port lines strates numerous enhancements over the standard - Four input-only port lines V25; however, it maintains strict pin compatibility with its predecessor, the V25. o Two independent full-duplex serial channels The V25 Plus offers improved DMA transfer rates to 5 o Priority interrupt controller megabytes/second, additional serial channel status - Standard vectored service flags, improved memory access timing, and enhanced - Register bank switching software control of register bank context switching. - Macroservice o Pseudo SRAM and DRAM refresh controller The jiPD70325 has the same complement of internal peripherals as the V25 and maintains compatibility o Two 16-bit timers with existing drivers; however, some modification Of o On-chip time base counter DMA device drivers may be necessary. The jiPD70325 o Programmable wait state generator does not offer on-chip ROM or EPROM. o Two standby modes: STOP and HALT Features Ordering Information o 16-bit CPU and internal data paths Part Number Clock (MHz) Package o Functional and pin compatibility with V25 JlPD70325L-S S S4-pin PLCC o Software compatible with jiPD8086 L-10 10 o New and enhanced V-Series instructions GJ-S S 94-pin plastic QFP o 6-byte prefetch queue GJ-10 10 o Two-channel high-speed DMA controller o Minimum instruction cycle -250 ns at 8 MHz - 200 ns at 10 MHz V20 and V30 are registered trademarks of NEC Corporation. V25 and V35 are trademarks of NEC Corporation. 50134-2 IIPD703'26 (V25 Pills) < NEe • i" Pin Configurations 84-PlnPLCC P07/CLKOUT 74 PT7 DO 73 PT6 01 72 PTS 02 71 PT4 03 70 PT3 04 69 PT2 05 68 PTt 06 67 PTO 07 66 P17/REAOY Ao 65 P16/SCKO At 64 P1SITOU~ A2 63 P14/INT/PO~ A3 62 P13/INTP2IINTAK A4 61 P12/1NTP1 A5 60 P11/1NTPO A6 59 P10/NMI A7 58 P27/HLORQ A8 57 P26/HLDAK A9 56 P25~ A10 55 P24/0MAAK1 A11 54 P23/0MARQ1 I"'- co Cl o ~ N C') v v v on on on on ~~~~~~~~8 c(c(c(c(c(c(c(c(tt. °l~f- f-~ a:xEilen()f- f-~ 8a: Z (!l () 0 ~ e TIc Q o ~ () Q > ~ ~ e~ 0 N N a. a. Notes: (1) Pin functions are identical to IlP070320. (2) All IC pins should be tied together and pulled up to V DO with a 10- to 20-k.Cl resistor. (3) EA must be tied low because IlP070325 does not support Internal ROM or EPROM. 83SL-G689B 2 NEe ,.,PD70325 (V25 Plus) 94-Pln PI••tlc QFP 71 POs A12 70 NC NC 69 IC A13 68 P04 A14 67 P03 A15 66 P02 A16 65 P01 A17 64 POo A18 63 EA A19 62 MREQ RxDO 61 IOSTB GND 60 MSTB CTSO 59 RIW TxDO 58 REFRQ RxD1 57 RESET CTS1 56 VDD TxD1 55 VDD P20/DMARQO 54 X2 IC 53 X1 VDD 52 GND VDD 51 GND P21/DMAAKO 50 NC NC 49 NC P22ITCO ~ ~ ~ ~ re ~ g M ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~48 VrH Notes: (1) Pin functions are Identical to J.l.PD70320. (2) All IC pins should be tied together and pulled up to V DD with a 10- to 20-kn resistor. (3) EA must be tied low because J.l.PD70325 does not support internal ROM or EPROM. 83SL-e690B 3 pPD70325 (V25 Plus) NEe Pin 'Identification PIN FUNCTIONS Symbol Function Ao-A19 (Address Bus) Address bus outputs Ao-A19 is the nonmultiplexed 20-bit address bus used to CLKOUT System clock output access all external devices. Clear to send channel 0 input CTS1 Clear to send channel 1 input CLKOUT (System Clock) Bidirectional data bus This is the internal system clock. It can be used to External access synchronize external devices to the CPU. I/O strobe output CTSn, RxDn, TxDn, SCKO (Clear to Send, MREQ Memory request output Receive Data, Transmit Data, Serial Clock Out) MSTB Memory strobe output I/O portO The two serial ports (channels 0 and 1) use these lines for transmitting and receiving data, handshaking, and P101NMI Port 1 input line; nonmaskable interrupt serial clock output. P11-P12/INTPO- Port 1 input lines; external interrupt input lines INTP1 00-07 (Data Bus) P131'INTP2/ Port 1 input line; external interrupt input line; INTAK interrupt acknowledge output Do-D7 is the 8-bit external data bus. P141'1 N17POLL I/O port 1; interrupt request input; I/O poll input DMARQn, DMAAKn, TCn (DMA Request, DMA P1:/TOUT I/O port 1; timer out Acknowledge, Terminal Count) P1e1SCKO I/O port 1; serial clock output I/O port 1; ready input These are the control signals to and from the on-chip DMA controller. P20/DMARQO I/O port 2; DMA request 0 I/O port 2; DMA acknowledge 0 EA(External Access) I/O port 2; DMA terminal count 0 If this pin is low on reset, the J.1PD70322 0/25) will P231'DMARQ1 I/O port 2; DMA request 1 execute program code from external memory instead I/O port 2; DMA acknowledge 1 of internal ROM. I/O port 2; DMA terminal count 1 Because the V25 Plus does not support internal ROM, P2e1HLDAK I/O port 2; hold acknowledge output the EA pin must be fixed low in hardware. I/O port 2; hold request input PTO-PT7 Comparator port input lines H LDAK (Hold Acknowledge) Refresh pulse output The HLDAK output (active low) informs external de- RESET Reset input vices that the CPU has released the system bus. RxDO Serial receive data channel 0 input H LDRQ (Hold Request) RxD1 Serial receive data channel 1 input R/W Read/Write output The HLDRQ input (active high) is used by external devices to request the CPU to release the system bus to TxDO Serial transmit data, channel 0 input an external bus master. The following lines go into a TxD1 Serial transmit data, channel 1 input high-impedance status: Ao-A19, Do-D7, MREQ, RiW, X1,X2 Crystal connection terminals MSTB, REFRQ, and IOSTB. VDD Positive power supply voltage INT (Interrupt Request) Threshold voltage input GND Ground reference INT is a maskable, active-high, vectored interrupt re- quest. After assertion, external hardware must provide IC Internal connection the interrupt vector number. The INT pin allows direct connection of slave J.1PD71059 interrupt controllers. 4 NEe pPD70325 (V25 Plus) INTAK (Interrupt Acknowledge) every five clock cycles until it is low. POLL can be used to synchronize program execution to external condi- After INT is asserted, the CPU will respond with INTAK tions. (active low) to inform external devices that the interrupt request has been granted. PTO ·PT7 (Comparator Port) INTPO ·INTP2 (External Interrupt) PTO-PT7 are inputs to the analog comparator port. INTPO-INTP2 allow external devices to generate inter- READY (Ready) rupts. Each can be programmed to be rising or falling edge triggered. After READY is de-asserted low, the CPU synchronizes and inserts at least two wait states into a read or write 10STB (I/O Strobe) cycle to memory or I/O. This allows the processor to accommodate devices whose access times are longer 10STB is asserted during read and write operations to than nominal p.PD70325 bus cycles. external I/O. REFRQ (RefreSh) MREQ (Memory Request) This active-low output pulsecan refresh nonstatic RAM. MREQ (active low) informs external memory that the current bus cycle is a memory access bus cycle. It can be programmed to meet system specifications an is internally synchronized so that refresh cycles do not MSTB (Memory Strobe) interfere with normal CPU operation. MSTB (active low) is asserted during read and write RESET (Reset) operations to external memory. A low on RESET resets the CPU and all on-chip periPh-1!!I NMI (Nonmaskable Interrupt) erals. RESET can also release the standby modes. After RESET returns high, program execution begins from NM I cannot be masked through software and is typically address FFFFOH. used for emergency processing. Upon execution, the interrupt starting address is obtained from interrupt R/W (Read/Write) vector number 2. NMI can release the standby modes and can be programmed to be either rising or falling Rm output allows external hardware to determine if the edge triggered. current operation is a read or a write cycle. It can also control the direction of bidirectional buffers. POO·P07 (Port 0) TOUT (Timer Out) POo-P07 are the lines of port 0, an 8-bit bidirectional parallel I/O port. TOUT is the square-wave output signal from the internal timer. P10·P17 (Port 1) The status of P1o-P13 can be read but these lines are X1, X2 (Crystal Connections) always control functions. P14-P17 are the remaining lines The internal clock generator requires an external crystal of parallel port 1; each line is individually programmable across these terminals. By programming the PRC regis- as either an input, an output, or a control function. ter, the system clock frequency can be selected as the oscillator frequency (fosd divided by 2, 4, or 8. P20·P27 (Port 2) P2o-P27 are the lines of port 2, an 8-bit bidirectional Voo (Power Supply) parallel I/O port. The lines can also be used as control Two positive power supply pins (VDD) reduce internal signals for the on-chip DMA controller. noise. POLL (Poll) Upon execution of the POLL instruction, the CPU checks the status of this pin and, if low, program execution continues. If high, the CPU checks the level of the line 5 pPD70325 (V25 Plus) NEe VTH (Threshold Voltage) GND (Ground) The comparator port uses this pin to determine the Two ground connections reduce internal noise. analog reference point. The actual threshold to each comparator line is programmable to VTH x n/16 where n IC (Internal Connection) =1 to 16. . Allie pins should be tied together and pulled up to Voo with a 10- to 20-kO resistor. "PD70325 Block Diagram P20/DMARQO -+-:: ............... '" It> Ao-A19 P2 I~;:~~~ =lprOg~::ableil 1 P2 3 IDMARQ1 -j~ P2 4 /DMAAK1 - : : Controller LRESIT P2 s rrC1 .. -1.. . . . . . . . . . . . . . . . . . . . :;.- HLDAK/P2 6 }-~. HLDROIP2 7 ~.~ READY/P1 7 ~:~~ : :..··············::·;::;·················11 :. b' .:~ MREQ P1 /SCKO ~~ Interface :: [ ; - M~B Internal ROM Ili~ :TB 6 CTSO~: - General 8K Bytes TxD1 ~: r------, Registers (Reserved) ~ POLUINT/P14 ~;~~ =:1. . . . . . . . . . . . . . . . . . . .. -Macro Service Channel P1 0 /NMI P11/1NTPO Instruction Decoder P12/1NTP1 Programmable Micro Sequencer Interrupt P13/INTP2I INTAK Controller Micro ROM i;"'" EA ;=.............} P1 4 /1NTI POLL X1 X2 VDD TOUT/P15 REFRQ P07/CLKOUT PO P1 P2 PTO-PT7 V TH GND Notes: (1) The I1PD70325 (V25 Plus) is not a masked ROM product. Internal ROM Is reserved and not accessible. (2) Shaded blocks are functionally different on V25 Plus and V25. 83YL·5731B 6 NEe pPD70325 (V25 Plus) FUNCTIONAL DESCRIPTION Register Set The following features enable the p.PD70325 to perform Figure 1 shows the eight banks of internal registers, high-speed execution of instructions. which the p.PD70325 has functionally mapped into inter- nal RAM. Each bank contains general-purpose registers, • Dual internal data bus pointer and index registers, segment registers, and save • 16- and 32-bit temporary registers/shifters areas for context switching. • 16-bit loop counter Although these memory locations may be accessed as • Program counter and prefetch pointer normal RAM with the full set of memory addressing modes provided by the V25 family, the capability of Dual Data Bus context switching provides superior speed in register The p.PD70325 has two internal 16-bit data buses: the access. When used in the internal memory disabled main data bus and the secondary data bus. This reduces state, many instructions execute considerably faster. the processing time required for addition/subtraction Eight macroservice channel control blocks are also and logical comparison instructions by one third over mapped into register banks 0 and 1. The V25 Plus does single-bus systems. The dual data bus method allows not map the DMA channel control blocks into the inter- two operands to be fetched simultaneously from the nal RAM like the V25; instead, these control blocks are general-purpose registers and transferred to the AlU. mapped into the special function register area. 16- and 32-Bit Temporary Registers/Shifters General-Purpose Registers (AW, BW, Cw, OW). Four 16-bit general-purpose registers (AW, BW, Cw, and DW) The 16-bit temporary registers/shifters (TA and TB) allow can serve as 16-bit registers or as four sets of dual a-bit high-speed execution of multiplication/division and registers (AH, Al, BH, Bl, CH, Cl, DH, and Dl). The shift/rotate instructions. Using the temporary registers, instruction classes default to the following general- II'1I'I the p.PD70325 can execute multiplication/division in- structions about four times faster than with the micro- purpose registers. Iii:I programmed method. AW Word multiplication/division, word I/O, data conversion. Loop Counter (LC) Al Byte multiplication/division, byte I/O, BCD rotation, data conversion, translation. The dedicated hardware loop counter (lC) counts the ' number of iterations for string operations and the num- AH Byte multiplication/division. ber of shifts performed for multiple-bit shift/rotate in- BW Translation structions. The loop counter works with internal dedi- CW loop control, branch, and repeat prefixes. cated shifters to speed the processing of multiplication/ Cl Shift 'instructions, rotate instructions, BCD division instructions. operations. Program Counter and Prefetch Pointer DW Word multiplication/division, indirect I/O (PC and PFP) , addressing. The hardware PC addresses the memory location of the Pointers (SP, BP) and Index Registers (IX, IY). These instruction to be executed next. The hardware PFP registers are 16-bit base pOinters (SP, BP) or index addresses the program memory location to be accessed registers (IX, IY) in based addressing, indexed address- by the instruction queued next. Several clock cycles are ing, and based indexed addressing. They are used as saved for branch, call, return, and break instructions. default registers under the following conditions. SP Stack operations IX Block transfer (source), BCD string operations IY Block transfer (destination), BCD string operations 7 JlPD70325 (V25 Plus) NEe Figure 1. Internal RAM Mapping 32-Byte Register Bank 15 +1FH AW CW ow BW SP Eight 32-Byte Register Banks BP IX 15 IV xxEFFH Register Bank xxEEOH OS1 7 PS xxECOH 6 SS OSO xxEAOH 5 PC Storage xxE80H 4 PSW Storage Vector PC xxE60H 3 +OOH Reserved a-Byte xxE40H 2 Eight a-Byte Macroservice Channel s.{ Macroservice Channels 15 87 0 xxE20H xxEOOH 1 0 ] xxE3FH xxE30H xxE28H Macroservlce t;nannel xxE38H 15 7 6 5 0 +7H +OH MSP Reservedi SCHR SFRP MSS I MSC xxE20H 4 xxE18H 3 xxE10H 2 xxE08H 1 xxEOOH 0 83SL-6691B Segment Registers. The segment registers divide the Save Registers (Save PC and Save PSW). Save PC and 1M-byte address space into 64K-byte blocks. Each seg- save PSW are used as the storage areas during register ment register functions as a base address to a block; the bank context-switching operations. The Vector PC save effective address is an offset from that base. Physical location contains the effective address of the interrupt addresses are generated by shifting the associated seg- service routine when register bank switching is used to ment register left by four binary digits and then adding service interrupts. the offset address. The segment registers and default Program Counter (PC). The PC is a 16-bit binary offsets are listed below. counter that contains the offset address from the pro- gram segment of the next instruction to be executed. It Segment Register Default Offset is incremented every time an instruction is received from PS (Program Segment) PC (Program Counter) the queue. It is loaded with a new location whenever the SS (Stack Segment) SP and Effective Address branch, call, return, break, or interrupt is executed. DSO (Data Segment 0) IX and Effective Address DS1 (Data Segment 1) IV and Effective Address 8 NEe pPD70325 (V25 Plus) Program Status Word (PSW). The PSW contains status In large-scale systems where internal RAM is not re- and control flags used by the CPU and two general- quired for data memory, internal RAM can be removed purpose user flags. The configuration of this 16-bit reg- completely from the address space and dedicated en- ister is shown below. tirely to register banks· and control functions such as 15 8 macroservice.You do this by clearing the RAMEN bit in the processor control register. When the RAMEN bit is RB2 RB1 RBO V I DIR IE BRK cleared, internal RAM can only be accessed by register addressing or internal control processes. Many instruc- 7 0 tions execute faster when internal RAM is disabled. S z I F1 AC FO P I BRKI I CY Figure 2. Memory Map Status Flags Control Flags V Overflow bit DIR Direction of string FFFFFH S Sign processing Z Zero IE Interrupt enable AC Auxiliary carry BRK Break (after every P Parity instruction) ,,/--------/ CY Carry RBn Current register XXFFFH Special Function bank flags External Registers Area [256 Bytes) ~? BRKI I/O trap enable XXFOOH XXEFFH FO, F 1 General-purpose Internal RAM [256 Bytes) user flags XXEOOH .,? The eight low-order bits of the PSW can be stored in register AH and restored using a MOV instruction. The only way to alter the RBn bits with software is to execute Vector an RETRBI or RETI instruction. Table (1K Bytes) OOOOOH Memory Map 1M Bytes Memory Space 83YL-6771A The p.PD70325 has a 20-bit address bus that can directly access 1 megabyte of memory. Figure 2 shows the memory map. The internal data area (IDA) is a 256-byte INSTRUCTIONS internal RAM area followed consecutively by a 256-byte The p.PD70325 instruction set is fully compatible with the special function register (SFR) area. V20 native mode instruction set. The V25 Plus is a All the data and control registers for on-Chip peripherals superset of the p.P08086/8088 instruction set with differ- and I/O are mapped into the SFR area and accessed as ent execution times and mnemonics. RAM. The p.P070325 does not support the V20 8080 emulation The IDA is dynamically relocatable in 4K-byte increments mode. by changing the value in the internal data base (lOB) register. The value in this register is assigned as the uppermost eight bits of the IDA address. The lOB register is accessed from two memory locations, FFFFFH and XXFFFH, where XX is the value in the lOB register. On reset, the internal data base register is set to FFH, which maps the IDA into the internal ROM space. How- ever, since internal ROM is not present on the p.PD70325, this does not present a problem. You can select any of the eight possible register banks, which occupy the entire internal RAM space. Multiple register bank selec- tion allows faster interrupt processing and facilitates multitasking. 9 "PD70325 (V25 Plus) NEe Enhanced Instructions variable-Length Bit Field Operation Instructions In addition' to thep.PDB086/B088 instructions, the Bit fields are a variable-length data structure that can p.PD70325 provides the following enhanced instructions. range from 1 to 16 bits. The p.PD70325 supports two separate operations on bit fields: insertion (INS) and Instruction Description . extraction (EXT). There are no restrictions on the posi- PUSH imm Pushes immediate data onto stack tion' of the bit field in memory. PUSH R Pushes 8 general registers onto stack Separate segment, byte offset, and bit offset registers POPR Pops 8 g'eneral registers from stack are used for insertion and extraction. Following the MULimm Executes 16-bit multiply of register or execution of these instructions, both the byte offset and memory contents by immediate data bit offset are left pointing to the start of the next bit field, SHL immB Shifts/rotates register or memory by ready for the next operation. Bit field operation instruc- SHR immB immediate data tions are powerful and flexible and are therefore highly SHRAimmB effective for graphics, high-level languages, and ROLimmB packing/unpacking applications. ROR immB Bit field insertion copies the bit field of specified length ROLCimm8 from the AW register to the bit field addressed by RORC imm8 DS1 :IY:reg8 (8-bit general-purpose register). The bit field CHKIND Checks array index against designated length can be located in any byte register or supplied as boundaries immediate data. Following execution, both IYand regB INM Moves a string from an I/O port to are updated to point to the start of the next bit field. memory Bit field extraction copies the bit field of specified length OUTM Moves a string from memory to an I/O from the bit field addressed by DSO:IX:regB to the AW port register. If the length of the bit field is less than 16 bits, PREPARE Allocates an area for a stack frame and the bit field is right justified with a zero fill. The bit field copies previous frame pointers length can be located in any byte register or supplied as DISPOSE Frees the current stack frame on a immediate data. Following execution, both IX and regB procedure exit are updated to point to the start of the next bit field. Figures 3 and 4 further illustrate bit field insertion and Unique Instructions bit field extraction, respectively. The p.PD70325 provides the following unique instruc- Packed BCD Instructions tions. Packed BCD instructions process packed BCD data Instruction Description either as strings (ADD4S, SUB4S, and CMP4S) or byte INS Inserts bit field format operations (ROR4 and ROL4). Packed BCD strings may be 1 to 254 digits in length. The two BCD EXT Extracts bit field rotation instructions rotate a Single BCD digit in the ADD4S Performs packed BCD string addition lower half of the AL register using the register or SUB4S Performs packed BCD string subtraction thememoryoperand. CMP4S Performs packed BCD string comparison ROL4 Rotates BCD digit left Bit Manipulation Instructions ROR4 Rotates BCD digit right The p.PD70325 provides five unique bit manipulation TEST1 instructions that allow you to test, set, clear, or comple- Tests bit ment a single bit in a register or memory operand. This SET1 Sets bit increases code r~adability as well as performance over CLR1 Clears bit the logical operations traditionally used to manipulate NOT1 Complements bit bit data. These instructions also give you additional control over on ..chip peripherals. . BTCLR Tests bit; if true, clear and branch REPC Repeat whi Ie carry set REPNC Repeat while carry cleared 10 NEe pPD70325(V25 Plus) Figure 3. Bit Field Insertion Bit length 15 0 Awl 111/ ~ ~. Bit offset Byte offset (IV) ~ I I I t VtJ f Byte boundary L~ 1 [tMem~ Segment base (051) 83-0001069 Figure 4. Bit Field Extraction Bit length Bit offset Byte boundary Segment base (OSO) 83-0001079 Additional Instructions FINT Finished interrupt; after completion Besides the V20 instruction set, the ItPD70325 provides (no operand) of a hardware interrupt request, this the following additional instructions. instruction must be used to reset the current priority bit in the in- service priority register, ISPR. Not Instruction Description for use with NMI or INT interrupt BTClR Bit test and if true, clear and service routines. Sfr.imm3, branch; otherwise, no operation short-label Repeat Prefixes STOP Power-down instruction; stops (no operand) oscillator Two repeat prefixes (REPC and REPNC) allow condi- RETRBI Return from register bank context tional block transfer instructions to use the state of the (no operand) switch interrupt CY flag as the termination condition. This allows inequal- ities to be used when working on ordered data, thus increasing performance when searching and sorting algorithms. 11 pPD70325 (V25 Plus) NEe Bank Switch Instructions Escape trap The CPU traps in an FP01,2 instruction to allow software to emulate the The following instructions allow the effective use of the floating-point processor since the register banks for software interrupts and multitasking. ",PD70325 does not support an external hardware coprocessor: Instruction Description BRKCS reg 16 Performs a high-speed software 1/0 trap If the 1/0 trap bit in the PSW is cleared, interrupt with context switch to a trap is generated on every IN or OUT register bank indicated by lower 3 instruction. Software can then provide bits of register 16. an updated peripheral address. This feature provides software portability TSKSW reg 16 Performs a high-speed task switch between different systems. to register bank indicated by lower 3 bits of register 16. The PC and PSW When executing software written for another system, it are saved in the old banks. PS and is better to implement 1/0 with on-chip peripherals to PSW save registers and the new PC reduce external hardware requirements. However, since and PSW values are retrieved from ",PD70325 internal peripherals are memory mapped, the new register bank's save areas. software conversion may be difficult. The 1/0 trap fea- MOVSPA Transfers both SS and SP of old ture allows for easy conversion from external peripherals register bank to new register bank to on-chip peripherals. after bank has been switched by an interrupt or BRKCS instruction. Interrupt Vectors MOVSPB reg16 Transfers SS and SP of current Table 1 lists the interrupt vectors beginning at physical register bank before switching to SS address OOH. External memory is required to service and SP of new register bank indi- these routines. By servicing interrupts via the macroser- cated by lower 3 bits of register 16. vice function or context switching, this requirement can be eliminated. INTERRUPT STRUCTURE Each interrupt vector is 4 bytes wide. To service a vector- The ",PD70325 can service interrupts generated by both ed interrupt, the lower addressed word is transferred to hardware and software. Software interrupts are serviced the PC and the upper word to the PS. See figure 5. through vectored interrupt processing. The following interrupts are provided. Figure 5. Interrupt fMc tor 0 Interrupt Description Vector 0 .T Divide error The CPU traps if a divide error occurs OOOH 001H I as the result of a DIV or DIVU instruction. 002H I 003H I Single step The interrupt is generated after every instruction if the aRK bit in the PSW is PS +- (OO3H, 002H) PC +- (OO1H, OOOH) set. 83-000112A Overflow Using the BRKV instruction, an interrupt can be generated as the Execution of a vectored interrupt occurs as follows: result of an overflow. (SP-1, SP-2) - PSW Interrupt The BRK 3 and BRK imm8 instructions (SP-3, SP-4) - PS instructions can generate interrupts. (SP-5, SP-6) - PC Arraybounds The CHKIND instruction generates an SP - SP-6 interrupt if the specified array bounds IE -0, BRK-O are exceeded. PS - vector high bytes PC - vector low bytes 12 NEe pPD70325 (V25 Plus) Table 1. Interrupt *to,. Be careful when assigning the priority of a given inter- Addres8 Vector Anlgned Use rupt group; the assignment is done by the three priority bits inonly one interrupt control register in each group. 00 0 Divide error 04 1 Break flag If interrupts from different groups occur simultaneously 08 2 NMI and the groups have the same priority level, the priority OC 3 BRK3 Instruction is as shown in table 2. 10 4 BRKV Instruction 14 5 CHKlND Instruction Table 2. Interrupt Sources 18 6 General purpose Interrupt Source 1C 7 FPO Instructions (Priority Within Group) Default 2O·2C 8·11 General purpose Group 1 2 3 Priority 30 12 INTSERO Onterrupt serial error, channel 0) 34 13 INTSRO Onterrupt serial receive, channel 0) Nonmaskable interrupt NMI 0 38 14 INTSTO Onterrupt serial transmit, channel 0) Timer unit INTTUO INTTU1 INTTU2 1 3C 15 General purpose DMA controller INTDO INTD1 2 40 16 INTSER1 Onterrupt serial error, channel 1) 44 17 INTSR1 Onterrupt serial receive, channel 1) External peripheral interrupt INTPO INTP1 INTP2 3 48 18 INTST1 Onterrupt serial transmit, channel 1) Serial channel 0 INTSERO INTSRO INTSTO 4 4C 19 1/0 trap Serial channel 1 INTSER1 INTSR1 INTST1 5 50 20 INTDO Onterrupt from DMA.. channel 0) 54 21 INTDl Onterrupt from DMA, channel 1) Time base counter INTTB 6 58 22 General purpose Interrupt request INT 7 5C 60 64 68 23 24 25 26 General purpose INTPO Onterrupt from peripheral 0) INTP1 Onterrupt from peripheral 1) INTP2 Onterrupt from peripheral 2) The priority of the currently active interrupt is stored in the ISPR special function register. Bits PR7-PRO corre- 1m ~. sp~nd to the eight possible interrupt request priorities. 6C 27 General purpose The ISPR keeps track of the priority of active interrupts 70 28 INTTUO Onterrupt from timer unit 0) 74 29 INTTU1 Onterruptfrom timer unit 1) by setting the appropriate bit of this register. The address 78 30 INTTU2 (Interrupt from timer unit 2) of this a-bit register is xxFFCH, and the format is shown 7C 31 INTTB Onterrupt from time base counter) below. 080·3FF 32·255 General purpose I PR7 I PRs PRs PR4 PR3 PR2 PR1 PRo Hardware Interrupt Configuration NMI and INT are system type external vectored inter- The V25 Plus features a high-performance on-chip con- rupts. NMI is not maskable via software, and is also troller capable of controlling multiple processing for recognized by the I'PD70325 during DMA demand- interrupts from up to 17 different sources (5 external, 12 release transfer. INT is maskable by the IE bit in the PSW internal). The interrupt configuration includes system and requires that an external device provide the interrupt interrupts that are functionally compatible with those of vector number. It is designed to allow the interrupt the V20N30 and unique high-performance microcontrol- controller to be expanded by the addition of an external ler interrupts. interrupt controller such as the I'PD71059. Interrupt Sources NMI, INTPO-INTP1 are edge-sensitive inputs. By select- ing the appropriate bits in the interrupt mode register, The 17 interrupt sources are divided into groups for these inputs can be programmed to be either rising- or management by the interrupt controller. Using software, falling-edge triggered. Bits ESO-ES2 correspond to each of the groups can be assigned a priority from 0 INTPO-INTP2, respectively, as shown in figure 6. (highest) to 7 (lowest). The priority of individual inter- rupts within a group is fixed in hardware. 13 pPD70325 (V25 Plus) NEe Figure 6. External Interrupt Mode Register (I NTIf) The twelve internal interrupts are: a ES2 a I ES1 l a E S a a IESNMI I INTTUO Timer unit 0 interrupt INTTU1 Timer unit 1 interrupt 7 Address xxF 40H a INTTU2 Timer unit 2 interrupt INTDO DMA channel 0 interrupt ES2 INTP2 Input Effective Edge INTD1 DMA channel 1 interrupt a Falling edge INTSERO Serial channel 0 error interrupt 1 Rising edge INTSRO Serial channel 0 receive interrupt ES1 INTP1 Input Effective Edge INTSTO Serial channel 0 transmit interrupt a Falling edge INTSER1 Serial channel 1 error interrupt 1 Rising edge INTSR1 Serial channel 1 receive interrupt ESO INTPO Input Effective Edge INTST1 Serial channel 1 transmit interrupt a Falling edge INTTB Time base counter interrupt Rising edge Table 3 shows the various interrupt request control ESNMI NMI Input Effective Edge registers, the options for service, their relative priorities, a Falling edge and the options for multiple control. 1 Rising edge The five external interrupts are: NMI Nonmaskable interrupt INT Cascaded PIC interrupt INTPO Interrupt from peripheral 0 INTP1 Interrupt from peripheral 1 INTP2 Interrupt from peripheral 2 Table 3. Interrupt Processing Interrupt Interrupt Macro Bank Priority Priority Priority Multiple Source Vector Service Switching Setting Between Groups Within Group Process Control NMI 2 No No Not available a Not accepted INT External No No Not available 7 Not accepted INTTUO 28 Yes Yes Available Accepted INTTU1 29 2 INTTU2 30 3 INTDO 20 No Yes Available 2 INTD1 21 2 INTPO 24 Yes Yes Available 3 INTP1 25 2 INTP2 26 3 INTSERO 12 No Yes Available 4 INTSRO 13 Yes 2 INTSTO 14 Yes 3 INTSER1 16 No Yes Available 5 INTSR1 17 Yes 2 INTST1 18 Yes 3 INTTS 31 No No Not available 6 14 NEe IIPD70325 (V25 Plus) Interrupt Processing Modes associated IRC register. The PC and PSW are automati- cally sorted in the save areas of the new register bank, Interrupts, with the exception of NMI, INT, and INTTB and the address of the interrupt routine is loaded from have high-performance capability and can be processed the vector PC storage register in the new register bank. in any ofthree modes: standard vector method (compat- ible with V20N30), register bank context switching (sup- As in the vectored mode, the IE and BRK bits in the PSW ported in hardware), and macroservice (SFR transfers). are cleared to zero. After processing, execution of the The processing mode for a given interrupt can be chosen RETRBI instruction must be executed to return control by enabling the appropriate bits in the corresponding to the original register bank and restore the former PC interrupt request control register. Each interrupt, except and PSW Figures 8 and 9 show register bank context INTand NMI, has its own associated IRC register. The switching and register bank return. general format for each of these registers is shown in This method of interrupt service offers a dramatic per- figure 7. formance advantage over normal vectored service be- All interrupt processing routines other than those for cause there is no need to store and retrieve datal NMI and INT must end with the execution of the FINT registers on the stack. This also allows hardware-based instruction. This instruction informs the interrupt con- real-time task switching in high-speed environments. troller that the current interrupt service routine is com- In addition to context switching, the I4PD70325 has a plete; if FINT is not executed within the service routine, task switch opcode (TSKSW) that allows multiple inde- subsequently only interrupts of higher priority will be accepted. pendent processes to be internally resident. Figure 10 shows the task switching function. In the vectored service mode, the CPU traps to a vector location. Figure B. Register Bank Context Switching Figure 7. Interrupt Request Control Registers RBi RB) (IRC) AW AW IF \ IMK \MSIINT\ ENCS \ 0 CW CW 7 o ow OW IF Interrupt Flag BW BW o No interrupt request generated SP SP 1 Interrupt request generated IMK Interrupt Mask BP BP o Open (interrupts enabled) IX IX 1 Closed (interrupts disabled) IV IV MS/INT o Interrupt Response Method Vector interrupt or register bank switching OS1 r:::> OS1 1 Macroservice function PS PS ENCS Register Bank Switching Function SS SS o Not used 1 Used OSO OSO Interrupt Group Priority (0-7) Save PC Save PC 000 Highest (0) J, Save psw Save psw 1 1 1 Lowest (7) Vector PC y PC ~ Vector PC Register Bank Switching. Reserved y PSW I Reserved Register bank context switching allows interrupts to be 83SL~21A processed rapidly by switching register banks. After an interrupt, the new register bank selected has the same bank number (0-7) as the priority programmed in the 15 "PD70325 (V25 Plus) NEe Figure 9. Register Bank Return Figure 10. Task Switching RBi RBI Current New AW AW AW AW CW CW CW CW OW OW OW OW BW BW BW BW SP SP SP SP BP BP BP BP IX IX IX IX IV IV OS1 ¢:::J IV OS1 OS1 q IV OS1 PS PS PS PS SS SS SS SS OSO OSO oso OSO Save PC Save PSW Save PC Save PSW Save PC Save psw H PC r---- Save PC Save psw +1 il-f psw l~ Vector PC PC 1 Vector PC Vector PC Vector PC Reserved Reserved Reserved RB L Reg 16 Reserved 4 psw I RB Register bank field 83SL-6822A 83SL-6823A Interrupt Factor Register Figure 11. Interrupt Factor Register (IRQS) The IkPD70325 provides an additional register that stores the interrupt vector number of the last-serviced interrupt o I 0 I 0 Interrupt Vector 7 5 4 Address xxFE FH 0 request. The register is located in special-function mem- ory and is read only in 8-bit operations. This register Interrupt Factor Interrupt Vector facilitates the use of one register bank to service multiple INTTUO 1CH interrupt sources, particularly those within the same INTTU1 IDH group (interrupts within the same group will all context INTTU2 IEH switch to the same register bank). INTDO 14H The interrupt vector is stored in the IROS register as INTD1 15H shown in figure 11, and is retained unti I the next interrupt request is accepted. The value of the IROS register is not INTPO 18H altered by NMI, INT, or macroservice transfers. It is INTP1 19H generally recommended that the IROS register be read INTP2 1AH before the EI bit is set within the interrupt service routine INTSERO OCH to assure that its contents wi II not be altered by multiple INTSRO ODH processing routines. INTSTO OEH INTSER1 10H INTSR1 11H INTST1 12H INTTB 1FH 16 NEe IIPD70325 (V25 Plus) Macroservice Function Setting the macroservice mode requires programming the corresponding macroservice control register. Each The macroservice function (MSF) is a special micropro- individual interrupt, excluding INT, NMI, serial error, gram that acts as an internal DMA controller between DMA, and TBC, has its own associated register. Figure 13 on-chip peripheral special-function registers and mem- shows the generic format for all MSC registers. ory. The MSF greatly reduces the software overhead and CPU time that other processors would require for regis- Figure 13. Macroservice Control Registers ter save processing, register returns, and other handling (IISC) associated with interrupt processing. If the MSFis selected for a particular interrupt, each time I MSM21 MSM1 I MSMo I DIR o the requestis received, a byte or word of data is trans- 7 o ferred between an SFR and memory without interrupting the CPU. Each time a request occurs, the macroservice Macroservlce Mode counter is decremented. When the counter reaches zero, 000 Normal (a-bit transfer) an interrupt to the CPU is generated. The MSF also has o0 1 Normal (16-bit transfer) a character search option. When selected, every byte 100 Character search (a-bit transfer Other combinations are not allowed. transferred is compared to an 8-bit search character and an interrupt is generated if a match occurs or if the DIR Data Transfer Direction macroservice counter reaches zero. o Memory to SF R SF R to memory Like the NMI, INT, and INTTB, the two DMA controller interrupts (lNTDO and INTD1) do not have MSF capabil- Macroservlce Channel ity. 1m. 000 Channel 0 Eight 8-byte macroservice channels are mapped into 1 1 1 Channel 7 ~ internal RAM from XXEOOH to XXE3FH. Each macro- ------------------- J.. service channel contains all necessary information to TIMER UNIT execute the macroservice process. Figure 12 shows the components of each channel. The #kPD70325 (figure 14) has two programmable 16-bit interval timers (TMO and TM1) on chip, each with vari- Figure 12. Macroservice Channels able input clock frequencies. Each of the two 16-bit timer registers has an associated 16-bit modulus register (MDO and MD1). Timer 0 operates in the interval timer mode or one-shot mode; timer 1 has only the interval Upto3FH timer mode. XXE08H Interval Timer Mode MSS M.S. Channel 0 In this mode, TMO/TM1 are decremented by the selected MSP input clock, and, after counting out, the registers are automatically reloaded from the modul us registers and Reserved SCHR counting continues. Each time TM1 counts out, inter- rupts are generated through TF1 and TF2 (timer flags 1 SFRP MSC XXEOOH [Internal RAM] and 2). When TMO counts out, an interrupt is generated 1----16 Bits---l through TFO. The timer-out signal can be used as a square-wave output whose half-cycle is equal to the MSS = Macro service segment count time. MSP = Macro service pOinter SCHR = Search character Two input clocks derived from the system clock are SFRP = Special function register pOinter SCLK/6 and SCLK/128. Typical timer values shown be- MSC = Macro service counter low are based on fosc = 10 MHz and fSCLK = fosc/2. 49·001345A Clock Timer Resolution Full Count SCLK/6 1.2 #kS 78.643 #kS SCLK/128 25.6 #kS 1.678 s 17 pPD70325 (V25 Plus) NEe Figure 14. Timer Unit Block Diagram Figure 15. Timer Control Register 0 (TMCO) TSO 'TClKa' MSO 'MClKa' ENTO' AlV 'MOD1' MODo' 7 Address xxF90H 0 I fSCLK TSO TMO In Either Mode Idivided bY~ a Stop countdown 1 Start countdown 12: ~L-':""':'---1 MOD1 MOOD TClKO TMO Register Clock Frequency 0 0 0 fscu )( ~ IOAOR . I~ _IOMRO_ - IHMOR 1+ R/W I , tOAMR~1 -I tWMRL IOMSO II tscc- 1\ !--IOMRMS- I---- 1\ j IOAMS- ~tWMSL-1 1\ REFRQ ~ 83-004309C 39 ,.,PD70325 (V25 Plus) NEe Memory Write 1 - - - - - B 1 - - - - + I - - - - B2 -------" CLKOUT ~I+---\,-------,YK)_\~I IOKA- ) K !+-IOAOW'" l..-t HMA - 07- 0 0 tSOM . I-IHMowr; I R/Iii \ MREQ +-toAMRl , tWMRL 1I -tscc- 1\ I+-tOMRMS- \ V tOAMS- ~tWMSL _ _ IOSTB ~ REFRQ ~ \1+----."""----~tW-TCL----+l( -tOMRTC 83-004310C 40 NEe ,.,PD70325 (V25 Plus) //ORad tOKA ~ K I+------,- tOAOR _ _ _ rtHISA- l 1 tOISO tHIS OR I---- R/W / I\- MSTB I-tOAIS-1 \ tWISL . II tscc-- m IOSTB "- \. DMAAK1 DMAAKO 83-004311C 41 ,.PD70325 (V25 Plus) NEe I/O Write 81 I 82 I ICYK "I ~I CLKOUT J ~ A19-AO ) ~K tDADW rIHISA ..... k. F ISOIS . IHISDW R/W \ V ~ I I-IDAIS ..... IWISL . I+-'------- t s e e - REFRQ " ill f\ 1\ 83"004312C 42 NEe pPD70325 (V25 Plus) DMA, I/O 10 Memory ~I--------B1--------41---------B2------~ }=1.--------t CYK -------; eLKOUT ----1'L-----..\~---J ~\~----J!~\~---Jlr--------.\ tOKA- >~ 'K '. R/Vi \ V I-tOAMR- tWMRL I--tHMA-- ~ / \ j..-tOMRMS- tscc ) f\ tOAMS~ ~tWMSL_ f\ _tSOAOO __ DMARQO DMARQ1 ~ j.-tHOAOO .... ~ V tWOMRL 1\ -tOOATC- r tWTCL II 83-004313C 43 JlPD70325 (V25 Plus) NEe DIM, IIemory to I/O 1------B1-----+-----B2---~ 1+----tCYK----+t CLKOUT I--tOKA_ )( K R/W J 1\ I--tOAMR_ tWMRL \+-tHMA_ Ij 1\ " , tscc ~ \ tOAMS ~twMSL--l 1\ I---tSOAOQ---. DMARQO DMARQ1- '" I+-tHOAOQ .... '\ I tWOMWL---l TC1-TCO N: ~tOOATC_ I tWTCL I 83-004314C 44 !\fEe pPD70325 (V25 Plus) Refresh ~ __-B1 ___-)----B2-__-J I+----ICYK----.l ~ ~\'--" ·-----"\\~r IOKA ___ A19-AO ) ~K D7-DO R/W J 1\ ~ 11\ f--IOARF1 IWRFL _IHRFA_ - \ ~ ISCC """---- 83-00431SC CLKOUT----------------------------------~l~-J ~ ~ IWRSL1 II RESET 83-0043168 45 "PD70325 (V25 Plus) NEe CLKOUT __ ~~RSU~ _ _ RESET - ~~ ----.Y 83-0043178 READY 1 f - - - - B1 I BAW ---'---+--- B A W - - - + - - - B 2 - - 1 \--------/ READY ____________________ IseRY FrIHCRY -J~ I '\~__________~_____________________________ _ 83-0043188 READY 2 1 - - - - B 1 - - - + - - - - BAW - - - + - - - - BAW - - - - + - - - BW - - - + - - - - B 2 - - 1 - \ n=2 n=3 I+-tHCRY' tSCRY' L n=2 In = 3 READY \ 1/ • tSCRY [READY setup time] and tHCRY [READY hold time] are a function of T and n. Timings shown are examples for n = 2 and n = 3. 83-0043196 46 1'fEC pPD70325 (V25 Plus) HLORQ/ HLlJAK 1 Bus control * 1+-----tDHQHA---~ ~--------tWHAL-----------~ *A19-AO, 07-00, MREQ, MSTB, IOSTB, R/W 83-0043208 HLORQ/HLIJAK 2 CLKOUT HLORQ ~----tWHQL---~ Bus control * --I---------;~l_--+---------------_{ IDKH~----~Il~-----:======~~~~~~----tD-H-Q-C------------~_-_-_-_-_-_~_____________ * A19-AO, 07-00, MREQ, MSTB, IOSTB, R/W 83-0043218 IN7P, OMARQ Input CLKOUT := = = = = = = - t~W~'Q-L- - - - - - - - - - - - - ~ INTp, OMARQ* ~-------tWIQH-------~ * INTP2-INTPO, OMARQ1-0MARQO 83-0043228 47 IIPD70325 (V25 Plus) POLL Input CLKOUT _ .. 1. ..----tSPLK_ _ POLL~ _ _ _---J! 83-0043236 Nllllnput CLKOUT NMI --11+-:---twNIH-----.jnl4--.~~~~~=-twN-,L====--=--:f 83-0043246 CTSlnput CLKOUT 1~~.~tW-CTL-==f 83-0043256 48 t\'EC pPD70325 (V25 Plus) INTR/IN71UC CLOOUT r~---+--~ INTR tOKIA tHIAIQ D7-DO--------------~~----------------+_--------------------------~ Serial Transmit .-------------------------------------------------------------------------~ 83-004326B m ~. CLKOUT tCYTK \ I r\ tWSTL I I tWSTH tHTKO TxD tOTKO )( C 83-004441 B Serial Receive CLKOUT tCYRK \ I \ tWSRL tWSRH RxD ) K ~tSROK_ tHKRD 83-004332B 49 ,.,PD70325 (V25'Plus), NEe INSTRUCTION SET Identifier Description Instructions, grouped according to function, are de- scribed in a table, near th~ end of this data ,sheet. far-proc Procedure located In another program segment Descriptions'include source code, operation, opcode, near-label Label In the current program segment number of bytes, and flag status. Supplementary infor- short- Label between -128 and +127 bytes from the end mation applicable to the instruction set is contained, in label of Instruction the following tables. far-label Label In another program segment • Symbols and Abbreviations memptr16 Word containing the offset of the memory location within the current program segment to which • Flag Symbols control Is to be transferred • 8- and 16-Bit Registers. When mod = 11, the register memptr32 Double word containing the offset and segment is specified in the operation code by the byte/Word base address of the memory location to which operand rN =, 0/1) and reg (000 to 111). control Is to be transferred • Segment Registers. The segment register is specified regptr16 16-blt register containing the offset of the memory in the operation code by sreg (00,01, la, or 11). • location within the program segment to which control Is to be transferred • Memory Addressing. The memory addressing mode is specified in the operation code by mod (00, 01, or 10) pop-value Number of bytes of the stack to be discarded (0 to 64K bytes, usually even addresses) and mem (000 through 111). fp-op Immediate data to Identify the Instruction code of • Instruction Clock Count. This table gives formulas for the external floating-point operation calculating the number of clock cycles occupied by each type of instruction. The formulas, which depend R Register set on byte/word operand and RAM enable/disable, have W Word/byte field (0 to 1) variables such as EA(effective address), W (wait reg Register field (000 to 111) states), and n (iterations or string instructions). mem Memory field (000 to',111) Symbols sndAbbrevistions mod Mode field (00 to 10) Identifier Description S:W When S:W - 01 or 11, data - 16 bits. At all other times, data - 8 bits. reg 8- or 16-blt general-purpose register X,XXX, Data to Identify the Instruction code of the external reg8 8-blt general-purpose register YYY, zzz floating-point arithmetic chip reg16 16-bit general-purpose register AW Accumulator (16 bits) dmem 8- or 16-bit direct memory location AH Accumulator (high byte) mem 8- or 16-blt memory location AL Accumulator (low byte) mem8 8-blt memory location BP Base pointer register (16 bits) mem16 16-bit memory location BW BW register (16 bits) mem32 32-bit memory location BH BW register (high byte) sfr 8-bit special function register location BL BW regl ster (low byte) Imm Constant (0 to FFFFH) CW CW register (16 bits) Imm16 Constant (0 to FFFFH) CH CW register (hIgh byte) Imm8 Constant (0 to FFH) CL CW register (low byte) imm4 Constant (0 to FH) OW OW register (16 bits) Imm3 Constant (0 to 7) DH OW register (hIgh byte) acc AW or AL register DL OW register (low byte) sreg . Segment register SP Stack pointer (16 bits) src-table Name of 256-byte translation table PC Program counter (16 bits) src-block Name of block addressed by the IX register PSW Program status word (16 bits) dst-block Name of block addressed by the IV register near-proc Procedure within the current program segment 50 NEe IIPD70325 (V25 Plus) Symbols and Abbreviations (conI) Rag Symbols Identifier Description Identifier Description IX Index register (source) (16 bits) (blank) No change IY Index register (destination) (16 bits) o Cleared to 0 PS . Program segment register (16 bits) Set to 1 SS Stack segment register (16 bits) x Set or cleared according to the result DSo Data segment 0 register (16 bits) u Undefined Data segment 1 register (16 bits) Value saved earlier Is restored AC Auxiliary carry flag CY Carry flag 8- and 16-Bit Registers (mod = 11) P Parity flag reg w-o W-1 000 AL AW S Sign flag 001 CL CW Z Zero flag 010 DL OW DIR Direction flag 011 BL BW IE Interrupt enable flag 100 AH SP v Overflow flag 101 CH BP BRK Break flag 110 DH IX MD Mode flag 111 BH IY (...) Values In parentheses are memory contents disp ext-disp8 Displacement (8 or 16 bits) 16-bit displacement (sign-extension byte + 8-bit displacement) Segment Registers sreg Register ED 00 DS1 temp Temporary register (8116/32 bits) 01 PS tmpcy Temporary carry flag (1-blt) 10 SS seg Immediate segment data (16 bits) 11 DSo offset Immediate offset data (16 bits) Transfer direction lIemory Addressing + Addition mem mod = 00 mod = 01 mod = 10 Subtraction 000 BW+ IX BW + IX + disp8 BW + IX + disp16 x Multiplication 001 BW+ IV BW + IV + disp8 BW + IV + disp16 + Division 010 BP + IX BP + IX + disp8 BP + IX + disp16 % Modulo 011 BP + IV BP + IV + disp8 BP + IV + disp16 AND Logical product 100 IX IX + dlspS IX + disp16 OR Logical sum 101 IV IV + disp8 IV + disp16 XOR Exclusive logical sum 110 Direct BP + dlsp8 BP + disp16 XXH Two-digit hexadecimal value 111 BW BW + dlsp8 BW + disp16 XXXXH Four-digit hexadecimal value 51 pPD70325 (V25 PIUs) NEe Instruction Clock Count. Mnemonic Operand Clocks Mnemonic Operand Clocks ADD reg8, reg8 2 CALL near-proc 22+2w [18+2W) reg16, reg16 2 regptr16 22+2W [18+2W) reg8, mem8 EA+6+W memptr16 EA+26+4W [EA+24+4W] reg16, mem16 EA+8+2W far-proc 36+4W [34+4WJ memptr32 EA+36+8W [EA+24+8W] mem8, reg8 EA+8+2W [EA+6+W] reg16, mem16 EA+12+4W [EA+8+2W] CHKlND EA+26+4W reg8,Imm8 5 CLR1 CY 2 reg16,Imm8 5 DIR 2 mem16, Imm16 6 reg8, CL 8 mem8,Imm8 EA+9+2W [EA+7+2W] reg16, CL 8 mem16,Imm8 EA+9+2W [EA+7+2W] mem8, CL EA+14+2W [EA+12+W] mem16, Imm16 EA+14+4W [EA+10+4W] mem16, CL EA+18+4W [EA+14+2W] AL,Imm8 5 reg8,Imm3 7 AW,lmm16 6 reg16,Imm4 7 ADD4S 22+(27-i:3W)n [22+(25+3W)n] mem8,Imm3 EA+11 +2W [EA+9+W] ADDC Same as ADD mem16,Imm4 EA+15+4W [EA+10+2WJ ADJ4A 9 CMP reg8, reg8 2 reg16, reg16 2 ADJ4S 9 reg8, mem8 EA+6+W ADJBA 17 reg16, mem16 EA+8+2W ADJBS 17 mem8, reg8 EA+6+W AND reg8, reg8 2 mem16, reg16 EA+8+2W reg16, reg16 2 reg8,ImmS 5 reg8, memS EA+6+W reg16,ImmS 5 reg16, mem16 EA+8+2W reg16, Imm16 6 memS, regS EA+S+2W [EA+6+W] memS,Imm8 EA+7+W mem16, reg16 EA+12+4W [EA+S+2W] mem16,ImmS EA+10+2W mem16, Imm16 EA+10+2W reg8,ImmS 5 reg16, Imm16 6 AL,Imm8 5 AW, imm16 6 memS, imm8 EA+9+2W [EA+7+2W] mem16, Imm16 EA+14+4W [EA+10+4W] CMP4S 22+ (23+2W)n Bcond (conditional branch) S or 15 CMPBK memB, mem8 23+2W [19+2W] mem16, mem16 27+4W[21 +2W] BCWZ S or 15 CMPBKB 16+ (21+2W)n BR near-label 12 short-label 12 CMPBKW 16+ (25+4W)n regptr16 13 CMPM memB 17+W memptr16 EA+17+2W mem16 19+2W far-label 15 CMPMB 16+(15+W)n memptr32 EA+25+4W CMPMW 16+(17+2W)n BRK 3 55+ 10W [43+ 10W] CVTBD 19 immS 56+10W [44+10W] CVTBW 3 BRKCS 15 CVTDB 20 BRKV 55+ 10W [43+ 10W] CVTWL S BTCLR 29 BUSLOCK 2 52 NEe pPD70325 (V25 Plus) Instruct/on Clock Count. (conI) Mnemonic Operand Clocks Mnemonic Operand Clocks OBNZ 8 or 17 MOV reg8. reg8 2 reg16. reg16 2 OBNZE 8 or 17 reg8. mem8 EA+6+W OBNZNE 8 or 17 reg16. mem16 EA+S+2W OEC regS 5 mem8. regS EA+4+W [EA+2] reg16 2 mem16. reg16 EA+6+2W [EA+2] memS EA+11+2W [EA+9+2W] regS.lmmS 5 mem16 EA+15+4W [EA+11+4W] reg16. Imm16 6 01 4 memSjlmmS EA+5+W OISPOSE 12+2W mem16. Imm16 EA+5+2W OIV AW, regS 46-56 AL. dmemS 9+W AW, mem8 EA+48+W to EA+58+W AW, dmem16 11+2W OW,AW, reg16 54·64 dmemS.AL 7+W [5] OW; AW, EA+58+2W to EAt6S+2W dmem16. AW 9+2W [5] mem16 sreg. reg16 4 OIVU AW, regS 31 sreg. mem16 EA+10t2W AW, mem8 EA+33+W reg16. sreg 3 OW,AW, reg16 39 mem16. sreg EA+7+2W [EA+3] Ow, AW, mem16 EA+43+2W AH. PSW 2 OSO: 2 PSw, AH 3 OS1: EI EXT regS. regS 2 12 41·121 OSO. reg16. memptr32 OS1. reg16. memptr32 EA+19+4W EA+19+4W Em regS.lmm4 42·122 MOVBK memS. memS 2O+2W [16+W] FINT 2 mem16. mem16 16+ (20+ 4W) n [16+ (12+ 2W)n] FP01 60+ 10W [48+ 10W] MOVBKB memS. memS 16+(16+2W)n [16+(12+W)n] FP02 60+ 10W [48+ 10W] MOVBKW mem16. mem16 24+4W [20+2W] HALT 0 MOVSPA 16 IN AL.lmm8 14+W MOVSPB 11 AW,lmm8 16+2W MUL AW, AL. reg8 31·40 AL.OW 13+W AW, AL. mem8 EA+33+W to EA+42+W AW,OW 15+2W OW,AW, AW, 39·4S INC regS 5 reg16 reg16 2 OW,AW, AW, EA+43+2W to EA+52+2W mem16 mem8 EA+11+2W [EA+9+2W] mem16 EA+15+4W [EA+11+4W] reg16. reg16. 39·49 Imm8 INM memS. OW 19+2W [17+2W] reg16. mem16. EA+43+2Wto EA+53+2W mem16. OW 21 +4W [17+4W] Imm8 mem8. OW 1S+(13+2W)n [18+(11+2W)n] reg16. reg16. 40·50 mem16. OW 18+ (15+4W)n [18+ (11 +4W)n] imm16 INS reg8. reg8 63·155 reg16. EA+44+2Wto EA+54+2W reg8.lmm4 64·156 mem16. Imm16 LOEA EA+2 MULU reg8 24 mem8 EA+26+W LOM mem8 12+W mem16 16+ (12+2W)n reg16 32 mem16 EA+34+2W LOMB mem16 14+2W LOMW mem8 16+(10+W)n 53 pPD70325 (V25 Plus) NEe Instruction Clock Counts (cont) Mnemonic Operand Clocks Mnemonic Operand Clocks NEG regS 5 PREPARE imm16, immS immS = O:27+2W reg16 5 immS = 1:39+4W immS = n > 1:46+19 memS EA+11+2W [EA+9+W] (n-1)+4W mem16 EA+15+4W [EA+11+2W] PS: 2 Nap 3 PUSH reg16 10+2W [6] NOT regS 5 mem16 EA+1S+4W [EA+14+4W] reg16 5 OS1 11+2W [7] memS EA+11+2W [EA+9+W] PS 11+2W [7] mem16 EA+15+4W [EA+11+2W] SS 11 +2W [7] NOn CY 2 OSO 11 +2W [7] regS. CL 7 PSW 10+2W[6] reg16, CL 7 R S2+16W [50] memS, CL EA+13+2W [EA+11+W] immS 13+2W[9] mem16, C.L EA+17+4W [EA+13+2W] imm16 14+2W [10] regS. imm3 6 REP 2 reg16, imm4 6 REPE 2 memS, imm3 EA+1O+2W [EA+S+W] mem16, imm4 EA+14+4W [EA+10+2W] REPZ 2 OR regS, regS 2 REPC 2 reg16, reg16 2 REPNC 2 regS, memS EA+6+W REPNE 2 reg16, mem16 EA+S+2W REPNZ 2 memS, regS EA+S+2W [EA+6+W] mem16, reg16 EA+12+4W [EA+S+2W] RET null 20+2W pop-value 20+2W regS, immS 5 reg16, imrn16 6 null 29+4W pop-value 30+4W memS, immS EA+9+W [EA+7+W] mem16, imm16 EA+14+4W [EA+10+4W] RETI 43+6W [35+2W] AL, immS 5 RETRBI 12 AW, imm16 6 ROL regS, 1 S OUT immS, AL 10+W reg16, 1 S immS,AW 10+2W memS,1 EA+14+2W [EA+12+W] Ow, AL 9+W mem16,1 EA+1S+4W [EA+14+2W] Ow, AW 9+2W regS, CL 11+2n OUTM Ow, memS 19+2W [17+2W] reg16, CL 11+2n OW,mem16 21 +4W [17+4W] memS, CL EA+17+2W+2n Ow, memS 1S+(13+2W)n [EA+15+W+2n] [1S+(11 +2W)n] mem16, CL EA+21 +4W+2n Ow, mem16 1S+(15+4W)n [EA+17+2W+2n] [1S+(11+4W)n] regS,immS 9+2n POLL 0 reg16, imm8 9+2n POP reg16 12+2W memS, immS EA+13+2W+2n mem16 EA+16+4W [EA+12+2W] [EA+11 +W+2n] mem16,ImmS EA+17+4W+2n OS1 13+2W [EA+13+2W+2n] SS 13+2W ROL4 regS 17 OSO 13+2W memS EA+1S+2W [EA+16+2W] PSW 14+2W R S2+16W [58] 54 NEe pPD70325 (V25Plus) InstructiDn Clock Count. (conI) Mnemonic Operand Clocks Mnemonic Operand Clocks ROLC Same as ROL TEST1 reg8, CL 7 reg16, CL 7 ROR Same as ROL mem8, CL EA+11+W ROR4 reg8 21 mem16, CL EA+13+2W mem8 EA+24+2W [EA+22+2W] reg8,lmm3 6 RORC Same as ROL reg16,lmm4 6 SET1 CV 2 mem8,lmm3 EA+8+W DIR 2 mem16,lmm4 EA+10+2W reg8, CL 7 TRANS 10+W reg16, CL 7 TRANSB 10+W mem8, CL EA+13+2W [EA+11 +W] mem16, CL EA+17+4W [EA+13+2W] TSKSW 11 reg8,lmm3 6 XCH reg8, reg8 3 reg16,lmm4 6 reg16, reg16 3 mem8,lmm3 EA+10+2W [EA+8+W] reg8, mem8 EA+10+2W [EA+8+2W] mem16,lmm4 EA+14+4W [EA+10+2W] reg16, mem16 EA+14+4W [EA+10+4W] SHL Same as ROL mem8, regS EA+10+2W [EA+S+2W] mem16, reg16 EA+14+4W [EA+10+4W] SHR Same as ROL AW, reg16 4 SHRA Same as ROL reg16, AW 4 SS: 2 1m XOR Same as AND STM memS 12+2 [10] mem16 16+ (10+2W)n [16+(6+2W)n] Notes: STMB memS 16+ (S+W)n [16+(6+W)n] (1) If the number of clocks Is not the same for RAM enabled and RAM disabled conditions, the RAM enabled value is listed first, fol- STMW mem16 14+2W [10] lowed by the RAM disabled value In brackets; for example, STOP 0 EA+S+2W [EA+6+W] SUB Same as ADD (2) Symbols In the Clocks column are defined as follows. EA = additional clock cycles required for calculation of the SUB4S 22+ (27+3W)n effective address [22+ (25+3W)n] = 3 (mod 00 or 01) or 4 (mod 10) SUBC Same as ADD W = number of wait states selected by the wrc register n = number of iterations or string instructions TEST regS, regs 4 reg16, reg16 4 regS, memS EA+S+W reg16, mem16 EA+10+2W memS, regS EA+S+W mem16, reg16 EA+10+W regS, immS 7 reg16, imm16 S memS, immS EA+11 +W mem16, imm16 EA+11 +2W AL, immS 5 AW, imm16 6 55 pPD70325 (V25Plus) NEe Execution Clock Counts for Operations Byte Word RAM Enable RAM Disable RAM Enable RAM Disable Context switch interrupt (Note 1) 27 27 DMA (Single-step mode) (Note 2) 8+2W 8+2W 14+4W 14+4W DMA (Demand release mode) (2+W)n (2+W)n (4+2W)n (4+2W)n DMA (Burst mode) 3.5 + (4+ 2W) (n-1) 3.5 + (4+2W)(n-1) 9.5 +2W+ (4+ 2W) (n-1) 9.5 +2W+ (4+2W)(n-1) DMA (Single-transfer mode) 2+W 2+W 4+2W 4+2W Interrupt (INT pin) (Note 3) 62+6W 62+6W Macroservice, sfr .... mem (Note 2) 24+W 19+W 26+2W 21+2W Macroservice, mem .... sfr 22+W 20+W 22+2W 22+2W Macroservice (Search char mode), sfr ~ mem 27+W 27+W Macroservice (Search char mode), mem ~ sfr 37+W 34+W Vectored priority interrupts (including NMI) 58+10W 58+10W (Note 1) N = number of clocks to complete the instruction currently executing. n = number of transfers Notes: (1) Every interrupt has an additional associated latency time of 27 + N clocks. During the 27 clocks, the interrupt controller performs some overhead tasks such as arbitrating priority. This time should be added to the above listed interrupt and macroservice execution times. (2) The DMA and macroservice clock counts listed are the required number of CPU clocks for each transfer. (3) When an external interrupt is asserted, a maximum of 6 clocks is required for internal synchronization before the interrupt request flag is set. For an internal interrupt, a maximum of 2 clocks is required. Bus Controller Latency Clocks Latency Mode Typ Max Hold request Refresh active 9+3W Intack active 10+2W No refresh or intack 7+2W DMA request Burst 3 14+2W (Notes 1, 2) Single-step 3 14+2W Demand release 3 14+2W Single-transfer 4 14+2W Notes: (1) The listed DMA latency times are the maximum number of clocks when a DMA request is asserted until DMAAK or MREQ goes low in the corresponding DMA cycle. (2) The test conditions are: no wait states, no interrupts, no macro- service requests, and no hold requests. 56 NEe pPD70325 (V25 Plus) Instruction Set Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S z Data Transfer MOV reg, reg reg +- reg 0 0 0 0 W 2 reg reg mem, reg (mem) +- reg 0 0 0 0 0 W 2-4 mod reg mem reg,mem reg +- (mem) 0 0 0 0 W 2-4 mod reg mem mem,imm (mem) +- imm 0 0 0 W 3-6 mod 0 0 0 mem reg,imm reg +- imm 0 W reg 2-3 acc,dmem When W = 0: AL +- (dmem) 0 0 0 0 0 W 3 WhenW= 1:AH +- (dmem + 1), AL +- (dmem) dmem,acc When W = 0: (dmem) +- AL 0 0 0 0 W 3 WhenW= 1 : (dmem + 1) +- AH, (dmem) +- AL sreg, reg16 sreg +- reg16 sreg: SS, OSO, OS1 0 0 0 0 2 sreg,mem16 sreg +- (mem16) sreg : SS, OSO, OS1 mod 0 0 0 0 0 sreg sreg reg mem 0 2-4 1m reg16,sreg reg16 +- sreg 0 0 0 0 0 2 0 sreg reg mem16,sreg (mem16) +- sreg 0 0 0 0 0 2-4 mod 0 sreg mem OSO,reg16, reg16 +- (mem32), 0 0 0 0 2-4 mem32 OSO +- (mem32 + 2) mod reg mem OS1,reg16, reg16 +- (mem32), 0 0 0 0 0 2-4 mem32 OS1 +- (mem32 + 2) mod reg mem AH,PSW AH +- S, Z, x, AC, x, P, x, CY 0 0 PSW,AH S, Z, x, AC, x, P, x, CY +- AH 0 0 0 x x x x x LOEA reg16, mem16 reg16 +- mem16 0 0 0 0 2-4 mod reg mem TRANS src-table AL +- (8W + AL) 0 0 XCH reg, reg reg ~ reg 0 0 0 0 W 2 reg reg mem, reg (mem) ~reg 0 0 0 0 W 2-4 orreg,mem mod reg mem AW,reg16 AW~reg16 0 0 0 reg orreg16, AW 57 pPD70325 (V25 Plus) NEe Instruction Set (cont) Operation Code Flags Mflemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CV V P S Z Repeat Prefixes REPC While CW ;II!: 0, the next byte of the 0 0 0 0 primitive block transfer instruction is executed and CW is decremented (-1). If there is a waiting interrupt, it is processed. When CV ;II!: 1, exit the loop. REPNC While CW ;II!: 0, the next byte ofthe 0 0 0 0 0 primitive block transfer instruction is executed and CW is decremented (-1). If there is a waiting interrupt, it is processed. When CV ;II!: 0, exitthe loop. REP While CW ;II!: 0, the next byte of the 0 0 REPE primitive block transfer instruction is REPZ executed and CW is decremented (-1 ). If there is a waiting interrupt, it is processed. Ifthe primitive block transfer instruction is CMPBK or CMPM and Z;II!: 1, exit the loop. REPNE While CW ;II!: 0, the next byte of the 0 0 0 REPNZ primitive block transfer instruction is executed and CW is decremented (-1). If there is a waiting interrupt, it is processed. If the primitive block transfer instruction is CMPBK or CMPM and Z ;II!: 0, exit the loop. Primitive Block Transfer MOVBK dst-block, When W = 0: (IV) ~ (IX) 0 0 0 0 W src-block DIR = 0: IX ~ IX + 1, IV ~ IY + 1 DIR = 1:IX ~ IX-1,IY ~ IY-1 When W = 1: (IY + 1, IY) ~ (IX + 1,IX) DIR = 0: IX ~ IX + 2, IY ~ IY + 2 DIR = 1: IX ~ IX-2,IY ~ IY-2 CMPBK src-block, When W = 0: (IX) -(IY) 0 0 0 W x x x x x x dst-block DIR = 0: IX ~ IX + 1, IY ~ IY + 1 DIR= 1:IX ~ IX-1,IY ~ IY-1 WhenW = 1:(IX+ 1,IX)-(IY + 1,IY) DIR = 0: IX ~ IX + 2, IY ~ IY + 2 DIR = 1:IX ~ IX-2,IY ~ IY-2 CMPM dst-block When W = 0: AL- (IY) 0 0 W x x x x x x DIR=O:IY ~ IY+ 1;DIR=1:IY ~ IV-1 WhenW= 1:AW-(lY + 1,IY) DIR=O:JY ~ IY +2;DIR= 1:IY ~ IY-2 LDM src-block When W = 0: AL ~ (IX) 0 0 0 W DIR=O:IX~ IX+ 1;DIR= 1:IX~ IX-1 WhenW= 1:AW ~ (IX+ 1,IX) DIR=O:IX ~ IX+2;DIR= 1 :IX ~ IX-2 STM dst-block When W = 0: (IV) ~ AL 0 0 0 W DIR=O:IY ~ IY+ 1;DIR= 1:IY ~ IY-1 WhenW=1:(IY+1,IY) ~AW DIR=O:IY ~ IY+2;DIR= 1:IY ~ IY-2 58 t\fEC pPD70325 (V25 Plus) Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CV V P S Z Bit Field Transfer INS regS, regS 16-bitfield ... AW 0 0 0 0 3 0 0 0 0 0 reg reg reg8,imm4 16-bitfield ... AW 0 0 0 0 4 0 0 0 0 0 0 0 reg EXT reg8, reg8 AW ... 16-bitfield 0 0 0 0 3 0 0 0 0 reg reg reg8,imm4 AW ... 16-bitfield 0 0 0 0 4 0 0 0 0 0 0 reg I/O IN ace,imm8 When W = 0: AL ... (immS) 0 0 0 W 2 WhenW= 1:AH ... (immS + 1), AL ... (immS) ace, DW When W = 0: AL ... (DW) WhenW= 1:AH ... (DW+ 1), AL ... (DW) 0 0 W 1m OUT immS,acc When W = 0: (immS) ... AL 0 0 W 2 WhenW= 1:(immS+ 1) ... AH, (immS) ... AL DW,acc When W = 0: (DW) ... AL 0 W WhenW= 1:(DW + 1) ... AH, (DW) ... AL Primitive Block I/O Transfer INM dst-block, DW When W = 0: (IV) ... (DW) 0 0 0 W DIR = 0: IV ... IV + 1 DIR = 1:IV ... IV-1 When W = 1: (IV + 1, IV) ... (DW+1,DW) DIR = 0: IV ... IV + 2 DIR= 1:IV ... IV-2 OUTM DW,src-block When W = 0: (DW) ... (IX) 0 0 W DIR = 0: IX ... IX + 1 DIR = 1:IX ... IX-1 When W = 1: (DW + 1, DW) ... (IX+1,IX) DIR = 0: IX ... IX + 2 DIR=1:IX ... IX-2 59 "PD70325 (V25 Plus) NEe Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 o Bytes AC CY V P S Z Addition I Subtraction ADD reg, reg reg +- reg + reg o 0 0 0 o 0 W 2 x x x x x x reg reg mem, reg (mem) +- (mem) + reg o 0 0 0 o 0 0 W 2-4 x x x x x x mod reg mem reg,mem reg +- reg + (mem) o 0 0 0 o 0 W 2-4 x x x x x x mod reg mem reg,imm reg +- reg + imm 000 o 0 S W 3-4 x x x x x x o 0 o reg mem,imm (mem) +- (mem) + imm 000 o 0 S W 3-6 x x x x x x mod 0 0 o mem ace, imm When W = 0: AL +- AL + imm o 0 0 0 o o W 2-3 x x x x x x When W = 1: AW +- AW + imm AD DC reg, reg reg +- reg + reg + CY 000 o 0 W x x x x x reg reg mem, reg (mem) +- (mem) + reg + CY o 0 0 o 0 0 W 2-4 x x x x x x mod reg mem reg,mem reg +- reg + (mem) + CY 000 o 0 W 2-4 x x x x x x mod reg mem reg,imm reg +- reg + imm + CY 000 o 0 S W 3-4 x x x x x o o reg mem,imm (mem) +- (mem) + imm + CY o 0 0 o 0 S W 3-6 x x x x x x mod 0 o mem acc,imm WhenW = O:AL +- AL + imm + CY 000 o o W 2-3 x x x x x x When W = 1: AW +- AW + imm + CY SUB reg, reg reg +- reg - reg o 0 o o W 2 x x x x· x x reg reg mem, reg (mem) +- (mem) - reg o 0 o o 0 W 2-4 x x x x x x mod reg mem reg,mem reg +- reg - (mem) o 0 o o W 2-4 x x x x x mod reg mem reg,imm reg +- reg - imm 000 o 0 S W 3-4 x x x x x x o reg mem,imm (mem) +- (mem) - imm 000 o 0 S W 3-6 x x x x x x mod o mem acc,imm WhenW = O:AL +- AL - imm o 0 o o W 2-3 x x x x x x When W = 1: AW +- AW - imm SUBC reg,reg reg +- reg - reg - CY o 0 0 o W 2 x x x x x x reg reg mem, reg (mem) +- (mem)-reg-CY o 0 0 o 0 W 2-4 x x x x x x mod reg mem reg,mem reg +- reg-(mem)-CY o 0 0 o W 2-4 x x x x x mod reg mem 60 NEe IIPD70325 (V25 Plus) Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S Z Addition/Subtraction (cont) SUBC reg,imm reg +- reg-imm-CY 0 0 0 0 0 S W 3-4 x x x x x x 0 reg mem,imm (mem) +- (mem)-imm-CY 0 0 0 0 0 S W 3-6 x x x x x x mod 0 mem acc,imm WhenW = O:AL +- AL-imm-CY 0 0 0 0 W 2-3 x x x x x x WhenW= 1:AW +- AW-imm-CY BCD Operation ADD4S dst BCD string +- dst BCD string 0 0 0 0 2 u x u u u x + src BCD string 0 0 0 0 0 0 0 SUB4S dst BCD string +- dst BCD string 0 0 0 0 2 u x u u u x - src BCD string 0 0 0 0 0 0 CMP4S dst BCD string - src BCD string 0 0 0 0 2 x u u u x 0 0 0 0 0 ROL4 reg 8 7 AL 0 0 0 0 3 7 0 0 0 0 0 0 mem8 7 AL 7 mem8 0 0 0 0 0 0 0 0 reg 3-5 1m 0 0 0 0 0 0 mod 0 0 0 mem ROR4 reg 8 7 AL 7 0 0 0 0 3 0 0 0 0 0 0 0 0 reg mem8 7 0 0 0 0 3-5 AL 7 mem8 0 0 0 0 0 0 mod 0 0 0 mem BCD Adjust ADJBA When (AL AND OFH) > 9 or AC = 1 : 0 0 0 x x u u u u AL +- AL + 6, AH +- AH + 1, AC ... 1, CY ... AC, AL ... AL AND OFH ADJ4A When (AL AND OFH) > 9 or AC = 1: 0 0 0 0 x x u x x x AL ... AL+ 6,CY ... CYORAC,AC ... 1, WhenAL>9FH,orCY= 1: AL ... AL + 60H, CY ... 1 ADJBS When (AL AND OFH) > 9 or AC = 1 : 0 0 x x u u u u CY +- AC,AL ... ALANDOFH ADJ4S When (AL AND OFH) > 9 or AC = 1: 0 0 0 x x u x x x AL ... AL - 6, CY ... CY OR AC, AC ... 1, WhenAL>9FH,orCY = 1: AL ... AL + 60H, CY ... 1 61 "PD70325 (V25 Plus) NEe Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S z Incrementl Decrement INC regS regS +- regS + 1 0 2 x x x x x 0 0 0 reg mem (mem) +- (mem) + 1 W 2-4 x x x x x mod 0 0 0 mem reg16 reg16 +- reg16 + 1 0 0 0 0 reg x x x x x DEC regS regS +- regS - 1 0 2 x x x x x 0 0 reg mem (mem) +- (mem) - 1 W 2-4 x x x x x mod 0 0 mem reg16 reg16 +- reg16 - 1 0 0 0 reg x x x x x Multiplication MULU regS AW +- ALxregS 0 0 2 u x x u u u AH = O:CY +- 0, V+-O 0 0 reg AH ;II!: 0: CY +- 1, V +- 1 memS AW +- ALx(memS) 0 0 2·4 x x u u u AH = O:CY +- 0, V+-~ mod 0 0 mem AH ;II!: 0: CY +- 1, V +- 1 reg16 OW,AW +- AWxreg16 0 2 u x x u u u OW = 0: CY +- 0, V+-~ 0 0 reg OW ;II!: 0: CY +- 1, V +- 1 mem16 OW, AW +- AW x (mem16) 0 2·4 x x u u u OW = 0: CY +- 0, V+-~ mod 0 0 mem OW ;II!: 0: CY +- 1, V +- 1 MUL regS AW +- AL x regS 0 0 2 u x x u u u AH = ALsign expansion: CY +- 0, V+-~ 0 reg AH ;II!: AL sign expansion: CY +- 1, V +- 1 memS AW +- ALx(memS) 0 0 2·4 u x x u u u AH = AL sign expansion: CY +- 0, V+-~ mod 0 mem AH ;II!: AL sign expansion: CY +- 1, V +- 1 reg16 OW,AW +- AWxreg16 0 2 x x u u u OW = AW sign expansion: CY +- 0, V+-~ 0 reg OW ;II!: AW sign expansion: CY +- 1, V +- 1 mem16 OW,AW +- AWx(mem16) 0 2·4 x x u u OW = AW sign expansion: CY +- 0, V+-~ mod 0 mem OW;II!: AW sign expansion: CY +- 1, V +- 1 reg16, reg16 +- reg16ximmS 0 0 0 3 u x x u u u reg16, Product::5 16 bits: CY +- 0, V+-O reg reg immS Product> 16 bits: CY +- 1, V +- 1 reg16, reg16 +- (mem16) x immS 0 0 0 3·5 x x u u u mem16, Product::5 16 bits: CY +- 0, V+-O mod reg mem immS Product> 16 bits: CY +- 1, V +- 1 reg16, reg16 +- reg16 x imm16 0 0 0 0 4 x x u u u reg16, Product::5 16 bits: CY +- 0, V+-~ reg reg imm16 Product> 16 bits: CY +- 1, V +- 1 reg16, reg16 +- (mem16)ximm16 0 0 0 0 4-6 x x u u u mem16, Product::5 16 bits: CY +- 0, V+-~ mod reg mem imm16 Product> 16 bits: CY +- 1, V +- 1 62 1tt{EC "PD70325 (V25· Plus) Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S z Unsigned Division DIVU reg8 temp +- AW 0 0 2 u u u u u When temp 7 reg8 > FFH: 0 reg (SP-1,SP-2) +- PSW, (SP-3, SP-4) +- PS, (SP-5, SP-6) +- PC, SP +- SP-6, IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All other times: AH +- temp % reg8, AL +- temp 7 reg8 mem8 temp +- AW 0 0 2-4 u u u u u u When temp 7 (mem8) > FFH: mod 0 mem (SP-1,SP-2) +- PSW, (SP-3, SP-4) +- PS, (SP-5,SP-6) +- PC,SP +- SP-6, IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All other times: AH +- temp % (mem8), AL +- temp 7 (mem8) reg16 temp +- AW 0 2 u u u u u When temp 7 reg16 > FFFFH: 0 reg (SP-1,SP-2) +- PSW, (SP-3, SP-4) +- PS, (SP-5, SP-6) +- PC, SP +- SP-6, mem16 IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All other times: AH +- temp% reg16, AL +- temp 7 reg16 temp +- AW 0 2-4 u u u u u u III When temp 7 (mem16) > FFFFH: mod 0 mem (SP-1,SP-2) +- PSW, (SP-3, SP-4) +- PS, (SP-5, SP-6) +- PC,SP +- SP-6, IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All other times: AH +-temp%(mem16),AL +-temp7(mem16) Signed Division DIV reg8 temp +- AW 0 0 2 u u u u u u When temp 7 reg8 > 0 and temp 7 reg8 reg > 7FH or temp 7 reg8 < 0 and temp 7 reg8 < 0-7FH-1: (SP-1,SP-2) +-PSW, (SP-3, SP-4) +- PS, (SP-5, SP-6) +- PC, SP +- SP-6, IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All other times: AH +- temp % reg8, AL +- temp 7 reg8 mem8 temp +- AW 0 0 2-4 u u u u u u When temp 7 (mem8) > 0 and (mem8) > mod mem 7 FH ortemp 7 (mem8) < 0 and temp 7 (mem8) < 0-7FH -1: (SP-1, SP-2) +- PSW, (SP-3, SP-4) +- PS, (SP-5,SP-6) +- PC,SP +- SP-6, IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All other times: AH +- temp % (mem8), AL +- temp 7 (mem8) 63 IIPD70325 (V25 Plus) NEe Instruction Set (cant) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S z Signed Division (cont) OIV reg16 temp +- OW, AW 0 2 u u u u u u When temp -7 reg16 > 0 and reg16 reg > 7FFFH or temp -7 reg16 < 0-7FFFH-1: (SP-1,SP-2) +- PSW, (SP-3,SP-4) +- PS, (SP-5, SP-6) +- PC, SP +- SP-6, IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All other times: AH +- temp%reg16,AL +- temp -7 reg16 mem16 temp +- OW, AW 0 2-4 u u u u When temp -7 (mem16) > 0 and (mem16) mod mem > 7FFFHortemp -7 (mem16) reg16 or 0 0 0 0 a 2-4 mem32 (mem32 + 2) < reg16 mod reg mem (SP-1,SP-2) ... PSW, (SP-3, SP-4) ... PS, (SP-5, SP-6) ... PC, SP ... SP-6, IE ... 0, BRK ... 0, PS ... (23,22), PC ... (21, 2a) CPU Control HALT CPU Halt a 0 0 STOP CPU Halt 0 0 0 a 0 a BUSLOCK Bus Lock Prefix 0 0 0 a FP01 fp-op No Operation a x x X 2 (Note 1) y Y Y Z Z Z fp-op,mem data bus ... (mem) a x x X 2-4 mod y y y mem FPa2 fp-op No Operation 0 0 a x 2 (Note 1) y y y Z Z Z fp-op,mem data bus ... (mem) a 0 a x 2-4 mod y y y mem Notes: (1) Does not execute but does generate an interrupt. 75 "PD70325 (V25Plus) NEe Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 1 0 Bytes AC CY V P S Z CPU Control (cont) POLL Poll and Wait 0 0 0 NOP No Operation 0 0 0 0 0 0 01 IE~O 0 0 EI IE~ 1 0 OSO;OS1; Segment Override Prefix 0 0 sreg 0 PS;SS Register Bank Switching MOVSPA 0 0 0 0 2 0 0 0 0 0 BRKes reg16 0 0 0 0 3 0 0 0 0 MOVSPB reg16 0 0 0 0 3 0 0 1 0 0 reg TSKSW reg16 0 0 0 0 3 x x x x x x 0 0 0 0 0 reg 76 NEe NEC Electronics Inc. pPD70335 (V35 Plus) 16-Bit Microcomputer: Advanced, High-Speed DMA Single-Chip, CMOS Description o Four multifunction I/O ports ..,- 8-bit analog comparator port The )1PD70335 (V35 Plus) is a high-performance, 16-bit - 20 bidirectional port lines single-chip microcomputer with a 16-bit external data - 4 input-only port lines bus. The )1PD70335 is fully software compatible with the )1PD70108/116 (V2~N30®) as well as the )1PD70320/ o Two independent full-duplex serial channels 330 (V25™ N35™). The V35 Plus demonstrates numer- o Priority interrupt controller ous enhancements over its predecessor, the standard - Standard vectored service V35; however, it maintains pin compatibility and DRAM- - Register bank switching direct bus interface with its predecessor, the V35. - Macroservice The V35 Plus offers improved DMA transfer rates (over o Pseudo-SRAM and DRAM refresh controller 5M bytes per second), additional serial channel status o Two 16-bit timers flags, improved memory access timing, and enhanced o On-chip time base counter software control of register bank context switching. o Programmable wait state generator The )1PD70335 has the same complement of internal peripherals as the V35 and maintains compatibility o Two standby modes: STOP and HALT with existing drivers; however, some modification of the DMA drivers may be necessary. The)1PD70335 does Ordering Information - - = - -Clock -- --1 Iii:I~iI not offer on-chip ROM or EPROM. Part Number (MHz) Package JiPD70335L-8 8 84-pin PLCC Features L-10 10 o 16-bit CPU and internal data paths GJ-8 8 94-pin plastic QFP o 16-bit non-multiplexed external data path GJ-10 10 o Direct RAS/CAS DRAM interface o Functional and pin compatibility with the V35 o Software compatible with )1PD8086 o New and enhanced V-Series instructions o Minimum instruction cycle 200 ns (at 10 MHz) o 6-byte prefetch queue o Two-channel high-speed DMA controller o Internal 256 bytes RAM memory DOne 1M-byte memory address space o Eight internal memory-mapped register banks V20 and V30 are registered trademarks of NEC Corporation. V25 and V35 are trademarks of NEC Corporation. 50155-2 pPD70335 (V35 'Ius)- NEe Pin Configurations 84-PinPLCC PO 7 ICLKOUT PT7 DO PT6 01 72 PT5 02 71 PT4 03 70 PT3 04 69 PT2 05 68 PT1 06 67 PTO 07 66 P17/REAOY 08 65 P16/SCKO 09 64 P15/TOU!..- 010 63 P14/INT/P~ 011 62 P1 3/INTP2IINTAK 012 61 P12/1NTP1 013 60 P11/1NTPO 014 59 P10/NMI 015 58 P27 /Hl ORO Ao 57 P26/HlOAK A9 /A 1 56 P25~ A10/A2 55 P24/0MAAK1 A11 /A 3 54 P23/DMAR01 CD q- I'- q- co q- Cl q- oII) II) .... C\I II) C') II) q- II) CD I'- co co I Cl W 0 0 Ci 8 Q i51i! 18 Q ~~~~~<.("~~ C\lC')q-II)CD- a: °1&1 a t> ~ Cil >< a: ~ >~~ .- .................... f'o- co ~ ««<.(" .( e e~ 0 C\I N Q. Q. Notes: (1) Pin functions are identical to ~P070330. (2) IC pins should be tied together and pulled up to V DO with a 10- to 20-k.Q resistor. (3) EA must be tied low because IlP070335 does not support Internal ROM or EPROM. (4) Pin 9 should be tied to GNO through a pull-down resistor. 83SL-6827B 2 NEe pPD70335 (V35 Plus) 94-Pin Plastic QFP POs A12/A4 NC NC IC A13 /A S P04 A14 /A 6 P03 A1S/A7 P02 A16 /A a P01 A17 /A 18 POo A19 EA A1a/UBE MREQ RxDO 10STB GND MSTB CTSO AlW TxDO REFRQ RxD1 RESET CTS1 VOD TxD1 P20lDMARQO Voo X2 IC X1 VDD GND ~ GND P21/DMAAKO NC NC NC P22ITCO VrH C'l ..r- III co r-. Q ~1~151~90 ~lfl£I~I~ ~I~ ~ ~ l- I- I- 0 Q O0 . ~ : .....................:: :; P20/DMAROO ---f:. P2 1IDMAAKO ~: :: - ",Programmable" P2 2/TCO ~, DMA . P23 /DMAR01 -----.;' Controller P24/DMAAK1 - ( :i-- RESET P2S/TC1 - - {...... j.--- HLDAKlP2 6 :~ HLDRO/P2 7 ff'~ READY/P1 7 TxDO ~---{... RxDO --t P1 6 /SCKO - : : Serial Interface Internal ROM b' ::-....... MREO }:c: ~B CTSO.....;:. 8K Bytes o· ,:---- IOSTB TxD1 - ..... ?.----....., :i.- POLUINT/P14 RXD1~: (Reserved) CTS1 ~, '----:-'.:.:.:.:./ P1 0 /NMI P11"NTPO Instruction Decoder P12"NTP1 Programmable Micro Sequencer Interrupt Micro ROM P13"NTP2I Controller INTAK .:- EA (Fixed Low :::.:.:.,.:.,.,.i Externally) P1 4 /INT' POLL X1 X2 VDD P1S /TOUT REFRO P07/CLKOUT PO P1 P2 PTO·PT7 VTH GND Notes: (1) The IlPD7033S (V3S Plus) is not a masKed ROM product. Internal ROM is reserved and not accessible. (2) Shaded blOCKS are modified from the standard V3S. 83YL-6989B 7 ,.,PD7033S{V3S- Plus) NEe FUNCTIONAL DESCRIPTION memory space. They are grouped in a 512-byte block called the internal data area (IDA). The 256-byte inter- Architectural Enhancements nal RAM is also in the IDA. The addresses of the register The following features enable the J,lPD70335 to perform are given as offsets into the IDA. The start address of high-speed execution of instructions. the IDA is set by the Internal Data Area Base register (IDB), and may be programmed to any 4K boundary in • Dual data bus the memory address space. • 16-/32-bit temporary registers/shifters (TA, TB, TA + TB) Register Banks. Because the general-purpose register set is in internal RAM, it is possible to have multiple • 16-bit loop counter (lC) ba~ks of registers. The J,lPD70335 CPU supports up to a • Program counter (PC) and prefetch pointer (PFP) register banks. A bit field in the PSW selects which bank • Internal ROM pass bus is currently being used. Each bank contains the entire Dual Data Bus. The J,lPD70335 has two internal 16-bit CPU register set plus additional information needed data buses: the main data bus and a subdata bus. This for context switching. Register banks may be switched reduces the processing time required for addition/ using special instructions (TSKSW, BRKCS, MOVSPA, subtraction and logical comparison instructions by M OS1 PS PS PS PS SS SS S8 SS OSO 080 OSO OSO Save PC Save PC Save PC f--l PC .J+- Save PC Save psw rY Save PSW Save PSW SavePSW ~I psw l~ Vector PC PC I Vector PC Vector PC Reserved RB L Reg 16 Vector PC Reserved Reserved Reserved ~ PSW I RB Register bank field -e822A 83SL-e823A MACROSERVICE FUNCTION The macroservice function (MSF) is a special micropro- gram that acts as an internal DMA controller between bn-chip peripherals (special-function registers, SFR) and memory. The MSF greatly reduces the software overhead and CPU time that other' processors would require for register save processing, register returns, and other handling assoCiated with interrupt process- ing. If the MSF is selected for a particular interrupt, each time the request is received, a byte or word of data will be transferred between the SFR and memory without interrupting the CPU. Each time a request occurs, the macroservice - counter is' decremented. .When the counter reaches zero, an interrupt to the CPU is gener- ated. The MSF also has a character search option. When selected, every byte transferred will be com- pared to an 8-bit search character and an interrupt will be generated if a match occurs or if the macroservice counter counts out. 18 NEe pPD7033S (V3S Plus) Like the NMI, INT, and INTTB,the two DMA controller Figure 12. /IIacroservice Control Registers interrupts (INTOO, INTD1) and the serial error interrupts (/liSe) (INTSERO, INTSER1) do not have MSF capability. IMSM21 MSM1 I MSMo I DIR 0 CH2 CH1 I CHo I There are eight, 8-byte macroservice channels mapped 7 0 into internal RAM from XXEOOH to XXE3FH. Figure 11 shows the components of each channel. MSM2- MSM o Macroservice Mode Setting the macroservice mode for a given interrupt 000 Normal (8-bit transfer) requires programming the corresponding macroser- 001 Normal (16-bit transfer) vice control register. Each individual interrupt service- 1 00 Character search (8-bit transfer Other combinations are not allowed. able with the MSF has its own associated MSC special- function register. The general format for all MSC DIR Data Transfer Direction registers is shown in figure 12. 0 Memory to SFR 1 SFR to memory Figure 11. /IIacroservice Channels CH2-CHO Macroservice Channel 15 a 7 o 000 Channel 0 .. +7H ~ MSS 111 Channel 7 MSP TIMER UNIT Reserved SCHR SFRP MSC The ~P070335 (figure 13) has two programmable 16-bit Ii.i.i r +OH interval timers (TMO, TM1) on-chip, each with variable Offset from macro service channel start address. input clock frequencies. Each of the two 16-bit timer registers has an associated 16-bit modulus register MSS +6H Segment value of memory address used (MOO, MD1). Timer ° operates in either the interval timer mode or one-shot mode; timer 1 has only the for data transfer. Memory address will be MSS x 16 + MSP. interval timer mode. MSP +4H Offset value of memory address used for data transfer. Interval Timer Mode SCHR +2H a·blt data compared In character search. In this mode, TMOfTM1 are decremented by the se- SFRP +1H Offset value of special function register lected input clock and, after counting out, the registers address, which Is xxFOOH + SFRP. (xx Is specified by lOB register). are automatically reloaded from the modulus registers MSC +OH Number of transfers performed In and counting continues. Each time TM1 counts out, macro service 83M·005285A interrupts are generated through TF1 and TF2 (Timer Flags 1, 2). When TMO counts out, an interrupt is generated through TFO. The timer-out signal can be used as a square-wave output whose half-cycle is equal to the count time. Two input clocks derived from the system clock ~re SCLK/6 and SCLK/128. Typical timer values shown below are based on fosc = 10 MHz and fSCLK = foscl2. Clock Timer Resolution Full Count SCLK/6 1.2J1s 78.643 ms SCLK/128 25.6~s 1.678 s 19 pPD7033S (V3S Plus) NEC One-Shot Mode Figure 14. Timer Control RegisterO. (TIfCO) In the one-shot mode, TMO and MDO operate as inde- pendent one-shot timers. Starting with a preset value, I TSO ITClKO I MSO I MClKO I ENTO·I AlV I MOD1 MODo I I each is decremented to zero. At zero, counting ceases 7 0 and an interrupt is generated by TFO (from TMO) or TF1 (from MDO). TSO Timer 0 in Either Mode 0 Stop countdown When TMO is programmed to one-shot mode, TM1 may 1 Start countdown still operate in interval mode. MOD 1 MODo TClKO TMO Register Clock Frequency Two input clocks derived from the system clock are 0 0 0 fSCLKl6 (Interval) SCLK/12 and SCLK/128. Typical timer values shown 0 0 1 fSCLKl128 (Interval) below are based on fosc = 10 MHz and fSClK = fosc/2. 0 1 0 fSCLKl12 (One-shot) 0 1 fSCLKl128 (One-shot) Clock Timer Resolution Full Count MSO MOO Register Countdown SCLK/12 2.4 Jis 157.283 ms (One-Shot Mode) SCLK/128 25.6Jis 1.678 s 0 Stop 1 Start Timer Control Registers MClKO MOO Register Clock Frequency 0 fSCLKl1;2 Setting the desired timer mode requires programming 1 fSCLKl128 the timer control register. See figures 14 and 15 for ENTO TOUT Square-Wave Output format. 0 Disable 1 Enable Figure 13. Timer Unit Block Diagram AlV TOUT Initial level (Counter Stopped) 0 low High I fSCLK MOD 1 MODo Timer Unit Mode :divlded bY~ 0 0 Interval timer 0 1 One-shot 12:~ .......;....:.---, X Reserved Figure 15. Timer Control Register 1 (TIfCI) 12 L---- I1S1 ITClK1 I 0 o o o o o I 128 I"""'"......T-i---'" 7 o TS1 Timer 1 Countdown o Stop Start TClK1 Timer 1 Clock Frequency o fSCLKl6 I fscLKl128 t-----oTO I ---------~----------------- TIME BASE COUNTER V Internal Bus The 20-bit free-running time base counter (TBC) con- r } trols internal timing sequences and is available as the 83SL-6746A source of periodic interrupts at lengthy intervals. One of four interrupt periods can be selected by program- ming the TBo and TB1 bits in the processor control register (PRC). The TBC interrupt is unlike the others 20 NEe IIPD70335 (V35 Plus) because it is fixed as a level 7 vectored interrupt. Figure 18. Time Base Counter (TBC) Block Macroservice and register bank switching cannot be Diagram used to service this interrupt. See figures 16 and 17. Figure 16. Time Base Interrupt Request Control Register (TBIC) ~-E I TBF I TBMK I 0 7 0 0 Address xxFECH 1 o I I I I I +210 + 2 13 +216 +220 83NR-7450A TBF Time Base Interrupt Flag o No interrupt generated REFRESH CONTROLLER 1 Interrupt generated TBMK Time Base Interrupt Mask The JlPD70335 has an on-Chip refresh controller for dynamic and pseudostatic RAM mass storage memo- o Unmasked ries. The refresh controller generates refresh addresses Masked and refresh pulses. It inserts refresh cycles between the normal CPU bus cycles accordi ng to refresh specifica- Figure 17. Processor Control Register (PRC) tions. I 0 IRAMENI 0 o I TB1 I TBo I PCK1 I pCKo I The refresh controller outputs a 9-bit refresh address on _ address bits Ao-As during the refresh bus cycle. Address ~ 7 Address xxFEBH o bits A9-A19 are all zeros. The 9-bit refresh address is RAMEN Built-In RAM automatically incremented at every refresh timing for 512 row addresses. The 8-bit refresh mode (RFM) reg- 0 Disable ister (figure 19) specifies the refresh operation and 1 Enable allows refresh duri ng both CPU HALT and HOLD TB1 TBo Time Base Interrupt Period modes. Refresh oycles are automatically timed to min- 0 0 21 O/fscLK imize the effect on system throughput. 0 1 2 13/fSCLK 1 0 2 16/fSCLK The following shows the REFRQ pin level in relation to 1 22O/fSCLK bits 4 (RFEN) and 7 (RFLV) of the refresh mode register. PCK1 PCKo System Clock Frequency (fsCLId RFEN RFLV REFRQ Level 0 0 -0-- -0-- o foscl2 0 1 foscl4 o 1 1 1 0 foscl8 1 o o Reserved 1 1 Refresh pulse output The RAMEN bit in the PRC register allows the internal It should be noted that since the V35 Plus directly RAM to be removed from the memory address space to supports dynamic RAM memory, the refresh controller implement faster instruction execution. output should be gated into the RAS input of the The TBC (figure 18) uses the system clock as the input memory chips. When combined with the chip select frequency. The system clock can be changed by pro- logic and the MREQ Signals, a direct DRAM interface is gramming the PCKo and PCK1 bits in the processor supported. control register (PRC). Reset initializes the system clock to foscl8 (fosc = external oscillator frequency). SERIAL CONTROL UNIT The JlPD70335 has two full-duplex UARTs, channel 0 and channel 1. Each serial port channel (figure 20) has a transmit line TxDn, a receive line RxDn, and a clear- to-send input line CTSn for handshaking. Communica- tion is synchronized by a start bit, and the ports can be programmed for even, odd, or no parity, character lengths of 7 or 8 bits, and 1 or 2 stop bits. 21 pPD70335 (V3S Plus) NEe Figure 19. Refresh Mode Register (RFM) Bx G = SCLK x 106 2n +1 IRFLV IHLDRF IHLTRF I RFEN I RFW1 I RFWo I RFT1 RFTo I where B = baud rate 7 Address xxFE1 H 0 G = Baud rate genrator register BRGn value (table 4) RFLV RFEN REFRQ Output Signal Level n = input clock specification (n between 0 0 0 0 and 8). This is the value that is loaded into 1 0 1 the SCCn register. See figure 21. 0 1 0 SCLK = system clock frequency (MHz). 1 Refresh pulse HLDRF Automatic Refresh Cycle in HOLD Mode Based on the above expression, table 4 shows the baud 0 Disabled rate generator values used to obtain standard trans- 1 Enabled mission rates when SCLK = 8 MHz. HLTRF Automatic Refresh Cycle In HALT Mode Tab/e4. Baud Rate Generator Register (BRGn) 0 Disabled Enabled Baud Rate n G Error (%) RFEN Automatic Refresh Cycle 110 7 142 0.03 0 Refresh pin = RFLV 300 6 208 0.16 1 Refresh enabled 1200 4 208 0.16 RFW1 RFWo No. of Wait States Inserted In Refresh Cycle 2400 3 208 0.16 0 0 0 4800 2 208 0.16 0 1 1 1 0 2 9600 208 0.16 1 1 2 19,200 0 208 0.16 RFT1 RFTo Refresh Period 38,400 0 104 0.16 0 0 16/SCLK 1.00M 0 4 0.00 0 1 32/SCLK 1 0 64/SCLK 1 1 128/SCLK The JlPD70335 has dedicated baud rate generators for each serial channel. This eliminates the need to obli- gate the on-chip timers. The baud rate generator allows a wide range of data transfer rates up to 1.25 Mb/s. This includes all of the standard baud rates without being restricted by the value of the particular external crys- tal. Each baud rate generator has an 8-bit baud rate gen- erator register BRGM, which functions as a prescalerto a programmable input clock selected by the serial communication control register SCCn. Together these must be set to generate a frequency equivalent to the desired baud rate. The baud rate generator can be set to obtain the desired transmission rate according to the following formula. 22 NEe pPD7033S (V3S Plus) Figure 20. Serial Interface Block Diagram software to poll for the completion of a message (the last bit of the last byte is shifted out when the ALL SENT Channel 0 bit is set). All error flags are available in this register (refer to figure 24). TXDO~ Serial Register ~ TxBO ~ Please refer to the V25N35 User's Manual for additional information on the serial channels. o----t>-1 ~ F=> Figure 21. Serial Communication Control Serial RxBO RxDO Register Register (SCCn) 7 6 5 4 3 2 0 CTSO 0 0 0 0 I PRS3 PRS2 PRS1 PRSol SCKO~--------------'---~ PRS 3-PRS o n Input Clock for Baud Generator o0 0 0 0 SCLK/2 000 1 1 SCLK/4 00 1 0 2 SCLK/8 o0 1 1 3 SCLK/16 Channel 1 o1 0 0 4 SCLK/32 o1 o1 SCLK/64 II 5 TXD1~ Serial Register ~ TxB1 ~ o1 10 o1 1 1 6 7 SCLK/128 SCLK/256 1 000 8 SCLK/512 Combinations after PRS = 1000 are not valid. RxD1 o----t>-1 Serial Register ~ RxB1 F=> CTS1 In addition to the asynchronous mode, channel 0 has a synchronous I/O interface mode. In this mode, each bit of data transferred is synchronized to a serial clock SCKO. This is the same as the NEC /lCOM75 and /lCOM87 series, and allows easy interfacing to these devices. Figures 22 and 23 show the serial communication mode register SCMn and error register SCEn. The serial control unit of the /lPD70335 is functionally identical to that of the standard V35, with the exception of several enhanced features. All serial status information is moved to the serial status register (SSTn) on the V35 Plus. Included in this register is an additional flag which signals that the transmit shift register is clear of data. This flag allows 23 pPD70335 (V35 Plus) NEe Figure 22. Serial Communication Mode Figure 23. Serial Communication Error Registers (SCMn) Registers (SCEn) 7 6 5 4 3 2 o 7 6 5 4 3 2 0 I RxD 0 0 0 0 ERP ERF I ERO I RxD RxD Line Status TxRDY Transmitter Control 0 RxD line = 0 o Disable 1 RxD line = 1 1 Enable ERP Parity Error RxE Receiver Control 0 No parity error o Disable Parity error has occurred 1 Enable ERF Framing Error Parity Control 0 No framing error 00 No parity 1 Stop bit not detected o1 o parity (0 during transmit; ignored during ERO Overrun Error Flag receive) 1 0 Odd parity 0 No overrun 1 1 Even parity Overrun has occurred CL/TSK Character Length/Transmit Shift Clock (I/O interface mode only) o 7 bits/No effect 1 8 bits/Trigger transmit SlJRSCK Stop Bit Length/Receive Clock (110 interface mode only) o 1 stop bit/External clock (input on CTSO) 1 2 stop bits/Internal clock (output on CTSO) Mode 00 I/O interface (Channel 0 only) o1 Asynchronous 1 x Reserved 24 1ttIEC pPD70335 (V3S Plus) Figure 24. Serial Status Register (SSTn) IRxDN I ASn ITxBEn IRxBFn I 0 ERPn ERFn I EROn I Parity Error Flag ERPn Indicates that transmit parity was not consistent 7 o with receive parity (Note 5) Framing Error Flag ERFn Receive Terminal Pin State RxON Indicates that stop bit was not detected (Note 5) Input state of RxDn pin is checked by RxDN bit Overrun Error Flag EROn All Sent Flag ASn Indicates that succeec!ing receive has completed before the previous receive data is taken over from Reset when transmit data has been written to o transm it shifter the receive buffer (Note 5) Set when all the data in the transmit buffer and transmit shift register has been sent (Note 1) Notes: Transmit Buffer Empty Flag TxBEn (1) Transmitterflags are reset to 1 when the value of either the baud rate generator or serial control register is written. Reset when transmit data has been written to o transmit buffer (Note 1) (2) Receive buffer full flag is also reset when either the baud rate generator or serial control register is written. Set when transmit data in transmit buffer has been sent to shift register (3) Receive buffer full flag is not related to the receive error state. (4) Error flags are cleared when the next data byte is received. ~_ Receive Buffer Full Flag RxBFn (5) In the table, n = 0 or 1. ~ Reset when receive data has been read from o receive buffer (Note 2) Set when receive data has been sent from shift register to receive buffer (Note 3) Table 5. DMA Controller Operation Single-Step Mode Burst'Mode Single-Transfer Mode Demand Release Mode Transm ission Memory - memory Memory - memory Memory -I/O Memory -I/O coverage Function Under one time of DMA Under one DMA One DMA transfer is DMA transmission is executed request instruction, request, specified number executed every time DMA while DMARa terminal is kept one bus cycle and one DMA of DMA transmissions request occurs. high-level. transmission are alternately are executed. executed the specified number of times. DMA start Rise of DMARa Rise of DMARa Rise of DMARa High level of DMARa Setting TDMA bit of DMA Setting TDMA bit of DMA control register control register Halt method Depends on software None Depends on software Halted at low level of DMARa during DMA transmission Terminal count Terminal count Terminal count Terminal count decremented from zero decremented from zero decremented from zero decremented from zero Interrupt All accepted Not accepted All accepted All accepted except during DMA transmission during DMA transmission During halt Specified times of DMA Specified number of DMA Active Active transmission are executed transfers are executed consecutively consecutively DMA request DMA at channel 1 is retained Other DMA is retained until DMA transmission under DMA at channel 1 is retained during DMA while DMA at channel 0 is DMA transmission request is executed after one while DMA at channel 0 is transmission executed is terminated. DMA transmission is over executed. 25 pPD70335 (V35 Plus) NEe DMA CONTROLLER Figure 26. DIIIA Channellllode Registers (DIIIAllln) Two memory-to-memory transfer modes (single-step and burst) are supported as well as two I/O-to-memory 1 MD2 1 MD1 1 MDo 1 W 1 EDMA 1 TDMA 1 0 o 1 modes (single-transfer and demand release). Refer to 7 o table 5. The most significant V35 Plus enhancement boosts the MD2-MD o Transfer Mode transfer rates of the dual internal DMA channels to full 000 Single-step (memory to memory) bus bandwidth. All operational modes remain the same 001 Demand release (I/O to memory) as the V35, but since the V35 Plus DMA controller is 010 Demand release (memory to I/O) 011 Disabled implemented in hard-wired logic, the control delays of 100 Burst (memory to memory) a microprogrammed method are not present. As a 101 Single-transfer (I/O to memory) result, the demand release mode transfer rate boasts a 110 Single-transfer (memory to I/O) theoretical transfer rate of over 6M bytes per second. 111 Disabled The ,uPD70335 DMA control registers are moved from W Transfer Method the internal RAM to the SFR area; thus the V35 Plus may 0 Byte transfer effectively have a larger internal RAM memory area Word transfer than comparable designs on the standard V35. EDMA TDMA Transfer Condition Additionally, the ,uPD70335 DMA controller uses linear 0 o Disabled registers for both source and destination address 1 o DMA channel enabled Software initiate DMA (memory to pointers. Thus, three a-bit registers completely specify memory modes) the DMA address pointers as shown in figure 25. These pointers may be updated by byte (±1) or word (±2) The TDMA bit is only valid for single-step and burst quantities as programmed in the DMA channel mode modes. This bit allows software iriitiation of the DMA register shown in figure 26. This register also specifies transfer (provided the EDMA bit is set); the bit always the operational mode of the channel. The EDMA bit is reads as zero and .has no meaning in the demand- c;lutomatically cleared when terminal count is reached, release or single-transfer modes. and DMA requests are ignored when this bit is cleared. The DMA address pointers may be incremented or Figure 25. DIIIA Address Registers decremented per transfer as specified in the DMA address update register shown in figure 27. The ad- 23 20 19 16 15 8 7 dress pointer can also be programmed to remain the same, allowing repeated transfers to or from a location. Figure 27. DIIIA Address Control Registers f-- Applied addresses (20 bits) - l (DIIIAC) n =0,1 83YL-6715A o .1 0 1 PD 1 1 PDo 0 0 pS 1 pSo I 7 o Destination Address Offset 00 No modification 01 Increment 10 Decrement 11 No modification Source Address Offset 00 No modification 01 Increment 10 Decrement 11 No modification The DMAAKn Signals are not output for memory-to- memory transfer modes, but are driven low for each transfer I/O to/from memory. Nominal DMA bus cycles 26 NEe pPD70335 (V35 Plus) are three clock states; however, programmable wait Figure 30. Port Mode Control Register 0 (PMCO) states may be added. Wait states for memory-to- memory transfers are added to both source and desti- I PMC0 71 I I I I I I I nation addresses as programmed for each specific 7 o address. Port or Control Bit Selection During memory-to-I/O transfers, the number of wait states inserted is determined by the slower of the o Port mode CLKOUT source and destination. IIO-to-memory transfers add the number of wait states required by the memory write Figure 31. Port Mode Control Register 1 (PMCI) address. PARALLEL I/O PORTS 7 0 The J1PD70335 has three 8-bit parallel I/O ports: PO, P1, and P2. Refer to figures 28 through 32. Special function PMC1 7 Port/Control Bit Selection register (SFR) locations can access these ports. The. 0 P171/0 port lines are individually programmable as inputs or 1 READY input outputs. Many of the port lines have dual functions as PMC16 Port/Control Bit Selection port or control lines. 0 P161/O Use the associated port mode and port mode control registers to select the mode for a given I/O line. The analog comparator port (PT) compares each input line to a reference voltage. The reference voltage is 1 PMC15 0 1 SCKO output Port/Control Bit Selection P1 5 1/0 TOUT output a programmable to be the (VTH input pin) x n/16, where n PMC14 Port/Control Bit Selection = 1 to 16. See figure 33. 0 P14 I/O or POLL input 1 INT input Figure 28. Por,t Mode Registers 0 and 2 (pM01 PMC13 Port/Control Bit Selection PM2) 0 INTP2/P13 input 1 INTAK output PMC12 Port/Control Bit Selection 7 o x INTP1/P12 input 0 INTP2/P13 input Input or Output Bit Selection PMC1 1 Port/Control Bit Selection o Output port mode x INTPO/P11 input 1 Input port mode n = 7 through 0 PMC10 Port/Control Bit Selection x NMI/P1 o input Figure 29. Port Mode Register 1 (PMI) IPM17 I PM16 I PM15 I PM14 I I I 7 o PMC1 n PM1 n Port Mode Input/Output (Port P1 n) o o Output port mode o 1 Input port mode n = 7, 6, 5, or 4. 27 pPD70335 (V35 Plus) NEe Figure 32. Port Mode Control Register 2 (PMC2) PROGRAMMABLE WAIT STATE GENERATION You can generate wait states internally to further re- 7 0 duce the necessity for external hardware. ·Insertion of these wait states allows direct interface to devices Port/Control Bit Selection whose access times cannot meet the CPU read/write o I/O port timing requirements. 1 HLDRQ output When using this function, the entire 1M-byte memory PMC26 Port/Control Bit Selection address space is divided into 128K-blocks. Each block o I/O port can be programmed for zero, one, or two wait states, or 1 HLDAK input two plus those added by the external READY signal. PMC2s Port/Control Bit Selection The top two blocks are programmed together as one o I/O port unit. 1 TC1 output The appropriate bits in the wait control word (WTe) Port/Control Bit Selection control wait state generation. Programming the upper o I/O port two bits in the wait control word will set the wait state 1 DMAAKI output conditions for the entire I/O address space. Figure 34 Port/Control Bit Selection shows the memory map for programmable wait state o I/O port generation; see figure 35 for a graphic representation 1 DMARQ1 .input of the wait control word. Port/Control Bit Selection Figure 34. Programmable Wait State Generation x I/O port o TCO output FFFFFH Port/Control Bit Selection 256K x I/O port 1 DMAAKO outp~t COOOOH PMC20 Port/Control Bit Selection o I/O port ~~ ~~ 1 DMARQO input . 40000H 128K Figure 33. Port T Mode Register (PMT) 20000H I 0 I 0 I 0 I 0 I PMT3 I PMT2 I PMT1 PMTol OH 128K 7 0 83NR-7451A PMT3-PMTO STANDBY MODES 0000 VTH x 16/16 0001 VTH x 1/16 The two low-power standby modes are HALT and STOP. 0010 VTH x 2/16 Software can cause the processor to enter either mode. 0011 VTH x 3/16 0100 VTH x 4/16 HALT Mode 0101 VTH x 5/16 0110 VTH x 6/16 In the HALT mode, the CPU is inactive and the chip 0111 VTH x 7/16 consumes much less power than when operational. 1000 VTH x 8/16 The external oscillator remains functional and all pe- 1001 VTH x 9/16 1010 VTH x 10/16 ripherals are active. Internal status and output port line 1 01 1 VTH x 11/16 conditions are maintained. Any unmasked interrupt can release this mode. In the EI state, interrupts sub- 1100 VTH x 12/16 1 101 VTH x 13/16 sequently wi II be serviced and the HALT state released. 1110 VTH x 14/16 In the 01 state, program execution is restarted with the 1111 VTH x 15/16 instruction following the HALT instruction and the interrupt causing the release from HALT will be latched. 28 NEe pPD7033S (V3S Plus) STOP Mode Figure 35. Wait Control Word (WTC) The STOP mode allows the largest power reduction while maintaining RAM. The oscillator is stopped, halt- ing the CPU and all internal peripherals. Internal status 7 Wait Control, High o and port pin outputs are maintained. Only a RESET or NMI can release this mode. A standby flag in the STBC register is reset by rises in 7 Wait ContrOl, Low o the supply voltage. Its status is maintained during normal operation and standby. The STBC register (fig- Wait States Block n1 Block nO ure 36) is not initialized by RESET. Use the standby flag o o o to determine whether program execution is returning o from standby or from a cold start by setting this flag 2 o before entering the STOP mode. 2 or more (control from READY pin) SPECIAL-FUNCTION REGISTERS n = 0 thru 6 Table 6 shows the special-function register mnemonic, Figure 36. Standby Register (STBC) type, address, reset value, and function. The eight high-order bits of each address (xx) are specified by I~_~~I_o~l_o~l__o_l~o~l_o~l__o~l_s_:F~I~ the lOB register. SFR area addresses not listed in table 6 are reserved. If SBF Standby Flag read, the contents of these addresses are undefi ned, and any write operation will be meaningless. o No changes in Voo (standby) 1 Rising edge on VOO (cold start) Table 6. Special-Function Registers Address Register Function Symbol R/W Manipulation (Note 6) When Reset xxFOOH Port 0 PO R/W 8/1 Undefined xxF01H Port mode 0 PMO w 8 OFFH xxF02H Port mode control 0 PMCO w 8 OOH xxF08H Port 1 P1 R/W 8/1 Undefined xxF09H Port mode 1 PM1 w 8 OFFH xxFOAH Port mode control 1 PMC1 w 8 OOH xxF10H Port 2 P2 R/W 8/1 Undefined xxF11H Port mode 2 PM2 w 8 OFFH xxF12H Port mode control 2 PMC2 w 8 OOH xxF38H Threshold port PT R 8 Undefined xxF3BH Threshold port mode PMT R/W 8/1 OOH xxF40H External interrupt mode INTM R/W 8/1 OOH xxF44H External interrupt macro service control 0 (Note 1) EMSO R/W 8/1 Unde'fined xxF45H External interrupt macro service control 1,(Note 1) EMS1 R/W 8/1 xxF46H External interrupt macro service control 2 (Note 1) EMS2 R/W 8/1 xxF4CH External interrupt request control 0 (Note 1) EXICO R/W 8/1 47H xxF4DH External interrupt request control 1 (Note 1) EXIC1 R/W 8/1 xxF4EH External interrupt request control 2 (Note 1) EXIC2 R/W 8/1 29 pPD70335 (V3S Plus) NEe Table 6. Special-Function Registers (cont) Address Register Function Symbol R/W Mani pulation (Note 6) When Reset xxF60H Receive buffer 0 RxBO R 8 Undefined xxF62H Transmit buffer 0 TxBO W 8 xxF65H Serial receive macro service control 0 (Note 1) SRMSO R/W 8/1 xxF66H Serial transmit macro service control 0 (Note 1) STMSO R/W 8/1 xxF68H Serial mode register 0 SCMO RIW 8/1 OOH xxF69H Serial control register 0 SCCO R/W 8/1 xxF6AH Baud rate generator 0 BRGO R/W 8/1 xxF6BH Serial status register 0 SSTO R 8 60H xxF6CH Serial error interrupt request register 0 (Note 1) SEICO R/W 8/1 47H xxF6DH Serial receive interrupt request register 0 (Note 1) SRICO R/W 8/1 xxF6EH Serial transmit interrupt request register 0 (Note 1) STICO R/W 8/1 xxF70H Serial receive buffer 1 RxB1 R 8 Undefined xxF72H Serial transmit buffer 1 TxB1 W 8 xxF75H Serial receive m'acro service register 1 (Note 1) SRMS1 R/W 8/1 xxF76H Serial transmit macro service register 1 (Note 1) STMS1 R/W 8/1 xxF78H Serial communication register 1 SCM1 R/W 8/1 OOH xxF79H Serial control register 1 SCCt R/W 8/1 xxF7AH Baud rate generator 1 BRG1 RIW 8/1 xxF7BH Serial status register 1 SCS1 R 8 60H xxF7CH Serial error interrupt request register I (Note 1) SEIC1 R/W 8/1 47H xxF7DH Serial receive interrupt request register 1 (Note 1) SRIC1 R/W 8/1 xxF7EH Serial transmit interrupt request register 1 (Note 1) STIC1 RIW 8/1 xxF80H Timer register 0 (Note 2) TMO R/W 16 Undefined xxF82H Timer 0 modulo register (Note 2) MOO R/W 16 xxF88H Timer register 1 (Note 2) TM1 R/W 16 xxF8AH Timer 1 modulo register (Note 2) M01 R/W 16 xxF90H Timer 0 control register (Note 2) TMCO R/W 8/1 OOH xxF91H Timer 1 control register (Note 2) TMC1 R/W 8/1 xxF94H Timer unit 0 macro service register (Note 1) TMMSO RIW 8/1 Undefined xxF95H Timer unit 1 macro service register (Note 1) TMMS1 R/W 8/1 xxF96H Timer unit 2 macro service register (Note 1) TMMS2 R/W 8/1 xxF9CH Timer unit 0 interrupt request register (Note 1) TMICO R/W 8/1 47H xxF9DH Timer unit 1 interrupt request register (Note 1) TMIC1 R/W 8/1 xxF9EH Timer unit 2 interrupt request register (Note 1) TMIC2 RIW 8/1 xxFAOH DMA address update control register 0 DMACO R/W 8/1 Undefined xxFA1H DMA mode register 0 DMAMO RIW 8/1 47H xxFA2H DMA address update control register 1 DMAC1 R/W 8/1 Undefined xxFA3H DMA mode register 1 DMAM1 R/W 8/1 OOH xxFACH DMA interrupt request control register 0 (Note 1) DICO R/W 8/1 47H xxFAOH DMA interrupt request control register 1 (Note 1) DIC1 R/W 8/1 30 NEe pPD7033S (V3S Plus) Table 6. Special-Function Registers (cont) Address Register Function Symbol R/W Manipulation (Note 6) When Reset xxFCOH DMA channel 0 source address pointer low SAEOL R/W 16/8 Undefined xxFC1H DMA channel 0 source address pointer mid SAEOM R/W 16/8 xxFCOH DMA Channel 0 source address pointer low SAEOL R/W 16/8 xxFC1H DMA channel 0 source address pointer mid SAEOM R/W 16/8 xxFC2H DMA channel 0 source address pointer high SAROH R/W 8 xxFC4H DMA channel 0 destination address pointer low DAROL R/W 16/8 xxFC5H DMA channel 0 destination address pointer mid DAROM R/W 16/8 xxFC6H DMA channel 0 destination address pointer high DAROH R/W 8 xxFC8H DMA channel 0 count register DMATCO R/W 16/8 xxFDOH DMA channel 1 source address pointer low SAR1L R/W 16/8 xxFD1H DMA channel 1 source address pointer mid SAR1M R/W 16/8 xxFD2H DMA channel 1 source address pointer high SAR1H R/W 8 xxFD4H DMA channel 1· destination address pointer low DAR1L R/W 16/8 xxFD5H DMA channel 1 destination address pointer mid DAR1M R/W 16/8 xxFD6H xxFD8H xxFEOH DMA channel 1 destination address pointer high DMA channel 1 terminal count register Standby control register DAR1H DMATC1 STBC R/W R/W R/W (Note 3) 8 16/8 8/1 Undefined (Note 4) m xxFE1H Refresh mode register RFM R/W 8/1 OFCH xxFE8H Wait state control WTC R/W 16/8 OFFFFH xxFEAH User flag (Note 5) FLAG R/W 8/1 OOH xxFEBH Processor control register PRC R/W 8/1 4EH xxFECH Time base interrupt request control register TBIC R/W 8/1 47H (Note 1) xxFEFH Interrupt factor register (Note 1) IROS R 8 Undefined xxFFCH Interrupt priority control register (Note 1) ISPR R 8 OOH xxFFFH Internal data area base IDB R/W 8/1 OFFH Notes: (1) One wait state is inserted into accesses to these registers. (4) Upon power-on reset = OOH; other = no change. (2) A maximum of 6 wait states are added into accesses to these (5) For the user flag register (FLAG), manipulating bits other than registers. bits 3 and 5 is meaningless. The contents of user flags 0 and 1 (FO (3) Each bit of the standby control register can be set to 1 by an and F1) of the FLAG register are affected by manipulating FO and instruction; however, once set, bits cannot be reset to 0 by an F1 of the PSW instruction (only 1 can be written to this register). (6) The manipulation column indicates which memory operations can read or modify the register according to the following key. 16 Word operations 8 Byte operations Bit operations 31 pPD70335 (V35 Plus) NEe ELECTRICAL SPECIFICATIONS Comparator Characteristics Voo = + 5 V ±10%; TA = -10 to + 70°C Note: The de and ac characteristics specified in this data Parameter Symbol Min Max Unit Conditions sheet are for 8-MHz parts (lJPD70335-8). The specifica- tions for 10-MHz parts (J./PD70335-10) are in a separate Accuracy VACOMP ±100 mV publication. Threshold voltage 0 V VTH VOO + 0.1 Comparison time tCOMP 64 65 tCYK Absolute Maximum Ratings TA = 25°C PT input voltage VIPT 0 VOO V Supply voltage, Voo -0.5 to +7.0 V Input voltage, VI -0.5 to Voo + 0.5 V (::; + 7.0 V) Capacitance Voo = OV; TA = 25°C Output voltage, Vo -0.5 to Voo + 0.5 V (::; + 7.0 V) Parameter Symbol Min Max Unit Conditions Threshold voltage, VT H -0.5 to Voo + 0.5 V (::; + 7.0 V) Input capacitance CI 10 pF fc = 1 MHz; Output current, low; IOL unmeasured pins Output capacitance Co 20 pF Each output pin 4.0 rnA returned to 0 V I/O capacitance CIO 20 pF Total SOmA Output current, high; IOH DC Characteristics; J£PD70335-8 Each output pin -2.0 rnA voo = +5V ±10%; TA = -10to +70°C (Note.1) Total -20 rnA Parameter Symbol Min Typ Max Unit Conditions Operating temperature range, TOPT -10 to +70°C Supply current, 1001 65 120 rnA Storage temperature range, TSTG -65 to +150°C operating Exposure to Absolute Maximum Ratings for extended periods may Supply current, 1002 25 50 rnA affect device reliability; exceeding the ratings could cause perma- HALT mode nent damage. Supply current, 1003 10 30 JiA STOP mode Supply Current VB Clock Frequency VTH supply ITH 0.5 1.0 rnA VT H = 0 to VOO current 140 - I- TA = 25°C Voo =5V Input voltage, VIL o 0.8 V ~ I-Typical Sample i~fs~ low 120 Input voltage, 2.2 VIH1 VOD V All inputs high except RESET, ..- ....... 100 -- -- P1o/NMI, X1, X2 1c 80 ~ VIH2 0.8 x VOO V RESET, P101 c 60 40 .-- -- .-- ~ Output voltage, low Output voltage, VOL VOH Voo Voo 0.45 V V NMI, X1, X2 IOL = 1.6mA IOH = -0.4 rnA 20 high -1.0 2 3 4 5 6 7 8 9 10 Input current ±20 JiA EA, P101NMI; fSCLK(MHz) VI = 0 toVOO 83NR·7427A Input leakage III ±10 JiA All except EA, current P1o/NMI; VI = 0 to VOO Output leakage ILO ±10 JiA Vo = Oto VOO current Notes: (1) The standard operating temperature range is -10 to +70°C. However, extended temperature range parts (-40 to +85°C) are available with certain restrictions. 32 NEe pPD70335 (V35 Plus) AC Characteristics; "PD70335-8 VOO = +5 V ±10%; TA -10 to + 70°C; CL = 100 pF (max) n = total number of wait states; T = CPU clock period (tcyKl Parameter Symbol Min Max Unit Conditions Input rise, fall time tlR, tlF 20 ns Except X1, X2, RESET, NMI Input rise, fall time tlRS' tlFS 30 ns RESET, NMI (Schmitt) Output rise, fall time tOR, tOF 20 ns Except CLKOUT X1 cycle time tCYX 62 250 ns X1 width, high/low tWXH/tWXL 20 ns X1 rise, fall time tXR, tXF 20 ns CLKOUT cycle time tCYK 125 2000 ns CLKOUT width, high/low tWKH/t,WXL 0.5T -15 ns CLKOUT rise, fall time tKR, tKF 15 ns Address delay time tOKA 15 90 ns Address valid to input data valid tOAOR (n + 1 .5)T - 70 ns MREQ to address hold time tHMRA 0.5T - 30 ns MREQ to data delay tOMRO (n+ 2)T- 60 ns MSTB to data delay MREQ to MSTB delay tOMSO tOMRMSR T-35 (n + 1)T - 60 T + 35 ns ns 1m MREQ width, low twMRL (n + 2)T -30 ns MREQ, MSTB to address hold time tHMA 0.5T - 30 ns Input data hold time tHMO 0 ns Next control setup time tscc T-25 ns MREQ to TC delay time tOMRTC 0.5T + 50 ns MREQ delay time tOAMR 0.5T - 30 ns MSTB read delay time tOAMSR 0.5T- 30 ns Read cycle MSTB width, read low twMSLR (n+1)T-30 ns Address data output tOAOW 0.5T -35 0.5T + 50 ns Data output setup time tSOM (n + 2)T - 50 ns MSTB write delay time tOAMSW (n +0.5)T - 30 ns Write cycle MREQ to MSTB write delay time tOMRMSW (n + 1)T-35 (n + 1)T + 35 ns MSTB write width low twMSLW T-30 ns Write cycle Data output hold time tHMOW 0.5T - 30 ns 10STB delay time tOAIS 0.5T -30 ns 10STB to data input tOISO (n + 1)T-60 ns 10STB width, low tWISL (n + 1)T-30 ns Address hold time from 10STB t tHISA 0.5T - 30 ns I/O cycle Data hold time from 10STB t tHISOR 0 ns MREQ to 10STB delay time tOMRIS T-35 ns Next DMARQ setup time tSOAOQ (n -1)T - 50 ns Demand mode DMARQ hold time tHOARQ 0 ns DMAAK read width, low twDMRL (n + 2.5)T -30 ns DMAAK write width, low twOMWL (n + 2)T:... 30 ns 33 pPD70335 (V35 Plus) NEe AC Characteristics; "PD70335-8 (cent) Parameter Symbol Min Max Unit Conditions DMAAK to TC delay time tOOATC OoST + SO ns TC width, low twrCL (n + 3)T - 30 ns REFRQ delay time tOARF OoST- 30 ns REFRQ width, low twRFL (n + 2)T-30 ns Address hold time tHRFA OoST - 30 ns RESET width low twRSL 1 30 ms Crystal oscillator; STOP/ Power on reset twRSL2 S /1s System warm reset READY setup time from MREQ ~ tSCRYO 2T -100 ns First sample n ;:: 2 READY setup time from MREQ tSCRY nT -100 ns n;:: 3 READY hold time from MREQ ~ tHCRYO 2T ns First sample n = 2 READY hold time from MREQ ~ tHCRY nT ns n;:: 3 READY hold time from MREQ ~ tHCRY1 (n -1)T ns READY setup time from CLKOUT ~ tSRYK 20 ns All samples READY hold time from CLKOUT ~ tHKRY 40 ns READY setup time from laSTS ~ tSSRYO T-100 ns First sample n ;:: 2 READY setup time from laSTS ~ tSSRY (n -1)T-100 ns n;:: 3 READY hold time from laSTS ~ tHSRYO T ns First sample n = 2 READY hold time from laSTS ~ tHSRY (n -1)T ns n;:: 3 READY hold time from laSTS ~ tHSRY1 (n -2)T ns HLDRQ setup time tSHQK 30 ns HLDAK output delay time tOKHA 1S 80 ns Sus control float to HLDAK ~ tCFHA T-SO ns HLDAK t to control output time tOHAC T-SO n$ HLDRQ to HLDAK delay tOHQHA 3T + 160 ns HLDRQ ~ to control float time tOHQC 3T + 30 ns HLDRQ width, low tWHQL 10ST ns HLDAK width, low twHAL T ns INTP, DMARQ setup tSIQK 30 ns INTP, DMARQ width, high/low twIQH/tWIQL 8T ns POLL setup time tSPLK 30 n$ NMI width, high/low tWNIH/tWNIL S /1s CTS width, low twCTL 2T n$ INT setup time tSIRK 30 n$ INTAK delay time tOKIA 1S 80 ns INT hold time tHlAlQ 0 ns INTAK width, low twlAL 2T-30 ns INTAK width, high tWIAH T- 30 ns INTAK to data delay time to lAO 2T -130 n$ INTAK to data hold time tHIAO 0 OoST ns SCKO (TSCK) cycle time tCYTK 1000 ns 34 NEe pPD7033S (V3S Plus) AC Characteristics; p.PD70335-8 (cont) Parameter Symbol Min Max Unit Conditions SCKO (TSCK) width, high/low twSTH/ tWSTL 450 ns TxD delay time tOTKO 210 ns TxD hold time 20 ns CTSO (RSCI<) cycle time tCYRK 1000 ns CTSO (RSCK) width, high/low tWSRH/ tWSRL 420 ns RxD setup/hold time 80 ns External System Clock Control Source Recommended Oscillator Components Ceramic Resonator Capacitors Internal Oscillator Manufacturer Product No. C1 (pF) C2 (pF) Kyocera KBR-10.0M 33 33 ! I:: External Clock 1 Murata Mfg. TDK *Crystal CSA16.00MX040 CSA20.00MX040 FCR10.M2S FCR16.0M2S 30 10 30 15 --1m Capacitors 30 10 30 6 Manufacturer Case C1 (pF) C2 (pF) Clock X1 Kinseki (KSS) HC-49/U (KR·100) 22 22 HC-49/U (KR·160) 22 22 HC-49/U (KR-200) 22 22 *AT cut, fundamental mode; 10-, 16-, or 20-MHz crystal X2 recommended. 83SL~718A STOP Mode Data Retention Characteristics TA = -10 to + 70°C Parameter Symbol Min Max Unit Timing Waveforms Data retention voltage VOOOR 2.4 5.5 v AC Input 1 (Except X11 X21 RESET I NMI) VOO rise/fall time 200 ps 2. 0.4 V 4V 4 2.2 V 0.8 V IIR !-IIF Stop Mode Data Retention Timing VOO VDDDR 83-004305A IRVO AC Input 2 (RESET I NMI) 83-004333A ~ AC Output (Except CLKOUT) rt= 0.8 V .2V ~ IIRS It-IIFS 0.8 V 83-004306A lOR - -I-O-F- - . - - 83-004307A 35 pPD70335 (V35Plus) NEe Clock In and Clock Out CLKIN1 [X1j 0.8 V 1-----tCYX----+1 - I+- tKR - -tKF 1\ 2.2 V CLKOUT V .. 0.8 V . tWKL tWKH ICYK Memory Read r-----B1---~---B2----_r----B3~ CLKOUT ADDRESS 015· DO --------+----+--+----<1 REFRQ t:1't~.~---------tWTCL-------~:(' DMRTC 831JB-0052768 36 NEe pPD70335 (V35 Plus) Memory Write r-----B1-----+-----B2----~---B3~ CLKOUT ADDRESS t DADW -·~---------I--t SDM ------~ tscc--- t DMRMSW-k------.I tDMRTC ~---------tWTCL-----------.1 83MB-005277B 37 pPD70335 (V3S Plus) NEe I/O Read ~B1----~-----B2----4----B3~ CLKOUT ADDRESS 0 15 -0 0 +-.....~...............--~I ........................................~............... R/W .--tDMRD--+---~ t DAMR ~----~ I+-----/----+--t WMRL MSTB tDAIS IOSTB ............................................................+-...............~I 83NR-7429B 38 NEe IIPD70335 (V35 Plus) I/O Write ~B1----~----B2----~---B3~ CLKOUT ADDRESS ~---+----tWMRL------~ MSTB -----------------------+----+-------~------~~-------------+------------ 10STB REFRQ 83NR-7430B 39 pPD70335 (V3S Plus) NEe DMA, I/O to Memory ~B1-----r----B2----4----B3~ eLKOUT ADDRESS 0..5 -Do RtW tDAMR~--~~1 ~~-----+-- tsee ----./ DMARQO- DMARQ1 : = ~ -=- - - :. - -t-WT-e-L~ -=- =- =- =- =- - - :"~{ 83MS-005280S 40 NEe pPD70335 (V35 Plus) DMA~ Memory to I/O ~Bl----~----B2----4----B3~ CLKOUT ADDRESS RtW t DAMR -I4--~ '-"-------1-- tscc---~ DMARQO- DMARQl TC1-TCO ---t-{ :===-=--=--=----------twr-C-L-:.-=--=--=----:..- --- 83MB'()()5281B 41 JlPD70335 (V3S'Plus) Refresh ~B1--~~~--B2----4----B3~ CLKOUT 1~--~tDKA ADDRESS RtW tscc---- t DARF ~--+I 1+------ tWRFL--------.I 83MB-005282B CLKOUT--------------------------------------~~-J RESET-------~~·~-_-_-_-_-_-_-_tW_R_S_L1_- ~j;--------~U---------------------------------- _____-____ 83-0043168 CLKOUT _ _ ~~".12~ _ _ _ _ __ RESET-~ ~ 83-0043178 42 NEe pPD70335 (V35 Plus) READY 1 B1 B2IBAW BAW BAW/B2 B3 (RIW) CLKOUT READY 83SL-74328 READY 2 B1 B2JBAW BAW BAWIB2 B3 (RIW) CLKOUT J:1m5 _~~_----Jr­ iOsi'B I.......-~--+-_+-+--+---..J/ READY 83SL-7431B HLDRQ/ HLDAK 1 Bus control" 1-----tDHQHA ---~ HLOAK "A19 -AO, 015-00, MREQ, MSTB, IOSTB, R/W ~---------tWHAL-------~ 43 JlPD70335 (V35 PIUs) ttlEC H LDRQ/HLDAK 2 CLKOUT HLDRQ f4-~-- tWHOL -.,.---.1 Bus control· --1--------of~--_+____::---_:_---------_l( t_D_KH~A t=____~U~--~I~.===========~-t-D-H-OC--------------_-_-_-_-_~________ HLoAK _ ___ r * A19-AO, 015-00, MREQ, MSTB,IOSTB, RNi 83-0043216 INffl DMARQ Input CLKOUT 44 NEe I'PD70335 (V35 Plus) CTSlnput 1t---------. -twcn-===cJ INTR/INTAK tOKIA tHIAIQ tHIAO D7-DO------------~~--------------~----------------------~1 tsc 83-0043268 Serial Transmit (I/O Interface Mode) tCYTK II \ I i\ tWSTL II tWSTH tHTKD TxD j+tDTKD-+ ) C 83MB-005283B Serial Receive (I/O Interface Mode) tCYRK II \ i) I+--tWSRL- .. tWSRH " RxD K l-tSRDK- tHKRD II 83MB-005284B 45 pPD7033S (V3S Plus) NEe INSTRUCTION SET Symbols and Abbreviations (cont) Identifier Description Instructions, grouped according to function, are de- scribed in a table near the end of this data sheet. near-proc Procedure within the current program segment Descriptions include source code, operation, opcode, far-proc Procedure located in another program segment number of bytes, and flag status. Supplementary infor- near-label Label in the current program segment mation applicable to the instruction set is contained in short- Label between -128 and +127 bytes from the end the following tables. label of instruction • Symbols and Abbreviations far-label Label in another program segment • Flag Symbols memptr16 Word containing the offset of the memory location within the current program segment to which • 8- and 16-Bit Registers. When mod = 11, the register control is to be transferred is specified in the operation code by the byte/word memptr32 Double word containing the offset and segment operand (W = 0/1) and reg (000 to 111). base address of the memory location to which • Segment Registers. The segment register is speci- control is to be transferred fied in the operation code by sreg (00,01, 10, or 11). regptr16 16-bit register containing the offse~ of the memory • Memory Addressing. The memory addressing mode location within the program segment to which is specified in the operation code by mod (00, 01, or control is to be transferred 10) and mem (000 through 111). pop-value Number of bytes of the stack to be discarded (0 to • Instruction Clock Count. This table gives formulas 64K bytes, usually even addresses) for calculating the number of clock cycles occupied fp-op Immediate data to identify the instruction code of by each type of instruction. The formulas, which the external floating-point operation depend on byte/word operand and RAM enable/ R Register set disable, have variables such as EA (effective ad- W Word/byte field (0 to 1) dress), W (wait states), and n (iterations or string reg Register field (000 to 111) instructions). mem Memory field (000 to 111) Symbols and Abbreviations mod Mode field (00 to 10) Identifier Description S:W When S:W = 01 or 11, data = 16 bits. At all other reg 8- or 16-bit general-purpose register = times, data 8 bits. reg8 8-bit general-purpose register X, XXX, Data to identify the instruction code of the YVY, ZZZ external floating point arithmetic chip reg16 16-bit general-purpose register AW Accumulator (16 bits) dmem 8- or 16-bit direct memory location AH Accumulator (high byte) mem 8- or 16-bit memory location AL Accumulator (low byte) mem8 8-bit memory location BP Base pointer register (16 bits) mem16 16-bit memory location BW BW register (16 bits) mem32· 32-bit memory location BH BW register (high byte) sfr 8-bit special function register location BL BW register (low byte) imm Constant (0 to FFFFH) CW CW register (16 bits) imm16 Constant (0 to F FF FH) CH CW register (high byte) imm8 Constant (0 to F FH) CL CW register (low byte) imm4 Constant (0 to FH) DW DW register (16 bits) imm3 Constant (0 to 7) DH DW register (high byte) acc AW or AL register DL DW register (low byte) sreg Segment register SP Stack pointer (16 bits) src-table Name of 256-byte translation table PC Program counter (16 bits) src-block Name of block addressed by the IX register PSW Program status word (16 bits) dst-block Name of block addressed by the IV register IX Index register (source) (16 bits) 46 NEe pPD70335 (V35 Plus) Symbols and Abbreviations (cont) Flag Symbols Identifier Description Identifier Description IV Index register (destination) (16 bits) (blank) No change PS Program segment register (16 bits) a Cleared to a SS Stack segment register (16 bits) Set to 1 DSo Data segment a register (16 bits) x Set or cleared according to the result Data segment 1 register (16 bits) U Undefined AC Auxiliary carry flag R Value saved earlier is restored CV. Carry flag P Parity flag 8- and 16-Bit Registers (mod = 11) reg W=O W = 1 S Sign flag 000 AL AW Z Zero flag 001 CL CW DIR Direction flag 010 DL DW IE Interrupt enable flag 011 BL BW v Overflow flag 100 AH SP BRK Break flag II 101 CH BP MD Mode flag 110 DH IX (...) Values in parentheses are memory contents 111 BH IV disp Displacement (8 or 16 bits) ext-disp8 16-bit displacement (sign-extension byte + 8-bit displacement) Segment Registers sreg Register temp Temporary register (8/16/32 bits) 00 DS 1 tmpcy Temporary carry flag (1-bit) 01 PS seg Immediate segment data (16 bits) 10 SS offset Immediate offset data (16 bits) 11 DSo Transfer direction + Addition Memory Addressing Subtraction mem mod = 00 mod = 01 mod = 10 x Multiplication 000 BW + IX BW + IX + disp8 BW + IX + disp16 Division 001 BW + IV BW + IV + disp8 BW + IV + disp16 % Modulo 010 BP + IX BP + IX + disp8 BP + IX + disp16 AND Logical product 011 BP + IV BP + IV + disp8 BP + IV + disp16 OR Logical sum 100 IX IX + dispB IX + disp16 XOR Exclusive logical sum 101 IV IV + disp8 IV + disp16 XXH Two-digit hexadecimal value 110 Direct BP + disp8 BP + disp16 XXXXH Four-digit hexadecimal value 111 BW BW + disp8 BW + disp16 47 ,.,PD70335 (V35Plus) NEe Instruction Clock Count Mnemonic Operand Clocks Mnemonic Operand Clocks ADD reg8, reg8 2 CALL near-proc 21+W [17+W] reg16, reg16 2 regptr16 21+W [17+W] reg8, mem8 EA+7+W memptr16 EA+24+2W [EA+22+2W] reg16, mem16 EA+7+W far-proc 36+2W [32+2WI memptr32 EA+32+4W [EA+20+4W] mem8, reg8 EA+10+2W [EA+7+W] reg16, mem16 EA+ 10+ 2W [EA+ 7 + W] CHKIND reg16, mem32 EA+24+2W reg8, imm8 5 CLA1 CY 2 mem16, imm16 6 DIA 2 mem8,imm8 EA+ 11+2W [EA+9+2W] reg8, CL 8 mem16, imm16 EA+12+2W [EA+8+2W] reg16, CL 8 AL, imm8 5 mem8, CL EA+16+2W [EA+13+W] AW, imm16 6 mem16, CL EA+16+2W [EA+13+W] ADD4S 22+ (30+3W)n [22+ (28+3W)n] reg8, imm3 7 reg16, imm4 7 ADDC Same as ADD mem8, imm3 EA+13+2W [EA+10+W] ADJ4A 9 mem16, imm4 EA+13+2W[EA+9+~ ADJ4S 9 CMP reg8, reg8 2 ADJBA 17 reg16, reg16 2 ADJBS 17 reg8, mem8 EA+7+W reg16, mem16 EA+7+W AND reg8, reg8 2 reg16, reg16 2 mem8, reg8 EA+7+W mem16, reg16 EA+7+W reg8, mem8 EA+7+W reg16, mem16 EA+7+W reg8, imm8 5 reg16, imm8 5 mem8, reg8 EA+10+2W [EA+7+W] reg16, imm16 6 mem16, reg16 EA+10+2W [EA+7+W] memS, imm8 EA+8+W reg8, imm8 5 mem16, immS EA+9+W reg16, imm16 6 mem16, imm16 EA+9+W memS,lmmS EA+11+2W [EA+9+2W] AL, immS 5 mem16, imm16 EA+12+2W [EA+S+2W] AW, imm16 6 AL, imm8 5 CMP4S 22+ (25+2W)n AW, imm16 6 CMPBK memS,memS 25+2W [21 +2W] Bcond (conditional branch) S or 15 mem16, mem16 25+2W [19+2W] BCWZ 8 or 15 CMPBKB 16+ (23+2W)n BA near-label 12 CMPBKW 16+ (23+2W)n short-label 12 CMPM mem8 1S+W regptr16 13 mem16 19+2W memptr16 EA+16+W CMPMB n> 1 16+(16+W)n far-label 15 memptr32 EA+23+2W CMPMW n> 1 16+ (16+2W)n BAK 3 50+5W [3S+5W] CVTBD 19 immS 51 +5W [39+5W] CVTBW 3 BAKCS 15 CVTDB 20 BAKV 50+5W [3S+5W] CVTWL 8 BTCLR 29 DBNZ S or 17 BUSLOCK 2 DBNZE S or 17 DBNZNE S or 17 48 NEe pPD7033S (V3S Plus) Instruction Clock Count (cant) Mnemonic Operand Clocks Mnemonic Operand Clocks DEC reg8 5 MOV reg8, reg8 2 reg16 2 reg16, reg16 2 mem8 EA+13+2W [EA+11+2W] reg8, mem8 EA+7+W mem16 EA+13+2W[EA+9+2W] reg16, mem16 EA+7+W DI 4 mem8, reg8 EA+5+W [EA+2] mem16, reg16 EA+5+W [EA+2] DISPOSE 11+W reg8, imm8 5 DIV AW, reg8 46-56 reg16, imm16 6 AW, mem8 EA+49+W to EA+59+W mem8, imm8 EA+6+W DW:AW, reg16 54-64 mem16, imm16 EA+6+W DW: AW, mem16 EA+57+W to EA+67tW AL, dmem8 10+W DIVU AW, reg8 31 AW, dmem16 10+W AW, mem8 EA+34+W dmem8, AL 8+W [5] DW:AW, reg16 39 dmem16, AW 8+W [5] DW: AW, mem16 EA+43+2W sreg, reg16 4 DSO: 2 sreg, mem16 EA+9+W DS1: 2 reg16, sreg 3 EI EXT reg8, reg8 reg8, imm4 12 41-121 42-122 mem16, sreg AH, PSW PSw, AH EA+6+W [EA+3] 2 3 1m FINT 2 DSO, reg16, EA+17t2W memptr32 FP01 55+5W [43+5W] .DS1, reg16, EA+17+2W FP02 55+5W [43+5W] memptr32 HALT N/A MOVBK mem8,mem8 22+2W [17+W] mem16, mem16 22+2W [19+W] IN AL, imm8 15+W AW, imm8 15+W MOVBKB n> 16+ (18+2W)n [16+ (13+W)n] AL, DW 14+W MOVBKW n> 1 16+(18+2W)n [16+ (10+W)n] AW, DW 14+W MOVSPA 16 INC reg8 5 MOVSPB reg16 11 reg16 2 MUL AW, AL, reg8 31-40 mem8 EA+13+2W [EA+11+2W] AW, AL, mem8 EA+34+Wto EA+43+W mem16 EA+13+2W [EA+9+2W] DW:AW, AW, 39-48 INM mem8, DW 21 +2W [19+2W] reg16 mem16, DW 19+2W [15+2W] DW:AW, AW, EA+42+Wto EA+51+W mem8, DW 18+ (15+2W)n [18+ (13+2W)n] mem16 mem16, DW 18+(13+2W)n [18+ (9+2W)n] reg16, reg16, 39-49 INS reg8, reg8 63-155 imm8 reg8, imm4 64-156 reg16, mem16, EA+ 42+ W to EA+ 52+ W imm8 LDEA EA+2 reg16, reg16, 40-50 LDM mem8 13+W imm16 mem16 13+W reg16, mem16, EA+ 43+ W to EA+ 53+ W LDMB n> 16+(11+W)n imm16 LDMW n> 16+(11+W)n MULU reg8 24 mem8 EA+27+W reg16 32 mem16 EA+33+W 49 pPD7033S (V3S Plus) NEe Instruction Clock Count (cont) Mnemonic Operand Clocks Mnemonic Operand Clocks NEG regS 5 PREPARE imm16, immS imm8 = 0:26+ W reg16 5 immS = 1:37+2W imm8 = n, n > 1 :44+ 19 mem8 EA+13+2W [EA+10+W] (n-1)+2Wn mem16 EA+13+2W [EA+10+W] PS: 2 NOP 4 PUSH reg16 13+W [9+W] NOT reg8 5 mem16 EA+16+2W [EA+12+2W] reg16 5 OS1 10+W [7] mem8 EA+13+2W [EA+10+W] PS 10+W [7] mem16 EA+13+2W [EA+10+W] SS 10+W [7] NOT1 CY 2 OSO 10+W [7] regS, CL 7 PSW 9+W [6] reg16, CL 7 R 74+SW [50] memS, CL EA+15+W [EA+12+W] immS 12+W [9] mem16, CL EA+15+2W [EA+12+W] imm16 13+W[10] reg8, imm3 6 REP 2 reg16, imm4 6 REPE 2 memS, imm3 EA+12+2W [EA+9+W] mem16, imm4 EA+12+2W [EA+9+W] REPZ 2 OR regS, regS 2 REPC 2 reg16, reg16 2 REPNC 2 regS, mem8 EA+7+W REPNE 2 reg16, mem16 EA+7+W REPNZ 2 memS, reg8 EA+10+2W [EA+7+W] mem16, reg16 EA+10+2W [EA+7+W] RET null 19+W pop-value 19+W regS,immS 5 reg16, imm16 6 null 27+2W pop-value 2S+2W memS, immS EA+11 +2W [EA+9+2W] mem16, imm16 EA+12+2W [EA+8+2W] RETI 40+ 3W [34+ W] AL, immS 5 RETRSI 12 AW, imm16 6 ROL regS 1 8 OUT immS, AL 11+W reg16,1 8 immS, AW 9+W mem8,1 EA+16+2W [EA+13+W] Ow, AL 10+W mem16,1 EA+16+2W [EA+13+W] Ow, AW S+W regS, CL 11+2n OUTM Ow, memS 21+2W [19+2W] reg16, CL 11+2n Ow, mem16 19+2W [15+2W] memS, CL EA+ 19+ 2W+ 2n Ow, mem8 18+ (15+2W)n [EA+16tW+2n] [1S+ (13+2W)n] mem16, CL EA+ 19+ 2W+ 2n Ow, mem16 18+ (13+2W)n [EA+16+W+2n] [18+ (9+2W)n] regS, immS 9+2n POLL N/A reg16, immS 9+2n POP reg16 11+W mem8, immS EA+ 15+2W+2n mem16 EA+14+2W [EA+11+W] [EA+12+W+2n] mem16, immS EA+ 15+2W+2n OSO,1 12+W [EA+ 12+ W+ 2n] SS 12+W ROL4 regS 17 OSO 12+W mem8 EA+20+2W [EA+1S+2W] PSW 13+W ROLC Same as ROL R 74+8W [5S] ROR Same as ROL 50 NEe pPD70335 (V35 Plus) Instruction Clock Count (cont) Mnemonic Operand Clocks Mnemonic Operand Clocks ROR4 reg8 21 TEST1 reg8, CL 7 mem8 EA+26+2W [EA+24+2W] reg16, CL 7 RORe Same as ROL mem8, CL EA+12+W mem16, CL EA+12+W SET1 CY 2 DIR 2 reg8, imm3 6 reg16, imm4 6 reg8, CL 7 reg16, CL 7 mem8, imm3 EA+9+W mem16, imm4 EA+9+W mem8, CL EA+15+2W [EA+12+W] mem16, CL EA+ 15+ 2W [EA+ 12+ W] TRANS 11+W reg8, imm3 6 TRANSB 11+W reg16, imm4 6 TSKSW 20 mem8, imm3 EA+12+2W [EA+9+W] XCH reg8, reg8 3 mem16, imm4 EA+ 12+2W [EA+9+ W] reg16, reg16 3 SHL Same as ROL mem8, reg8/ EA+12+2W [EA+9+W] SHR Same as ROL reg8, mem8 SHRA Same as ROL mem16, reg16/ EA+ 12+2W [EA+9+2W] SS: STM STMB mem8 mem16 n> 1 2 13+W[10] 13+W (10] 16+ (9+ W)n [16+ (7+ W)n] XOR reg16, mem16 AW, reg16 reg16, AW 4 4 Same as AND m STMW n> 1 16+ (9+ W)n [16+ (5+ W)n] Notes: STOP N/A (1) If the number of clocks is not the same for RAM enabled and RAM SUB Same as ADD disabled conditions, the RAM enabled value ,is listed first, followed by the RAM disabled value in brackets; for example, SUB4S 22+ (30+3W)n EA+8+2W [EA+6+W] [22+ (28+3W)n] (2) Symbols in the Clocks column are defined as follows. SUBC Same as ADD EA additional clock cycles required for calculation of the effective address TEST reg8, reg8 4 3 (mod 00 or 01) or 4 (mod 10) reg16, reg16 4 W number of wait states selected by the WTC register reg8, mem8 EA+12+W n number of iterations or string instructions reg16, mem16 EA+11+2W mem8, reg8 EA+12+W mem16, reg16 EA+11+2W reg8, imm8 7 reg16, imm16 8 mem8, imm8 EA+9+W mem16, imm16 EA+10+W AL, imm8 5 AW, imm16 6 51 ,.,PD70335 (V35 Plus) NEe Instruction Clock Count for Operations Byte Word RAM Enable RAM Disable RAM Enable RAM Disable Context switch interrupt 27 27 DMA (Single-step mode) 9.5+2W 9.5+2W 15.5+4W 15.5+4W DMA (Demand release mode) (3+W)n (3+W)n (3+W),n (3+W)n DMA (Burst mode) 3.5+ (6+2W)n 3.5+ (6+ 2W)n 9.5+2W+ (6+2W)n 9.5+2W+ (6+2W)n DMA (Single-transfer mode) 3+W 3+W 3+W 3+W Interrupt (INT pin) 57+3W 57+3W Macro service, sfr .... mem 25+W 20+W 25+W 20+W Macro service, mem .... sfr 22+W 21+W 22+W 21+W Macro service (Search char mode), sfr ..... mem 28+W 28+W Macro service (Search char mode), mem +- sfr 38+W 35+W Priority interrupt (Vectored mode) 55+5W 55+5W NMI (Vectored mode) 53+5W 53+5W W = number of wait states inserted into external bus cycle n = number of iterations Bus Controller Latency Interrupt Latency Clocks Clocks Latnecy Mode Typ Max Source Typ Max Hold request Refresh active 9+3W NMI pin 18+N 18+N Intack active 10+2W INT pin 8+N 8+N No refresh or intack 7+2W All others (Note 3) 11+N 27+N DMA request Burst 4 9.5+2W N = number of clocks to complete the instruction (Notes 1, 2) currently executing Single-step 4 15.5+2W Demand release 4 10+2W Single-transfer 4 10+2W Notes: (1) The listed DMA latency times are the maximum number of clocks when a DMA request is asserted until DMAAK or MREQ goes low in the corresponding DMA cycle. (2) The test conditions are: no wait states, no interrupts, no mac- roservice requests, and no hold requests. (3) An additional 6 clocks is required to latch an external INTPn interrupt input. 52 NEe pPD7033S (V3S Plus) Instruction Set Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S Z Data Transfer MOV reg, reg reg +- reg 0 0 0 0 W 2 reg reg mem,reg (mem) +- reg 0 0 0 0 0 W 2-4 mod reg mem reg,mem reg +- (mem) 0 0 0 0 W 2-4 mod reg mem mem,imm (mem) +- imm 0 0 0 W 3-6 mod 0 0 0 mem reg,imm reg +- imm 0 W reg 2-3 acc,dmem When W = 0: AL +- (dmem) 0 0 0 0 0 W 3 WhenW = 1 :AH +- (dmem + 1), AL +- (dmem) dmem,acc WhenW = O:(dmem) +- AL 0 0 0 0 W 3 1m WhenW = 1 : (dmem + 1) +- AH, (dmem) +- AL sreg, reg16 sreg +- reg16 sreg: SS, OSO, OS1 0 0 0 0 2 0 sreg reg sreg,mem16 sreg +- (mem16) sreg : SS, OSO, OS1 0 0 0 0 2-4 mod 0 sreg mem reg16,sreg reg16 +- sreg 0 0 0 0 0 2 0 sreg reg mem16,sreg (mem16) +- sreg 0 0 0 0 0 2-4 mod 0 sreg mem OSO, reg16, reg16 +- (mem32), 0 0 0 0 2-4 mem32 OSO +- (mem32 + 2) mod reg mem OS1,reg16, reg16 +- (mem32), 0 0 0 0 0 2-4 mem32 OS1 +- (mem32 + 2) mod reg mem AH,PSW AH +- S, Z, x, AC, x, P, x, CY 0 0 PSW,AH S,.z, x, AC, x, P, x, CY +- AH 0 0 0 x x x x LOEA reg16, mem16 reg16 +- mem16 0 0 0 0 2-4 mod reg mem TRANS src-table AL +- (8W + AL) 0 0 XCH reg, reg reg ~ reg 0 0 0 0 W 2 reg reg mem,reg (mem) ~reg 0 0 0 0 W 2-4 orreg,mem mod reg mem AW,reg16 AW~reg16 0 0 0 reg or reg16,AW 53 pPD70335 (V3S Plus) NEe Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CV V P S "z Repeat Prefixes REPC While CW ;00 0, the next byte of the 0 0 0 0 primitive block transfer instruction is executed and CW is decremented (-1). If there is a waiting interrupt, it is processed, When CV ;00 1, exit the loop. REPNC While CW ;00 0, the next byte of the 0 0 0 0 0 primitive block transfer instruction is executed and CW is decremented (-1). If there is a waiting interrupt, it is processed. When CY ;00 0, exit the loop. REP While CW ;00 0, the next byte ofthe 0 0 REPE primitive block transfer instruction is REPZ executed and CW is decremented (-1 ). Ifthere is a waiting interrupt, it is processed. Ifthe primitive block transfer instruction is CMPBK or CMPM and Z;oo 1, exitthe loop. REPNE While CW ;00 0, the next byte of the 0 0 0 REPNZ primitive block transfer instruction is executed and CW is decremented (-1). Ifthere is a waiting interrupt, it is processed.lfthe primitive block transfer instruction is CMPBK or CMPM and Z;oo 0, exit the loop. Primitive Block Transfer MOVBK dst-block, When W = 0: (IY) +- (IX) 0 0 0 0 W src-block DIR = 0: IX +- IX + 1, IY +- IV + 1 DIR = 1: IX +- IX:-1, IY +- IY-1 When W = 1: (IY + 1, IY) +- (IX + 1, IX) DIR = 0: IX +- IX + 2, IY +- IY + 2 DIR = 1: IX +- IX-2, IY +- IY-2 CMPBK src-block, Wt"\enW = O:(IX)-(IY) 0 0 0 W x x x x x x dst-block DIR = 0: IX +- IX + 1, IY +- IY + 1 DI R = 1: IX +- IX -1 , IY +- IY-1 WhenW= 1:(IX+ 1, IX)-(IV+ 1, IY) DIR = 0: IX +- IX + 2, IY +- IY + 2 DIR = 1: IX +- IX-2, IV +- IY-2 CMPM dst-block WhenW= O:AL-(IY) 0 0 W x 'x x x x x DIR = 0: IY +- IY + 1 ; DIR = 1: IY +- IY-1 WhenW= 1:AW-(IY + 1, IY) DIR =0: IY +-IY + 2;DIR= 1: IY +-IY-2 LDM src-block When W = 0: AL +- (IX) 0 0 0 W DIR=O:IX +-IX+ 1 ;DIR= 1:IX +-IX-1 WhenW = 1:AW +- (IX + 1, IX) DIR =O:IX +-IX + 2;DIR= 1:IX +-IX-2 STM dst-block When W = 0: (IY) +- AL 0 0 0 W DIR =0: IY +- IY + 1 ;DIR= 1: IY +-IY-1 WhenW= 1:(IY+ 1, IY) +- AW DIR =0: IY +-IY + 2;DIR = 1 :IY +-IY-2 54 NEe pPD70335 (V35 Plus) Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S Z Bit Field Transfer INS reg8, reg8 16-bitfield ~ AW 0 0 0 0 3 0 0 0 0 0 reg reg reg8,imm4 16-bitfield ~ AW 0 0 0 0 4 0 0 0 0 0 0 0 reg EXT reg8, reg8 AW ~ 16-bitfield 0 0 0 0 3 0 0 0 0 reg reg reg8,imm4 AW ~ 16-bitfield 0 0 0 0 4 0 0 0 0 0 0 reg I/O IN acc, imm8 When W = 0: AL ~ (imm8) WhenW= 1:AH ~ (imm8 + 1), AL ~ (imm8) 0 0 0 W 2 1m acc,OW When W = 0: AL ~ (OW) 0 0 W WhenW = 1 :AH ~ (OW + 1), AL ~ (OW) OUT imm8,acc When W = 0: (imm8) ~ AL 0 0 W 2 WhenW = 1: (imm8 + 1) ~ AH, (imm8) ~ AL OW,acc When W = 0: (OW) ~ AL 0 W WhenW = 1:(OW+ 1) ~ AH, (OW) ~ AL Primitive Block I/O Transfer INM dst-block, OW When W = 0: (IY) ~ (OW) 0 0 0 W OIR = 0: IY f- IY + 1 OIR = 1: IY ~ IY-1 When W = 1: (IY + 1, IY) ~ (OW+ 1,OW) OIR = 0: IY ~ IY + 2 OIR = 1:IY ~ IY-2 OUTM OW, src-block When W = 0: (OW) ~ (IX) 0 0 W OIR = 0: IX ~ IX + 1 OIR = 1: IX ~ IX-1 When W = 1: (OW + 1, OW) ~ (IX+ 1,IX) OIR = 0: IX ~ IX + 2 OIR = 1: IX ~ IX - 2 55 pPD70335 (V35 Plus) NEe Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 o Bytes AC CY V P S Z Addition I Subtraction ADD reg, reg reg +- reg + reg o 0 0 0 o 0 W 2 x x x x reg reg mem, reg (mem) +- (mem) + reg o 0 0 0 o 0 0 W 2-4 x x x x x mod reg mem reg,mem reg +- reg + (mem) . o 0 0 0 o 0 W 2-4 x x x x x mod reg mem reg,imm reg +- reg + irrim 000 o 0 S W 3-4 x x x x x o 0 o reg mem,imm (mem) +- (mem) + imm 000 o 0 S W 3-6 x x x x x mod 0 0 o mem ace, imm WhenW = O:AL +- AL + imm o 0 0 0 o o W 2-3 x x x x When W = 1: AW +- AW + imm AD DC reg, reg reg +- reg + reg + CY 000 o 0 W 2 x x x x x reg reg mem, reg (mem) +- (mem) + reg + CY 000 o 0 0 W 2-4 x x x x mod reg mem reg, mem reg +- reg + (mem) + CY 000 o 0 W 2-4 x x x x x mod reg mem reg,imm reg +- reg + imm + CY 000 o 0 S W 3-4 x x x x x o o reg mem,imm (mem) +- (mem) + imm + CY 000 o 0 S W 3-6 x x x x x mod 0 o mem aec,imm When W = 0: AL +- AL + imm + CY 000 o o W 2-3 x x x x x When W = 1: AW +- AW + imm + CY SUB reg, reg reg +- reg - reg o 0 o o W 2 reg reg mem, reg (mem) +- (mem) - reg o 0 o o 0 W 2-4 x x x x x mod reg mem reg,mem reg +- reg - (mem) o 0 o o W 2-4 x x x x mod reg mem reg,imm reg +- reg - imm 000 o 0 s W 3-4 x x x x x o reg mem,imm (mem) +- (mem) - imm o 0 0 o 0 S W 3-6 x x x x x mod o mem acc,imm WhenW = O:AL +- AL - imm o 0 o o W 2-3 x x x x x x When W = 1: AW +- 9 or AC = 1 : 0 0 0 x x u u u u AL ~ AL + 6, AH ~ AH + 1 ,AC ~ 1, CY ~ AC,AL ~ ALANDOFH ADJ4A When (AL AND OFH) > 9 or AC = 1 : 0 0 0 0 x x x x x AL ~ AL + 6, CY ~ CY OR AC, AC ~ 1, WhenAL>9FH,orCY= 1: AL ~ AL + 60H, CY ~ 1 ADJBS When (AL AND OFH) > 9 or AC = 1 : 0 0 x x u u u CY ~ AC, AL ~ AL AND OFH ADJ4S When (AL AND OFH) > 9 or AC = 1 : 0 0 0 x x u x x AL ~ AL - 6, CY ~ CY OR AC, AC ~ 1, . WhenAI,.>9FH,orCY= 1: AL ~ AL + 60H, CY ~ 1 57 pPD70335 (V3S Plus) NEe Instruction Set (cant) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S Z Increment I Decrement INC reg8 reg8 +- reg8 + 1 0 2 x x x x x 0 0 0 reg mem (mem) +- (mem) + 1 W 2-4 x x x x x mod 0 0 0 mem reg16 reg16 +- reg16 + 1 0 0 0 0 reg x x x x OEC reg8 reg8 +- reg8 - 1 0 2 x x x x 0 0 reg mem (mem) +- (mem) - 1 W 2-4 x x x x mod 0 0 mem reg16 reg16 +- reg16 - 1 0 0 0 reg x x x x Multiplication MULU reg8 AW +- AL x reg8 0 0 2 x x u u AH = 0: CY +- 0, V+-~ 0 0 reg AH ~ 0: CY +- 1, V+-1 mem8 AW +- ALx (mem8) 0 0 2-4 x x u AH = O:CY +- 0, V+-~ mod 0 0 mem AH ~ 0: CY +- 1, V+-1 reg16 OW,AW +- AWxreg16 0 2 x x u u OW = 0: CY +- 0, V+-O 0 0 reg OW~O:CY +-1,V +-1 mem16 OW, AW +- AW x (mem16) 0 2-4 x x u u OW = 0: CY +- 0, V+-O mod 0 0 mem OW~O:CY +-1,V +-1 MUL reg8 AW +- AL x reg8 0 0 2 u x x u u u AH = AL sign expansion: CY +- 0, V+-O 0 reg AH ~ AL sign expansion: CY +- 1, V+-1 mem8 AW +- AL x (mem8) 0 0 2-4 u x x u u u AH = AL sign expansion: CY +- 0, V+-O mod 0 mem AH ~ AL sign expansion: CY +- 1, V+-1 reg16 OW,AW +- AWxreg16 0 2 u x x u u OW = AW sign expansion: CY +- 0, V+-~ 0 reg OW ~ AW sign expansion: CY +- 1, V+-1 mem16 OW, AW +- AW x (mem16) 0 2-4 u x x u u u OW = AW sign expansion: CY +- 0, V+-~ mod 0 mem OW ~ AW sign expansion: CY +- 1, V+-1 reg16, reg16 +- reg16ximm8 0 0 0 3 u x x u u u reg16, Product,;; 16 bits: CY +- 0, V+-~ reg reg imm8 Product> 16 bits: CY +- 1, V+-1 reg16, reg16 +- (mem16)ximm8 0 0 0 3-5 u x x u u u mem16, Product,;; 16 bits: CY +- 0, V+-~ mod reg mem imm8 Product> 16 bits: CY +- 1, V+-1 reg16, reg16 +- reg16 x imm16 0 0 0 0 4 u x u u reg16, Product,;; 16bits:CY +- 0, V+-~ reg reg imm16 Product> 16 bits: CY +- 1, V+-1 reg16, reg16 +- (mem16) x imm16 0 0 0 0 4-6 u x x u u u mem16, Product,;; 16 bits: CY +- 0, V+-~ mod reg mem imm16 Product> 16 bits: CY +- 1, V+-1 58 NEe pPD70335 (V35 Plus) Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S Z Unsigned Division DIVU regS temp +- AW u u u When temp -0- regS> FFH: ° reg ° 2 (SP-1, SP-2) +- PSW, (SP-3, SP-4) +- PS, ° (SP-5, SP-6) +- PC, SP +- SP-6, IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All other times: AH +- temp % regS, AL +- temp -0- reg8 memS temp +- AW 2-4 u u u u When temp -0- (memS) > FFH: mod ° mem ° (SP-1, SP-2) +- PSW, (SP-3, SP-4) +- PS, ° (SP-5, SP-6) +- PC, SP +- SP-6, IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All other times: AH +- temp% (memS), AL +- temp -0- (memS) reg16 temp +- AW 2 u u u ° When temp -0- reg16 > FFFFH: (SP-1,SP-2) +- PSW, (SP-3, SP-4) +- PS, (SP-5, SP-6) +- PC, SP +- SP-6, ° reg 1m IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All other times: AH +- temp % reg16, AL +- temp -0- reg16 mem16 temp +- AW 2-4 u u u When temp -7 (mem16) > FFFFH: mod ° mem (SP-1, SP-2) +- PSW, (SP-3,SP-4) +- PS, ° (SP-5, SP-6) +- PC, SP +- SP-6, IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All othertimes: AH +- temp%(mem16),AL +- temp -7 (mem16) Signed Division DIV regS temp +- AW 2 u °° When temp -0- regS> and temp -0- regS ° reg ° > 7FH ortemp -7 regS < and temp -7 regS < 0- 7FH -1 : (SP-1,SP-2) +- PSW, (SP-3, SP-4) +- PS, (SP-5, SP-6) +- PC, SP +- SP-6, IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All other times: AH +- temp % regS, AL +- temp -0- regS memS temp +- AW 2-4 u u u °° When temp -7 (memS) > and (memS) > mod ° mem ° 7 FH or temp -7 (memS) < and temp -7 (memS) < 0-7FH -1: (SP-1,SP-2) +- PSW, (SP-3, SP-4) +- PS, (SP-5, SP-6) +- PC, SP +- SP-6, IE +- 0, BRK +- 0, PS +- (3,2), PC +- (1,0) All other times: AI-! +- temp % (memS), AL +- temp -7 (mem8) 59 pPD70335 (V35 Plus) NEe Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S Z Signed Division (cont) OIV reg16 temp ~ OW,AW 0 2 u u u u u When temp -;- reg16 > 0 and reg16 reg > 7FFFH ortemp -;- reg16 < 0-7FFFH-1: (SP-1,SP-2) ~ PSW, (SP-3,SP-4) ~ PS, (SP-5, SP-6) ~ PC, SP ~ SP-6, IE ~ 0, BRK ~ 0, PS ~ (3,2), PC ~ (1,0) All other times: AH ~ temp % reg16, AL ~ temp -;- reg16 mem16 temp ~ OW,AW 0 2-4 u u u u When temp -;- (mem16) > 0 and (mem16) mod mem > 7 FFFH ortemp -;- (mem16) < 0 and temp -;- (mem16) < 0-7FFFH-1: (SP-1,SP-2) ~ PSW, (SP-3, SP-4) ~ PS, (SP-5, SP-6) ~ PC, SP ~ SP-6, IE ~ 0, BRK ~ 0, PS ~ (3,2), PC ~ (1,0) All other times: AH ~ temp%(mem16),AL ~ temp -;- (mem16) Data Conversion CVTBO AH ~ AL -;- OAH, AL ~ AL % OAH 0 0 0 0 2 u x x x 0 0 0 0 0 0 CVTOB AH ~ 0, AL ~ AH x OAH + AL 0 0 0 2 u x x x 0 0 0 0 0 0 CVTBW When AL < 80H: AH ~ 0 0 0 0 0 0 All other times: AH ~ FFH CVTWL When AL < 8000H: OW ~ 0 0 0 0 0 All other times: OW ~ FFFFH Comparison CMP reg, reg reg-reg 0 0 0 W 2 x x x x reg reg mem,reg (mem)-reg 0 0 0 0 W 2-4 x x x x x x mod reg mem reg,mem reg-(mem) 0 0 0 W 2-4 x x x x x mod reg mem reg,imm reg-imm 0 0 0 0 0 S W 3-4 x x x x x x reg mem,imm (mem)-imm 0 0 0 0 0 S W 3-6 x x x x x x mod mem acc,imm WhenW = O:AL-imm 0 0 0 W 2-3 x x x x x WhenW= 1:AW-imm 60 NEe pPD70335 (V35 Plus) Instruction Set (cant) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P 5 Z Complement NOT reg reg +- reg 0 W 2 0 0 reg mem (mem) +- (mem) 0 W 2-4 mod 0 0 mem NEG reg reg +- reg + 1 0 1. W 2 x x x x 0 reg mem (mem) +- (mem) + 1 0 W 2-4 x x x x mod 0 mem Logical Operation TEST reg, reg reg AND reg 0 0 0 0 0 W 2 0 0 x x x reg reg mem,reg (mem) AND reg 0 0 0 0 0 W 2-4 u 0 0 x x xII or reg, mem mod reg mem reg,imm regANDimm 0 W 3-4 0 0 x 0 0 0 reg mem,imm (mem) AND imm 0 W 3-6 u 0 0 x x mod 0 0 0 mem ace, imm When W = 0: AL AND imm8 0 0 0 0 W 2-3 u 0 0 x x When W = 1: AW AND imm8 AND reg, reg reg +- reg AND reg 0 0 0 0 0 W 2 u 0 0 x x reg reg mem,reg (mem) +- (mem) AND reg 0 0 0 0 0 0 W 2-4 0 0 x x mod reg mem reg,mem reg +- reg AND (mem) 0 0 0 0 0 W 2-4 u 0 0 x x mod reg mem reg,imm reg +- reg AND imm 0 0 0 0 0 0 W 3-4 0 0 x 0 0 reg mem,imm (mem) +- (mem) AND imm 0 0 0 0 0 0 W 3-6 u 0 0 x x mod 0 0 mem ace, imm When W = 0: AL +- AL AND imm8 0 a 0 0 0 W 2-3 u 0 0 x When W = 1: AW +- AW AND imm16 61 pPD70335 (V35 Plus) NEe Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 o Bytes AC CY V P S Z Logical Operation (cont) OR reg, reg reg +- reg OR reg o 0 0 0 o W 2 u o 0 x x x reg reg mem,reg (mem) +- (mem) OR reg o 0 0 0 o 0 W 2-4 o 0 x x x mod reg mem reg,mem reg +- reg OR (mem) o 0 0 0 o W 2-4 o 0 x x x mod reg mem reg,imm reg +- reg OR imm 000 o 0 0 W 3-4 o 0 x x o 0 reg mem,imm (mem) +- (mem) OR imm o 0 0 o 0 0 W 3-6 o 0 x x mod 0 0 mem acc,imm When W = 0: AL +- AL OR imm8 o 0 0 0 o W 2-3 o 0 x When W = 1: AW +- AW OR imm16 XOR reg, reg reg +- reg XOR reg o 0 o 0 W 2 o 0 x x reg reg mem, reg (mem) +- (mem) XOR reg o 0 o 0 0 W 2-4 o 0 x x mod reg mem reg,mem reg +- reg XOR (mem) o 0 o 0 W 2-4 u o 0 x mod reg mem reg,imm reg +- reg XOR imm o 0 0 o 0 0 W 3-4 o 0 x x o reg mem,imm (mem) +- (mem) XOR imm 000 o 0 0 W 3-6 o 0 x x mod o mem ace, imm When W = 0: AL +- AL XOR imm8 o 0 o o W 2-3 o 0 x x x When W = 1: AW +- AW XOR imm16 Bit Operation TEST1 reg8, CL reg 8 bit no. CL = 0: Z +- 1 o 0 0 0 3 o 0 u u x reg8 bit no. CL = 1 : Z +- 0 000 o 0 0 0 o 0 o reg mem8,CL (mem8) bit no. CL = 0: Z +- 1 o 0 0 0 3-5 u o 0 u u (mem8) bit no. CL = 1: Z +- 0 o 0 0 o 0 0 0 mod 0 0 o mem reg16,CL reg16 bit no. CL = 0: Z +- 1 o 0 0 0 3 u o 0 u u x reg16bitno.CL = 1:Z +- 0 000 000 o 0 o reg mem16,CL (l11em16) bit no. CL = 0: Z +- 1 o 0 0 0 3-5 o 0 x (mem16) bit no. CL = 1: Z +- 0 o 0 0 000 mod 0 0 o mem reg8, imm3 reg8 bit no. imm3 = 0: Z +- 1 o 0 0 0 4 u o 0 u x reg8 bit no. imm3 = 1 : Z +- 0 000 o 0 0 o 0 o reg 62 NEe pPD7Q335 (V3S Plus) Instruction Set (cant) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P 5 Z Bit Operation (cont) TEST1 mem8,imm3 (mem8) bit no. imm3 = 0: Z +- 1 0 0 0 0 4-6 0 0 u u x (mem8) bit no. imm3 = 1: Z +- 0 0 0 0 0 0 0 mod 0 0 0 mem reg16,imm4 reg16 bit no. imm4 = 0: Z +- 1 0 0 0 0 4 0 0 u u x reg16 bit no. imm4 = 1: Z +- 0 0 0 0 0 0 0 0 0 reg mem16,imm4 (mem16) bit no. imm4 = 0: Z +- 1 0 0 0 0 4-6 0 0 x (mem16) bit no. imm4 = 1: Z +- 0 0 0 0 0 0 mod 0 0 0 mem NOT1 reg8, CL reg8 bit no. CL +- reg8 bit no. CL 0 0 0 0 3 , 0 0 0 0 1 0 0 0 0 reg III mem8,CL (mem8) bit no. CL +- (mem8) bit no. CL 0 0 0 0 3-5 0 0 0 0 0 mod 0 0 0 mem reg16, CL reg16 bit no. CL +- reg16 bit no. CL 0 0 0 0 3 0 0 0 0 0 0 0 reg mem16,CL (mem16) bit no. CL +- (mem16) bit no. CL 0 0 0 0 3-5 0 0 0 0 mod 0 0 0 mem reg8, imm3 reg8 bit no. imm3 +- reg8 bit no. imm3 0 0 0 0 4 0 0 0 0 0 0 0 reg mem8,imm3 (mem8) bit no. imm3 +- (mem8) bit no. imm3 0 0 0 0 4-6 0 0 0 0 mod 0 0 0 mem reg16, imm4 reg16 bit no. imm4 +- reg16 bit no. imm4 0 0 0 0 4 0 0 0 0 0 0 reg mem16,imm4 (mem16)bitno.imm4 +- (mem16)bitno.imm4 0 0 0 0 4-6 0 0 0 mod 0 0 0 mem CY CY +- CY 0 0 x 63 pPD7033S (V3S Plus) NEe Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S Z Bit Operation (cont) CLR1 reg8,CL reg8 bit no. CL ~ 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 reg mem8,CL (mem8) bit no. CL ~ 0 0 0 0 0 3-5 0 0 0 0 0 0 mod 0 0 0 mem reg16,CL reg16bitno. CL ~ 0 0 0 0 0 3 0 0 0 0 0 0 0 0 reg mem16,CL (mem16) bit no. CL ~ 0 0 0 0 0 3-5 0 0 0 0 0 mod 0 0 0 mem reg8,imm3 reg8 bit no. imm3 ~ 0 0 0 0 0 4 0 0 0 0 0 0 0 0 reg mem8,imm3 (mem8) bit no. imm3 ~ 0 0 0 0 0 4-6 0 0 0 0 0 mod 0 0 0 mem reg16,imm4 reg16 bit no. imm4 ~ 0 0 0 0 0 4 0 0 0 0 0 0 0 reg mem16,imm4 (mem16) bit no. imm4 ~ 0 0 0 0 0 4-6 0 0 0 0 mod 0 0 0 mem CY CY~O 0 0 0 0 DIR DIR ~O 0 0 SET1 reg8,CL reg8 bit no. CL ~ 1 0 0 0 0 3 0 0 0 0 0 0 0 0 0 reg mem8,CL (mem8) bit no. CL ~ 1 0 0 0 0 3-5 0 0 0 0 0 0 mod 0 0 0 mem reg16,CL reg16 bit no. CL ~ 1 0 0 0 0 3 0 0 0 0 0 0 0 0 reg mem16,CL (mem16) bit no. CL ~ 1 0 0 0 0 3-5 0 0 0 0 0 mod 0 0 0 mem 64 NEe pPD70335 (V35 Plus) Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S Z Bit Operation (cont) SET1 regS,imm3 regS bit no. imm3 +- 1 0 0 0 0 .1 4 0 0 0 0 0 0 0 0 reg memS,imm3 (memS) bit no. imm3 +- 1 0 0 0 0 4-6 0 0 0 0 0 mod 0 0 0 mem reg16, imm4 reg16 bit no. imm4 +- 1 0 0 0 0 O· 0 0 0 0 0 0 reg mem16,imm4 (mem16) bit no. imm4 +- 1 0 0 0 0 4-6 0 0 0 0 mod 0 0 0 mem 1m CY CY +-1 0 0 DIR DIR +- 1 0 Shift SHL reg, 1 CY +- MSB of reg, reg +- reg x 2 0 0 0 0 W x x x When MSB of reg ~ CY, V+-1 0 0 reg When MSB of reg = CY, V+-O mem, 1 CY +- MSB of (mem), (mem) +- (mem) x 2 0 0 0 0 W 2-4 x x x x When MSB of (mem) ~ CY, V+-1 mod 1. 0 0 mem When MSB of (mem) = CY, V+- 0 reg,CL temp +- CL, whiletemp~ 0, 0 0 0 W u x repeat this operation, CY +- MSB of reg, 0 0 reg reg +- reg x 2, temp +- temp-1 mem,CL temp +- CL, while temp ~ 0, 0 0 0 W 2-4 u x x x repeat this operation, CY +- MSBof(mem), mod 0 0 mem (mem) +- (mem)x2, temp +- temp-1 reg, immS temp +- immS, while temp ~ 0, 0 0 0 0 0 W 3 u x repeat this operation, CY +- MSB of reg, 0 0 reg reg +- reg x 2, temp +- temp-1 mem,immS temp +- immS, while temp ~ 0, 0 0 0 {) 0 W 3·5 x u x repeatthis operation, CY +- MSB of (mem), mod 0 0 mem (mem) +- (mem)x2, temp +- temp-1 65 IIPD70335 (V35 Plus) NEe Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S z Shift (cont) SHR reg, 1 CY ... LSB of reg, reg ... reg -:- 2 0 0 0 0 W 2 u x x x x When MSB of reg ;c bit following MSB 0 reg ofreg:V ... 1 When MSB of reg = bit following MSB of reg: V ... 0 mem, 1 CY ... LSBof(mem), (mem) ... (mem) -:- 2 0 0 0 0 W 2-4 u x x x When MSB of (mem) ;c bit following MSB mod 0 mem of(mem):V ... 1 When MSB of (mem) = bit following MSB of(mem):V ... 0 reg,CL temp ... CL, while temp ;c 0, 0 0 0 W 2 u u x x x repeatthis operation, CY ... LSB of reg, 0 reg reg ... reg -:- 2, temp ... temp-1 mem,CL temp ... CL, whiletemp;c 0, 0 0 0 W 2-4 u x x repeatthisoperation, CY ... LSBof(mem), mod 0 mem (mem) ... (mem) -:- 2, temp ... temp-1 reg,imm8 temp ... imm8, while temp ;c 0, 0 0 0 0 0 W 3 u x u x x x repeat this operation, CY ... LSB of reg, 0 reg reg ... reg -:- 2, temp ... temp-1 mem,imm8 temp ... imm8, while temp ;c 0, 0 0 0 0 0 W 3-5 u u x x x repeat this operation, CY ... LSB of (mem), mod 0 mem (mem) ... (mem) -:- 2, temp ... temp-1 SHRA reg, 1 CY ... LSB of reg, reg ... reg -:- 2, V ... 0 0 0 0 0 W 2 u x 0 x x MSB of operand does not change reg mem,1 CY ... LSB of (mem), (mem) ... (mem) -:- 2, 0 0 0 0 W 2-4 u x 0 x x V ... 0, MSB of operand does not change mod mem reg,CL temp ... CL, while temp ;c 0, 0 0 0 W 2 u x x x x repeatthis operation, CY ... LSB of reg, reg reg ... reg -:- 2, temp ... temp-1 MSB of operand does not change mem,CL temp ... CL, while temp ;c 0, 0 0 0 W 2-4 u x x x x repeatthisoperation,CY ... LSBof(mem), mod mem (mem) ... (mem) -:- 2, temp ... temp-1 MSB of operand does not change reg,imm8 temp ... imm8, while temp ;c 0, 0 0 0 0 0 W 3 u u x x x repeat this operation, CY ... LSB of reg, reg reg ... reg -:- 2, temp ... temp-1 MSB of operand does not change mem,imm8 temp ... imm8, whiletemp;c 0, 0 0 0 0 0 W 3-5 u x u x x x repeatthisoperation,CY ... LSBof(mem), mod mem (mem) ... (mem) -:- 2, temp ... temp-1 MSB of operand does not change Rotation ROL reg, 1 CY ... MSBofreg, reg ... regx2 + CY 0 0 0 0 W 2 x x MSBofreg;c CY:V ... 1 0 0 0 reg MSB of reg = CY:V ... 0 mem,1 CY ... MSB of (mem), 0 0 0 0 W 2-4 x (mem) ... (mem) x 2 + CY mod 0 0 0 mem MSBof(mem);c CY:V ... 1 MSBof(mem) = CY:V ... 0 66 NEe pPD7033S (V3S Plus) Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S Z Rotation (cont) ROL reg,CL temp +- CL, whiletemp;lO 0, 0 0 0 W 2 x u repeat this operation, CY +- MSB of reg, 0 0 0 reg reg +- reg x 2 + CY, temp +- temp-1 mem,CL temp +- CL, while temp ;10 0, 0 0 0 W 2-4 u repeat this operation, CY +- MSB of (mem), mod 0 0 0 mem (mem) +- (mem) x 2 + CY, temp +- temp-1 reg,imm8 temp +- imm8, while temp ;10 0, 0 0 0 0 0 W 3 u repeatthis operation, CY +- MSB of reg, 0 0 0 reg reg +- regx2 + CY, temp +- temp-1 mem,imm8 temp +- imm8, while temp ;10 0, 0 0 0 0 0 W 3-5 x u repeatthis operation, CY +- MSB of (mem), mod 0 0 0 mem (mem) +- (mem) x 2 + CY, temp +- temp-1 ROR reg, 1 CY +- LSB of reg, reg +- reg -;.. 2, MSB of reg +- CY MSB of reg ;10 bitfollowing MSBofreg:V +-1 0 0 0 0 0 0 reg W x 1m MSB of reg = bit following MSBofreg:V +- 0 mem, 1 CY +- LSB of (mem), (mem) +- (mem) -;.. 2, 0 0 0 0 W 2-4 x x MSBof(mem) +- CY, mod 0 0 mem MSB of (mem) ;10 bitfollowing MSBof(mem):V +- 1 MSB of (mem) = bit following MSBof(mem):V +- 0 reg,CL temp +- CL, while temp ;10 0, 0 0 0 W 2 x u repeat this operation, CY +- LSB of reg, 0 0 reg reg +- reg -;.. 2, MSB of reg +- CY, temp +- temp-1 mem,CL temp +- CL, while temp ;10 0, 0 0 0 W 2-4 x repeat this operation, CY +- LSB of (mem), mod 0 0 mem (mem) +- (mem) -;.. 2, MSB of (mem) +- CY, temp +- temp-1 reg,imm8 temp +- imm8, while temp ;10 0, 0 0 0 0 0 W 3 u repeat this operation, CY +- LSB of reg, 0 0 reg reg +- reg -;.. 2, MSB of reg +- CY, temp +- temp-1 mem,imm8 temp +- imm8, while temp ;10 0, 0 0 0 0 0 W 3-5 u repeatthis operation, CY +- LSB of (mem), mod 0 0 mem (mem) +- (mem) -;.. 2, temp +- temp-1 67 pPD7033S (V3S Plus) NE€ . ...• . . ! . ":(;;' .. Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S z Rotate ROLC reg, 1 tmpcy +-CY,CY +- MSBofreg, 0 0 0 0 W 2 reg +- reg x 2 + tmpcy 0 0 reg MSB of reg = CY:V +- 0 MSB of reg ;.:: CY: V+-1 mem, 1 tmpcy +- CY, CY +- MSB of (mem), 0 0 0 0 W 2-4 (mem) +- (mem) x 2 + tmpcy mod 0 0 mem MSBof(mem) = CY:V +- 0 MSBof(mem);.:: CY:V +- 1 reg,CL temp +- CL, while temp ;.:: 0, 0 0 0 W 2 u repeat this operation, tmpcy +- .CY, 0 0 reg CY +- MSB of reg, reg +- reg x 2 + tmpcy, temp +- temp-1 mem,CL temp +- CL, while temp;.:: 0, 0 0 0 W 2-4 x u repeat this operation, tmpcy +- CY, mod 0 0 . mem CY +- MSB of (mem), (mem) +- (mem) x 2 + tmpcy, temp +- temp-1 reg,imm8 temp +- imm8, while temp;.:: 0, 0 0 0 0 0 W 3 u repeat this operation, tmpcy +- CY, 0 0 reg CY +- MSB of reg, reg +- reg x 2 + tmpcy, temp +- temp-1 mem,imm8 temp +- imm8, while temp;.:: 0, 0 0 0 0 0 W 3-5 u repeatthis operation, tmpcy +- CY, . mod 0 0 mem CY +- MSBof(mem), (mem) +- (mem) x 2 + tmpcy temp +- temp - 1 RORC reg, 1 tmpcy +- CY, CY +- LSBofreg, 0 0 0 0 W 2 x reg +- reg -7 2, MSB of reg +- tmpcy, 0 reg MSB of reg;.:: bit following MSBofreg:V +-1 MSB of reg = bit following MSBofreg:V +- 0 mem, 1 tmpcy +- CY,CY +-LSBof(mem), 0 0 0 0 W 2-4 x x (mem) +- (mem) -7 2, mod 0 mem MSB of (mem) +- tmpcy, MSB of (memj ;.:: bit following MSB of (mem): V+-1 MSB of (mem) = bit following MSB of(mem):V +- 0 reg,CL temp +- CL, while temp ;.:: 0, 0 0 0 W 2 u repeatthisoperation, tmpcy +- CY, 0 reg CY +- LSB of reg, reg +- reg -7 2, MSB of reg +- tmpcy, temp +- temp-1 mem,CL temp +- CL, whiletemp;.:: 0, 0 0 0 W 2 c4 x repeatthisoperation, tmpcy +- CY, mod 0 mem CY +- LSB of (mem), (mem) +- (mem) -72, MSB of (mem) +- tmpcy, temp +- temp-1 reg,imm8 temp +- imm8, while temp ;.:: 0, 0 0 0 0 0 W 3 repeat this operation, tmpcy +- CY, 0 reg CY +- LSBofreg, reg +- reg -7 2, MSBofreg +- tmpcy, temp +- temp-1 mem,imm8 temp +- imm8, while temp ;.:: 0, 0 0 0 0 0 W 3-5 u repeat this operation, tmpcy +- CY, mod 0 mem CY +- LSBof(mem), (mem) +- (mem) -7 2, MSBof(mem) +- tmpcy, temp +- temp-1 68 NEe IIPD70335 (V35 Plus) Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P 5 Z Subroutine Control Transfer CALL near-proc (SP-1,SP-2) +- PC,SP +- SP-2, 0 0 0 0 3 PC +- PC + disp regptr16 (SP-1, SP-2) +- PC, SP +- SP-2, 2 PC +- regptr16 0 0 reg memptr16 (SP-1, SP-2) +- PC, SP +- SP-2, 2-4 PC +- (memptr16) mod 0 0 mem far-proc (SP-1,SP-2) +- PS, 0 0 0 0 5 (SP-3, SP-4) +- PC, SP +- SP-4, PS +- seg, PC +- offset memptr32 (SP-1,SP-2) +- PS, 2-4 (SP-3, SP-4) +- PC, mod 0 mem SP +- SP-4, PS +- (memptr32 + 2), PC +- (memptr32) RET PC +- (SP + 1, SP), SP +- SP + 2 0 0 0 0 1, 1m pop-value PC +- (SP + 1, SP), 0 0 0 0 0 3 SP +- SP + 2, SP +- SP + pop-value PC +- (SP + 1, SP), PS +- (SP + 3, SP + 2), 0 0 0 SP +- SP + 4 pop-value PC +- (SP + 1, SP), PS +- (SP + 3, SP + 2), 0 0 0 0 3 SP +- SP + 4, SP +- SP + pop-value Stack Manipulation PUSH mem16 (SP-1, SP-2) +- (mem16), 2-4 SP +- SP-2 mod 0 mem reg16 (SP-1, SP-2) +- reg16, SP +- SP-2 0 0 0 reg sreg (SP-1, SP-2) +- sreg, SP +- SP-2 0 0 0 sreg 0 PSW (SP-1,SP-2) +- PSW,SP +- SP-2 0 0 0 0 R Push registers on the stack 0 0 0 0 0 0 imm (SP-1,SP-2) +- imm, 0 0 0 S 0 2-3 SP +- SP - 2, When S = 1, sign extension POP mem16 (mem16) +- (SP + 1, SP), SP +- SP + 2 0 0 0 2-4 mod 0 0 0 mem reg16 reg16 +- (SP + 1, SP), SP +- SP + 2 0 0 reg sreg sreg +- (SP + 1, SP), sreg : SS, DSO, DS1 0 0 0 sreg SP +- SP + 2 PSW PSW +- (SP + 1, SP), SP +- SP + 2 0 0 0 R R R R R R R Pop registers from the stack 0 0 0 0 0 PREPARE imm16, immS Prepare new stack frame 0 0 0 0 0 4 DISPOSE Dispose of stack frame 0 0 0 0 69 pPD7033~ (V3S Plus) NEe Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S Z Branch BR near-label PC +- PC + disp 0 0 0 3 short-label PC +- PC + ext-disp8 0 0 2 regptr16 PC +- regptr16 2 0 0 reg memptr16 PC +- (memptr16) 2-4 mod 0 0 mem far-label P8 +- seg, PC +- offset 0 o. 0 5 memptr32 P8 +- (memptr32 + 2), 2-4 PC +- (memptr32) mod 0 mem Conditional Branch BV short-label if V = 1, PC +- PC + ext-disp8 0 0 0 0 0 2 BNV short-label if V = 0, PC +- PC + ext-disp8 0 0 0 0 2 BC,Bl short-label ifCY = 1, PC +- PC + ext-disp8 0 0 0 0 2 BNC,BNl short-label if CY = 0, PC +- PC + ext-disp8 0 0 0 2 BE,BZ short-label if Z = 1, PC +- PC + ext-disp8 0 0 0 0 2 BNE,BNZ short-label if Z = 0, PC +- PC + ext-disp8 0 0 0 2 BNH short-label if CY OR Z = 1 , PC+- PC + ext-disp8 0 0 0 2 BH short-label if CY OR Z = 0, PC +- PC + ext-disp8 0 0 2 BN short-label if 8 = 1 , PC +- PC + ext-disp8 0 0 0 0 2 BP short-label if 8 = 0, PC +- PC + ext-disp8 0 0 0 2 BPE short-label if P = 1 , PC +- PC + ext-disp8 0 0 0 2 BPO short-label if P = 0, PC +- PC + ext-disp8 0 0 2 BlT short-label if 8 XOR V = 1, PC +- PC + ext-disp8 0 0 0 2 BGE short-label if 8 XOR V = 0, PC +- PC + ext-disp8 0 0 2 BlE short-label if (8 XOR V) OR Z = 1, PC +- PC + ext-disp8 0 0 2 BGT short-label if (8 XOR V) OR Z = 0, PC +- PC + ext-disp8 0 2 DBNZNE short-label CW +- CW-1 1 0 0 0 0 0 2 if Z = 0 and CW ;0: 0, PC +- PC + ext-disp8 DBNZE short-label CW +- CW-1 0 0 0 0 2 if Z = 1 and CW;o: 0, PC +- PC + ext-disp8 DBNZ short-label CW +- CW-1 0 0 0 0 2 if CW ;0: 0, PC +- PC + ext-disp8 BCWZ short-label if CW = 0, PC +- PC + ext-disp8 0 0 0 2 BTClR sfr,imm3, if bit no. imm3 of (sfr) = 1, 0 0 0 0 5 short-label PC +- PC + ext-disp8, 0 0 0 0 bit no. imm3 or (sfr) +- 0 70 NEe pPD70335 (V35 Plus) Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S Z Interrupt BRK 3 (SP-1, SP-2) +- PSW, 0 0 0 0 (SP-3, SP-4) +- PS, (SP-5, SP-6) +- PC, SP +- SP-6, IE +- 0, BRK +- 0, PS +- (15,14), PC +- (13, 12) imm8 (SP-1, SP-2) +- PSW, 0 0 0 2 (~3) (SP-3,SP-4) +- PS, (SP-5, SP-6) +- PC, SP +- SP-6, IE +- 0, BRK +- 0, PC +- (nx4 + 1, nx4), PS +- (n x 4 + 3, n x 4 + 2) n = imm8 BRKV WhenV= 1 0 0 0 (SP-1,SP-2) +- PSW, (SP-3, SP-4) +- PS, (SP-5, SP-6) +- PC, SP +- SP-6, Rm IE +- 0, BRK +- 0, PS +- (19, 18), PC +- (17, 16) RETI PC +- (SP + 1, SP), 0 0 R R R R R PS +- (SP + 3, SP + 2), PSW +- (SP + 5, SP + 4), SP +- SP + 6 RETRBI PC +- Save PC, PSW +- Save PSW 0 0 0 0 2 R R R R R R 0 0 0 0 0 FINT Indicates that interrupt service routine 0 0 0 0 2 to the interrupt controller built in the 0 0 0 0 0 CPU has been completed CHKIND reg16, When (mem32) > reg16 or 0 0 0 0 0 2-4 mem32 (mem32 + 2) < reg16 mod reg mem (SP-1,SP-2) +- PSW, (SP-3, SP-4) +- PS, (SP-5, SP-6) +- PC, SP +- SP-6, IE +- 0, BRK +- 0, PS +- (23,22), PC +- (21,20) CPU Control HALT CPU Halt 0 0 0 STOP CPU Halt 0 0 0 0 0 0 BUSLOCK Bus Lock Prefix 0 0 0 0 FP01 fp-op No Operation 0 X X X 2 (Note 1) Y Y Y Z Z Z fp-op,mem data bus +- (mem) 0 X X X 2-4 mod y y y mem FP02 fp-op No Operation 0 0 0 X 2 (Note 1) y y y Z Z Z fp-op,mem data bus +- (mem) 0 0 0 X 2-4 mod y y y mem Notes: (1) Does not execute but does generate an interrupt. 71 pPD70335 (V35 Plus) t\'EC Instruction Set (cont) Operation Code Flags Mnemonic Operand Operation 7 6 5 4 3 2 0 Bytes AC CY V P S z CPU Control (cont) POLL Poll and Wait 0 0 '0 NOP No Operation 0 0 0 0 0 0 01 IE +- 0 0 0 EI IE +- 1 0 OSO;OS1; Segment Override Prefix 0 0 sreg 0 PS;SS Register Bank Switching MOVSPA 0 0 0 0 2 0 0 0 0 0 BRKes reg16 0 0 0 0 3 0 0 0 0 MOVSPB reg16 0 0 0 0 3 0 0 0 0 reg TSKSW reg16 0 0 0 0 3 x x x x x 0 0 0 0 0 reg 72 NEe NEC Electronics Inc. JlPD70327 (V25 Software Guard) 16-Bit Microcomputer: Software-Secure, Single-Chip, CMOS Description o Internal 256-byte RAM memory The p.PD70327 (V25 Software Guard) is a high- o 1-megabyte memory address space; 64K-byte I/O performance, 16-bit, single-chip microcomputer with an space a-bit external data bus. The p.PD70327 is fully software o Eight internal RAM-mapped register banks compatible with the p.PD70108/116 (V20®/30®) as well as o Four multifunction I/O ports the p.PD70320/330 (V25 ™/35 TM). - 8-bit analog comparator port The p.PD70327 allows external executable code to be - 20 bidirectional port lines encrypted by a user-defined translation table. The - Four input-only port lines p.PD70327 will automatically decode the encrypted op- o Two independent full-duplex serial channels codes internally before the instructions are moved into o Priority interrupt controller the instruction execution register. As a result, the p.PD70327 offers identical performance to the standard - Standard vectored service - Register bank switching V25 even during security mode operation. The security - Macroservice feature may be selected by hardware and/or software, and may be switched from one state to the other under o Pseudo SRAM and DRAM refresh controller software control. o Two 16-bit timers The p.PD70327 has the same complement of internal o On-chip time base counter peripherals as the standard V25 and maintains compat- o Programmable wait state generator ibility with existing drivers. Other than the additional mode select pin, the p.PD70327 also maintains pin com- patibi lity with other members of the standard V25 family. o Two standby modes: STOP and HALT Ordering Information III Note:The electrical specifications of the V25 Software Part Number Clock (MHz) Package Guard and the standard V25 are the same. The instruc- tion sets are also the same except for (BRKS and BRKN ,uPC 70327L-8-xxx 8 84-pin PLCC added to control the Security and Normal operational GJ-8-xxx 8 94-pin plastic QFP modes. For electrical specifications and standard in- structions, refer to the ~PD70320/322 (V25) Data Sheet. Features o Security and normal operational modes o System clock speeds to a MHz (16-MHz crystal) o 16-bit CPU and internal data paths o Functional compatibility with V25 o Software upward compatible with p.PDa086 o New and enhanced V-Series instructions o 6-byte prefetch queue o Two-channel on-chip DMA controller o Minimum instruction cycle: 250 ns at a MHz V20 and V30 are registered trademarks of NEC Corporation. V25 and V35 are trademarks of NEC Corporation. 50185-1 · " pPD70327 ·(V25 Software Guard) . t-{EC Pin Configurations 84-PinPLCC P07/CLKOUT PT7 DO 73 PT6 01 72 PT5 02 71 PT4 03 70 PT3 04 69 PT2 05 68 PT1 06 67 PTO 07 66 P17/REAOY Ao 65 P16fSCKO A1 64 P15 fTOU:!....- A2 6.3 P14I1NTfPO~ A3 62 P13I1NTP2IINTAK A4 61 P1211NTP1 A5 60 P1111NTPO A6 59 P10/NMI A7 58 P27/HLORO A8 57 P26/HLOAK A9 56 P25~ A10 55 P24/0MAAK1 A11 54 P23/0MAR01 I'- co 01 0 .... t\I C'l ~ ~ ~ LO LO LO LO Notes: (1) Pin functions are Identical to jJ.P070320. (2) All IC pins should be tied together and pulled up to V DO with a 10- to 20-k.Q resistor. 83SL-7039B 2 NEe pPD70327 (V25 Software Guard) 94-Pin Plastic QFP § ~ Q O~~=~~~~MN~O~~~~MN~O~~ -1 Register Buffer SCLK = system clock frequency (MHz) Based on the above formula, the following table shows CTSO o---t>--i Transmit Control I the baud rate generator values used to obtain standard RxCO transmission rates when SCLK = 5 MHz. SCKO Baud Rate !! BRGn Error {%} 110 7 178 0.25 Channel 1 150 7 130 0.16 300 130 0.16 ~ l<=i ~ 6 Serial TxB1 TxD1 Register Buffer 600 5 130 0.16 1200 4 130 0.16 ~I ~ 2400 3 130 0.16 Serial RxB1 4800 9600 2 1 130 130 0.16 0.16 RxD1 o-----t>-1 Register Buffer 19.2k 0 130 0.16 38.4k 0 65 0.16 CTS1 1.25M 0 2 0.00 In addition to the asynchronous mode, channel 0 has a RxC1 synchronous I/O interface mode. In this mode, each bit of data transferred is synchronized to a serial clock 83SL·7028A (SCLKO). This mode is compatible with the #,COM75 and #,COM87 series, and allows direct interfacing to these devices. Figures 17, 18, and 19 show the three serial communica- tion registers: SCM, sec, and SCE. 18 NEe pPD70327 (V25 Software Guard) Figure 17. Serial Communication Mode Registers Figure 18. Serial Communication Control (SCM) Register (SCC) I TxRDY I RxB I I I PRTY1 PRTYO CLTSK §LRsc3 MD1 I MDO I o o o o I PRS3 I PRS2 I PRS1 I PRSo 7 0 7 o TxRDY Transmitter Control PRS3-PRSO Baud Rate Generator Input Clock Frequency o Disabled 0000 fSCLKl2 (n = 0) 1 Enabled 0001 fscuq'4 RxB Receiver Control 0010 fscLKl8 0011 fscLKl16 o Disabled 0100 fSCUQ32 1 Enabled 0101 fscLKl64 PRTY1-PRTYO Parity Control 0110 fSCUQ128 01 11 fSCUQ256 o 0 No parity o 1 o parity (Note 1) 1000 fscLKl512 (n = 8) 1 0 Odd parity 1 1 Even parity Figure 19. Serial Communications Error Register CLTSK Character Length (Async Mode) (SCE) Tx Shift Clock (I/O Interface Mode) o 7 bits (Async) RxDn I 0 o o o ERP ERF ERO No effect (I/O intfc) 7 o SLRSCK 8 bits (Async) Trigger transmit (I/O intfc) Stop Bits (Async Mode) R xDn 0, 1 Receive Terminal State Status of RxD pin III ~ Receiver Clock (I/O Interface Mode) - ERP - - - - Parity Error Flag o 1 stop bit (Async) Ext clock input on CTSO (I/O intfc) o No error 2 stop bits (Async) 1 Transmit and receive parity are different Int clock output on CTS1 (I/O intfc) ERF Framing Error Flag MD1-MDO Mode o No error o 0 I/O interface (Note 2) 1 Stop bit not detected o 1 Asynchronous ERO Overrun Error Flag 1 x Reserved o No error Notes: 1 Data is received before receive buffer outputs previous data (1) Parity is 0 during transmit and ignored during receive. (2) I/O interface mode only. DMA CONTROLLER (3) Channel 0 only. The #-,PD70327 has a two-channel, on-chip Direct Mem- ory Access (DMA) controller. This allows rapid data transfer between memory and auxiliary devices. The DMA controller supports four modes of operation, two for memory-to-memory transfers and two for I/O to memory; in all cases, transfer direction is programma- ble. Memory-to-Memory Transfers In the single-step mode, a Single DMA request will commence the alternation of one DMA cycle with one CPU cycle until the prescribed number of transfers (terminal count) is reached. Interrupts are accepted while in this mode. 19 pPD70327 '. (V25.Software' .Guard) Alternatively, ttl. the bursLmode, one' DMA req~est Figure 21. ' DMA,Address Contrt)' Registers causes DMA transfer cycles'to continue consecutively (DMAC) until the DMA terminal count decrements to zero. Soft- ware can initiate memory-to-memory transfers. o o I PD1 PDo o o PSo 7 o I/O:-Jo-Memory Transfers Destination Address Offset The single tr:ansfer· mode 'will. yield~exactly one DMA 00 No modification. ", transfer per DMA request. After the transfer, the bus is 01 Increment returned to the CPU. Alternatively, in demand release 10 Decrement mode, the rising edge of DMARQ enable DMA cycles 11 No modification which continue while the DMA 're.qI,Jest remains active. Source Address Offset 00 No modification DMA Registers 01 Increment 10 Decrement Figures 20 and 21 show the DMA mode registers (DMAM) 11 No modification and the DMA address control registers (DMAC). These control regis.ters (figure 22) are mappec;l into .the In i:lll modes: the TC (Terminl:!1 Count)' output pin' will same area of regis,ter bank 0 as the macroservice control pulse low and a DMA end-of-service int~rrupt request block registers. Thesemacroservice channels should will be internally generated after the programmed num- not be used when the DMA controller is active. ber of transfers have been completed. The bottom of internal RAM contains all the necessary address infor- The DMA controller generates .the physical source and mation for the deSignated DMA channels~ .J:he DMA destination addresses by offsetting Address High regis- channel mnemonics are as follows. ' . ter 12 bi.ts to .the left, and .then, adding .the Addre~s register: The source and des.tinationaddress registers TC Terminal count can be programmed to incre,men.t or decrement indepen- SAR Source address register dently for DMAoperation. , SARH Source address. register high When the EOMA bit is set, the in.ternal DMARQ flag is DAR Destination (;!,ddressregister cleared. Therefore, subsequent requests are recognized DARH Destination address'regis.ter high only after the EDMA bit has been set. Figure 20. DMA Mode Regis.tersiQlfAAf) ,' Figure 22. DMA Channels MD2 I MD1 I MOo I .' w ' lEOMA TDMAI, 0 o 7 o TC1 Transfer Mode, xxEOEH 000 001 Single-step (memory to memory) Oemand release (I/O to memory)." SARH1 I DARH1 DAR1 010 Demanc:t rel~ase (memory to I/O) 011 Reserved' Channel 1 SAR1 100 Burst (l1)emory to memory) 101 Single-transfer (110 to memory) . TCO Channel 0 110 , Single-transfer (memory to liD) ,1 1 1 Reserved SARHO I DARHO w Transfer Method DARO o Byte transfer .' SARO xxEOOH 1 Word transfer EDMA TDMA Transfer Condition o DiSabled If§ I~ 0 8 ~ 1I:::: I\Q Z ~ ~f ~ ~ Notes: (1) Connect pin 9 to GNO through a 5- to 1O-kn resistor. (2) All IC pins should be tied together and pulled up to V 00 with a 10- to 20-kn resistor. 83SL-7209B 2 NEe pPD70337 (V3S Software Guard) 94-Pin Plastic QFP A12/A4 POs NC NC Note 1 A1a /A s P04 A14 /A 6 POa A1S/A7 P02 A16 /A S POi A17 /A 1S POo A19 IC A1S/uBE MREQ RxOO IOSTB GNO MSTB CTsO RlW TxOO Fi'EFRQ Rx01 FiEsET CTSi VOO TxOi VOO P20/0MAROO X2 IC Xi VOO GNO ~ GNO P21/0MAAKO NC NC NC P22ITCO VrH Notes: (1) Connect pin 69 to GNO through a 5- to i0kn resistor. (2) AIlIC pins should be tied together and pulled up to V DO with a 10- to 20-kn resistor. 83SL-721OB 3 '\!""E' ... C • ~ .... : '. J ': ":; pPD70337(V35 ,So,ftware Guardl tit·· ~ ',. t, .. " " . ", Pin Identification Symbol Function Symbol Function Address bus outputs voo +5-volt power source input (two pins) CLKOUT System clock output Threshold voltage input to comparator circuits Clear-to-send input, serial channel 0 GND Ground reference (two pins) Clear-to-send input, serialchahnel 1 IC Internal connection; must be tied to Voo externally :thrciugh a pullup resistor Bidirectional data bus DMAAKO DMA acknowledge output, DMA controller channel 0 DMAAK1 DMA acknowledg~ ou~put, DMA controller channel 1 PIN FUNCTIONS DMARQO DMA requestinput, DMA controller channel 0 Ao-A19 (Address Bus) DMARQ1 DMA request input, DMA controller channel 1 To support dynamic RAMs, the 20-bit address is multi . . HLDAK Hold acknowledge output plexed on 11 lines. When MREO is asserted, A9-A17 are HLDRQ Hold request input valid. When MSTB or 10STB is asserted, A1-A8 and A18 INT Interrupt request i~put are valid. A18 is also multiplexed with UBE and is valid when MREO is asserted. ThereforeA18 is active through~ Interrupt acknowledge output out the bus cycle. A19 and Ao are not multiplexed but INTPO Interrupt request 0 input have dedicated pins and are valid throughout the bus Interrupt request 1input cycle. Interrupt request 2 input I/O read or write strobe output CLKOUT (Clock Out) Memory request output The system clock (ClK) is distributed from the internal Memory strobe output clock generator to the CPU and output to peripheral NMI Nonmaskable interrupt request hardware at the ClKOUT pin. This pin. is sampled at system reset. N/S Normal mode/security mode select input I/O port 0 CTSO (Clear-to-Send 0) I/O port 1 This is the CTS pin of the channel a serial interface. In I/O port 2 .' asynchronous mode, a low-level input on CTSa enables POLL Input on POLL synchronizes the CPU and external transmit operation. In 1/0 interface mode, CTSa is the devices receive clock pili. PTO-PT7 Comparator port input lines CTS1' (Clear-to-Send 1) READY Ready signal input controls insertion of wait states DRAM refresh request output This is the CTS pin of the channel 1 serial interface. In RESET Reset signal input asynchronous mode" a low-level input on CTS1 enables transmit operation. R/W Read/write strobe output RxDO, Receive data input, serial channel 0 00-015 (Data Bus) RxD1 Receive data input, serial channel 1 00-015 is the 16-bit data bus. Serial clock output TCO Terminal count output; DMA completion, channel 0 OMAAKO and OMAAK1 (OMA Acknowledge) Terminal count output; DMA completion, channel 1 These are the DMA acknowledge outputs of the DMA TOUT Timer output controller, channels a and 1. Signals are not output TxDO Transmit data output, serial channel 0 during DMA memory-to-memory transfer operations (burst mode, single-step mode). TxD1 Transmit data output, serial channel 1 UBE Upper byte enable OMARQO and OMARQ1 (OMA Request) X1,X2 Connections to external frequency control source These are the DMA request inputs of the DMA controller, (crystal, ceramic resonator, or clock) channels a and 1. 4 NEe IIPD70337 (V3S Software Guard) H LOAK (Hold Acknowledge) MST8 (Memory Strobe) The HLDAK output signal indicates that the hold request Together with MREQ and RM MSTB controls memory- (HLDRQ) has been accepted. When HLDAK is active accessing operations. MSTB should be used either to (low), the following lines go to the high-impedance state enable data buffers or as a data strobe. During memory with internal 4700-0 pullup resistors: Ao-A19, 00-07, write, a low-level output on MSTB indicates that data on 10STB, MREQ, MSTB, REFRQ, and RiW. the data bus is valid. A low-level output on MSTB indi- cates that multiplexed address bits A1-As, A18, and USE H LORQ (Hold Request) are valid. The HLDRQ input from an external device requests that NMI (Nonmaskable Interrupt) the p,PD70335 relinquish the address, data, and control buses to an external bus master: The NMI input is an interrupt request that cannot be masked by software. The NMI is always accepted by the INT (Interrupt) CPU; therefore, it has priority over any other interrupt. The INT input is a vectored interrupt request from an The NMI input is detected at the effective edge specified external device that can be masked by software. The by external interrupt mode register INTM. Sampled in active high level is detected in the last clock cycle of an each clock cycle, NMI is accepted when the active level instruction. The external device confirms that the INT lasts for some clock cycles. When the NMI is accepted, a interrupt request has been accepted by the INTAK signal number 2 vector interrupt is generated after completion . . , . . output from the CPU. of the instruction currently being executed. ~ The INT signal must be held· high until the first INTAK The NMI input is also used to release the CPU standby signal is output. Together with INTAK, INT is. used for mode. operation with an interrupt controller such as p,PD71059. N/S (N Mode/S Mode) INTAK (Interrupt Acknowlec;tge) Normal or security mode is selected by a fixed high level The INTAK output is the acknowledge signal for the (N) or low level (S) at this pin. This pin is sampled at software-maskable interrupt request INT. The INTAK sig- system reset and at the acceptance of interrupts. nal g.qes low when the CPU accepts INT. The external device inputs the interrupt vector to the CPU via data POe·P07 (Port 0) bus 00-07 in synchronization with INTAK. Port 0 is an 8-bit bidirectional I/O port. INTPO, INTP1, INTP2 (Interrupt from Peripheral 0, P10·P17 (Port 1) 1,2) Lines P1 4 -P1 7 are individually programmable as an input, The INTPn inputs (n = 0,1, 2) are external interrupt output, or control function. The status of P1 0- P13 can be requests that can be masked by software. The INTPn read but these lines are always control functions. input is detected at the effective edge specified by external interrupt mode registerlNTM. P20·P27 (Port 2) The INTPn input is also used to release the HALT mode. P20-P27 are the lines of port 2, an 8-bit bidirectional I/O port. These lines can also be used as control signals for IOST8 (I/O Strobe) the on-chip DMA controllers. A low-level output on 10STB indicates that the I/O bus cycle has been initiated and that the I/O address output POLL (Po") on Ao-A15 is valid. The POLL input is checked by the POLL instruction. If the level is low, execution of the next instruction is MREQ (Memory Request) initiated. If the level is high, the POLL input is checked A low-level output on MREQ indicates that the memory or every five clock cycles until the level becomes low. The I/O bus cycle has started and that address bits Ao, POLL functions are used to synchronize the CPU pro- A9-A17, A 18 and A19 are valid. gram and the operation of external devices. 5 pPD70337 (V3S Software Guard) NEe Note: POLL is effective when P1 4 is specified for the input In the I/O interface mode (channel 0 only), receive data is port mode; otherwise, POLL is assumed to be at low input to the serial register at the rising edge of the level when the POLL instruction is executed. receive clock. PTO -PT7 (Port with Comparator) SCKO (Serial Clock) The PT input is compared with a threshold voltage that is The SCKO output is the transmit clock of serial channel programmable to one of 16 voltage steps individually for O. each of the eight lines. TCO, TC1 (Terminal Count 0,1) READY (Ready) The TCO and TC1 outputs go low when the terminal After READY is de-asserted low, the CPU will synchro- count of DMA service channels 0 and 1, respectively, nize and insert at least two wait states into a read or write cycle to memory or I/O. This allows the processor reach zero, indicating DMA completion. to accommodate devices whose access times are longer than normal execution allows. TOUT (Timer Output) The TOUT signal is a square-wave output from the RE F RQ (Refresh, Request) internal timer. This output pulse can refresh nonstatic RAM. It can be programmed to meet system specifications and is inter- TxDO, TxD1 (Transmit Data 0, 1) nally synchronized so that refresh cycles do not interfere These pins output data from serial channels 0 and 1. with normal CPU operation. In the asynchronous mode, the transmit signal is in a RESET (Reset) frame format that consists of a start bit, 7 or 8 data bits (least significant bit first), parity bit, and stop bit. The This input signal is asynchronous. A low on RESET for a TxDO and TxD1 pins become mark state (high level) certain duration resets the CPU and all on-chip periph- when transmit operation is disabled or when the serial erals regardless of clock operation. The reset operation register has no transmit data. has priority over all other operations. The reset signal is used for normal initialization/startup In the I/O interface mode (channel 0 only), the frame has and also for releasing the STOP or HALT mode. After the 8 data bits and the most significant bit is transmitted reset signal returns high, program executio'n begins first. from address FFFFOH. UBE (Upper Byte Enable) R/W (Read/Write Strobe) UBE is a high-order memory bank selection signal out- When the memory bus cycle is initiated, the R/W signal put. UBE and Ao determine which bytes of the data bus output to external hardware indicates a read (high- level) will be used. UBE is used with Ao to select the even/odd or write (low-level) cycle. It can also control the direction banks as follows. of bidirectional buffers. Operand USE Ao Number of Bus Cycles RxDO, RxD1 (Receive Data 0, 1) Even address word 0 0 These pins input data from serial channels 0 and 1. Odd address word 0 2 In the asynchronous mode, when receive operation is 0 enabled, a low level on the RxDO or RxD1 input pin is Even address byte 0 recognized as the start bit and receive operation is Odd address byte 0 initiated. 6 NEe IIPD70337 (V3S Software Guard) X1, X2 (Clock Control) VTH (Threshold Voltage) The frequency of the internal clock. generator is con- Comparator port PTO-PT7 uses threshold voltage VTH to trolled by an external crystal or ceramic resonator determine the analog reference points. The actual connected across pins X1 and X2. The crystal frequency threshold to each comparator line is programmable to is the same as the clock generator frequency fx. By VTH x n/16 where n = 1 to 16. programming the PR C register, the system clock fre- quency fCLK is selected as fx divided by 2, 4, or 8. GND (Ground) As an alternative to the crystal or ceramic resonator, the Ground reference (two pins). positive and negative phases of an external clock (with frequency fx) can be connected to pins X1 and X2. IC (Internal Connection) Internal connection; must be tied to Voo externally Voo (Power Supply) through a 10-kO to 20-kO resistor. +5-volt power source (two pins). p.PD70337 Block Diagram DMARQO DMAAKO Ao-A19 1m TCO USE DMARQ1 Controller DMAAK1 RESET TC1 HLDAK HLDRQ READY TxDO MREQ RxDO MSTS SCKO RIW CTSO Translation laSTS Table TxD1 POLL RxD1 CTS1 NMI Instruction Decoder INTPO Micro Sequencer INTP1 Micro ROM INTP2 INTAK INT - NlS X1 X2 - - - VDD - - - GND 83YL-5729B 7 pPD70337 (V3S Software Guard) NEe V25N35 FAMILY Another function of the V35S that is different from the V25S is the operation of the READY input pin. This pin is This addition to the V25N35 family of high-integration sampled in the middle of the second bus cycle (BAW1) on microcomputers-the V35 Software Guard (V35S)- the V25S; the V35S samples one clock period later in the offers a direct DRAM interface with an external 16-bit middle of BAW2. data path. It supports both native V25N35 operational modes as well as the enhanced security mode of Other than these bus controller differences, the V35S is operation. The security mode allows external code identical to the V25S in its operation. All internal periph- memory to be encrypted, thus preventing the erals are programmed and operate in the same manner unauthorized inspection of proprietary algorithms. as those of the V25S. The instruction sets of the two processors are identical, and internally both processors V35S Comparison to V25S operate on 16-bit data paths. Additionally, the security The V35S is fully software compatible with the p.PD8088/ mode of the V35S functions identically to that of the 8086 and the p.PD70118/70116 (V20N30) instruction set. V25S, although it fetches 16-bits of opcode per fetch Because the V35S is a ROM less part, all code must be cycle. located in external memory. The external memory may contain both encrypted opcodes and/or normal V-series V35S Comparison to Standard V35 opcodes. The V35S contains the same peripherals and maintains The V35S contains the same core and peripherals as the full upward functional compatibility with the standard V25 Software Guard (V25S). The main difference be- V35. All internal functional units operate and are pro- tween the two is confined to the external bus interface grammed the same as those of the V35. The instruction and bus control logic. While the V25S is designed with set is also a direct superset of the standard V35, contain- an 8-bit external interface, the V35S provides the full ing all instructions of the V35 and adding only two to 16-bit external data path. select the secure/normal operational modes. The V35S external data bus is non-multiplexed; however, The pinouts of the V35S and the V35 are the same except the 20-bit address bus is multiplexed to provide a direct for two pins. DRAM style RAS/CAS bus cycle. As a result, the nominal bus cycle is three CLKOUT states. During the first bus (1) EA on the V35 is IC on the ROMless V35S. state, the address lines output the high 9 bits of the (2) N/S on the V35S is IC on the V35. physical address, A17-A9. During the second bus state, the address lines output low address bits Aa-A1. Address All other pins on the V35S perform identical functions to lines A19 and Ao are not multiplexed and are valid during corresponding pins on the V35. the entire bus cycle. Address line A18 is multiplexed with the Upper Byte Enable signal (UBE) and is valid as an SECURITY MODE OPERATION address during bus state one. During 16-bit transfers to odd addresses (UBE = 0 and Ao = 1), two 8-bit bus The security mode of the p.PD70337 is designed to cycles are performed. protect proprietary user software algorithms by encod- ing the user's programs resident in external system The memory control signals of the V35S and V25S are EPROM or ROM memory. The process encodes only the identical; however, certain timing specifications are dif- first byte of each opcode via a linear translation table. ferent, particularly for static memory interfaces. Refer to The decoding process is performed in real time within the V35 Data Sheet for these timing parameters. Typi- the p.PD70337 and thus does not impact system perfor- cally, the MREQ signal is used to generate the DRAM mance. The flowchart of the conversion process is RAS control signal, and the MSTB Signal is used to shown in figure 1. generate the CAS signal. Like the V25S, the V35S pro- vides an output from the internal refresh control unit, which is also typically gated into the DRAM RAS signal. 8 NEe pPD70337 (V3S Software Guard) Figure 1. Opcode Translation Flowchart The code converter uses the encrypted opcode from the prefetch queue as an address, and provides the correct V35 opcode as data to the instruction register. An exam- ple of this is shown in figure 3. Again, only the first byte of each opcode is decoded, and subsequent bytes are passed directly from the prefetch unit to the execution unit. Figure 3. Opcode Converter Translation Table N Mode r Decoded V25N35 Code A1 34 12 I L o 1 2 3 4 567 8 9 ABCDEF Encoded o 1 Opcode 2 4A 34 12 3 4 A1 5 6 7 8 9 A The user-defined translation table is inserted into each B J,tPD70337 mask at the factory. The J,tPD70337 can be C D dynamically switched from secure mode to normal E mode, thus providing an additional measure of security F 83YL·6757A as well as compatibility with existing ROM versions of V35 software. Note, however, that the V35 Software Guard does not support internal ROM. Mode Switching The opcode translator is effectively a look-up table that is The transition from normal V35 instruction execution to inserted between the instruction prefetch queue and the secure instruction decoding and execution can be per- instruction register of the J,tPD70337. A conceptual dia- formed in either hardware or software. The hardware gram of this is in figure 2. trigger source is provided by the N/S pin of the J,tPD70337. This pin is listed as an internal connection pin Figure 2. Code Converter Functional Diagram on standard V35 systems, and as such, should be pulled up to VD Dthrough a resistor. Thus, a J,tPD70337 used in a standard V35design will execute in normal mode iden- External tically to the standard V35. Code Space The state of the N/S pin is read by the processor at system reset and determines the operational mode of the device at that point. Regardless of the state of this pin, V25S1V35S the p,PD70337 will begin program execution using regis- ter bank 7 as the default register set. (See figure 4.) If the processor samples the N/S pin in the low state, the first Execution opcode fetched from the reset address will be decoded Unit using the on-chip translation table. The Nis pin has an internal pull-up resistor that will set the device to normal mode operation with no external connections. The N/S pin should be set in hardware to a fixed logic state. 83YL·6756A 9 pPD70337 (V3S Software Guard) NEe Figure 4. Operational Mode State Figure 5. Program Status Word (PSW) Transition Diagram MD RB2 RB1 RBO v DIR IE BRK 15 8 S Z F1 AC FO p BRKI I CY I 7 o Status Flag Control Flags V Overflow bit DIR Direction of string processing S Sign IE Interrupt enable Z Zero BRK Break (after every instruction) Auxiliary carry RBn Current register bank flags t-RikJ~=H::::W==/S===W;:I=;N;T~(N;;/S===O~)=i;nffin;j AC RESET (N/S = 0) - RETI/RETRBI P Parity BRKI I/O trap enable CY Carry FO, F1 General-purpose user flags (accessed by flag SF R) MD Normal/security mode select RETI BRKS Operation Timing HW INT Hardware Interrupt SW INT Software Interrupt (BRK, BRKCS, etc) Operational execution of the standard V3S and that of the V35 Software Guard are identical regardless of the RBn Register bank n is selected; n, n', n" = 0 to 7 operational mode selected for the V3S Software Guard. When system is reset, n = 7. However, since the I-tPD70337 is a ROM less device, all 83YL·6758A memory cycles are nominally three system clock periods long. (This is in contrast to the one clock cycle ROM code Software control of the operating mode is performed by fetch of the I-tPD70~32.) Due to its ROMless nature, the the BRKS (Break for Secure Operation) and the BRKN I-tPD70337 does not support the EA pin of the standard (Break for Normal Operation) instructions. These op- V35, and this pin (labeled IC) should be fixed to a logical codes are undefined codes on the standard V3S and high level in the hardware. should not be ported to standard V35 processor envi- ronments. These instructions are detailed in the instruc- ELECTRICAL SPECI FICATIONS tion set section. The electrical specifications of the V35 Software Guard The operational state of the I-tPD70337 is specified by bit and the standard V35 are the same. Refer to the 15 (MD) of the Program Status Word (PSW). The remain- I-tPD70330/332 (V35) Data Sheet. der of the PSW (figure 5) is identical to that of the standard V35. Since portability of V35 and V35 Software INSTRUCTION SET Guard systems is sometimes desired, bit 15 of the PSW should always be written as a logical 1 in standard V35 The instruction sets of the V35 Software Guard and the systems. As with the V25N35, the upper 4 bits of the standard V35 are the same except for the addition of two PSW cannot be updated by POP; the upper 8 bits of the mode change instructions for the V35 Software Guard PSW cannot be updated by MOV. (BRKS and BRKN) described below. Consult the I-tPD70327 (V2S Software Guard) data sheet for additional details of secure mode operation 10 NEe pPD70337 (V3S Software Guard) BRKS Instruction The RETI instruction is used to return to the operating mode prior to execution of the BRKN instruction. The BRKS instruction switches operation to security (S) mode and generates a vectored interrupt. In S mode, the Opcodes fetched operation code is executed after conversion in accordance with the built-in translation table. Clock counts and opcodes applicable to the added mode change instructions are in tables 1 and 2. The RETI instruction is used to return to the operating mode prior to execution of the BRKS instruction. Table 1. Instruction Clock Counts Mnemonic Operand *Clocks BRKN Instruction BRKS immB (*3) 56 + 10T [44 + 10T] The BRKN instruction switches operation to normal (N) BRKN immB (*3) 56 + 10T [44 + 1OT] mode and generates a vectored interrupt. In N mode, the fetched instruction is executed as a I-tPD70330/70332 * Clock counts are specified for internal RAM enabled and [Internal RAM disabled]. (V35) operation code. Table 2. Mode Change Instructions Operation Code Mnemonic Operand Operation 765 4 3 2 1 0 No. of Bytes Flags BRKS imm8 (*3) (SP - 1, SP - 2) +- PSw, (SP - 3, SP - 4) +- PS, 1 1 o 0 0 1 2 Not applicable ~ (SP - 5, SP - 6) +- PC, SP +- SP - 6 IE .... 0, BRK 4 - 0, MD +- 0 PC .... (n x 4 + 1, n x 4) 11m PS .... (n x 4 + 3, n x 4 + 2) n = imm8 BRKN imm8 (*3) (SP - 1, SP - 2) .... PSw, (SP - 3, SP - 4) .... PS, 0 1 1 0 0 0 1 2 Not applicable (SP - 5, SP - 6) .... PC, SP +- SP - 6 IE .... 0, BRK .... 0, MD +- 1 PC +- (n x 4 + 1, n x 4) PS .... (n x 4 + 3, n x 4 + 2) n = imm8 11 JlPD70337 (V3S Software Guard) NEe -12 pPD79011 t-fEC NEG Electronics Inc. 16-Bit Microcomputer: Single-Chip, CMOS, With Built-In RTOS Description D Flexibility to perform status changes by event driven task scheduling function The IlPD79011 is an upgraded IlPD70322 (V25™) single- chip microcomputer with a built-in real-time operating D System clock: 8 MHz maximum system (RTOS). " D V25 hardware compatibility The IlPD79011 provides high-speed multitask process- D CMOS technology ing particularly suited for real-time event processing D Development tools and as a kernel of an embedded control system for - V25 software can be used without modification process control and data processing applications. - Relocatable assembler (RA70320) The RTOS kernel provides extensive system calls for - C compiler (CC70116) task synchronization, control, and communication as -Concurrent CP/M®, MS-DOS®, VMsn.. , and well as interrupt and time management. UNIXTM base The IlPD79011 instruction set is the same as the V25 Ordering Information instruction set. The IlPD79011 hardware is also identi- Part Number Clock Package cal to the stand.ard V25, but uses 6K of the internal ROM for RTOS system code. Refer to the V25 Data Sheet. JlPD79011 L-8 8MHz 84-pin PLCC GJ-8 8 MHz 94-pin plastic QFP Features D Real-time multitask processi ng D Supports five types of system calls - Task management - Communication management - Memory management - Time management -Interrupt management D High-speed response to events -System call processing shortens time to 41 Ils (minimum) when operated at 8 MHz - High-speed task switching using V25 register banks V25 is a trademark of NEC Corporation. CP/M is a registered trademark of Digital Research, Inc. MS-DOS is a registered trademark of Microsoft Corporation. VMS is a trademark of Digital Equipment Corporation. UNIX is a trademark of AT&T Bell Laboratories. 50180-1 JlPD79011 NEe Pin Configurations B4-PlnPLCC P07/CLKOUT PT7 DO PT6 01 PT5 02 71 PT4 03 70 PT3 04 69 PT2 05 68 PT1 Os 67 PTO 07 66 P17/REAOY AO S5 P16/SCKO A1 64 P15ITOU_T_ A2 63 P14I1NT/PO~ A3 62 P13I1NTP2IINTAK A4 61 P12"NTP1 AS 60 P1111NTPO AS 59 P10/NMI A7 58 P27/HLORO A8 57 P26/HLDAK A9 56 P25~ A10 55 P24/0MAAK1 An 54 P23/DMAR01 <0 I"- co 01 o ... N C'? ' ° a: f- x f- x f- ~ Q Q TIc o~<.>- >~~ Q ~ U 0 N N c.. c.. Note: All IC pins should be tied together and pulled up to V DO with a 10- to 20-kO resistor. 83SL~7'9B 2 NEe pPD79011 94-Pin Plastic QFP ~~~c;;~~~I0~~~~~;o~~:e::::!elert~~ 71 P05 A12 70 NC NC 69 IC A13 68 P04 A14 67 P03 A15 66 P02 A16 65 P01 A17 64 POo A18 63 IC A19 62 MREQ RxDO 61 IOSTB GND 60 MSTB CTSO 59 RIW TxDO 58 ~ RxD1 57 RESET CTS1 56 VOD TxD1 55 VOD P20/0MARQO 54 X2 IC 53 X1 VDD 52 GND ~ 51 GND P21/DMAAKO 50 NC NC 49 NC P22ITCO ~ ~ ~ ~ ~ ~ g M ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~48 ~H Note: AIlIC pins should be tied together and pulled up to VDD with a 10- to 20-kQ resistor. 83SL~7~B 3 pPD7,9011. NEe Pin Identification PIN FUNCTIONS Symbol Function Ao-A19 (Address Bus) Address bus outputs Ao-A'9 is the 20-bit address bus used to access all CLKOUT System clock output external devices. Clear to send channel 0 input Clear to send channel 1 input CLKOUT, (System Clock) Bidirectional data bus This is the internal system clock. It can be used to I/O strobe output synchronize external devices to the CPU. Memory request output Memory strobe output CTSn, RxDn, TxDn, SCKO (Clear to Send, Receive Data, Transmit Data, Serial Clock Out) POa-PO; I/O portO' P101NMI Port 1 input line; nonmaskable interrupt The two serial ports (channels 0 and 1) use these lines Port 1 input lines; Interrupt requests from for transmitting and receiving data, handshaking, and peripherals 0 and 1 serial clock output. P131'INTP2/INTAK Port 1 input I,ine; Interrupt requests from peripheral 2; Interrupt acknowledge output 00-07 (Data Bus) P1,JINT/POLL I/O port 1; Interrupt request input; I/O poll input 00-07 is the a-bit external data bus. P151'TOUT I/O port 1; Timer out DMARQn, oMAAKn , TCn (DMA' Request, DMA P1s1SCKO I/O port 1; Serial clock output Acknowledge, Terminal Count) I/O port 1; Ready input P201DMARQO I/O port 2; DMA request 0 These are the control signals to and from the on-chip OMA controller. . I/O port 2; DMA acknowledge 0 I/O port 2j DMA terminal count 0 H LDAK (Hold Acknowledge) P231'DMARQl I/O port 2; DMA request 1 The HLOAK output (active low) informs external devices P2,JDMAAK1 I/O port 2; DMA acknowledge 1 that the CPU has released the system bus. P251'TCl I/O port 2; DMA terminal count 1 P2s1HLDAK I/O port 2; Hold acknowledge output H LORQ (Hold Request) I/O port 2; Hold request input The HLORQ input. (active high) is used by external PTO-PT7 Comparator port input lines devices to request the CPU to release the system bus to Refresh pulse output an external bus master. The following lines go into a RESET Reset input high-impedance state with internal 4.7-kO pullup resis- tors: Ao-A19' 00- 0 7, MREQ, RiW, MSTB, REFRQ, and RxDO Serial receive data channel 0 input IOSTB. RxD1 Serial receive data channel 1 input R/W Read/write output INT (Interrupt Request) TxDO Serial transmit data, channel 0 input INT is a maskable, active-high, vectored request inter- TxDl Serial transmit data, channel 1 input rupt. After assertion, external hardware must provide the Xl, X2 Crystal connection terminals interrupt vector number. Voo Positive power supply voltage INTAK (Interrupt Acknowledge) Threshold voltage input for comparator GND Ground reference After INT is asserted, the CPU will respond with INTAK (active low) to inform external devices that the interrupt IC Internal connection request has been granted. 4 NEe pPD79011 INTPO·INTP2 (External Interrupt) PTO ·PT7 (Comparator Port) INTPO-INTP2 allow external devices to generate inter- PTO-PT7 are inputs to the analog comparator port. rupts. Each can be programmed to be rising or falling edge triggered. READY (Ready) After READY is de-asserted low, the CPU synchronizes 10STS (I/O Strobe) and inserts at least two wait states into a read or write 10STS is asserted during read and write operations to cycle to memory or I/O. This allows the processor to external I/O. accommodate devices whose access times are longer than normal execution. MREQ (Memory Request) REFRQ (Refresh) MREQ (active low) informs external memory that the current bus cycle is a memory access bus cycle. This active-low output pulse can refresh nonstatic RAM. It can be programmed to meet system specifications MSTS(Memory Strobe) and is internally synchronized so that refresh cycles do not interfere with normal CPU operation. MSTS (active low) is asserted during read and write operations to external memory. RESET (Reset) A low on RESET resets the CPU and all on-chip periph- NMI (Nonmaskable Interrupt) erals. RESET can also release the standby modes. After NMI cannot be masked through software and is typically RESET returns high, program execution begins from used for emergency processing. Upon execution, the address FFFFOH. interrupt starting address is obtained from interrupt vector number 2. NM I can release the standby modes and can be programmed to be either rising or falling R/W (Read/Write) RiW output allows external hardware to determine if the IDI edge triggered. current operation is a read or a write cycle. It can also control the direction of bidirectional buffers. POo·P07 (Port 0) POO-PO? are the lines of port 0, an 8-bit bidirectional TOUT (Timer Out) parallel I/O port. TOUT is the square-wave output signal from the internal timer. P10·P17 (Port 1) X1, X2 (Crystal Connections) The status of P1o-P13 can be read but these lines are always control functions. P1 4-P1? are the remaining lines The internal clock generator requires an external crystal of parallel port 1; each line is individually programmable across these terminals. By programming the PRC regis- as either an input, an output, or a control function. ter, the system clock frequency can be selected as the oscillator frequency (fosd divided by 2,4, or 8. P20·P27 (Port 2) Vee (Power Supply) P20-P2? are the lines of port 2, an 8-bit bidirectional parallel I/O port. The lines can also be used as control Two positive power supply pins (VDD) reduce internal signals for the on-chip DMA controller. noise. POLL (Poll) VTH (Threshold Voltage) Upon execution of the POLL instruction, the CPU checks The comparator port uses this pin to determine the the status of this pin and, if low, program execution analog reference point. The actual threshold to each comparator line is programmable to VTH x n/16 where n continues. If high, the CPU checks the level of the line = 1 to 16. every five clock cycles until it is low. POLL can be used to synchronize program execution to external condi- tions. 5 pPD.79011 NEe GND (Ground) IC (Internal Connection) Two ground connections reduce internal noise. All Ie pins should be tied together and pulled up to Voo with a 10- to 20-kO resistor. p.PD79011 Block Diagram P20/DMAROO P21/DMAAKO P22 rrco P23/DMARQ1 P2 4 /DMAAK1 RESET P2srrC1 HLDAKlP26 HLDROip27 READY/P17 TxDO MREO RxDO MSTB P16/SCKO RiW Internal ROM CTSO (OS) 10STB TxD1 POLUINT/P14 RxD1 CTS1 P10/NMI Instruction Decoder P11/1NTPO Micro Sequencer P12/1NTP1 Micro ROM P13/1NTP2 IINTAK P14/1NT IPOLL X1 X2 VDD TOUT/P1S REFRO CLKOUT/P0 7 PO P1 P2 PTO-PT7 VTH GND 83YL·5792B 6 NEe pPD79011 ELECTRICAL SPECIFICATIONS Comparator Characteristics TA = -10 to +70°C; voo = +5.0 V ±10% Absolute Maximum Ratings Parameter Symbol Min Max Unit TA = 25°C Accuracy VACOMP ±100 mV Supply voltage, Voo -0.5 to 7.0 V Threshold voltage VTH 0 Voo+0.1 V Input voltage, VI -0.5 to Voo+0.5 (::;; +7.0 V) Comparison time tCOMP 64 65 tCYK Output voltage, Vo -0.5 to Voo + 0.5 (::;; +7.0 V) PT input voltage VIPT 0 Voo V Threshold voltage, VT H -0.5 to Voo +0.5 (::;; +7.0 V) Output current low, IOl Each output pin 4.0 mA (Total 50 mA) Capacitance TA = 25°C; Voo = 0 V Output current high, IOH Each output pin -2.0 mA (Total -20 mA) Parameter Symbol Min Max Unit Conditions Operating temperature range, TOPT -40 to +85°C Input capacitance CI 10 pF f = 1 MHz; Storage temperature range, TSTG -65 to + 1500C unmeasured Output capacitance Co 20 pF Exposure to Absolute Maximum Ratings for extended periods may pins returned affect device reliability; exceeding the ratings could cause permanent 110 capacitance CIO 20 pF to ground damage. DC Characteristics TA = -10 to +70°C; voo = +5.0 V ±10% Parameter Symbol Min Typ Max Unit Conditions Supply current, operating mode 1001 43 100 mA fCLK = 5 MHz 58 120 mA fCLK = 8 MHz Supply current, HALT mode 1002 17 21 40 50 mA mA fCLK = 5 MHz fCLK = 8 MHz 1m Supply current, STOP mode 1003 10 30 p,A Input voltage, low Vil 0 0.8 V Input voltage, high VIH1 2.2 Voo V All except RESET, P101NMI, X1, X2 VIH2 0.8 x Voo Voo V RESET, P101NMI, X1, X2 Output voltage, low VOL 0045 V IOL = 1.6mA Output voltage, high VOH Voo - 1.0 V IOH = -OAmA Input current liN ±20 p,A P101NMI; VI = 0 to Voo Input leakage current III ±10 p,A All except P101NMI; VI = 0 to Voo Output leakage current ILO ±10 p,A Vo = 0 to Voo VTH supply current ITH 0.5 1.0 mA VTH = 0 to Voo Data retention voltage VOOR 2.5 5.5 V 7 pPD79011 NEe Supply Current vs Clock Frequency External System Clock Control Source 150 Internal Oscillator TA = 25°C 140 I - - Voo = 5 V Typ. Sample 130 splc. - Point 120 110 Spec. Point 100 90 Note: For a parallel resonant quartz crystal, C 1, C2 = 15 pF (recommended) <" 80 §. c 70 E External Clock 60 ~ ~ V 50 Clock X1 V 40 / 30 V V 20 X2 83SL~718A 10 o o Recommended Oscillator Components 4 fCLK [MHz] Ceramic Resonator Capacitors B3-004331A Manufacturer Product No. C1 (pF) C2 (pF) Kyocera KBR-10.0M 33 33 Murata Mfg. CSA.10.0MT 47 47 CSA16.0MX040 30 30 TDK FCR10.M2S 30 30 FCR16.0M2S 15 6 AC Characteristics TA = -10 to +70°C; VD D = +5.0V ±10% Parameter Symbol Min Max Unit Conditions VDD rise, fall time tRv'D, tFVD 200 p.s STOP mode Input rise, fall time tlR, tlF 20 ns Except X1, X2, RESET, NMI Input rise, fall time (Schmitt) tlRS, tlFS 30 ns RESET, NMI Output rise, fall time tOR, tOF 20 ns Except C LKOUT X1 cycle time tcyx 98 250 ns 5-MHz CPU clock 62 250 ns 8-MHz CPU clock X1 width, low tWXL 35 ns 5-MHz CPU clock 20 ns 8-MHz CPU clock X1 width, high twxH 20 ns 5-MHz CPU clock 20 ns 8-MHz CPU clock X1 rise, fall time tXR, tXF 20 ns 8-MHz CPU clock CLKOUT cycle time tCYK 125 2000 ns fx/2, T = tCYK 8 NEe pPD79011 AC Characteristics (cont) Parameter Symbol Min Max Unit Conditions CLKOUT width, low tWKL O,5T -15 ns Note 1 CLKOUT width, high tWKH O,5T -15 ns CLKOUT rise, fall time tKR' tKF 15 ns Address delay time tOKA 15 90 ns Address valid to input data valid tOAOR T(n+1,5) - 90 ns Note 2 MREQ to data delay time tOMRO T(n+1) -75 ns MSTB to data delay time tOMSO T(n+O,5) -75 ns MREQ to TC delay time tOMRTC O,5T+50 ns MREQ to MSTB delay time tOMRMS O,5T -35 0,5+35 ns MREQ width, low tWMRL T(n+1) -30 ns Address hold time tHMA O,5T -30 ns Input data hold time tHMoR 0 ns Next control setup time tscc T -25 ns TC width, low tWTCL 2T-30 ns Address data output tOAOW O,5T +50 ns MREQ delay time tOAMR O,5T -30 ns MSTB delay time tOAMS T -30 ns MSTB width, low Data output setup time tWMSL tSOM T(n+O,5) - 30 T(n+1) -50 ns ns 1m Data output hold time tHMOW O,5T -30 ns IOSTB delay time tOAIS O,5T -30 ns 10STB to data input tDlSO T(n+1) -90 ns 10STB width, low tWISL T(n+1) - 30 ns Address hold time tHISA O,5T -30 ns Data input hold time tHISOR 0 ns Output data setup time tSOIS T(n+1) -50 ns Output data hold time tHISOW O,5T -30 ns Next DMARQ setup time tSDAOQ T ns Demand mode DMARQ hold time tHOAOQ 0 ns Demand mode DMMK read width, low tWOMRL T(n+1,5) -30 ns DMMK to TC delay time tOOATC O,5T+50 ns DMMK write width, low twoMWL T(n+1) - 30 ns RE F RQ delay time tOARF O,5T -30 ns RE F RQ width, low tWRFL (n+1)T - 30 ns Address hold time tHRFA D,5T -30 ns RESET width, low tWRSL 1 30 ms STOP mode release; power- on reset RESET width, low tWRSL2 5 p.s System warm reset MREQ, IOSTB to READY setup time tSCRY T(n -1) -100 ns n ;;:: 2 MR'EO, iOSTB to READY hold time tHCRY T(n -1) ns n ;;:: 2 9 pPD79011 NEe AC Characteristics (cont) Parameter Symbol Min Max Unit Conditions H LDAK output delay time tOKHA 80 ns Bus control float to H LDAK J. tCFHA T-SO ns HLDAK Ho control output time tOHAC T -so ns H LDRQ J. to cont rol output time tOHQC 3T +30 ns H LDAK width, low tWHAL T ns HLDRQ setup time tSHQK 30 ns HLDRQ to HLDAK delay time tOHQHA 3T+160 ns H LDRQ width, low tWHQL 1.ST ns INTP, DMARQ setup time tSIQK 30 ns INTP, DMARQ width, high tWIQH 8T ns INTP, DMARQ width, low tWIQL 8T ns POLL setup time tSPLK 30 ns NMI width, high tWNIH S p's NMI width, low tWNIL S p.s CTS width, low tWCTL 2T ns INTR setup time tSIRK 30 ns INTR hold time tHIAIQ 0 ns INTAK width, low tWIAL 2T-30 ns INTAK delay time tOKIA 80 ns INTAK width, high tWIAH T-30 ns INTAK to data delay time tOIAO 2T -130 ns INTAK to data hold time tHIAO 0 O.ST ns SCKO cycle time tCYTK 1000 ns SCKO (TSCK) width, high tWSTH 4S0 ns SCKO (TSCK) width, low tWSTL 4S0 ns TxD delay time tOTKO 210 ns TxD hold time tHTKO 20 ns eTSO (RSCI<) cycle time tCVRK 1000 ns eTSO (RSCI<) width, high tWSRH 420 ns eTSO (RSCI<) width, low tWSRL 420 ns RxD setup time tSRoK 80 ns RxD hold time tHKRO 80 ns Notes: (1) T = CPU clock period (tcvKl (2) n = number of wait states inserted STOP Mode Data Retention Characteristics TA = -10 to +70°C Parameter Symbol Min Max Unit Data retention voltage VO OOE 2.5 5.5 V Voo rise time tLFVO 200 p.s VOO fall time tFVO°C 200 p's 10 NEe pPD79011 Timing Waveforms Stop Mode Dlltll Retention Timing AC InDUt Kttveform 2 {RESET JI NUl} ~ VOO VOOOR 0.8 V IRVO IIRS l-"FS 83-004306A 83-004333A AC Input Waveform 1 (Except XI, X2, RESET, NUl) AC Output Test Point (Except CLKOUT) 2. 0.4 V 4V 4 2.2 V 0.8 V IIR 4 0.8 V lOR !=-IOF 83-004307A 83-00430SA Clock In Ilnd Clock Out CLKIN1 0.8 VOO [X1] 0.8 V ~----ICYX----..I - I-- IKR -1\ I-IKF 2.2 V CLKOUT IIJ IWKL ICYK IWKH .. 0.8 V 83-0043088 11 pPD79011 NEe Memory Read I~--------B1------~~1--------B2------~ CLKOUT _{t------=:\'--------I:K-)~\'__________'I tOKA_ )~ K tOAOR . It r It I-tOMRO- - tHMOR .. R/Vi I tOAMR I tWMRL tscc- I \k: I{ 1\ l.tOMSO. -tOMRMS- \ i tOAMS- I-tWMSL-! ~ i\ -~( I+-tOMRTC TC1-TCO \1+---1- --tWT-CL- 83-004309C 12 NEe I'P.D79011 Memory Write 1 - - - - B 1 - - - - + . - I - - - - B2 - - - - - - - - 1 eLKOUT ~I+-------\-----.,,'K).......---..--\~! _. ___ IOKA- A19- A O ) K I+-tOAOW- I_IHMA-+ ~ 07-00 ~ ISOM . ~tHMDWy I R/W \ \-IOAMj IWMRL - Isee--,-----.. " !--IOMRMS- 1/ 1\ 1/ " MSTB r\ IOAMS---,---+ ~ IWMSL- 1\ \ \I----~.~IW-TeL---------+l( i-IoMRTe TC1-TCO 83-00431OC 13 pPD79011 NEe I/DRead B1 II B2 I tCYK "I CLKOUT ..J ~ )L K I---tOAOR_ r-tHISA- 1 tOISO ~ R/iii J f\ I+-tOA1S-1 tWISL tscc- 'I I l\- i\. DMAAK1 DMAAKo 83-004311C 14 NEe pPD79011 I/O Writ. B1 I B2 I ICYK I I CLKOUT J ~ A19-AO ) 10AOW K rIHISA ..... 07-00 If ISOIS . IHISOW R/W \ V 1\ . I----tscc- , !--IOAIS ..... IWISL II 1\ i\ 83-004312C 15 pPD79011 NEe OMit, I/O to Memory I~--------B1--------~I---------B2~----~ }=~-------tCYK-------l+t eLKOUT .---IL---\~---'!"""-----""\~---'!-\,",-----JI \ tOKA- } X R/W \ V I+-tOAMR- tWMRL I-o-tHMA- 1\ II 1\ I+-tOMRMS- tscc .. 1\ lJ tOAMS- ~tWMSL_ 1\ [+--tSOAOO_ DMARQO- DMARQ1 ~ I+-tHOAOO ..... ''I II tWOMRL rx I+- tOOATC- I tWTCL J I 83-004313C 16 1tIEC pPD79011 DM~ Memory to I/O ~-------B1--------+-----~-B2-------­ I+-------ICYK - - - - - - - + l CLKOUT _IOKA_ A19- A O ) K R/W J 1\ -tOAMR_ _IHMA _ _ IWMRL ~ 1/ 1\ ISCC rx -' 1\ IOAMS !--IWMSL-I r\ _ISOAOO __ DMARQO DMARQ1 1\ I+-tHOAOO-+ " 1 IWOMWL---l If\b _I j+-1OOATC_ I IWTCL 83-004314C 17 pPD79011 NEe Refresh ~-------B1--------~--------B2--------~ '---------tCYK - - - - - - I CLKOUT ~tDKA- ) K R/W J ~ l\..- I\..- _tDARFj tWRFL I--tHRFA- \ II tscc 83-004315C CLKOUT----------------------------------------~,~-J _---.~I+--.-tWRsL1----.!.~-~lll!--------­ RESET ---------------- 83-0043168 18 NEe pPD79011 RESET 2 CLKOUT __ I~RS"-=, _ _ RESET-~ J 83-0043178 READY 1 ~-----B1----~~----BAW----~------BAW-----+------B2-----1 / READY ______________________ ~;' ~~____________________________________________ 83-0043188 READY 2 ~ r-------------1iiII ~ B1-------1r----- BAW -----+------ BAW -----+----- BW -----+----- B2-----1 MREQ n=2 n=3 -tHCRY* tSCRY* L n=2 In = 3 READY \ VI * tSCRY [READY setup time] and tHCRY [READY hold time] are a function of T and n. Timings shown are examples for n = 2 and n = 3. 83-0043198 19 pPD79011 NEe H LORQ/H LlJAK 1 CLKOUT ~KI------+--------l~ HLORQJ - , Bus control' ~-------tDHQHA------~ 'A19-AO, 07-00, MREQ, MSTB, IOSTB, Riw ~--------------tWHAL--------------~ 83-0043206 HLORQJHLIJAK 2 CLKOUT HLORQ ~------tWHQL----~~ Bus control' --r---------it----i----------------~ IOKH:;:-_ _ _ _ --tU~--~~--------------~--------~-t-DH-Q-C--_-_-_-_-~--~~~~~~:----------- 83-0043218 I NTP, OMARQ Input CLKOUT :===============-tW~~IQ-L~------------------------~~ INTP, OMARQ' ~--------------tWIQH------------~ 'INTP2-INTPO, OMARQ1-0MARQO 83-0043226 20 NEe pPD79011 POLL Input CLKOUT _~IS'" POLL I 83-0043238 Nllllnput CLKOUT NMI-1. tWNIH h tWNIL r 83-004324B CTSlnput CLKOUT Em CTS1-CTSO~ ) tWCTL r 83-0043258 21 pPD79011 NEe INTR/INTAK CLOOUT INTR r'~--4---' tOKIA tHIAIQ 07-DO--------------~r----------------+_--------------------------~ 83-0043268 Serial Transmit CLKOUT tCVTK \ I ~ tWSTL J I tWSTH tHTKO TxD tOTKO ) C 83-004441B 22 NEe pPD79011 Serial Receive CLKOUT tCYRK \ ,j 1\ tWSRL tWSRH RxD }. K f+---tSRDK - tHKRD 83-0043326 ARCHITECTURAL DESCRIPTION Figure 1. Memory Map The IkPD79011 is an upgraded version of IkPD70322 (V25) , NEC's original single-chip microcomputer. It has a FFFFF FFFFO P[3lliffu3llillilililli3lliillili3lliIq Ii RESET real-time operating system built into internal ROM. The IkPD79011 is the same as the V25 in both hardware and software specifications except for the built-in ROM contents. For more information on the V25, refer to the IkPD70320/70322 V25 Data Sheet Memory Map FDOOO The IkPD79011 can access a maximum of 1M bytes of memory via the 20-bit address bus. A 16K-byte segment of memory (FCOOOH to FFFFFH) is allocated to the FCOOO on-chip ROM. The IkPD79011 operating system is stored in this ROM area. An external memory area of 2K bytes (FB 800H to FBFFFH) contains a configuration table. When reset, the IkPD79011 starts program execution at address User's Initial Task FFFFOH, and performs the necessary initialization ac- [System Setup. etc.) ~--lf-----' cording to the information in this table. Then, program control is passed to each user-defined task. User's Area A 1K-byte area (OOOOOH to 003FFH) contains the vector tables. Thus, the total area for user tasks is from 00400H to FB7FFH. Address determined at configuration time. Figure 1 is the IkPD79011 memory map. 00400 t - - - - -........- - - - i Vector Table 00000'--_ _ _ _ _ _ _ _--' 49TB-516A 23 pPD79011 NEe Reset Operation Table 1. ~ctor Table Area Assignments (cont) Vector Start When reset, the p,PD79011 begins program execution at Number Address Use address FFFFOH and jumps to the reset routine, which 72 to 79 00120H External p.PD71059 performs the following processing. (Slave 1. Available for use) • Initializes special registers 80 to 87 00140H External p.PD71059 • Initializes the interrupt vector table (Slave 2. Available for use) • Generates the system table 88 to 95 00160H External p.PD71059 (Slave 3. Available for use) • Specifies both semaphore and mail box areas 96 to 00180H External p.PD71059 • Generates and starts tasks 103 (Slave 4. Available for use) After completing the required reset processing, the 104 to 001AOH External p.PD71059 p,PD79011 jumps to the operating system dispatch rou- 111 (Slave 5. Available for use) tine, and then passes the program control to each 112 to 001COH External p.PD71059 user-defined task. 119 (Slave 6. Available for use) Figure 2 is a flowchart of system operation at reset time. 120 to 001EOH External p.PD71059 127 (Slave 7. Available for use) Figure 2. Reset Operation Flowchart 128 to 00200H Available for use 255 Note: Vectors 56 to 127 are aSSigned to the master and slave interrupt RESET controllers when added to the p.PD79011. Otherwise, the area is free to be used. Configuration Table The configuration table resides in memory from FB 800H to FBFFFH. The reset routine obtains initialization infor- mation from the configuration table. Any items not ini- tialized by the reset routine must be initialized by the user initial task. Table 2 is an example of a configuration table. It shows the assembler sources (described by RA70116). The input values in the table are only examples. Table 2. Configuration Table, Filing Example 49TB-517A Data Type Example Value Notes Interrupt Vectors PTRO OW INTERNAL RAM_ BASE PTR1 OW TASK...CNT Up to 256 interrupt vectors (4 bytes/vector) can be stored in the vector table area. See table 1. PTR2 OW SMA-CNT PTR3 OW MBOK-CNT Table 1. ~ctor Table Area Assignments INTERNAL DB FFH 2 Vector Start RAM_BASE Number Address Use DB 46H o to 31 OOOOOH Reserved for hardware as on p.PD70322 (V25) OW 1000H 3 32 to 47 00080H Avai lable for use OW 2000H 48 OOOCOH Operating system data table BLK...SIZE OW 2FCOH 49 to 55 OOOC4H Available for use 56 to 63 OOOEOH External p.PD71059 (Master. Available for use) 64 to 71 00100H External p.PD71059 (Slave O. Available for use) 24 tyEe pPD79011 Table 2. conf~uration Table~ Filing Example Pointers (co.nt " A pointer is an offset value obtained using a segment CONF_TBL Data Type Example Value Notes value of OFB08H. The following pointers are provided. PORTO DW 1000H 4 The organization of the configuration table changes PORT1 DW 2000H according to user system status. PORT2 DW OFFFFH PORT3 DW CiF'FFFH Pointer Size Points to PTRO 1 word INTERNALRAM:...BASE PORT4 DW OFFFFH PTR1 1 word TASK-CNT PORT5 DW OFFFFH PTR2 1 word SM~CNT PORT6 DW OFFFFH PTR3 1 word MBOx..CNT PORT? DW OFFFFH PORT8 DW OFFFFH System Information TASK..CNT DB 2BH 5 INTERNALRAM_BASE: This byte is required to se~ the MIN_TASK..NO DB 0 internal RAM base segment of the JLPD79011. It is spec- INIT_TASK DB 0 ified in the internal data area base register (lOB address IDL~SP DW 1000H 6 OFFFFFH). IDL~SS DW OFOOOH If XXH is specified as the IDB value (where' X is a INILPCO DW OOOOH ? hexadecimal number), the internal RAM base segment is INILPSO DW 4000H User assumed to be XXOOH. Therefore, each register bank and Task the special function register (including lOB) are assigned ~ INILSPO INILSSO DW DW 2000H OFOOOH 0 to the 512-byte area starting at address XXEOOH. II.i&I PRC_INFO. This byte sets the processor control register I NILD SO DW 2000H (PRC), wh,ich has the following functions. INILPC1 DW 1000H 7 User • System clock divider of oscillator frequency INILPS1 DW 4000H Task INILSP1 DW 3000H 1 • Interval of time base interrupt INILSS1 DW OFOOOH • Enable/disable of internal RAM INILDS1 DW 2000H RAM Information SMA-CNT DW 2 8 The configuration table provides the following RAM in- INILRSCO DW formation. DW 10H LOW_DS/HIGH_OS: These two words specify the user MBOx...CNT' DW 10H free RAM area. Because it is a continuous memory area, RESEFNE DW OOH 9 both the upper and lower limit segment addresses (offset CONF_TBL ENDS 0) must be used to specify this area. END The initialize routine sets the system table and each Notes: control block in this RAM area .. Any remaining, control (1) Pointers blocks are queued in the system table as memory blocks (2) Systeminformati,on (the section System Calls provides more information). The user free RAM area must be large enough to hold all (3) RAM information control blocks. (4) Interrupt controller information (5) User task information (6) Idle task stack information (7) User task register information (8) Semaphore/mail box information (9) Reserved area 25 pPD79011 NEe Bues IZE: This word of information specifies the mem- INIT_DSO: This word of information specifies the initial ory block size in units of 16 bytes. If BLK....S IZE of zero is value of the data segment (DS) for the first user task. specified, no memory blocks are generated. The above set of register initial values is repeated for each user task. Interrupt Controller PORTO th rough PORT8 (9 words) provide the information Semaphore/Mail box required when one or more external interrupt controllers SMA...CNT: This word of information specifies up to 256 (J,.t.PD71059) are connected to J,.t.PD79011. semaphores to be used. PORTO specifies the port address for the master inter- INIT_RSCO: This word of information supplies the initial rupt controller. PORT1 through PORT8 specify the port number of resources for semaphore O. After specification addresses corresponding to the slave interrupt control- of semaphore 0, the initial number of resources of all lers (0 to 7). other semaphores should be specified sequentially. If fewer than nine interrupt controllers are used, OFFFFH MBO)LC NT: This word of information specifies the num- indicates the addresses of the unused interrupt control- ber of mail boxes (up to 256) to be used. lers. Reserved Area User Task Information RESERVE is a one-word area. You must specify a value of TASK....CNT: This byte of information specifies the total o for RESERVE. number of user tasks (except for idle tasks). Up to 63 tasks can be specified. Task Status and Status Change MIN_TASICNO: User task numbers are assigned sequen- Table 3 shows the various task statuses. Figure 3 shows tially starting from this number, the mimimum task all task status changes. number. Only tasks with numbers greater than the mini- mum task number are generated. Table 3. Task Status Status Meaning INIT_TASK: This byte of information indicates the num- RUN One task, given priority to use the CPU, is ber of the first task that the operating system must currently being executed. execute when the system is initialized. All other tasks are READY A task is ready to execute. A READY task has a dormant when the system is initialized. priority lower than the task currently under execution and is hence blocked by the priority Id Ie Task Stack handler. IDLE_SP: This word of information specifies the idle task WAIT A task is waiting for an event to occur so it can go into the READY status. This status is caused stack pointer (SP) value. by the following conditions: WAIT - a system call caused the status change IDLE-SS: This word of information specifies the idle tas~ and the task is either waiting for a resource with stack segment (SS) value. When a stack is set, any value a semaphore, waiting for a message (through can be used for the address. The stack area must be a mail box or direct connection), or waiting for an minimum of 32 bytes. interrupt. SUSPEND The system call SUS_TSK suspended execution User Task Register Initialization forcibly when the task was in the RUN status. The task must wait for a system call to restart INIT_PCO: This word of information specifies t~e initial execution value of the program counter (PC) in relation to the WAIT SUSPEND A task was forcibly moved Into the WAIT status mini mum user task number specified for MIN_TASK-NO. and has a double wait status. If the system call RSM_TSK is issued to a task in the WAIT INIT_PSO: This word of information specifies the initial SUSPEND status, the task is released from the value of the program segment (PS) for the first user task. SUSPEND status and goes into the WAIT status. If released from the WAIT status, the task INIT_SPO: This word of information specifies the initial goes into SUSPEND status. value of the stack pointer (SP) for the first user task. DORMANT When the system is initialized, only one task INIT_SSO: This word of information specifies the initial goes into the READY state. All other tasks go value of the stack segment (SS) for the first user task. into the DORMANT status. If the system call EXLTSK is issued to a task that is executing, this task becomes DORMANT. 26 NEe pPD79011 Figure 3. Task Status Change The remaining tasks, numbered 6 to 63, are all assigned to bank 6. These tasks, unlike tasks resident in banks, End Start require processing time to swap the task state to register bank 6. Table 4 shows the register banks and tasks. Table 4. Register Banks and Corresponding Tasks Register Bank Task *Priorlty Type o 0 o Resident 2 2 2 3 3 3 4 4 4 5 5 5 6 6 to 63 6 to 63 Non-resident 7 Occupied by I'PD79011 OS No priority can be set for DMA or macroservice transfer. Task Management Idle Task The task management function is used to terminate, ~ The p.PD79011 operates an idle task when no user-set start, suspend, restart tasks, and set the restart address. IiiII task needs to be executed. The user-specified maximum If system call STA.TSK is issued to a task, the task exits number plus 1 is used as the idle task number. the DORMANT status and goes into the READY status. If the idle task begins execution, it executes the HALT If system call SUS_TSK is issued to a task, the specified instruction in the Interrupt Enable status, then waits for task goes into the SUSPEND status. The task exits the an interrupt to be issued. SUSPEND status when system call RSM_TASK is issued, and its status becomes READY FUNCTIONAL DESCRIPTION The restart address is set by issuing system call The p.PD79011 can handle up to 64 tasks numbered and SET....ADA. The SET....ADR is always used with system call assigned priorities from 0 to 63. Task numbers and RES_INT to end the interrupt handler. (Refer to the priority levels correspond to each other. (For example, section Interrupt Management for additional informa- task 3 has a task priority of 3.) Level 0 is the highest tion.) priority; level 63 is the lowest priority. Synchronization/Communication Management Tasks are scheduled according to their priority levels. The p.PD79011 selects and executes the READY task Tasks are synchronized by queuing or mutual exclusion. with the highest priority (RUN status). If tasks are queued, they are processed and executed one at a time. Like the V25, the p.PD79011 has 8 register banks (num- bered 0 to 7). Task switching can be done at a high speed Mutual exclusion is used in task processing to prohibit using these register banks. The operating system occu- simultaneous access by more than one task to a shared pies bank 7. The remaining banks (0 to 6) are all assigned resource (such as memory, an I/O device, etc.). to tasks. The p.PD79011 uses semaphores for task synchroniza- Of the 7 register banks, tasks numbered 0 to 5 are tion and mail boxes for intertask communication. assigned to banks 0 to 5 and are resident in the banks. Because the bank-resident tasks do not require any Semaphores processing to save/return the task status, task switching The p.PD79011 implements semaphores to manage re- can be handled quickly. sources and for queuing or mutually excluding tasks. 27 pPD79011 NEe Both the. Pinstruction .(Obtain Resource) a.nd the V POLMSG: Issued if a message was sent to a mailbox; instruction (Release Resource) manage only one re- notifies the system that no message can be received. source at a time. POLDIR: Issued if a message was sent directly; notifies The P instruction can use the following system calls. " the system that no message can be received. REQ_RSC: If the request to obtain resource is not ac- Memory Management cepted, the task goes into;the WA,IT status. You can issue system callsto secure and return memory POLRSC: If the request to obtain resource is not ac- blocks dynamically on the p.PD79011. The memory block cepted, the system is notified that the request has been size is specified at configuration time. rejected. Task status remains the same and an the error code is The V instruction (system call RELRSC) releases the returned when the GET_MEM system call is unable to occupied resource. secure.a block of memory. Figure 4 shows how to use system calls to avoid simul- If a memory block is specified as the message area, the taneous read and write to shared memory. In figure 4, system uses the first two bytes of memory (figure 5). both tasks A and B share the same resource (memory). Consequently, ava:ilable memory (specified in the config- An interrupt is issued when task A is executed and uration table) is reduced by 2 bytes. control is passed between the two tasks. If the REQ_RSC request is not accepted because the resource Figure 5. Memory Block is used by another task (task A), task B goes into the WAIT status. Figure 4. Mutual Exclusion User Area Allocated Memory Block 2 Bytes Addresses [Used by OS] 49TB-52OA Interrupt Management 49TB-519A Fo( internally and externally generated· ii'lterrupt re- quests, RTOS has the following functions to support the Intertask Communication associated interrupt service routines~ Tasks communicate with each other in one of two ways, directly and nondirectly . Each task has a mailbox with a • Interrupt handler assignment task queue for receiving·messages and a message queue • Interrupt handler return for sending messages. No mailbox is required-for direct • Interrupt enable/disable. communication. Messages c~m be. sent directly from one • interrupt wait status task to another. When DE F_I NT is issued; a correspondence is set be- If a task cannot receive a message for any reason (either tween the request level(br vector type) of an external directly or in a mailbox), onecf the following syst~m p.PD71059 interrupt controller and the starting address calls is issued. of its service routine. RCV_MSG: Issued if a message was sent to a mailbox; The ENA.:JNT and DIS_JNT calls allow interrupts to be the task goes into WAIT status. .. enabled or disabled. RCV_DIR:lssued if a message was sent directly; the task goes into the WAIT status. "28 NEe pPD79011 The SIG_INT and RES_INT system calls terminate the SYSTEM CALLS interrupt handler and pass control to the top-queued The JLPD79011 provides the following types of system task (queued by the WAUNT call). calls. Figure 6 shows how SIG_INT passes control to a task. The following events occur in the figure. • Task management • Synchronization/communication management • Due to WAUNT, task B waits for an interrupt. • Memory management • An interrupt is issued while task A is running. • Time management • SIG_INT is issued to task B at the end of interrupt handling. • Interrupt management If the priority of task A is higher than that of task B, The system calls all have ID numbers assigned to them. Descriptions of system calls include their syntax and control is passed to task A when SIG_INT is executed any error codes that may be returned to the task when (the interrupted task). If the priority of task B is higher, the call is issued. control is passed to task B. You can use the C language or assembly language to Figure 6. SIa.lNT Examples develop programs for the I-I-PD79011. If using the C language, an error code is returned as a function value of TaskS the system call. If using assembly language, an error ,/ Interrupt Handler" I code is returned to the AW register of the JLPD79011 as a Task A ,/,/,/ "" return parameter. ,/ " WAUNT Interrupt ___ k'/ "" " C Language Interface The JLPD79011 supports the C language, a high-level ~ language for developing large or small programs. To ~ 83YL-6775A issue system calls in the C language, an assembler The RES_INT system call is always used with the SET_ routine is required as an interface between the I-I-PD79011 ADR system call to set the restart address. If SET-ADR operating system and the C language. Refer to the has already been issued in an interrupted task handler Assembly Language Interface section for details on writ- that issues RES_INT, RES_INT passes control to the ing the interface. restart address specified by SET-ADR, not to the ad- Following is the syntax use for issuing calls in the C dress where the interrupt was issued. language. Figure 7 shows how to use the RES_INT system call to err = < name> ([ < parameter>)); pass control to a task. Argument Description err Function value returned by RTOS Figure 7. RES_INT Example 7-letter System Call Name < parameter> Input parameter Task Interrupt Handler SET_ADR (Restart_Address) - Interrupt _ L---- - - - - - - - -l Assembly Language Interface The JLPD79011 has a C language-oriented architecture. Therefore, when issuing system calls using assembly language, the I-I-PD79011 always sends and receives Ir------------ parameters via a stack. (If the system call requires no parameters, no stacking is needed.) Re'tart_Add,,,, RES_INT The syntax for issuing system calls using assembler and loading the stack for operation are shown below. If the parameter is a pointer, the offset value is stacked in the 49TB-S22A lower address area of the stack, and the segment val ue is stacked in the upper address area. 29 pPD79011 NEe err = (arg1, arg2, arg3); (1) Parameter. Argument Description I/O Name Description 7-letter System Call Name In int taslLno; Task number (0 to 62) arg1 unsigned int (2) Return val ue. arg2 int arg3 unsigned int Error Code Number Description E_OK o Normal end The system call is issued in the following sequence. E_DMT 1 Task is not DORMANT • Parameter 3 (arg3) is stacked. (3) C format. • Parameter 2 (arg2) is stacked. • Parameter 1 (arg1) is stacked. short taslLno; • A pOinter to the parameter area is stacked. ercode = STA-TSK(taslLno); • The system call number is set in the AW register. STA-TSK can only be issued to a task that is in the • RTOS_ENTRY (FCOOOH) is called between segments. DORMANT status. An intersegment system call is needed even when the The started task processing is done in one of the follow- RTOS_ENTRY address is within the same segment. ing ways . • Executed for the first time. Figure 8. Stacking Conditions • After it is terminated once, it is restarted. Parameter Area Pointer _ SS : SP Always necessary to If a task is executed for the first time, the task processing t-----------I arg1 I indicate this position immediately before starts from the initial address. Initial values from the configuration table are also used for the stack pointer, Offset Value of arg2 RTOS _ ENTRY (FOOO:COOO) is called stack segment, and data segment values. Other register Segment Value of arg2 between segments values are not defined. arg3 High 49TB-523A If the task processing is ended once and then restarted, the task also resumes at the initial address. In this case, The procedures for issuing the SIG_INT and RES_INT the stack pointer, stack segment, data segment values, system calls are different. They are explained later in this and other register values assume the values they had data sheet. just before the EXT_TSK system call was issued. TASK MANAGEMENT SYSTEM CALLS Exit Task (EXT_T5K) The following system calls are used for task manage- System Call 1. EXT_TSK terminates task processing ment. and moves the task into the DORMANT status from the RUN status. It has the following syntax. System Call Description STA-TSK Starts task processing int EXT_TSK () EXT_TSK Terminates task processing (1) Return value. SUS_TSK Suspends task processing RSM_TSK Restarts task processing Error Code Number Description SET-ADR Sets restart address E_OK o Normal end (2) C format. Start Task (ST~TSK) ercode = EXT_TSK(); System Call O. STA-TSK starts task processing during If STA-TSK restarts a task in the DORMANT status (due which the task goes into the READY status from the to EXT_TSK) , the start address returns to the initial DORMANT status. It has the following syntax. value. Other register values retain the values they had int STA-TSK (taslLno) when EXT_TSK was issued. Thus, the stack pointer, stack segment, data segment values may not match the values assumed at configuration time. 30 fttIEC pPD79011 Suspend Task (SUS_TSK) Set Restart Address (SET~DR) System Call 2. SUS_TSK suspends a task and puts it System Call 4. SET-ADR sets the restart address of a into the SUSPEND status. It has the following syntax. task. It has the following syntax. int SUS_TSK (taslLno) int SET-ADR (restarLadr) (1) Parameter. (1) Parameter. I/O Name Description I/O Name Description In int taslLno; Task number (0 to 62) In int (restarLadr); Task restart address (2) Return val ue. (2) Return val ue Error Code Number Description Error Code Number Description E_OK 0 Normal end E_OK o Normal end E_DMT 1 Task is DORMANT (3) C format. E_SUS 2 Task is in SUSPEND status ercode = STA-TSK(restarLadr); (3) C format. pointer restarLadr; short taslLno; ercode = SUS_TSK(taslLno); SELADR is always used in conjunction with the RES- _INT system call. If RES_INT is issued on return from the SUS_TSK cannot be issued to tasks that are in the interrupt handler, control is passed to the restart address DORMANT status or in the SUSPEND status. If SUS_TSK is issued to a task in the WAIT status, the task goes into the WAIT SUSPEND status. set previously by SET-ADR. SELADR can be issued more than once, but the system only validates the last restart address that was issued. 1m ~ Setting the restart address to 0 clears current restart Resume Task (RSM_TSK) address. System Call 3. RSM_TSK restarts a task that is in the SYNCHRONIZATION/COMMUNICATION SUSPEND status. It has the following syntax. MANAGEMENT SYSTEM CALLS int RSM_TSK (taslLno) The following system calls are used for synchronization/ (1) Parameter. communication management: I/O Name Description System Call Description In int taslLno; Task number (0 to 62) REQ_RSC Requests resource from a semaphore (2) Return val ue. POLRSC Requests resource from a Error Code Number Description semaphore (no wait) E_OK o Normal end RELRSC Releases resource for a semaphore E_DMT 1 Task is DORMANT RCV_MSG Receives messages from a mailbox E_SUS 2 Task is not in SUSPEND POLMSG Receives messages from a mailbox status (no wait) SND_MSG Sends messages to a mailbox (3) C format. RCV_DIR Receives messages sent to this task short taslLno; POLDIR Receives messages sent to this task ercode = RSM_TSK(taslLno); (no wait) SND_DIR Sends messages to the specified RSM_TSK cannot be issued to tasks that are in the task DORMANT status or in the SUSPEND status. If it is issued to a task in the WAIT SUSPEND status, the Request Resource (REQ_RSC) task is released from the SUSPEND status and goes into System Call 5. REQ_RSC requests a resource from the the WAIT status. specified semaphore. It has the following syntax. int REQ_RSC (semaphore_no) 31 ,.,PD79011 NEe (1) Parameter. (1) Parameter. 1/0 Name Description 1/0 Name Description In int semaphore_no; Semaphore number (0 to In int semaphore_no; Semaphore number (0 to specified number) specified number) (2) Return value. (2) Return value. Error Code Number Description Error Code Number Description E_OK o Normal end E_OK o Normal end (3) C format. (3) C format. ercode = REQ_RSC(semaphore_no); ercode = RELRSC(semaphore_no); short semaphore_no; short semaphore_no; If REQ_RSC is issued when the resource count is 0, the When RELRSC is issued, the semaphore resource task goes into the WAIT status. If the resource count is count is increased by 1. If WAIT tasks exist, the earliest- more than 1, the resource countis decremented by one. wait task is selected and released from the WAIT status. Each semaphore has a task queue. But, if REQ_RSC The initial value of the semaphore resource count is set causes a task to go into the WAIT status, the task is when the system is started. No error occurs even when placed in the last position in the queue regardless of its the resource count exceeds the initial value asa result of priority. issuing RELRSC. If the resource count exceeds 65,535, the resource count is cleared to 0 automatically and no Poll Resource (POLRSC) error is generated. System Call 6. POLRSC is used to request resources Receive Message (RCV_MSG) from the specified semaphore. It has the following syn- tax. System Call 8. RCV_MSG receives messages from mailboxes. It has the following syntax. int POLRSC (semaphore_no) int RCV_MSG (mailbo>Lno) (1) Parameter. (1) Parameter. 1/0 Name Description In int semaphore_no; Semaphore number (0 to' 1/0 Name Description specified number)· In int mailbo>Lno; Mailbox number (0 to specified number) (2) Return value. (2) C format. Error Code Number Description E_OK o Normal end seg = RCV_MSG(mailbo>Lno); E_RSC 6 Resource count is 0 short mailbox....no; (3) C format. If RCV_MSG is issued when messages are present in mailboxes, the earliest message is selected and the ercode = POLRSC(semaphore_no); segment value of the message area is returned as the short semaphore_no; function value. POLRSC is used to determine whether any resources If there is no message, the task goes into the WAIT status are left in the specified semaphore. Unlike the RE- and it is placed in the last position in the mail box queue. Q_RSC, POLRSC never causes a task to go into the WAIT status. Instead, it returns the E_RSC error code Poll Message (POLMSG) when the resource count is O. If the resource count is more than 1, the count is decremented by 1. System Call 9. POLMSG receives messages from mailboxes. It has the following syntax. Release Resource (RELRSC) int POLMSG (mailbo>Lno) System Call 7. RELRSC releases resource for the specified semaphore. It has the following syntax. int RELRSC (semaphore_no) 32 NEe pPD79011 (1) Parameter. Receive Direct Message (RCV_DIR) I/O Name Description System Call 11. RCV_DIR receives messages sent di- In int mail bO)Lno; Mail box number (0 to rectly to a task. It has the following syntax. specified number) int RCV_DIR () (2) Return value. If there are any messages in the spec- (1) C format. ified mailbox, the message area segment value is returned. If there is no message, the following error ercode = RCV_DIR(); code is returned. If RCV_DIR is issued when there is no message, the task Error Code Number Description goes into the WAIT status. If a message is present, the E_MSG 7 No message found message area segment value is returned. (3) C format. Poll Direct Message (POLDIR) seg = POLMSG(mailbo)Lno); System Call 12. POLOIR receives messages sent by a short mailbo)Lno; task to itself. It has the following syntax. If POLMSG is issued when messages are present in int POLDIR ( ) mail boxes, the earliest message is selected and the segment value of the message area is returned as the (1) Return value. If POLDIR is issued when a message is present, .the message area segment value is re- function value. turned. If no message is present, the following error If no message is found, unlike the RCV_MSGsystem call, code is returned and the task does not enter WAIT III the task never goes into the WAIT status. Instead, the status. E_MSG error code is returned. Error Code Number Description E_MSG 7 No message is present Send Message (SND_MSG) (2) C format. System Call 10. SND_MSG sends messages to mail- boxes. It has the following syntax. ercode = POLDIR(n); int SND_MSG (mailbo)Lno, msg_seg) Send Direct Message (SND_DIR) (1) Parameter. System Call 13. SND_DIR specifies a task and sends a I/O Name Description message· to the specified task. It has the following In int mailbo)Lno; Mailbox number (0 to syntax; specified number) int SND_DIR (task_no, msg_seg) In int msg_seg; Send message area segment (1) Parameter. (2) Return value. I/O Name Description Error Code Number Description In int taslLno; Task number (0 to 62) E_OK o Normal end In int msg_seg; Send message area segment (3) C format. (2) Return val ue. ercode = SND_MSG(mailbo)Lno, msg_seg); Number Description short mailbo)Lno; o Normal end short msg_seg; (3) C format. If SND_MSGis issued when a task is waiting to be ercode = SND_DIR(task_no, msg_seg); processed, the task is released from the WAIT status, and short taslLno; the send message area segment value is returned. short msg_seg; If no tasks are in the WAIT status, the message is queued If SND_DIR is issued when the specified task is waiting in the mail box. Like tasks, messages are queued using for a message directly, the task is released from the WAIT the first-in, first-out (FIFO) method. status. The message area segment value is returned to the task. 33 pPD79011 NEe If the specified task is not waiting for any message RELMEM cannot release memory blocks containing directly, the message is placed in the task message messages in a mail box or task queue. The memory block queue using the FIFO method. can only be released after a message is received. MEMORY MANAGEMENT SYSTEM CALLS TIME MANAGEMENT SYSTEM CALLS The following system calls are used for memory man- The following system calls are used for time manage- agement. ment. System Call Description System Call Description GET_MEM Gets a memory block GET_TIM Reads the system time RELMEM Releases the memory block SET_TIM Sets the system time Get Memory (GET_MEM) Get Time (GET_TIM) System Call 14. GET_MEM allocates a memory block. It System Call 16. GET_TIM reads the system time. It has has the following syntax. the following syntax. int GET_MEM ( ) int GET TIM (time_ptr) (1) Return value. If a memory block is available when (1) Parameter: GET_MEM is issued, the memory block segment 1/0 Name Description value is returned. If no memory block is present, the In struct Ltime * time_ptr; Pointer to location following error code is returned. of system time Error Code Number Description (2) Time structure. E_BLK 3 No memory block found struct Ltime{ (2) C format. int Uime; ercode = GET_MEM(); int m_time; GET_MEM can use the memory block as a message area int h_time;}; for intertask communications: The memory block size is (3) Return value. specified when the system is started, and the value is fixed. Error Code Number Description E_OK o Normal end If the error code is returned, the task never goes into the WAIT status. (4) C format. ercode = GET_TIM(time_ptr); Release Memory (RELMEM) pointer time_ptr; System Call 15. RELMEM releases the specified mem- The system time is 3-word data. The lower order word is ory block. It has the following syntax. stored in the lowest order address; the intermediate data int RELMEM (mem_blk) is in the intermediate address; and the upper order data is in the highest address. (1) Parameter: 1/0 Name Description The minimum resolution of the system time is deter- mined by the value set in the time base counter in the In int mem_blk; Segment value of the released memory block 14PD79011. However, since interrupts to the 14PD79011 are inhibited during system call processing, choose the (2) Return val ue. minimum resolution of the system time with system call Error Code Number Description overhead time in mind. E_OK o Normal end Set Time (SET_TIM) (3) C format. System Call 17. SET_TIM sets the system time. It has ercode = RELMEM(mem_blk); the following syntax. short mem_blk; 34 t-IEC pPD79011 int SET_TIM (time_ptr) Define Interrupt Handler (DE F_INT) (1) Parameter. System Call 18. DEF_INT sets the start address of the interrupt handler. It has the following syntax. I/O Name Description In struct Ltime * time_ptr; Time pointer int DE F_INT (device_no, starLadr) (2) Time structure. (1) Parameter. struct Ltime{ I/O Name Description int Uime; In int device_no; Device number (interrupt int m_time; level or vector type) int h_time;}; In int (starLadr) (); Pointer to interrupt handler start address (3) Return val ue. (2) Return value. Error Code· Number Description E_OK 0 Normal end Error Code Number Description E_OK o Normal end (4) C format. E_DVN 4 Device number error pointer time_ptr; E_SYS 5 System error ercode = SET_TIM (time_ptr); (3) C format. The p.PD79011 uses the on-chip timer base counter ercode = DEF_INT(device_no, starLadr); output as the system real-time clock source .. The on- shCirt device_no; III chip timer therefore starts its counting operation when pointer starLadr; the system is started.The interval from the SET_TIM call If DE F_INT is issued, correspondence between interrupt to the next real-time clock interrupt is an error term request level of external p.PD71059 interrupt controller associated with the initial call to SET_TIM, and all (or interrupt request vector type) and start address ofthe subsequent calls produce additional pseudorandom er- interrupt handler is established. When an interrupt, re- ror times. The real-time clock interval is set at configu- quest vector type is specified, the interrupt request ration time. control register can also be set at the same time. INTERRUPT MANAGEMENT SYSTEM CALLS If 0 is specified for the interrupt handler start address, the existing start address is cleared. If the start address The following system calls are used for interrupt man- of the interrupt handler is cleared after an interrupt agement: request level of the interrupt controller is specified, the mask bit (IMK) equivalent to the specified interrupt System Call Description request level is set and the interrupt is masked. Then the DEF_INT Sets the start address of the existing start address is cleared. interrupt handler Starts a task waiting for an If the start address of the interrupt handler is cleared interrupt and terminates the after an interrupt request vector type is specified, the interrupt handler operation existing start address is cleared and the interrupt re- WAUNT Waits for an interrupt quest control register is set. At this time, the interrupt CAN_INT Releases a task waiting for an mask can be set at the same time by explicitly setting bit interrupt from WAIT status 6 of the interrupt request control register. DIS_INT Disables interrupts by device If the start address of the interrupt handler is not 0, the number address is set with no other changes. The IMK (mask bit) Enables interrupts by device is never altered. number Terminates interrupt handler If the start address of the interrupt handler is set after the operation and calls the restart vector type of interrupt request is specified, the interrupt address request control register is also set. Therefore, interrupt mask operation can be specified using bit 6 of the interrupt request control register. 35 IIPD79011 NEe External Interrupt Controller Definition (2) C format. The interrupt request level of the external interrupt ercode = SIG_INT(taslLno); controller can be specified by setting 0 in bit 7. It is short taslLno; specified as follows. SIG_INT can be issued only from inside an interrupt Bit(s) Description handler. 0-2 Slave level interrupt request level If S IG_I NT is issued, the interrupt handler operation ends 3 If 0, master/slave configuration; and control is passed to the target task. Therefore, when if 1, master only 4-6 Master interrupt request level SIG_INT is used, control is never passed to the address 7 Fixed to 0 following S IG_INT. 8-15 Upper-order byte is fixed to 0 If an error occurs, no error code is returned and the The low-order byte is used to specify the interrupt level. specified task is not started. In this cas'e, control is Bits 0 to 2 specify the slave interrupt request level when returned immediately to the point where the interrupt in master-slave configuration; bit 3, whether to use any was issued. slave device; bits 4 to 6, the master interrupt request SIG_INT is not used to control multiprocessing of exter- level. nal or internal interrupt requests. Nesting management The interrupt request level of the interrupt controller and related to the interrupt handler and execution of the EOI each interrupt request vector type are in one-to-onE~ (End Of Interrupt) and FINT (Finish Interrupt) instruc- corrrespondence The interrupt request is divided into 72 tions must be done in each interrupt handler. levels, and they correspond to interrupt request vector The procedures used to issue SIG_INT (and system call types 56 to 127. RES_INT) differ from those to issue other system calls. For example, if; the device consists of only the master, 0 When using assembly language, SIG_INT is issued as is specified for the master interrupt request level; this follows. interrupt request vector type becomes 56. Slave inter- rupt request level 7 must be connected to master inter- Procedure Description rupt request level 7 when in master-slave configuration PUSH task_no The target task number is set in and becomes vector type 127. stack BR SIG_INT_ Far jump to absolute address The interrupt request vector type can be specified by ENTRY OFCOOEH setting 1 in bit 7. It is specified as follows. Bit(s) Description Wait for Interrupt (WALINT) 0-6 Vector type System Call 20. WAUNT moves a task into the WAIT 7 Fixed to 1 status. It has the following syntax. 8-15 Interrupt request control register value int WAUNT () The J.(.PD79011 operating system uses the on-chip time base counter as the system timer. As a result, other tasks (1) Return value. cannot specify vector type 31 (equivalent to the time Error Code Number Description base counter) when the system timer function is used. E_OK o Normal end E_INT 8 Release from interrupt Signal Interrupt (SIG_INT) wait status System Call 19. SIG_INT activates a task waiting fo~ an (2) C format. interrupt and terminates the currently executing .inter- rupt handler. It has the following syntax. ercode = WAUNT; void SIG_INT (taslLno) When issuing this system call, the" current task goes into (1) Parameter. the interrupt wait status. If the SIG_INT system call is issued to a waiting task (which was invoked by WAUNT), I/O Name Description the specified task is released from the WAIT status. In int task_no; Target task number (0 to 62) 36 pPD79011 A task can release another task's WAIT (for interrupt) DIS_INT can be issued from either a task or an interrupt status by means of the CAN_I NT system call. Otherwise handler: an interrupt handler will release the WAIT status after an To specify the interrupt request level of the interrupt interrupt is presented. controller, set the corresponding IMR (mask bit) of the If SIG_INT is used to release a task from the WAIT status, external n059. To specify the interrupt request vector the error code E_OK is returned. If CAN_INT is used to type, set bit 6 of the interrupt request control register. release the WAIT status, the error code E_INT is re- turned. Enable Interrupt (ENAJNT) System Call 23. ENAJNT enables interrupts in units of Cancel Interrupt (CAN_INT) device number (interrupt request level or interrupt re- System Call 21. CAN_INT releases the specified task quest vector type). It has the following syntax. from the WAIT status. It has the following syntax. int ENAJNT (device_no) int CAN_INT (taslLno) (1) Parameter: (1) Parameter: I/O Name Description I/O Name Description In int device_no; Device number In int taslLno; Task number (0 to 62) (2) Return value. (2) Return val ue. Error Code Number Description Error Code Number Description E_OK o Normal end ~OK 0 Normal end E_DVN 4 Device number error E_INT 8 Task is not waiting for interrupt (3) C format. (3) C format. ercode = ENAJNT(device_no); ercode = CAN_INT(taslLno); short device_no; short taslLno; ENA..JNT can be issued from either a task or an interrupt If CAN_INT is issued to a task that is waiting for an handler. interrupt (due to system call WAUNT) , the specified task To specify the interrupt request level of the interrupt exits the WAIT status. If CAN_INT is issued when the controller, reset the corresponding IMR (mask bit) of specified task is not waiting for any interrupt, the E_INT external 71059. To specify the interrupt request vector error code is returned. type, reset bit 6 of the interrupt request register. Disable Interrupt (DIS_INT) Reset Interrupt (RES_INT) System Call 22. DIS_INT disables interrupts in units of System Call 24. RES_INT terminates interrupt handler device number (interrupt request level or interrupt re- operation and passes control to the restart address. It quest vector type). It has the following syntax. has the following syntax. int DIS_INT (device_no) void RES_INT ( ) (1) Parameter: (1) C format. I/O Name Description ercode = RES_INTO; In int device_no; Device number RES_INT is always used in conjunction with system call (2) Return val ue. SELADR. Error Code Number Description If SELADR has been already issued in a task that was interrupted by a handler that issues RES_INT, control is E_OK o Normal end E_DVN passed to the specified restart address. If SET....ADR has 4 Device number error not been issued to that task, control is returned to the (3) C format. pOint where the interrupt was issued. ercode = DIS_INT(device_no); RES_INT cannot be used to control multiple interrupt short device_no; processing, neither for internal nor for external 71059 37 "PD79011 t-{EC sources. Management of interrupt handler nesting and the execution of EOI (End Of Interrupt) and FINT (Finish Interrupt) instructions must be done in each interrupt handler. The procedure .for issuing RES_INT (and system call SIG_INT) differs from the procedure for issuing other system calls. Use the following syntax to issue RES_INT using assembly language. BR RES_INT_ ENTRY; Far jump to absolute address FC020H 38 NEe NEC Electronics Inc. ,.,PD79021 16·Bit Microcomputer: Single-Chip, CMOS, With Built-In RlOS Description o Flexibility to perform status changes by event driven task scheduling function The ILPD79021 is an upgraded ILPD70332 (V35™) single- chip microcomputer with a built-in real-time operating o System clock: 8 MHz maximum system (RTOS). o V35 hardware compatibility The ILPD79021 provides high-speed multitask process- o CMOS technology ing particularly suited for real-time event processing and o Development tools as a kernel of an embedded control system for process - V35 software can be used without modification control and data processing applications. - Relocatable assembler (RA70320) The RTOS kernel provides extensive system calls for - C compiler (CC70116) task synchronization, control, and communication as - Concurrent CP/M@, MS-DOS@, VMSTM, and well as interrupt and time management. UNIXTM base The ILPD79021 instruction set is the same as the V35 Ordering Information instruction set. The ILPD79021 hardware is also identical Part Number Clock Package to the standard V35, but uses 6K of the internal ROM for RTOS system code. Refer to the V35 Data Sheet for ,u.PD79021L-S SMHz S4-pin PLCC •. hardware-related details and the ILPD79011 Data Sheet GJ-S 8 MHz 94-pln plastic QFP ~ for RTOS system call descriptions. Features oReal-time multitask processing o Supports five types of system calls - Task management - Communication management - Memory management - Time management -Interrupt management o High-speed response to events - System call processing shortens time to 41 ILS (minimum) when operated at 8 MHz - High-speed task switching using V35 register banks V35 is a trademark of NEC Corporation. CP/M is a registered trademark of Digital Research, Inc. MS-DOS is a registered trademark of Microsoft Corporation. VMS is a trademark of Digital Equipment Corporation. UNIX is a trademark of AT&T Bell Laboratories. 50184 IJPD79021 NEe "PD79021 Block Diagram AO Ag/A1-A 16 /A S A17 /A 1S P20/DMARQO A19 P21/DMAAKO A1S /UBE P22fTCO RESET P23/DMARQ1 HLDAKlP2 6 P2 4 /DMAAK1 HLDRQ/P27 P2SfTC1 READY/P17 MREQ MSTB TxDO RxDO RiW 10STB P16/SCKO Internal ROM POLUINT/P14 CTSO 16K Byte TxD1 (RTOS) RxD1 crst P10/NMI Instruction Decoder P1 1 "NTPO Micro Sequencer P12/1NTP1 Micro ROM P13"NTP2I INTAK P14"NTI POLL X1 X2 VDD TOUT/P1S REFRQ CLKOUT/P0 7 PO P1 P2 PTO-PT7 GND 83YL-5793B 2 NEe Peripherals for CPUs 5-1 Peripherals for CPUs NEe Section 5 Peripherals for CPUS "PD71011 5a Clock Pulse Generator/Driver "PD71 037 5b Direct Memory Access (DMA) Controller "PD71 051 5c Serial Control Unit "PD71 054 5d Programmable Timer/Counter "PD71 055 5e Parallel Interface Unit "PD71 059 5f Interrupt Control Unit "PD71 071 59 DMA Controller "PD71 082, 71083 5h 8-Bit Latches "PD71 084 5i Clock Pulse Generator/Driver "PD71 086, 71087 5j 8-Bit Bus Buffer/Drivers "PD71 088 5k System Bus Controller "PD71641 51 Cache Memory Controller 5-2 NEe NEe Electronics Inc. pPD71011 Clock Pulse Generator/Driver Description Pin Configurations The p.PD71011 is a clock pulse generator/driver for the IS-Pin Pla.tic DIP V20@N30@ microprocessors and their peripherals using NEC's high-speed CMOS technology. CKSYN 1 VOO PRClK X1 Features REN1 X2 RDY1 ROYSYN CJ CMOS technology READY EXFS CJ Clock pulse generator/driver for p.PD70108/70116 or RDY2 6 Fix REN2 OSC other CMOS or NMOS CPUs and their peripherals ClK RESIN CJ SO% duty cycle RESET CJ Frequency source can be crystal or external clock 83-000196A input 2O-Pin Pla.tic SOP CJ Reset signal with Schmitt-trigger circuit for CPU or peripherals CKYSN VDD CJ Bus ready signal with two-bus system PRClK Xl synchronization NC NC CJ Clock synchronization with other p.PD71011 s RENl X2 RDYl RDYSYN Si,ngle +S-volt ±10% power supply m CJ READY EXFS CJ Industrial temperature range: -40 to +8SoC RDY2 FiX REN2 OSC ClK RESIN Ordering Information RESET VSS Maximum Clockout 83ML-6187A Part Number Frequency Package ~PD71011 C-8 8 MHz 18-pin plastic DIP C-10 10 MHz G-8 8 MHz 20-pin plastic SOP V20 and V30 are registered trademarks of NEC Corporation 50153 I'PD71011 NEe Pin Identification ClK (Processor Clock) Symbol Function The ClK output supplies the CPU· and its local bus CKSYN Clock synchronization Input peripherals' clocks. ClK is a 50-percent duty cycle clock PRClK Peripheral clock output of one-half the frequency of the external frequency Bus ready enable Input 1 source. The ClK output is +0.4 V higher than the other J=fEN1 outputs. RDY1 Bus ready Input 1 READY Ready output PRClK (Peripheral Clock) RDY2 Bus ready Input 2 The PRClK output supplies a 50-percent duty cycle J=fEN2 Bus ready enable Input 2 clock at one-half the frequency of ClK to drive peripheral ClK Processor clock output devices. Vss Ground potential OSC (Oscillator) RESET Reset output OSC outputs a Signal at the same frequency as the ~ Reset Input crystal input. When EXFS is selected, the OSC output is esc Oscillator output powered down, and its output will be a high. FIX External frequency source/crystal select Input EXFS External frequency source input CKSYN (Clock Synchronization) RDYSYiil Ready $ynchronization select input CKSYN synchronizes one ~PD71011 to other ~PD71011 s. X2 Crystal input A high level at CKSYN resets the internal counter, and a low level enables it to count. X1 Crystal input Voo +5-volt power supply RESIN (Reset) NC No connection This Schmitt-trigger input generates the RESET output. It is used as a power-on reset. PIN FUNCTIONS RESET (Reset) X1, X2 (Crystal) This output is a reset signal for the CPU. Reset timing is When FiX is low, a crystal connected to X1 and X2 will be provided by the RESIN input to a Schmitt-trigger input the frequency source for a CPU and its peripherals. The gate and a flip-flop which will synchronize the reset crystal frequency should be two times the frequency of timing to the falling edge of ClK. Power-on reset can be ClK. provided by a simple RC circuit on the RESIN input. EXFS (External Frequency Source) RDY1, RDY2 (Bus Ready) EXFS input is the external frequency input in the exter- A peripheral device sends RDY1 or RDY2 to signal that nal TTL-frequency source mode (FiX high). A square the data on the system bus has been received or is ready TTL-level clock signal two times the frequency of ClK's to be sent. REN1 and REN2 enable the RDY1 or RDY2 output should be used for the source. signals. FIX (Frequency/Crystal Select) REN1, REN2 (Bus Ready Enable) FIX input selects whether an external TTL-type input or REN1 and REN2 qualify their respective ROY inputs. an external crystal input is the frequency source of the ClK output. When FIX is low, ClK is generated from the crystal connected to X1 and X2. When FIX is high, ClK is generated from an external TTL-level frequency input on the EXFS pin. At the same time, the internal oscillator circuit will go into stop mode and the OSC output will be high. 2 1\fEC pPD71011 RDYSYN (Ready Sychronization Select) Figure 1 shows the recommended circuit configuration. Capacitors C1 and C2 are required for frequency stabil- RDYSYN selects the mode of READY signal synchroni- ity. The values of C1 and C2 (C1 = C2) can be calculated zation. A low-level signal makes the synchronization a from the load capacitance (CL,) specified by the crystal two-step process. This is used when RDY1 and RDY2 manufacturer. inputs are not synchronized to ClK. A high-level signal makes synchronization a one-step process. This is used C - C1 x C2 when RDY1 and RDY2 are synchronized to ClK. See L- C1 + C2 block diagram. Where CS is any stray capacitance in parallel with the crystal, such as the p.PD71011 input capacitance CIN. READY (Ready) The READY signal to the processor is synchronized by Figure 1. Crysl., Conligur.,lon CirculI the ROY inputs to the processor ClK. READY is cleared after the ROY signal goes low and the guaranteed hold time of the processor has been met. pPD71011 Crystal The oscillator circuit of the p.PD71011 works with a parallel-resonant, fundamental mode, '~T cut" crystal connected to pins X1 and X2. 83-001577A I'PD71011 Block Diagram X1 X2 i----.------------
  • - - - - - - - 0 osc FIX PRClK EXFS 0 - - - - - - - - 1 CKSYNo-------------------------~~--+_----r_~ REN1 0 - - - - - , ClK RDY1 0 - - - - - ' REN2 0 - - - - - - , READY RDYSYN o----------------------------~ RESIN o--------------------~~--------------, RESET 83-0001978 3 pPD71011 NEe Absolute Maximum Ratings DC Characteristics TA = 25°C; VS8 .. 0 v TA= -40 to +85°C; voo .. 5 V :t10% Power supply voltage, Voo - 0.5 to + 7.0 V Parameter Symbol Min Max Unit Conditions Input voltage, VI - 1.0 V to Voo + 1.0 V Input voltage, high VIH __2_.2_ _ _ _V _ _ _ _ __ Output voltage, Vo - 0.5 V to Voo + 0.5 V 2.6 V RESI N input Operating temperature, TOPT Input voltage, low VIL 0.8 V Storage temperature, T8TG Output voltage, high VOH Voo -0.4 V ClK output, 10H = -4mA Power dissipation, Po (DIP) 500mW Voo-0.8 V 10H" -4 rnA Power dissipation, Po (SO package) 200mW Output voltage, low VOL 0.45 VIOL" 4 rnA Exposure to Absolute Maximum Ratings for extended periods may affect device reliability; exceeding the ratings could cause permanent Input leakage current liN -1.0 1.0 damage. The device should be operated within the limits specified -400 1.0 p.A RDYSYN input under DC and AC Characteristics. RESIN input 0.20 V hysteresis Capacitance TA .. 25°C; Voo = +5 V Power supply 100 200 p.A current (static) Parameter Symbol Min Max Unit Conditions Power supply loodyn 30 rnA fin" 20 MHz Input capacitance CIN 12 pF tc'" 1 MHz current (dynamic) AC Characteristics f08C =10 MHz; TA -40 to +85°C; Voo ... +5 V ± 10% fOSC = 16 MHz; TA -10 to +70°C; Voo - +5 V :t5% f08C = 20 MHz; TA -10 to +70°C; VOO ... +5 V ±5% "PD71011 "PD71011-10 Parameter Symbol Min Max Min Max Unit Conditions Clock Timing EXFS input cycle time tCYFS 50 50 ns EXFS pulse width, high tPWF8H 20 20 ns 2.2 V measurement point EXFS pulse width, low tPWFSL 20 20 ns 0.8 V measurement pOint OSC cycle time fosc 8 20 8 20 MHz from EXFS CKSYN pulse width tpwCT 2tCYF8 2tCYF8 ns CKSYN setup time tHF8CTK 20 20 ns CKSYN hold time t8CTF8 20 20 ns ClK cycle time tC't'CK 125 100 ns ClK pulse width, high tpwCKH 80 41 ns 3.0 V, f08C == 10 MHz, f08C == 20 MHz 50 ns 3.0 V, f08C == 16 MHz ClK pulse width, low tPWCKl 90 49 ns 1.5 V, f08C = 10 MHz, f08C = 20 MHz 60 ns 1.5 V, f08C = 16 MHz ClK rise time iLHCK 10 5 ns 1.5 ... 3.0 V, f08C = 10 MHz, f08C = 20 MHz 8 ns 1.5'" 3.0 V, fosc = 16MHz ClKfall time tHLCK 10 5 ns 3.0 ... 1.5 V, f08C = 10 MHz, f08C = 20 MHz 7 ns 3.0 ... 1.5 V, f08C = 16 MHz OSC to ClK i delay tOCK 2 30 2 30 ns ClKi OSC to ClK J, delay tOCK -6 28 -6 28 ns ClKJ, PRClK cycle time tCYPRK 250 200 ns 4 NEe IIPD7 1011 AC Characteristics (cont) "PD71011 "PD71011-10 Parameter Symbol Min Max Min Max Unit Conditions Clock Timing (cont) PRClK pulse width, high tpWPRKH tCYCK tCYCK ns -20 -20 PRClK pulse width, low tpWPRKL tCYCK tCYCK ns -20 -20 PRClK i delay from ClK,J. tOPRKH 22 22 ns PRClK,J. delay from ClK,J. tOPRKL 22 22 ns Reset Timing RESIN setup to ClK,J. tSRICK 65 65 ns RESIN hold from ClK,J. tHCKRI 20 20 ns RESET delay from ClK ,J. tOCKRS 40 20 ns Ready Timing (RDYSYN = 'H7 REN1, 2 setup to RDY1, 2 tSRERY 15 15 ns REN1, 2 hold from ClK,J. tHCKRE 0 0 ns RDY1, 2 setup to ClK ,J. tSRYCK 35 35 ns RDYSYN high RDY1, 2 hold from ClK ,J. tHCKRY 0 0 ns RDYSYN setup to ClK ,J. tSRYSCK 50 50 ns RDYSYN hold from tHCKRYS 0 0 ns READY output delay from ClK ,J. Ready Timing (RDYSYN = 'L 7 tOCKROY 8 8 8 8 ns ns READYi READY,J. III REN1, 2 setup to RDY1, 2 tSRERY 15 15 ns REN1,2 hold from ClK,J. tHCKRE 0 0 ns RDY1, 2 setup to ClK tSRYCK 35 35 ns RDYSYN low RDY1, 2 hold from ClK ,J. tHCKRY 0 0 ns RDY8YN setup to ClK ,J. tSRYSCK 50 50 ns RDYSYN hold from ClK ,J. tHCKRYS 0 0 ns READY output delay from ClK,J. tOCKROY 8 8 ns READYi 8 8 ns READY,J. Output Pin Timing Rise time tLH 20 20 ns 0.8 -+ 2.0V Fall time tHL 12 12 ns 2.0 -+ 0.8 V 5 IIPD71011 NEe Timing Waveforms AC Test Input (except RESIN) AC Test Output (CLK) tPWCKH 2.6V =>{2.2V Test Points 2. 2V X = 0.8 V 0.8 V 0.45 V ..;;.;.;;~------------- RESIN: Input high level 3.00 V Measurement point 2.6 V Input low level 0.45 V Measurement point 0.8 V AC Test Output (except CLK) 83-004046A tHLCK...... - tpWCKL ... .... ... tLHCK 83-004048A 2.2V 2.2VX= 0.8 V Test Points 0.8 V. =>{ ~------------------------ 83-004047A Clock Output FIX ~~____________________________________________________________________ EXFS/OSC CKSYN ClK PRCLK ----------------------~ 83-004049B 6 NEe IIPD71011 Timing Waveforms (cant) RESET Pin ClK RESIN IDCKRS/_ { IOCKRS- RESET 83-0040508 READY Pin (RDYSYN = 6H, RENI.,:) ROY1,2 ISRERY .- IHCKRE -- c- ClK IHCKRYS -- m RDYSYN READY IDCKRDV_j IDCKRDV_ L 83-0040518 7 pPD71011 NEe Timing Waveforms (cant) READY Pin (RDYSYN = 6L, 83-0040528 8 NEe IIPD71011 Test Circuit for CLK High Dr Low Time Test Circuit for CLK to READY (in Crystal Oscillation Mode) (in EXFS Oscillation Mode) VDD ,....._ _ _ _...... FiX ClK .-----.---1 Xl ClK RENl 16 MHz [:::::J X2 71011 .-_._---1 EXFS READY FiX Cl I c2 CKSYN 71011 1 83ML-6145A 1-----1 RDY2 REN2 Test Circuit for CLK High Dr Low Time CKSYN (in EXFS Oscillation Mode) 83ML-6148A Loading Circuits Voo r - - - - - - - - , Load 1 Vl= 2.SV 0ad2 Vl=2.3V FiX EXFS CKSYN 71011 ClK Cl=100pF forCLK 'I Rl=525n S=171011 Cl=30 pF for Other Output 'I Rl=47Sn ExceptCLK 83ML-6149A 83ML-6146A Test Circuit for CLK to READY (in Cryst.IOscillation Mode) Voo ,....._ _ _ _....... RENl ClK . - - - - - - - -......--1 Xl 16 MHz I::] . - - - - - -......--1 X2 READY 71011 RDY2 Cl I I C2 FiX REN2 asc CKSYN 83ML-6147A 9 pPD71011 NEe 10 NEe NEe Electronics Inc. pPD71037 Direct Memory Access (DMA) Controller Description Ordering Information The p.PD71037 is a direct memory access (OMA) control- Part Number Clock (MHz) Package ler that provides high-speed data transfers between "PD71037CZ-10 10 40-pln plastic DIP (600 mlQ peripheral devices and memory for microprocessor sys- GB-10 10 44-pln plastic QFP tems. It is faster and draws less power than its predeces- LM-10 10 44-pln PLCC sors. The unit has four DMA channels, each with a 64K-byte address area and a transfer byte count func- tion. The channels enable I/O-to-memory and memory- Pin Configurations to-memory data transfer. The p.PD71037 is a versatile DMA controller that can be 4D-Pln PI••tlc DIP used for the following applications. lORD A7 • Office automation equipment (personal computers, IOWR A6 small business computers, EWS, etc.) AS • Communications MWR 4 A4 • Instrumentation ENDfTC READY A3 • Control HlDAK A2 ASTB 8 A1 Features Ao o Processing speed of 10 MHz (twice that of the HlDRQ VDD p.PD8237A-5) Cs ADo ClK AD1 o Four independent DMA channels RESET AD2 o Self-initialization for each channel DMAAK2 AD3 DMAAK3 AD4 o Memory-to-memory data transfer DMARQ3 DMAAKO o Block-level memory initialization DMARQ2 DMAAK1 DMARQ1 ADs o High-speed data transfer DMARQO AD6 - 3.2 Mb/s, 10-MHz normal transfer GND AD7 - 5.0 Mb/s, 10-MHz compression transfer o DMA channel count directly expandable in * Undefined; same non-function as ~PD8237A S3YL·5812A expansion mode o END input for the end of transfer o Software DMA request o CMOS o Low power consumption 50169 pPD71037 NEe U-Pin PI••fic QFP Pin Identification Symbol I/O Function Aq-A3 3-state I/O Four low-order bits of address bus ~-A7 3-state out Middle four bits of the output state address bus READY 33 A3 ADrrAD7 3-state I/O Eight high-order bits of the address and HLDAK 32 A2 funct,lons as an 8-blt data bus ASTB 31 A1 AEN Permits output from an external latch Out AEN 30 AO connectec;t to t~e "PD71037 HLDRQ 29 VDD NC ASTB Out Makes an external latch to the high-order NC 28 address CS 27 AOO CLK 26 AD1 ClK In Clock Input for Internal operations and RESET 25 · AD 2 data transfer speeds DMAAK2 24 AD3 es In Selects the "PD71037 as an I/O device DMAAK3 23 AD4 and enables read/Wrlte operation ~ ~ ~ ~ ~ ~ ~ ~ ~ N N N DMAAKO- Out Permits peripheral device to perform DMAAK3 DMA transfer ~~~~~ () '" <0 0 000::':: ::.:: Lt) T"'" Z c( c( c(.~ c( c( c( c( ~ ~ o 0 0 0 ~ ~ 0 ~0 DMARQO- In DMARQ3 Requests the "PD71037 to perform DMA transfer 83vB-6516A tNDtfC I/O Input that forces the "PD71037 to terminate DMA transfer; output that posts the end of DMA transfer U-Pln PLCC HlDAK In Permits the "PD71037 to hold the bus HlDRQ Out Requests the host CPU to hold the bus fORD 3-state I/O Input that enables the host CPU to read the "PD71037 status; output that enables the "PD71037 to read data from a NC 39 A3 peripheral device during DMA transfer NC 38 A2 IOWA 3-state I/O Input that enables the host CPU to write HLDAK 37 A1 data to the "PD71037; outputlhat ASTB 36 AO enables the "PD71037 to write data to a AEN 35 VDD peripheral device during DMA transfer HLDRQ 34 ADO MAD 3-state out Memory read during DMA transfer Cs 33 AD1 CLK 32 AD2 ~ 3-state out Memory write during DMA transfer RESET 31 AD3 READY In Requests extension of a read/Wrlte cycle DMAAK2 30 AD4 during DMA transfer NC 29 NC ~ ~ ~ N ~ ~ ~ ~ ~ ~ co RESET In Initializes the "PD71037 N NC No connection ~8~o8or-- Address Bus --./ DI DO f~ j> Ao-A7 ADo-AD7 K-.- => DI STB DE DO Aa- A 15 ~ L ~ ASTB I - - - HLDAK HLDRQ .. Data Bus (High-order Byte) ~ HLDAK i HLDRQ ) Ao-A7 B T I - - f-- Ao-A7 ADo -AD 7 lJ L~A ~PD710a6 A OE ~ ) IlPD71 037 h y Data Bus (Low-order Byte) ~PD710a2 ASTB - AEN ' - - - DI I DO ' - - ' - - y STB OE j t 83YL·5815B V20 and V30 are registered trademarks of NEC Corporation 6 NEe pPD71037 "PD71037 Block Diagram Bus Control Unit I Add~~ I " Address < IncremenV Buffer Internal Address Bus (16) Decrement < (16) < II Data Bus Buffer I 11 I Effective Address (16 x 4) I Control Registers CS Address ClK Registers Address Set I Device Control (8) RESET READY I (16 x 4) I Status Read (8) Bus ASTB AEN Control logic A D .. Mode Control (4 x 6) 2 K " Internal Data Bus (8) > Temporary Data (8) D MRD,MWR 2, IORD,IOWR I Request Control (4) DMA Control Unit Count l Count Set (16x 4) I Mask.Control (4) DMAROO- DMARQ3 , 4, ~ Priority Registers I Effective Count (16 x 4) J Control logic DMAAKO- 4 DMAAK3 I D HlDRQ HlDAK I I11m'... Coo,,"' I logic Count Decrement (16) ENDITC m 83YL·6264B INTERNAL BLOCK FUNCTIONS priority level of DMA requests and arbitrates the use of the bus in accordance with this priority level. The DMA The #,PD71037 has the following functional units as control unit also provides internal timing and controls shown in the block diagram. DMA operations. • Bus control unit Address Registers • DMA control unit • Address registers Each of the four DMA channels has one address set register and one effective address register. Each register • Address incrementer/decrementer stores a DMA 16-bit address. The effective address • Count registers register is updated for each single-byte DMA transfer • Count decrementer and constantly holds the address to be transferred next. • Control registers The contents of the address set register remain un- changed until the host CPU writes a new value to it. At Bus Control Unit self-initialization, the initial DMA address for the next DMA service is transferred from the address set register The bus control unit consists of the address and data to the effective address register. buffers and bus control logic. The bus control unit generates and receives signals that control addresses Address Incrementer/Decrementer and data on the Internal address and data buses. The address incrementer/decrementer updates the con- DMA Control Unit tents of the current address register whenever a DMA transfer completes. The DMA control unit contains the priority and timing control logic. The priority control logic determines the 7 pPD71037 NEe Count Registers Figure 1. DIM Operation Flow Each of the four DMA channels has one 16-bit count set register and one 16-bit effective count register that store a DMA transfer byte count. The count set register holds No a value written by the CPU. At self-initialization the value is transferrred to the effective address register where it is set as the number of DMA transfers in the next DMA Inactive Cycle service. A channel's effective count register is decremented by 1 for each single-byte transfer and constantly holds the No remaining number of DMA transfers. If a ~orrow occurs when this register is decremented, the terminal count is set to mark the end of the specified number of DMA transfers. Count Decrementer DMACycle The count decrementer decrements the contents of the effective count register by 1 when each DMA transfer takes place. No Control Registers The #,PD71037 contains six registers that control the bus mode, pin active levels (DMARQ and DMAAK), and the Inactive Cycle DMA transfer mode. 83YL-5816A DMA OPERATION Inactive Cycle The #,PD71037 operates in an inactive cycle and a DMA During the inactive cycle, the host CPU has authority cycle. Figure 1 illustrates basic DMA operation flow. and the #,PD71037 is in one of the following states. • The #,PD71037 has not yet received an effective DMA service request from a peripheral device. • The #,PD71037 has received an effective DMA service request, but has not yet received bus authority from the host CPU. • The #,PD71037 performs the following operations dur- ing the inactive cycle. - Detecting a DMA service request - Requesting bus authority - Selecting a DMA channel - Programming In the inactive cycle, there are no active DMA cycles but there may be one or more active DMA requests. However, the CPU has not yet released the bus. Detecting a DMA Service Request. The #,PD71037 wiIJ sample the four DMARQ input pins for each clock Signal. 8 NEe pPD71037 Requesting Bus Authority. When an effective (un- Figure 2. Generalion of Terminal Count (TC) masked) DMA request is received, a bus hold request signal (HLDRQ) is output to the host CPU. The "PD71037 continues to sample DMA requests until it obtains the bus by HLDAK input. Selecting a DMA Channel. After the CPU returns an HLDAK signal and the "PD71037 obtains the bus, the "PD71037 stops DMA sampling and selects the DMA channel with the highest priority from the valid DMA request signals. No Programming. Before DMA transfer, the transfer ad- dresses, the number of DMA transfers, the DMA transfer mode, and the active levels of the DMARQ and DMAAK pins must be determined. While the host CPU holds bus authority, "PD71037 83YL·6265A programming can be done by inputting a low signal to the CS pin. The four low-order address bits (Ao-As) specify a register for a read/write operation. Inputting an DMA Transfer Type 10RD/IOWR signal performs the operation on the speci- The type of transfer the "PD71037 performs depends on fied register. the following conditions. DMACycle • Memory-to-memory transfer enable • Direction of I/O-to-memory transfer for each channel In a DMA cycle, the "PD71037 controls the bus and performs DMA transfer operations based on· pro- • Transfer mode of each channel grammed information. Memory-to-Memory Transfer Enable. The "PD71037 Terminal Count. External input of an END signal or performs each DMA transfer (1 byte of data) between an internal generation of a terminal count terminates DMA I/O device and memory in a one-bus cycle and between ~ transfer. The terminal count is generated when a borrow memories in a two-bus cycle. _ occurs as a result of decrementing the effective count Memory-to-memory transfer can occur only when bit 0 of register, which counts the number of DMA transfers in the device control register is set to 1. The DMA channels bytes. When this occurs, the "PD71037 outputs the low used in memory-to-memory transfers are fixed, with level pulse TC. channel 0 as the source channel and channel 1 as the Figure 2 shows that the effective count register is tested destination channel. Channels 2 and 3 cannot be used in after each DMA operation. A borrow is detected after memory-to-memory transfers. The contents of the count each DMA transfer is completed. As a result, the actual registers of each channel should be the same when number of DMA transfers is one greater than the value performing this type of DMA transfer. set in the effective count register. The "PD71037 performs the following operations until a If self-initialization is not set when DMA service ends, the channel 0 terminal count or until END input is present. mask control register bits applicable to the channel Only the block mode is valid for this type of transfer. where service is ended are set, and the DMARQ input of (1) The memory data pointed to by the effective address that channel is masked. register of channel 0 is read into the temporary data register of the "PD71037 and the effective address register and effective count register of channel 0 are updated. (2) The temporary register data is written to the rnemory location shown by the effective address register of channel 1; the effective address register and effec- tive count register are updated. 9 pPD71031 NEe During memory-to-memory transfers, the address of the mode of DMA transfer for each channel. Table 2 shows transfer source can be fixed using the device control the various transfer modes and termination conditions. register. In this manner, a range of memory can be padded with the same value (0 or 1) since the contents of Table 2. Transfer Termination the source address never change. During memory-to- Transfer Mode End of Transfer Condition memory transfer, the DMAAK signal and channel a's Single After 1 byteof 0CD 0"I~ III: == 0ICI) the idle state. The pPD71051 enters standby mode >C I- when this signal falls from a high level toa low level. 83-004212A Standby mode is released when the CPU writes a mode byte to thepPD71 051. The reset pulse width must be at least 6 tCYK cycles and the clock must be enabled. 2 NEe pPD71051 ClK [Clock] 6'S'R [Data Set Ready] This clock input produces internal timing for the DSR is a general-purpose input pin that can be used for pPD71 051. The clock freq uency shou Id be at least 30 modem control. The status of this pin can be determined times the transmitter or receiver clock input frequency by reading bit 7 of the status byte. (TxCLK, RxCLK) in sync or async mode with the X1 clock. This assures stable operation. The clock DTR [Data Terminal Ready] frequency must be more than 4.5 times the TxCLK or DTR is a general-purpose output pin that can be used RxCLK in async mode using x16 or x64 clock mode. for modem control. The state of this pin can be controlled by writing bit 1 of the command byte. If bit 1 CS [Chip Select] = 0, then DTR = 1. If bit 1 = 1, then DTR = O. The CS input selects the pPD71051. The pPD71051 is selected by setting CS = O. When CS = 1, thepPD71051 RTS [Request to Send] is not selected, the data bus (DrDo) is in the high RTS is a general-purpose output pin that can be used impedance state, and the RD and WR signals are for modem control. The status of this pin can be ignored. controlled by writing bit 5 of the command byte. If bit 5 RD [Read Strobe] = 1, then RTS = O. If bit 5 = 0, then RTS = 1. The RD input is low when reading data or status CTS [Clear to Send] information from the pPD71051. The CTS input controls data transmission. The pPD71051 is able to transmit serial data when CTS = 0 WR [Write Strobe] and the command byte sets TxEN = 1.lf CTS is set The WR input is low when writing data or a control byte equal to 1 during transmission, the sending operation to the pPD71051. stops after sending all currently written data and the TxDATA pin goes high. C/O [Control or Data] TxDATA [Transmit Data] The C/O input determines the data type when accessing the pPD71051. When C/O = 1, the data is a control The pPD71051 sends serial data over the TxDATA byte (table 1) or status. When C/O = 0, the data is output. character data. This pin is normally connected to the least significant bit (Ao) of the CPU address bus. TxRDY [Transmitter Ready] The TxRDY output tells the CPU that the transmit data Table 1. Control Signals and Operations buffer in the pPD71051 is empty; that is, that new cs iiD WR ciii tJ PD71051 CPU Operation transmit data can be written. This signal is masked by Receive data buffer the TxEN bit of the command byte and by the CTS <7 Data bus Read receive data input. It can be used as an interrupt signal to request data from the CPU. Status register The status of TxRDY can be determined by reading bit ~ Data bus Read status o of the status byte. This allows the pPD71051 to be polled. Note that TxRDY of the status byte is not Data bus <> Transmit data buffer Write transmit data masked by CTS or TxEN. TxRDY is cleared to 0 by the falling edge of WR when Data bus the CPU writes transmit data to the pPD71 051. DCita in 0 Control byte regIster Write control byte the transmit data buffer that has not been sent is destroyed if transmit data is written while TxRDY = O. Data bus None High impedance Data bus: None High impedance 3 pPD71051 NEe TxEMP [Transmitter Empty] determine the status of RxRDY by reading bit 1 of the status byte and use the pPD71 051 in a polling applica- The pPD71051 reduces CPU overhead by using a tion. RxRDY becomes 0 when the CPU reads the double buffer; the transmit data buffer (second buffer) receive data. and the transmit buffer (first buffer) in the transmitter. When the CPU writes transmit data to the transmit data Unless the CPU reads the receive data (after RxRDY = buffer (second buffer), the pPD71051 sends data by 1 is set) before the next Single character is received and transferring the contents of the second buffer to the transferred to the receive buffer, an overrun error first buffer, after transmitting the contents of the first occurs, and the aVE status bit is set. The unread data buffer. in the receive data buffer is overwritten by newly transferred data and lost. This empties the second buffer and TxRDY is set to 1. The TxEMP output becomes 1 when the contents of the RxRDY is set to 0 in the receive disable state. This state first buffer are sent and the second buffer is empty. is set by changing the RxEN bit to 0 through the Thus, TxEMP = 1 shows that both buffers are empty. In command byte. After RxEN issetto 1 (making receiving half-duplex operation, you can determine when to possible), RxRDY becomes 1 whenever new characters change from sending to receiving by testing TxEMP= 1. are received and transferred to the receive data buffer. When TxEMP = 1 occurs in async mode, the TxDATA SYNC/BRK [Synchronization/Break] pin goes high. When the CPU writes transmit data, TxEMP is set to 0 and data transmission resumes. The SYNC pin detects synchronization characters in sync mode. The SYNC mode byte selects internal or When TxEMP = 1 occurs in sync mode, thepPD71051 external SYNC detection. The SYNC pin becomes an loads SYNC characters from the SYNC character output when internal synchronization is set, and an register and sends them through the TxDATA pin. input when externa.1 synchronization is set. TxEMP is set to 0 and resumes sending data after sending (one or two) SYNC characters and the CPU The SYNC output goes high when the pPD71051 writes new transmit data to the pPD71051. detects a SYNC character in internal synchronization. When two SYNC characters are used, SYNC goes·high TxCLK [Transmitter Clock] when the last bit of the two consecutive SYNC characters is detected. You can read the status of the The TxCLK input is the reference clock input that SYNC signal in bit 6 of the status byte. Both the SYNC determines the transmission rate. Data is transmitted pin and status are set to 0 by a read status operation. at the same rate as TxCLK in sync mode. In async mode, set TxCLK to 1, 16, or 64 times the transmission In external synchronization, in order for the external rate. Serial data from TxDATA is sent at the falling edge circuit to detect synchronization, a high level of at least of TxCLK. one period of RxCLK must be input to the SYNC pin. When the pPD71 051 detects the high level, it begins to For example, a rate of 19200 baud in sync mode means receive data, starting at the rising edge of the next that TxCLK is 19.2 kHz. A rate of 2400 baud in async RxCLK. The high level input may be removed when mode can represent a TxCLK of: synchronization is released. x1 clock = 2.4 kHz The BRK output is used only in async mode and shows x16 clock = 38.4 kHz the detection of a break state. BRK goes high when a x64 clock = 153.6 kHz low level signal is input to the RxDATA pin for two character bit lengths (including the start, stop, and RxDATA [Receive Data] parity bits). As with SYNC, you can read the status of ThepPD71051 receives serial data through the RxDATA BRK in bit 6 of the status byte. BRK is not cleared by the input. read operation. The set BRK signal is cleared when the RxDAT A pin RxRDY [Receiver Ready] returns to high level, or when the pPD71051 is reset by The RxRDY output becomes 1 when the pPD71051 hardware or software. The SYNC/BRK pin goes low on receives one character of data and transfers that data reset, regardless of previous mode. Figure 1 shows the to the receive data buffer; that is, when the receive data break state and BRK signal. can be read. This signal can be used as an interrupt signal for a data read request to the CPU. You can 4 NEe pPD71051 RxCLK [Receiver Clock] Block Diagram RxCLK is a reference clock input that controls the receive data rate. In sync mode, the receiving rate is the same as RxCLK.ln async mode, RxCLK can be 1, 16, or 64 times the receive rate. Serial data from RxDATA is input by the rising edge of RxCLK. 07- Do TxOATA TxROY Voo [Power] TxEMP TxClK +5 V power supply. RxOATA RxROY GND [Ground] SYNC/BRK RxClK RESET Ground. ClK C/O CTS AD RTS Figure 1. Break Status and Break Signal WR OSR OTR B-blt Character, No Parity IIr cs ~~ 83-000782A Stop Bit [2J Stop Bit StartBit Charac~er Bits RxOATA - , r'Do i----First Data ., • ) 07 Second Oata---i ) Do Charac!er Bits 0; r The CPU can read the current status of the pPD71 051 and can process data after checking the status, after Block Block [1 J BRK __________________________ ~~ checking fortransfererrors, andpPD71051 data buffer status. 6-blt Character with Parity lIT ThepPD71051 can be reset under hardware or software Ell ,II Parity Bit Parity Bit control to a standby mode that consumes less power RCharac~er m Stop Bit [2J Stop Bit i i i ~Charact!er Start Bit Bits Start Bit Bits I Start Bit and removes the device from system operation. In this mode, the pPD71 051 's previous operating mode is RxOATA - - , Do 05 Do 05 released and it waits for a mode byte to set the mode. i--Flrst Oata---!-- Second Oata-..l Block Block [1 J The pPD71051 leaves standby mode and shifts to a BRK --------------------~ designated operating mode when the CPU writes a Note: mode byte to it. [1J When RxOATA goes high In the stop bit position ofthe second data block, the BRK signal level may [but does not alwaysJ become high for a maximum of one bit time. Status Register [2J Only one bit of the stop bit is checked. 83-000783A The status register allows the CPU to read the status of the pPD71051 except in standby mode. This register IlPD71051 Functions indicates status and allows the CPU to manage data reading, writing, and error handling during operations. The pPD71051 is a CMOS serial control (USART) unit that provides serial communications in microcomputer Receive Data Buffer systems. The CPU handles thepPD71 051 as an ordinary 1/0 device. When the receiver has converted the serial data input from the RxDATA pin into parallel,data, the converted ThepPD71 051 can operate in synchronous or asynchro- data is stored in the receive data buffer. The CPU can nous systems. In sync mode, the character bit length, then read it. Data for one character entering the receive number of sync characters, and sync detection mode buffer is transferred to the receive data buffer and must be designated. In async mode, the communication RxRDY becomes 1, requesting that the CPU read the rate, character bit length, stop bit length, etc., must be data. designated. The parity bit may be designated in either mode. ThepPD71051 converts parallel data received from the CPU into serial transmitted data (from the TxDATA pin), and converts serial input data (from the RxDATA pin) into parallel data so that the CPU can read it (receiving operation). 5 pPD71051 NEe Transmit Data Buffer Absolute Maximum Ratings TA = +25°C The transmit data buffer holds the parallel data from the CPU that the transmitter will convert to serial data Power supply voltage, Voo -0.5 to +7.0 V and output from the TxDATA pin. When the CPU writes Input voltage, VI -0.5 to Voo + 0.3 V transmit data to the pPD71051, the pPD71051 stores Output voltage, Vo -0.5 to Voo + .0.3 V data in the transmit data buffer. The transmit data Operating temperature, TOPT buffer transfers the data to the transmitter, which sends the data from the TxDATApin. Storage temperature, TSTG Power dissipation, PDMAX 1.0 W Control Register Comment: Exposing the device to stresses above those listed in Absolute Maximum Ratings could cause permanent damage. The This register stores the mode and the command bytes. device is not meant to be operated under conditions outside the limits described in the operational sections of this specification. Control Logic Exposure to absolute maximum rating conditions for extended periods may affect device reliability. The control logic sends control signals to the internal blocks and controls the operation of the pPD71051 based on internal and external signals. Capacitance TA = +25°C, Voo = 0 v Limits Synchronous Character Register Test Parameter Symbol Min Max Unit Conditions This register stores one or two SYNC characters used in sync mode. During transmission, the SYNC fc = 1MHz Input capacitance CI 10 pF Unmeasured pins characters stored in this register are output from the 1/0 capacitance 20 pF returned to 0 V CIO TxDATA pin when the CPU does not send a new character and TxEMP status is set. During receiving, synchronization is established when the characters DC Characteristics received and the SYNC characters stored in this TA=-AO°Cto+85°C,Voo=+5V±10% regist~r are the same. Limits Parameter Symbol Min Typ Max Unit Test Conditions Transmitter Input voltage VIH 2.2 Voo+0.3 V The contents of the transmit data buffer are transferred high to the transmitter, converted from parallel to serial, and Input voltage VIL -0.5 0.8 V output from the TxDATA pin. The transmitter adds low start, stop, and parity bits. Output voltage VOH 0.7 x Voo V IOH = -AOO I1A high Receiver Output voltage VOL 0.4 V IOL = 2.5 rnA low The receiver converts serial data input from the RxDATA pin into parallel data and transfers the· parallel data to Input leakage IUH 10 I1A VI = Voo current high the receive data buffer, allowing the CPU to read it. Input leakage IUL -10 I1A VI =OV The receiver detects SYNC characters and checks current low parity bits in sync mode. It detects the start and stop Output leakage ILOH 10 I1A Vo = Voo bits, and checks parity in the async mode. current high In async mode, receiving does not begin (thestart bit is Output leakage ILOL -10 I1A Vo=OV not detected) until one effective stop bit (high level) is current low input to the RxDATA pin and Receive Enable (RxEN =;= Supply current 1) is set after setting up the mode. ti PD71051 1001 10 rnA Normal mode 1002 50 100 I1A Stand-by mode Modem Control I1PD71051-10 1001 10 rnA Normal mode This block controls the CTS, RTS, DSR, and DTR la02 2 50 I1A Stand-by mode modem interface pins. The RTS, DSR, and DTR pins can also be used as general-purpose I/O pins. 6 NEe pPD71051 AC Characteristics TA = -40°C to +85°C, VDD = 5 V ±10% 8 MHz Limits 10 MHz Limits Parameter Symbol Min Max Min Max Unit Test Conditions Read Cycle Address setup to RD ~ tSAR 0 0 ns CS,C/D Address hold from RD t tHRA 0 0 ns CS,C/D RD low level width tRRL 150 95 ns Data delay from RD ~ tORO 120 85 ns CL = 150 pF Data float from RD t tFRO 10 80 10 65 ns Port (DSR, CTS) set-up to RD ~ tSPR 20 20 tCYK Write Cycle Address setup to WR ~ tSAW 0 0 ns CS, C/O Address hold from WR t tHWA 0 0 ns CS,C/D WR low level width twwL 150 95 ns Data setup to WR t tsow 80 80 ns Data hold from WR t tHWO tCYK Port (DTR, RTS), delay from WR t towp 8 tCYK Write recovery time tRV 6 6 tCYK Mode initialize 8 8 tCYK Async mode 16 16 tCYK Sync mode Serial Transfer Timing ClK cycle time tCYK 125 DC 100 DC ns ClK high level width tKKH 50 35 ns ClK low level width tKKL 35 25 ns ClK rise time tKR 5 20 5 20 ns ClK fall time tKF 5 20 5 20 ns TxDATA delay from TxClK tOTKTD 0.5 0.5 /lS Transmitter input clock pulse tTKTKL 12 12 tCYK 1xBR (Note 1) width low level 1 1 tCYK 16x, 64xBR Transmitter input clock pulse tTKTKH 15 15 tCYK 1xBR width high level 3 3 tCYK 16x, 64xBR Transmitter input clock fTK DC 240 DC 300 kHZ 1xBR frequency (Note 2) DC 1536 DC 1920 kHz 16xBR DC 1536 DC 1920 kHz 64xBR Receiver input clock pulse tRKRKL 12 12 tCYK 1xBR width low level tCYK 16x, 64xBR Receiver input clock pulse tRKRKH 15 15 tCYK 1xBR width high level 3 3 tCYK 16x, 64xBR 7 pPD71051 NEe AC Characteristics (cont) 8 MHz limits 10 MHz Limits Parameter Symbol Min Max Min Max Unit Test Conditions Serial Transfer Timing (cont) Receiver input clock frequency fRK DC 240 DC 300 kHz 1xBR (Note 2) DC 1536 DC 1920 kHz 16xBR DC 1536 DC 1920 kHz 64xBR RxDATA set-up to Sampling pulse tSROSP fJS RxDATA hold from sampling tHSPRO fJS pulse TxEMP delay time (TxDATA) tOTXEP 20 20 tCYK TxRDY delay time (TxRDYt) tOTxR 8 8 tCYK TxRDY delay time (TxRDY l) tOWTXR 200 100 ns RxRDY delay time (RxRDYt) tORXR 26 26 tCYK RxRDY delay time (RxRDY l) tORRXR 200 100 ns SYNC output delay time tORKSY 26 26 tCYK (for internal sync) SYNC input set-up time tSSYRK 18 18 tCYK (for external sync) RESET pulse width 6 6 tCYK Notes: (1) BR = Baud rate (2) 1xBR: fTK or fRK::; 1/30tCLK, 16x, 64xBR: fTK orfRK::; 1/4.5tCLK (3) System elK is needed during reset operation (4) Status update can have a maximum delay of 28 tCYK from the event effecting the status. Timing Waveforms Write Data Cycle Read Data Cycle X k== ---JX ic: c/o - - -..... cs----M _ _ _I----,1II+-IWWL--! r+- r-I _1_ _ c/o _ _ cs---........ \n r--IS~R---! I---IRRL--! 0= I I WR ~ J(I~ \\ VJ'~ rftft' I....----ll -' IHWD I __+-____;....r:!_DR""D 07-00 _ _ _ _--.. 1- ~ I i I SDW~ nc= 07- 0 0 I -H1C I !-IDWP-j x: OSR,CTS ~--------+l-------------- !--IDWTXR ----! I ~ TxRDY ~ ~L RxROY _ _ _ _ _oJ I ______ ~ 83-01913A 83-000767A 8 NEe pPD71051 Timing Waveforms (coni) Transmitter Clock and TxDA TA TxClK [1 x BR] ---..1-'·~'T'm"~1--'_---..1,.---- ~tDTKTD1 ltDTKTD1 TxDATA ------..,X .X. .- - - - - - - - I I 16~ 1+---------- Cycle -----------+1 TxClK [16 x BR] TxDATA :': 83-0007698 Receiver Clock and RxDATA Timing RxClK [1 x BR] Internal Sampling Pulse _ ~' __ _1J:t"~ tSRDSP'----1-.1.1 tH-s-p-RD-l-----------J .... 11\____ RxDATA ~~-------S-ta-rt-B-it------~J(~-------1s-t-D-at-a-B-It--______--J)(~______ r-- I r~~ SRxClK SRxClK ~~ ,', "~~ __ 16 RxClK tRKRKL tRKRKH '1' .\ LJ H ~~'m,..~~/'LYL RxClK [16 x BR] tnternal I~' ~,'----- Sampling Pulse RxDATA ~ll·~ __________ts_R_DS~p~----------~~t~H-SP-R-Dl--~ " Start Bit~ :::::::::(~::::::::::~~':.=::x------ " .... 1st Data Bit 83-0007688 AC Test Input Write Recovery Time 2. 4V 0.4SV =::X_ 2,2 V _ O.S V Test Points -x== 2.2 V -------= 0.8 V 83-OOO766A Main Clock ClK 83-000770A 9 pPD71051 NEe Connecting the pPD71051 to the System Fi9We 3. pPD71051 Opera,t("gProcedure The CPU uses the pPD71051 as an I/O device by allocating two I/O addresses, set by the value of C/O. One I/O address is allocated when the level of C/O is low and becomes a port to the transmit and receive data register. The other I/O address is allocated when C/O is high and becomes aport to the mode, command, and status registers. Generally, the least significant bit (Ao) of the CPU address bus is connected to C/O to get a continuous I/O address. This is shown in figure 2. Pins TxRDY and RxRDY are connected to the CPU or, when interrupts are used, to the interrupt pin of the interrupt controller. Operating the pPD71051 Start with a hardware reset (set the RESET pin nigh) after powering on the pPD71051. This puts the pPD71051 into standby mode and it waits for a mode byte. In async mode, the pPD71051 is ready for a command byte after the mode byte; the mode byte sets the communication protocol to the async mode. In sync mode, the pPD71 051 waits for one or two SYNC characters to be sent after the mode byte; set C/O = 1. A command byte may be sent after the SYNC characters are written. Figure 3 shows this operation sequence. I n both modes, it is possible to write transmit data, read receive data, read status, and write more command bytes after the first command byte is written. The pPD71051 performs a reset, enters standby mode, and returns to a state where it waits for a mode byte when the command byte performs a software reset. Figure 2. System Connection Note: CPU [lJ This is done with C/O = 0, Others are operated with C/O = 1. 83-0007858 JlPD71051 MEM/IO RD~------------~--~ WR~----------------~ 83-000784A 10 NEe pPD71051 Mode Register . Figure 4. Mode Byte for Setting Asynchronous Mode When the JlPD71051 IS In standby mode, writing a C/D=1 mode byte to it will release standby mode. Figure 4 7654321 shows the mode byte format for designating async IST1ISTOI P1 PO I L1 LO I B1 I BO J mode. Figure 5 shows the mode byte format for L,J L~ L,J designating sync mode. Bits 0 and 1 must be 00 to ~B1 BO Baud Rate 0 1 x 1 Clock designate sync mode. Async mode is designated by all 1 0 x 16 Clock other combinations of bits 0 and 1. 1 1 x 64 Clock TheP1, PO and L 1, LO bits are common to both modes. L1 LO Character Length Bits P1 and PO (parity) control the generation and 0 5·bit 0 checking (sending and receiving) functions. These 0 1 6-bit parity bit functions do not operate when PO = O. When 1 0 7-bit P1, PO = 01, the JlPD71051 generates and checks odd 1 1 8-bit parity. When P1, PO = 11 , it generates and checks even parity. P1 PO Parity Generate/Check x 0 No Parity Bits L 1 and LO set the number of bits per character (n). 0 1 Odd Parity Additional bits such as parity bits are not included in 1 1 Even Parity this number. Given n bits, the JlPD71051 receives the lower n bits of the 8-bit data written by the CPU. The ST1 STO Transmit Stop Bits upper bits (8 -n) of data that the CPU reads from the 0 0 Use Illegal 0 1 1-bit JlPD71051 are set to zero. 1 0 1-1/2 bit The ST1, STO and B1, BO bits are used in async mode. 1 1 2-bit The ST1 and STO :bits determine the number of stop m x: don't care 83-000786A bits added by the JlPD71 051 during transmission. The B1 and BO bits determine the relationship between Figure 5. Mode byte for Setting Synchronous Mode the baud rates for sending and receiving, and the clocks TxCLK and RxCLK. B1 and BO select a multi- C/D=1 plication rate of 1, 16, or 64 for the frequency of the 5 4 3 2 1 sending and receiving clock relative to the baud rate. LSscLEXSYNC P1 L PO I Ld LO I 0 10 L..J Multiplication by 1 is not normally used in async mode. Note that the data and clock must be synchronized on T L1 LO Character Length 0 0 5-bit the sending and receiving sides when multiplication by 0 1 6-bit 1 is used. 1 0 7-bit 1 1 8-bit The SSC and EXSYNC bits are used in sync mode. The SSC bit determines the number of SYNC characters. P1 PO Parity Generate/Check SSC = 1 designates one SYNC character. SSC = 0 x 0 No Parity designates two SYNC characters. The number of 0 1 Odd Parity SYNC characters determined by the SSC bit are 1 1 Even Parity written to the JlPD71 051 immediately after writing the mode byte. EXSYNCI Sync Detect 0 Internally IOutput] The EXSYNC bit·determines whether sync detection 1 Externally [Input] during receiving operations is internal or external. EXSYNC = 1 selects external sync detection and SSC Sync Characters EXSYNC = 0 selects internal sync detection. 0 2 [BSC] 1 1 x: don't care 83-000787A pPD71051 NEe Command Register The TxEMP and RxRDY bits have the same meaning as the pins of the same name. The SYNC/BRK bit generally Commands are issued to the JlPD71051 by the CPU by has the same meaning as the SYNC/BRK pin. In command bytes that control the sending and receiving external synchronization mode, the status of this bit operations of the JlPD71051. A command byte is sent does not always coincide with the pin. In this case, the after the mode byte (in sync mode, a command byte SYNC pin becomes an input and the status bit goes to 1 may only be sent after writing SYNC characters) and when a rising edge is detected at the input. The status the CPU must set C/O = 1. Figure 6 shows the bit remains at 1 until it is read, even when the input level command byte format. at the SYNC pin goes low. The status bit becomes 1 Bit EH is set to 1 when entering hunt phase to when a SYNC character is input with the RxDATA synchronize in sync mode. Bit RxEN should also be set input, even when the pin is at a low level. to 1 at that time. Data reception begins when SYNC The DSR bit shows'the status of the DSR input pin. The characters are detected and synchronization is status bit is 1 when the DSR pin is low. achieved, thus releasing hunt phase. The FE bit (framing error) becomes 1 when less than When bit SRES is set to 1, a software reset is executed, one stop bit is detected at the end of each data block and the JlPD71051 goes into standby mode and waits during asynchronous receiving. Figure 8 shows how a for a mode byte. framing error can happen. Bit RTS controls the RTS output pin. RTS is low when the RTS bit = 1 , and goes high when RTS = O. Figure 6. Command Byte Format Setting bit ECl to 1 clears the error flags (PE, aVE, and C/D=l FE) in the status register. Set ECl to 1 when entering 5 4 the hunt phase or enabling the receiver. LEH1SRES IRTsJeCll SBRK1RxEN IDTR\ TxEN \ Bit SBRK sends a break. When SBRK = 1, the data L..r TxEN 1Transmit Enable Disable o I currently being sent is destroyed and the TxDATA pin Enable 1 I goes low. Set SBRK = 0 to release a break. Break also works when TxEN = 0 (send disable). . DTR I DTR Pin Control Bit RxEN enables and disables the receiver. RxEN = 1 o 1 DTR=l enables the receiver and RxEN = 0 disables the I 1 I DTR=O J receiver. Synchronization is lost if RxEN = 0 during I RxEN J Receive Enable sync mode. o I Disable 1 Enable Bit DTR controls the DTR output pin. DTR goes low when the DTR bit = 1 and goes high when the DTR SBRK Send Break bit = O. TxDATA Pin 0 Normal Operation The TxEN bit enables and disables the transmitter. 1 TxDATA = 0 TxEN = 1 enables the transmitter and TxEN = 0 disables the transmitter. When TxEN = 0, sending ECl Error Clear stops and the TxDATA pin goes high (mark status) 0 No Operation after all the currently written data is sent. I 1 Error Flag Clear ..J RTS RfS Pin Control Status Register 0 FiTS=l I The CPU can read the status of the JlPD71051 at any I 1 I RfS=o time except when the JlPD71 051 iSJn standby mode. Status can be read after setting C/D = 1 and RD = O. 'SRES Soltware Reset 0 No Operation Status is not updated while being read. Status updating is delayed at least 28 clock periods after an event that I 1 Reset Operation affects the status. Figure 7 shows the format of the EH [1] Enter Hunt Phase status register. 0 No Operation 1 Enter Hunt Phase Note: [1] The EH bit is eflective only in SYNC mode. 83-000788B 1':> NEe pPD71051 The aVE bit (overrun error) becomes 1 when the CPU Framing, overrun, and parity errors do not disable the delays reading the received data and two new data pPD71 051 's operations. All three error flags are cleared bytes have been received. In this case, the first data to 0 by a command byte that sets the ECl bit to 1. byte received is overwritten and lost in the receive data The TxRDY bit becomes 1 when the transmit data buffer. Figure 9 shows how an overrun can happen. buffer is empty. The TxRDY output pin becomes 1 The PE bit (parity error) becomes 1 when a parity error when the transmit data buffer is empty, the CTS pin is occurs in a receive state. low, and TxEN = 1. That is, bitTxRDY = Transmit Data Buffer Empty, pin TxRDY = (Transmit Data Buffer Figure 7. Status Register Format Empty)-(CTS = O)-(TxEN = 1). C/D=l Figure 8. Framing Error 5 4 3 IDSR l~~~c/'FEjoVE'PE ITXEM~ RxR DY' TxR DY L Same as the Output Pin Function with the Same Na 1 Character = 5-bit, No Parity, 1 Stop Bit [1 J In the break state: Enter the Break State TxRDY 0 Trasmit Data Buffer State Full RxDATA mlI I I~ I I -r . I I It\~ 1"", ""'1.... 1 -,.1.....1...'-.' Start Stop Start FE = 1 1 Empty Bit Bit Bit Set because a stop bit should be here. PE Parity Error I [2J A large frequency difference between RxCLK and TxCLK: I 0 1 - No Error - Error I RxDATA - - - , I 1II! , t:- Sto~ bit : \ \ \ \ \ \ +/FE - 1 ~ ~ , \ \ \ \ This pulse samples the stop bit. Because of OVE Overrun Error Sampling Pulse IIIIIII _ _ _ _ _ _ _ the frequency of RxCLK is lower than that of TxCLK the start bit is sampled too late I 0 - No Error I in time. 1 - Error [3J When data is changed during transmission: [Using less -I FE Framing Error reliable transmission circuit, etc.J I 0 - No Error I TxDATA ---, n nn n nn 1 - Error ~ I u U+~ I 4J+~ Lt- Start Stop Start Stop Start Bit Bit Bit Bit Bit ~Input DSR Pin State RxDATA - , \I n n 0 DSR = 1 UII~U4.JI~ 1 DSR =0 Bit Change Bit Bit Change Change FE= 1 83-000796A 83-000797A Figure 9. Overrun Error OVE RxRDY CPU Receive Data Buffer Receive Buffer R x Data [Second BufferJ [First BufferJ f/!'W/01l:!¥,6~ ~Char1 Readcharo--I I I I I I I I I ~Char1 I I I I I I I I ~ch~ri~Char1 ~)cj,:r;~ I I I I I I I ~ Char2 W~q~¥r)~ I I I I I I ~ Char2 ~Ch;r1~ ~Char2 f0V44ch~r1~ ~Chrr2~A-- Char2 WW4c+,2/0Y~ I I I I I I I t0J-- Char 3 Char 1 is not read by the CPU and is discarded on receipt 01 Char 2 83-0007988 pPD71051 NEe Sending in Asynchronous Mode When bit SBRK is set to 1, the TxDATA pin goes low (break status), regardless of whether data is being The TxDATA pin is typically in the high state (marking) sent. Figure 11 is a fragment of a typical program to when data is not being sent. When the CPU writes send data in the async mode. Figure 12 shows the transmit data to the pPD71 051, the pPD71 051 transfers output from pin TxDAT A. the transmit data from the transmit data buffer to the send buffer and sends the data from the TxDAT A pin Figure 10. Asynchronous Mode Data Format after adding one start bit (low level) and a programmed stop bit. If parity is used, a parity bit is inserted between No Parity the character and the stop bit. Figure 10 shows the data - - - , Start Do 0, On.' On format for async mode characters. Serial data is sent Mark I Bit I :::: Is:;:C Bit[s] Data Bits by the falling edge of the signal that divided TxCLK (1/1,1/16, or 1/64). With Parity DO 0, On.l On -:-:-:-1 Start Mark I Bit I :::: I Is:;:C Parity Bit[s] Data Bits Bit n=4,5,6,7 Stop Bit = 1 bit, 1.5 bit, 2 bit 83·000789A Figure 11. Asynchronous Transmitter Example ASYNTX: CALL ASYNMOD ;Set async mode MOV AL, 00010001 B ;Command: clear error flag, transmit enable OUT PCTRL,AL MOV BW, OFFSET TXDADR ;Transmit data area TXSTART: IN AL, PCTRL TEST1 AL,O ;Read status BNE TXSTART ;Wait until TxRDY = 1 MOV AL, [BW] ;Write transmit data OUT PDATA,AL INC BW ;Set next data address CMP AL,OOH BNE TXSTART ;End if data = 0 RET TXDADR DB 'NEC' ;Transmit data 4EH, 45H, 43H, 00 DB o ASYNMOD: MOV AL,O ;Writes control bytes three times OUT PCTRL, AL ;with OOH to unconditionally OUT PCTRL, AL ;accept the new command byte OUT PCTRL, AL MOV AL, 01000000B ;Software reset OUT . PCTRL, AL MOV AL,11111010B ;Write mode byte OUT .PCTRL, AL ;Stop bit = 2 bits, even parity RET ;7 bits/character, x16 clock Figure 12. TxDATA Pin Output 83-0007908 1-11 NEe J.lPD71051 Receiving in Asynchronous Mode Data for one character entering the receive buffer is transferred to the receive data buffer and causes The RxDATA pin is normally in the high state when RxRDY = 1, requesting that the CPU read the data. data is not being received, as shown in figure 13. The When the CPU reads the data, RxRDY becomes O. ,uPD71051 detects the falling edge of a low level signal when a low level signal enters it. When a valid stop bit is detected, the ,uPD71 051 waits for the start bit of the next data. If a low level is detected The ,uPD71051 samples the level of the RxDATA input in the stop bit, a framing error flag is set; however, the (only when x16 or x64 clock is selected) in a position receiving operation continues as if the correct high 1/2 bit ti me after the fall i ng edge of the RxDA T A input level had been detected. A parity. .error flag is set if a to check whether this low level is a valid start bit. It is parity error is detected. An overru'n error flag is set considered a valid start bit if a low level is detected at when the CPU does not read the data in time, and the that time. If a low level is not detected, it is not regarded next receiving data is transferred to the receive data as a start bit and the ,uPD71 051 continues testing for a buffer, overwriting the unread elata. The jJPD71 051's valid start bit. sending and receiving operations are not affected by When a start bit is detected, the sampling points of the these errors. data bits, parity bit (when used), and stop bit are If a low le~el is input to the RxDATA pin for more than decided by a bit counter. The sampling is performed by two data blocks during a receive operation, the the rising edge of the RxCLK when an X1 clock is used. ,uPD71051 considers it a break state and the SYNC/BRK When a x16 or x64 clock is used, it is sampled at the pin status becomes 1. nominal middle of RxCLK. In async mode, the start bit is not detected until a high Figure 13. Start Bit Detection level of more than one bit is input to the RxDATA pin and the receiver is enabled. Figure 14 is a fragment of a RxDATA [1J typical program to receive the data sent in the previous ~ async transmit example. ~ RxDATA [2J Sampling Bit Boundary _ _---"'_......... 1_ .........._ _ _ _ Note: [1 J Start bit is not recognized because R x Data is high at the sampling time. [2J Start Is recognized because R x Data is low at the sampling time. 83-000791 A Figure 14. Asynchronous Receiver Example ASYNRX: CALL ASYNMOD ;Set ASYNC mode MOV AL, 000101 OOB ;Command: clear error flag, receive ;enable OUT PCTRL,AL MOV BW, OFFSET RXDADR ;Data store area RXSTART: IN AL, PCTRL TEST1 AL,1 ;Read status BNE RXSTART ;Wait until RxRDY = 1 IN AL, PDATA ;Read and store the receive data MOV [BWJ, AL INC BW ;Set next store address CMP AL,OOH ; End if data = 0 BNE RXSTART RET RXDADR DB 256DUP ;Reserve receive data area 15 pPD71051 NEe Sending in Synchronous Mode Figure 15. Synchronous Mode Data Format Following the establishment of sync mode and the enabling of the transmitter,the TxDATA pin stays high Character Data without Parity until the CPU writes the first character (normally, I Do 0, ~: Dn-, On I SYNC characters). When data is written, the TxDATA I...- - - - - O n e C h a r a c t e r - - - - -...I pin sends one bit for each falling edge of TxCLK if the Character Data with Parity CTS pin is low. Unlike async mode, start and stop bits I Do 0, :: On·' On Parity I are not used. However, a parity bit may be set. Figure I...- - - - - - O n e Character with Parity -------.1 15 shows these data formats. n = 4, 5, 6, 7 Once sending begins, the CPU must write data to the 83-000792A JlPD71051 at the same rate as that of TxCLK. If TxEMP goes to 1 because of. a delay in writing by the CPU, the JlPD71051 sends SYNC characters until the CPU writes data. TxEMP goes to 0 when data is written, and the data is sent as soon as transmission of SYNC characters stops. Figure 16. Synchronous Mode Transmit Timing No. of Sync characters = 2 [BSC] CTS=O !,PD71051 Transmits Automatically TxDATA Mark TxRDY [Pin] TxEMP - - - , I~_--------------------------~I .----, I~ ______________ ~ Data 0 Data 2 Data 3 Data 4 r-----, r----------, 83-000793B Figure 17. Issuing a Command During SYNC Character Transmission No. of Sync Characters = 1 Data By the 71051 Bythe71051 By the CPU Sync Sync Character Character TxRDY J L-J TxEMP _ _ _ _---' I[2] [4] U ~ [1] [3] AD U U-- Note: [1] Confirm the automatic trasmlsslon of the SYNC character by the TxEMP status. [2] Write SYNC character data. [3] Confirm the beginning of SYNC character trasmlsslon by the CPU by reading the status. [4] Write command word. B3-000794A 16 NEe pPD71051 Automatic transmission of SYNC characters begins byte and transmit it as data. If a command must be sent after the CPU sends new data. SYNC characters are under these conditions, the CPU should send a SYNC not automatically sent by enabling the transmitter. character to the JiPD71051 and send the command Figure 16 shows these timing sequences. while the SYNC character is being transmitted. This is shown in figure 17. If a command is sent to the JiPD71051 while SYNC characters are automatically being sent and TxEMP = Figure 18 is a fragment of a typical program for sending 1, the JiPD71 051 may interpret the command as a data in sync mode. Figure 18. Synchronous Transmitter Example SYNTX: CAll SYNMOD ;Set sync mode MOV Al, 00010001 B ;Command; clear error OUT PCTRl, Al ;flags, transmit enable MOV 8W, OFFSET TXDADR ;Start location of data area TxDADR MOV Cl, lDlEN ;Set number of bytes (lDlEN) to be transmitted MOV CH,OOH TXlEN: IN Al, PCTRl ;Transmit the length byte TEST1 Al,O BZ TXlEN MOV Al, lDlEN OUT PDATA,Al TXDATA: IN Al, PCTRl TEST1 Al,O BZ TXDATA ;Transmit the number of MOV Al, (BW) ;bytes specified by lDlEN OUT PDATA,Al INC BW DBNZ TXDATA MOV Al, 00010000B ;Command; clear error OUT PCTRl, Al ;flags, transmit disable RET SYNC1 DB ? ;SYNC character 1 SYNC2 DB ? ;SYNC character 2 lDlEN DB ? ;transmit data count TXDADR DB 255 DUP (?) ;transm it data SYNMOD: MOV Al,OOH OUT PCTRl, Al ;Write control bytes OUT PCTRl, Al ;three times with OOH to OUT PCTRl, Al ;unconditionally accept the new ;command byte MOV Al, 01000000B ;Software reset OUT PCTRl, Al MOV Al,001111008 ;Write mode byte: 2 SYNC OUT PCTRl, Al ;characters, internal sync detect, ;even parity, 8 bits/character MOV Al, SYNC1 OUT PCTRl, Al ;Write SYNC characters MOV Al, SYNC2 OUT PCTRl, Al RET 17 NEe Receiving in Synchronous Mode bit becomes 1, and goes to 0 when the status is read. The SYNC status bit is set to 1 when the SYNC input In order to receive in sync mode, synchronization must has a rising edge followed by a high level of more than be established with the sending side. The first command one period of RxClK, even after synchronization is after setting sync mode and writing the SYNC character achieved. must be EH = 1, ECl = 1, and RxEN = 1. When hunt phase is entered all the bits in the receive buffer are set ThepPD71051 can rE3gain lost synchronization anytime to 1. In internal synchronization, data on the RxDATA by issuing an enter hunt phase command. pin is input to the receive buffer for each rising edge of RxClK and is compared with the SYNC character at After synchronization, the SYNC character is compared the same time. Figure 19 shows this internal sync with each character regardless of whether internal or detection. external synchronization is used. When the characters coincide, SYNC becomes 1, indicating that a SYNC When the receive buffer and the SYNC character character has been received. SYNC (SYNC status bit coincide, and parity is not used, the pPD71051 ends only in external detection) becomes 0 when the status hunt phase and SYNC is set to 1in the center of the last is read. SYNC bit. When parity is'used, SYNC becomes 1 in the center of the parity bit. Receiving starts with the bit Overrun and parity errors are checked the same way as which follows the bit when SYNC is set to 1. in async mode, affecting only the status flag. Parity checking is not performed in the hunt phase. Figure 20 In external sync detection, synchronization is achieved is a fragment of a typical program that receives the data by setting the SYNC pin high from an external circuit sent by the previous sync transmit program example. for at least one period of RxClK. Hunt phase ends, and Note that the frequencies of TxClK on the transmitter data reception can start. At this time, the SYNC status and RxCLK on the receiver must be the same. Figure 19. Internal Sync Detection Example 5-bit Character, No Parity, 2 Sync Characters Sync Character 1 = 01100B, Sync Character 2 = 11001B Sync Character 1 Sync Character 2 LSB MSB LSB MSB All bits are set to 1 by EH = 1. 10!o!111!0ixix!xl 11!oi O ! < 1 ! x ! X ! x l ~ ~ CPU Operation cb ® Receive Buffer cb ® I SYNC RxOATA Input Command EH=1 RxEN=1 I ' i ' i' i ' i ' i ' i ' i ' : ' I ' i ' ! ' i ' i ' i ' i ' ! ' i ' I 1 , 1 , 1 I 1 , 1 I 1 I 1 I 1 I 1 1 I 1 , 1 I 1 I 1 I 1 I 1 I 1 , 1 ' } Mark 1 11: 1 i 1! 1 i 1 i 1: 1 i 1! 111: 1 i 1: 1 i 1: 1 i 1 i 1.: 1 1 - - 1 ECL=1 I 1 ! 1 : 1 i 1 i 1 i 1 : 1 ; 1 ! 1 I 1 i 1 i 1 ! 1 i 0 i 1 ! 1 i 1 :1 I-- 0 1 : 1 : 1 i .1 i 1 i 1 : 1 ! 1 ! 1 I 1 : 1 ; 1 ; 0 ! 0 ! 1 i 1 ! 1 ! ·1 I-- 0 1 i 1.! 1 : 1 i 1 i 1 ! 1 i 1 i 1 I 1 i 1 ; 0 ! 0 ; 1 ! 1 : 1 i 1: 1 I-- 1 1 i 1 i 1 ! 1 i 1. ! 1 ! 1 i 1 i 1 I 1 ! 0 ! 0 ! 1 1 ! 1 i 1 ! 1 ; 1 I-- 1 i 1 i 1 ! 1 : 1 i 1 ! 1J 1 i 1 : 1 I 0 i 0 ! 1 i 1 : 0 : 1 i 1 ! 1 : 1 I-- 0 1 : 1 i 1 i 1 i 0 i 1 ! 1 i 1 i 1 l o ! 1 i 1 i O! 1 i 1! 1 ! 1 i 1 1 - - 1 1! 1 i 1! O! 0 i 1! 1 i 1: 111 i 1 i 0 i 1 i o! 1! 1! 1! 1 1 - - 0 I Sync Character 1 , ! ' !, ! ' ! ' ! ' ! ' !, : ' I ' : ' i ' : ' i ' ! ' : ' : , ! , 1---, .,,, C.""",,, 1 ! 0 i o! 1 ! 1 ! 1 ! 1 i 1 i 1 I 0 : 1 i o! o! 1 i 1! 1: 1 i 1 1 - - 1 Read Status 1 o i 0 i 1 i 1 i 0 ! 1.1 1 ! 1 1 1 I 1 1 0 i 0 ! 1 ! 1 ! 1 ! 1 ; 1 ! 1 I-- 1 o i 1 ! .~ ! 0 1 1 i1 1 1 :1 i 1 I 0 1 0 i 1 ;1 i 0 ! 1 ! 1 1, 1 ; 1 I--- 0 Data 1 Cleared by Status Read 00 00 X: don't care Note: Since the character is 5 bits, part1 of the sync character register [lower five bits] is valid and part 2 doesn't mailer. Similarly, in the receive buffer, part3 is valid and part 4 is not used. SYNC = 1 when part 1 3. = With parity, the LSB of part4 is the parity bit, but it is not compared with the SYNC character. 83-000795B 18 NEe pPD71051 Figure 20. Synchronous Receiver Example SYNRX: CAll SYNMOD ;Set sync mode MOV Al, 100101 OOB ;Command: enter hunt OUT PCTRl, Al ;phase, clear error flags, receive enable MOV BW, OFFSET RXDADR ;Set receive data store address RXlEN: IN Al, PCTRl TEST1 Al,1 BZ RXlEN ;Receive the number of IN Al,DATA ;receive data MOV STlEN,Al ;Set the number of MOV Cl, Al ;receive data to both variable and ;counter MOV CH,OOH RXDATA: IN Al, PCTRl TEST1 Al,1 BZ RXDATA ;Receive and store the IN Al, PDATA ;number of data bytes MOV [BW],Al ;stated by the counter INC BW DBNZ RXDATA MOV Al,OOOOOOOOB ;Command: receive disable OUT PCTRl, Al RET STlEN DB ? ;Set number of receiver data RXDADR DB 256 DUP (0) ;Reserve receive data area Standby Mode Figure 21. Standby Mode Timing The pPD71 051 is a low-power CMOS device. In standby Hardware Reset mode, it disables the external input clocks to the inside circuitry (ClK, TxClK, and RxClK), thereby con- suming less power. A hardware reset is one way to enter standby mode. The input of a high level to the RESET pin causes the Mode Word pPD71051 to enter standby mode at the falling edge of the high level. A software reset command is the other way to enter standby mode. The only way to take the pPD71051 out of standby mode is to write a mode byte. Software Reset In standby mode, the TxRDY, TxEMP, RxRDY, and SYNC/BRK pins are at low level and the TxDATA, DTS, and RTS pins are at high level. Figure 21 shows the timing for standby mode. While the internal standby signal is high, the external clocks to thepPD71 051 are ignored. If data (C/D = 0) is written 83-000799A to the pPD71 051 in standby mode, the operations are undefined and unpredictable operation may result. 19 JlPD71 051 NEe 20 NEe NEe Electronics Inc. pPD71054 Programmable Timer/Counter Description Pin Configurations The J1PD71 054 is a high-performance, programmable 24-Pin Plastic DIP counter for microcomputer system timing control. Three 16-bit counters, each with its own clock input, Voo gate input, and OUT pin, can be clocked from dc to 06 10 MHz. Under software control, theJ1PD71054 can gen- 05 erate accurate time delays. Initialize the counter, and the J1PD71054 counts the delay, and interrupts the 03 CPU when the task is complete. This eliminates the 02 01 need for software timing loops. Do The J1PD71054 contains three counters capable of ClKO binary or BCD operation. There are six programmable count modes. The counters operate independently and each can be set to a different mode. Use address lines 83-000800A A 1 , Ao to select a counter and perform a read/write operation. 44-Pln Plastic QFP Features o Three independent 16-bit counters z c... c'" c'" c z () .... () ~ I~ z z z () () () o Six programmable counter modes o Binary or BCD count o Multiple latch command NC NC o Clock rate: dc (standby mode) to 10 MHz NC RD o Low-power standby mode NC cs o CMOS technology o Single power supply, 5 V ±10% o Industrial temperature range -40 to +85°C o 8 MHz and 10 MHz 03 02 NC 01 Al Ao NC ClK2 1m DO OUT2 Ordering Information ClKO GATE2 OUTO ClKl Part Number Package Type NC NC pPD71054C-8 24-pin plastic DIP C-10 G-8 44-pin plastic QFP (P44G-80-22) w c () ()() 0 () () () z z z I- Z ::. I- Ui Z Z Z G8-8 44-pin plastic QFP (P44G8-80-384) e( l' () - ::J 0 l- e( l' l' G8-10 Note: L-8 28-pin PLCC [1 J 00 not connect any signal with pin 17. 83-001787A L-10 50009-2 (NECEL-139) pPD71054 NEe Pin Configurations (cont) Pin Functions 28-Pln PLCC (Plastic Leaded Chip Carrier) D7-DO [Data Bus] N These pins are an 8-bit three-state bidirectional data NNW ~ I- I- b,us. This t?us is used to program counter modes and to ~ I~ ~ ~ <3 5 ~ read status and count values. The data bus is active L() IIII:J' '('I') N ~ 0 0) when CS = 0, and is high impedance when CS = 1. N N N N N N ,.... AD 26 18 CLK1 WR 27 17 GATE1 ClKn [Counter Clock, n = 0-2] VOO 28 16 oun These pins are the clock input that determine the count NC 1 0 jlP071054 15 NC rate for counter rio The clock rate may be DC (standby D7 14 GND GATEO mode) to 8 MHz. Ds 13 Os 4 12 OUTO Ln CD ,.... co en ~ ~ ,OUTn [Counter Output, n = 0-2] These are the output pins for counter n. A variety of ' 88Bc8~~ outputs is available depending on the count mode. 0' 83-004204A When the pPD71054 is used as an interrupt source, these pins can output an interrupt request signal. Pin Identification GATEn [Counter Gate, n = 0-2] Symbol Function These output pins inhibit or trigger counter n according D7- DO Three-state, bidirectional data bus to the mode selected. CLKn Counter n clock output (n = 0-2) OUTn Counter n output (n = 0-2) A1, Ao [Address] GATEn Output to inhibit or trigger counter n (n = 0-2) These input pins select the counter. A1, Ao equal to 00, GND Ground 01, or 10 selects counter 0, 1, or 2,respectively. The IC Internally connected control register is selected when A1, Ao equals 11. These pins are normally connected to the address bus. Ao-A1 Select counter input 0, 1, or 2 CS Chip select CS [Chip Select] RD Read strobe When the CS input = 1, all the bits of the data bus WR Write strobe become high impedance. CS must be low to access the Voo +5V pPD71054. NC Not connected RD [Read Strobe] The RD input must be low to read data from the pPD71054. WR [Write Strobe] The WR input must be low to write data to the pPD71 054. The contents of the data bus are written to the pPD71 054 at the risi ng edge of WR. Voo [Power] +5V. GND [Ground] Ground. 2 NEe pPD71 054 Block Diagram Counter #0 1----------------, n I. i [8J + c $~ Hi9h L , , , , :: ~ [8J A. .J.. g'6.f-- ~ Data Bus 07- DO Buffer , ~ O~'Low ~, ...,.-" [8J [8J [8Ji Down I---e- CLKO Control A I Counter [16J ~ Logic GATEO 1\ [8J i Hi9h OUTO ~ ~ c ~ [8J A : o .... g~f-- 'Low , , ~ [8J i [8J , 'of _ _c : t , ~ , , Read/Write r- A , - Controller Status 8 Status [8J [ J Register [8J , '4 Latch [8J ~ , ! 0 , + , L ________________ . ~ A I [8J \ CLK1 1- ~ --y A. I Counter #1 GATE1 Control OUT1 Register I~ I A . r II UI [8J ) ) Counter #2 ~ . CLK2 GATE2 OUT2 m --y "- Note: The internal architecture of counters #1 and #2 is the same as counter #0. L-__________________________________________________________________________________ ~83~-O~OO~80~lB • Block Functions executes an OUT command when A1, Ao = 11. The contents of this register cannot be read if the CPU Data Bus Buffer executes an I N command when A1, Ao = 11. However, This is an a-bit three-state bidirectional buffer that acts the multiple latch command allows you to read the as an interface between the JlPD71054 and the system mode and status of each counter. data bus. The data bus buffer handles control com- mands, the count to be written to the count register, Counter n [n = 0-2] count data read from the count latch, and status data A 16-bit synchronous down counter performs the read from the status latch. actual count operation within the counter. You can preset this counter and select binary or BCD operation. Read/Write Control The count register is a 16-bit register that stores the This circuit decodes signals from the system bus and count when it is first written to the counter. The count is sends control signals to other blocks of the JlPD71 054. transferred to the down counter and a count operation A1 and Ao select one of the counters or the control for a specified number of counts begins. register. A low signal on RD or WR selects a read or write operation. CS must be low to enable these The a-bit width of the internal data bus permits the operations. transfer of only eight bits at a time when the count is written to the count register. However, when data is Control Register written from the count register to the down counter, all 16 bits can be written at once. When the count is written This is an a-bit register into which is written the control to the count register while the counter is in read/write command that determines the operating mode of the one byte mode, a OOH is written to the remaining byte of counter. Data is written to this register when the CPU the register. 3 j.lPD71 054 NEe The count latch normally holds the current value of the DC Characteristics down counter. If the contents of the down counter TA = -40°C to +85°C, VDD = +5 V ±10% change, the contents of the count latch also change so limits that the two values are the same. When the j.lPD71 054 Parameter Symbol Min Typ Max Unit Test Conditions receives a count latch command, the count latch latches the value of the down counter and holds it until Input voltage VIH 2.2 Voo + 0.3 V the CPU can read it. When the data is read, the count high latch returns to tracking the value of the down counter. Input voltage VIL -0.5 0.8 V low When the mode specified is written to the counter, the Output voltage VOH 0.7 V IOH = -40011A lower six bits of the control register are copied to the high xVoo lower six bits of the a-bit status register. The remaining Output voltage VOL 0.4 V IOL = 2.5 rnA two bits show the status of the OUT pin and the null low count flag. When the multiple latch command is sent to the counter, the current value of the status register is Input leakage ILiH 10 I1A VI = Voo current high latched into the status latch. This data is held in the latch until the CPU can read it. Input leakage ILiL -10 I1A VI =OV current low The control logic controls each internal block according Output leakage 10 ILOH I1A Va = Voo to the mode and the state of the ClK and GATE pins. current high The result is output to and sets the state of the OUT pin. Output leakage ILOL -10 I1A Vo= OV current low Absolute Maximum Ratings TA = +25°C Supply current I1PD71054 1001 30 rnA Normal Power supply voltage, Voo -0.5 to +7.0 V 1002 2 50 I1A Stand-by mode Input voltage, VI -0.5 to Voo + 0.3 V I1PD71054-10 1001 10 20 rnA Normal Output voltage, Va -0.5 to Voo + 0.3 V 1002 2 50 I1A Stand-by mode Operating temperature, TOPT -40°C to 85°C Storage temperature, TSTG -65°C to +150 °C Power dissipation, PDMAX lOW Comment: Exposing the device to stresses above those listed in Absolute Maximum Ratings could cause permanent damage. The device is not meant to be operated under conditions outside the limits described in the operational sections of this specification. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. Capacitance TA = +25°C, VDD = a v Limits Parameter Symbol Min Max Unit Test Conditions Input capacitance 10 pF fc = 1 MHz Unmeasured pins 1/0 capacitance 20 pF returned to 0 V 4 NEe pPD71 054 AC Characteristics TA = -40°C to +85°C, VDD = 5 V ±10% 8 MHz Limits 10 MHz Limits Parameter Symbol Min Max Min Max Unit Test Conditions Read Cycle Address set-up to RD ! tSAR 30 20 ns Address hold from RD t tHRA 10 0 ns CS set-up to RD ! tSCR 0 0 ns RD low level width tRRL 150 95 ns Data delay from RD ! tORO 120 85 ns CL = 150 pF Data float from RD t tFRO 10 85 10 65 ns CL = 20 pF; RL = 2 kn Data delay from address tOAO 220 185 ns CL = 150 pF Read recovery time tRV 200 165 ns Write Cycle Address set-up to WR ! tSAW 0 ns Address hold from WR t tHWA 0 0 ns CS set-up to WR ! tscw 0 0 ns WR low level width tWWL 160 95 ns Data set-up to WR t tsow 120 95 ns Data hold from WR t tHWO 0 0 ns Write recovery time tRV 200 165 ns ClK and Gate Timing ClK cycle time tCYK 125 DC 100 DC ns ClK high level width tKKH 60 30 ns ClK low level width ClK rise time tKKL tKR 60 25 45 25 ns ns 1m ClK fall time tKF 25 25 ns GATE high level width tGGH 50 50 ns GATE low level width tGGL 50 50 ns GATE set-up to ClK t tSGK 50 40 ns GATE hold from ClK t tHKG 50 50 ns Clock delay from WR t tOWK 100 40 ns tKKH 2: 125 ns (count transfer) 225 - tKKH 40 ns tKKH:::; 125 ns Clock set-up to WR t (latch) tSKW 85 60 ns GATE delay from WR t tOWG 0 ns OUT delay from GATE! tOGO 120 100 ns CL = 150 pF OUT delay from ClK ! tOKO 150 100 ns CL = 150 pF OUT delay from WR t (initial out) towo 295 240 ns CL = 150 pF Notes: (1) AC timing test pOints for output VOH = 2.2 V, VOL = 0.8 V 5 pPD71 054 NEe Timing Waveforms AC Test Input Read Cycle 2.4 V ~2~ O.4V . _ Test Points ==::C: 2.2 V 0.8 V 0.8 V 83-000766A AD CLK and GA TE Timing l--tDAD~~ ~--tOAD--- 83-001788A ClK Write Cycle GATE ----'---4~ Ir----+----+-------. latch [2J OUT 83-001789A ---towo--- Note: [1 J The last 1 byte of count number writing. Read/Write Recovery [2J Count latch command or multiple latch command. 83-000773A 83-000772A 6 NEe pPD71 054 Functional Description Bits RMW1 and RMW2 specify the read/write operation to the counter or select the count latch command. IlPD71 054 System Configuration Example Bits CM2, CM1, and CMO set the counter mode (0 to 5). The CPU views the three counters and the control Bit BCD selects binary or BCD operation. The count register as four I/O ports. A1 and Ao are connected to may be 0 to FFFFH in binary mode or 0 to 9999 in BCD. the A1 and Ao pins of the system address bus. CS is generated by decoding the address and 10/MEM If a control command written to the counter specifies a signals so that CS goes low when the address bus is set mode, the lower six bits of the control command are to the target I/O address and I/O is selected. These copied to the lower six bits of the status register of the connections are shown in figure 1. counter selected by SC1 and SCO. The mode selected remains in effect until a new mode is set. This is not true You can use the JlPD71 054 in memory-mapped I/O if the control command specifies the count latch or configurations. However, the decoding should be such multiple latch command. that CS goes low when memory is selected. Writing the Count Programming and Reading the Counter The count is written to the counter after the mode is set. The counter must be programmed and the operating Set A1, Ao to specify the target counter as shown in mode specified before you can use the JlPD71 054. table 1. A new count can be written to a counter at any Once a mode has been selected for a counter, it time, but the read/write mode selected (when the mode operates in that mode until another mode is set. The was written) must be used when writing the count. count is written to the count register and when that data is transferred to the down counter, a new count I n high 1-byte and low 1-byte modes only, the higher or operation begins. The current count and status can be lower byte of the count register is written by the first read while the counter is in operation. Figure 2 outlines write. The write operation ends and OOH is automatically the steps of operation. written to the remaining byte ,by the JlPD71 054. In the 2-byte modes, the lower byte is written by the fi rst write Programming the Counter and the higher byte by the second. TheJlPD71 054 is controlled by a microcomputer program. For example, if the 2-byte count 8801 H is written to a The program must write a control command to set the counter set in lower 1-byte mode, the lower byte (01 H) ~ counter mode and write the count data that determines is written first, followed by the higher byte (88H). ~ the length of the count operation. Table 1 shows the Therefore, the data written to the count register is values for A1 and Ao that determine the target counter 0001 H for the first write and 0088H for the second. This for write operations. is shown in Table 2. Table 1. Write Operations (CS = 0, RD = 1, WR = 0) Table 2. Read/Write Mode and Count Write AO Write Target No. of Count Register Read/Write Mode Writes Higher Byte Lower Byte o o Counter 0 Low 1-byte OOH nnH o Counter 1 High 1-byte nnH OOH o Counter 2 Low/High 2-byte nnH nnH Control word register (2nd write) (1st write) nnH = Two-digit hexadecimal value Control and Mode Setting The control command must be written to set the Reading the Counter counter mode before operating the counter. If a write The following three methods allow you to read the operation is performed when A1, Ao = 11, a control contents of the down counter during operation. In command is written to the control register. Figure 3 particular, the multiple latch command reads the shows the format of the 8-bit control command. current count data and the counter mode orthe state of Bits SC1 and SCO specify a counter or the multiple the OUT pin. Table 3 shows the values of A1, Ao used to latch command. When a counter is chosen, the spec- select the counter to be read. ifications described below apply to the counter. 7 pPD71 054 NEe Figure 1. Typical System Configuration Figure 2. Basic Operating Procedure CPU IJPD71054 Ao Ao A1 A1 - - - - - - OUT Instruction .J\ A7-A2 1 Decoder l CS iO/MEM L I - - - - - - OUT Instruction RD RD WR ViR 07" Do [8] 07- Do - - - - - - OUT Instruction 83-000802A - - - - - - IN Instruction Yes 83-000803A Figure 3. Control Register Format 06 05 01 Do \ SC1 SCO \RWM1 RWMO\ CM2 \ CM1 \ CMO \ BCD \ L~ L,J I I Lr BCD \ Binary or BCD \ o \ Binary Count [16 Bits] \ 1 \ BCD Count [4 Digits] CM2 CM1 CMO Count Mode[1] 0 0 0 Mode 0 0 0 1 Mode 1 X 1 0 Mode 2 X 1 1 Mode 3 1 0 0 Mode 4 1 0 1 Mode 5 RWM1 RWMO Read/Write Mode 0 0 Count Latch Command[2] 0 1 Lower Byte Only 1 0 Higher Byte Only 1 1 Lower Byte then Higher Select Counter or Multiple SC1 SCO Latch Command 0 0 Counter#O 0 1 Counter # 1 1 0 Counter # 2 1 1 Multiple Latch Command[2] X: Don't Care Note: [1] CS = 0, AD = 0, ViR = 1 [2] See: Reading the Counter 83-0008048 8 NEe pPD71054 Table 3. Read Operations (CS = 0, iiD = 0, WR = 1) When the status bit is 0, the status of the selected counters is latched into the status latches. Bits Os-Do AD Read Target of the status register show the mode status of the o o Counter 0 counter. The output bit (D7) shows the state of the OUT o Counter 1 pin of that counter. These bits are shown in figure 6. o Counter 2 The null count bit (06) indicates whether the count data is valid. When the count is transferred from the Directly Reading the Counter count register to the down counter, this bit changes to o to show that the data is valid. Table 4 shows how the You can read the current value of the counter by null count flag operates. reading the counter selected 'by A1, Ao as shown in table 3. This involves reading the count latch; since the Table 4. Null Count Flag Operation value of the down counter may change while the the Operation Null Count Flag count latch is read, this method may not provide an accurate reading. You must control the ClK or GATE Write control word for mode set input to stop the counter and read it for a correct Write count to count register(1) 1 reading. Transfer count from count register to down counter 0 Note: Using the Count Latch Command (1) When 2-byte mode is selected, the flag becomes 1 when the When the count latch command is executed, the second byte is written. current counter value is latched into the counter latch. This value is held by the latch until it is read or until a Figure 4. Control Register Format for Count Latch new mode is set. This provides an accurate reading of Command the counter value when the command is executed without affecting counter operation. Figure 4 shows 07 06 05 the format for the count latch command. o I 0 I 0 I 0 If the counter value that was latched into the count I SC1 I SCO Latch Target latch is not read before a second count latch command 0 0 Counter#O is executed, the second command is ignored. This is 0 1 Counter # 1 because the counter value latched by the first command 1 0 Counter # 2 1 1 Multiple Latch Command is held until it is read or until a new mode is set. When the data in the count latch is read, the latch is released Note: and continues tracking the value of the down counter. When bits SC1 and SCO are 11, the command Is not the count latch command; it is the mUltiple latch command. 83-00080SA Using the Multiple Latch Command When the multiple latch command is received, the Figure 5. Control Register Format for Multiple Latch counter value and status register for any counter may Command be selectively latched into the count latch and status latch. Bits 0 1 -05 of the multiple latch command specify 07 06 the counter latching. The CPU can then read the status I 1 I 1 ICOUNTISTATUSICNT2ICNT1ICNTOI 0 I and counter value for the selected counter. FigureS shows the format for this command. Il 0 I Counter # 0 Not Selected J l 1 J Counter # 0 Selected I Bits CNT2, CNT1 , and CNTO correspond to counters 2, 1, and O. The command is executed for all counters l 0 I Counter # 1 Not Selected J l 1 J Counter # 1 Selected J whose corresponding bit is 1. This allows the data for more than one counter to be latched by a single count I 0 I Counter # 2 Not Selected I latch command. I 1 I Counter # 2 Selected I When the count bit is 0, the counter value of the I 0 I Latch Status I selected counters is latched into the count latches. l 1 I Do Not Latch Status J I 0 I Latch Count I I 1 I Do Not Latch Count I 83-000B06A 9 pPD71 054 NEe If the data that was latched is not read before a second Initial OUT refers, to the state,of the OUT pin immediately mu Itiple latch command is executed, the second command after the mode is set. is ignored for those latches whose contents have not Count transfer refers to the transfer from the count been read. This is because the data latched by the first register to the down counter. The down counter is command is held until it is read or until a new mode is decremented at the falling edge of the ClK pulse. set. When the data in the latch is read, the latch is released. See figure 7. Count zero is the state of the down counter when the counter is decremented,to zero. It is possible to latch both the count and status using two multiple latch commands. However, regardless of PCNTO, PCNT1, and PCNT2 are the I/O ports for which data is latched first, the status is always read counters 0,1, and 2, respectively. PCTRl is the I/O port first. The count data is read by the next read operation for the control comm.and. (1- or 2..,step read as determined by read/write mode). If CW is the control command~ additional read commands are received, the count data that has not been latched (the contents of the down HB is the higher byte of the count. counter as reflected by the current counter value) is lB is the lower byte of the count. read. In the timing charts for each counter mode, counter 0 is Read operations must be performed in accordance in the read/write 1-byte and binary count mode. When with read/write mode. In 2-byte mode, two bytes of no GATE signal appears in the charts, assume a high data must always be read. This does not imply that the level signal. The valu'e shown below the OUT signal is second byte must be read immediately after the first; the counter value. The maximum value that can be set other counter operations may be. performed between for the count iheach mode IS O. When this value is set, a the two reads. For example, you coulcl read the lower maximum value of 10000H (hexadecimal count) or byte, write a new lower byte, read the higher byte, and 10000 (BCD count) is obtained. write a new higher byte. Figure 7. Multiple Latch Command Execution Definitions Example ClK pulse refers to the time from the rising to the falling edge of the CLKn input. Latch Condition Trigger refers to the rising edge of the GATEn input. The GATEn input is sampled at each rising edge of the Start ClKn input. The GATE input can be level or rising edge sensitive. In the latter case, counter n's internal flip-flop is set at the rising eclge of the GATE signal, sensed at the rising edge of the next ClK pulse, and reset immediately. This allows edge-triggering to be sensed whenever it occu rs. Latched Count Figure 6. Status Data of Counter 0 Ignored , * Command to EI3 EJ3 .Er:::!J Latch Status of Counter 1 Ignored. , * * * * * * EI3 EJ:!] EJ:!] All Latches Ignored o Latch Released • Latched * Command Ignored 83-00080BA 10 NEe pPD71054 Counter Modes Mode 0 Program Example. This subroutine causes a delay of 10004 (decimal, or 2710H) elK pulses. In this Mode 0: Interrupt on End of Count. In this mode, the program, counter 2 is set to 2-byte mode and binary OUT output changes from low to high level when the count. See figure 9. end of the specified count is reached. See table 5 and figure 8. SUBRO: MOV Al, 1011 OOOOB ;set mode: counter 2, Table 5. Mode 0 Operation ;2-byte mode, OUT PCTRl,Al ;count mode 0, binary Function Result MOV Al,10H Initial OUT low level OUT PCNT2,Al MOV Al,27H ;write count 10000 (decimal) GATE High Count enable OUT PCNT2,Al GATE low Count disable RET Count Write The OUT pin goes low independent of the ClK pulse. In 2-byte mode, the count is disabled when the first Mode 1: GATE Retriggerable One-Shot. I n mode 1, the byte is written. The OUT pin goes low. OUT goes low pPD71054 functions as a retriggerable one-shot. A when a new mode or new count is written. low-level pulse triggered by the GATE input is output Count When the count is written with GATE high: from the OUT pin. See table 6 and figure 10. Transfer Transfer is performed at the first ClK pulse after the and count value is written. The down counter is decre- Operation mented beginning at the first ClK pulse after data Table 6. Mode 1 Operation transfer. If a count of n is set, the OUT pin goes high Function Result after n + 1 ClK pulses. When the count is written with GATE low: Initial OUT High level Transfer is performed at the first ClK pulse after the GATE Trigger(1) Count data is transferred at the ClK pulse after the count is written. The down counter is decremented trigger. beginning at the first ClK pulse after the GATE signal goes high. If a count of n is set, OUT is low for Count Write The count is written without affecting the current a period of n ClK pulses after GATE goes high. operation. Transfer is performed at the first ClK pulse after the 1m Count Zero The signal at the OUT pin goes high. The count Count operation does not stop and counts down to FFFFH Transfer and trigger. At the same time, the signal at the OUT pin goes (hexadecimal) or 9999 (BCD) and continues to count Operation low to start the one-shot pulse operation. The count is down. . decremented beginning at the next ClK pulse. If a count • of n is set, the one-shot output from the OUT pin Minimum Count continues for n ClK pulses. Count Zero The signal at the OUT pin becomes high. Count oper- ation does not stop and wraps to FFFFH (hexadecimal) or 9999 (BCD) and continues to count. Minimum Count 1 Note: (1) The trigger is ignored when the count has not been written after the mode is set, or when only one byte of the count has been written in 2-byte count mode. 11 pPD71 054 NEe Figure 8. Mode 0 Timing Chart OUTO Count Value --~--~--~----~--~--~----T----r--~ GATEO LJ OUTO Count Value 83-0008098 Figure 9. Mode 0 Program Example T.imlng Chart CLK2 GATE2 OUT2 ---., Count Value 83-0008108 Figure 10. Mode 1 Timing Chart GATEO ---------1 tl---------------\ tl--------------\ tl------~! tl------- ---- OUTO Count Value n-1 I n-2 \VA --e.:.J L..:.J GATED ________ 1n----------------1 n--------------------- OUTD Count Value I n-1 I n-2 83-000811B 12 NEe pPD71 054 Mode 1 Program Example. This subroutine waits until Table 7. Mode 2 Operation no trigger is generated for an interval of 200 or more Function Result ClK pulses after the first gate trigger and returns to the Initial OUT High level main program. Counter 1 is set to low-byte read/write mode and binary count. See figure 11. GATE High Count enable GATE low Count disabled. If GATE goes low when OUT is low, OUT will go high (independent of the ClK pulse). SUBR1: MOV Al,01010010B ;set mode: counter 1,low-byte GATE Transfer is performed at the first ClK pulse after the OUT PCTRl,Al ;read/write mode, count mode 1, Trigger(1) trigger. MOV Al,200 ;binary OUT PCNT1,Al ;write low byte of count Count Write Count is written without affecting the current operation. FSTTRG: MOV Al,11100100B ;multiple latch command: Count Transfer is performed at the ClK pulse after the count ;counter 1, Transfer and is ·Nritten following the mode setting. The counter is OUT PCNT1,Al ;status Operation then decremented. Transfer is again performed at the IN Al,PCNT1 first ClK pulse after the count becomes 1. When the TEST1 AL,7 ;wait for first trigger trigger is used, transfer is performed at the next ClK BNZ FSTTRG pu Ise. When the contents of the down counter becomes 1, OUT goes low for one ClK pulse and returns to high. If WAIT: MOV Al,11100100B ;multiple latch command: a count of n is set, OUT repeats this sequence every n ;counter 1, ClK pulses. OUT PCTRl,Al ;status IN Al,PCNT1 Count Zero Never occurs in this mode. TEST1 Al,7 ;wait until output goes high Minimum 2 BZ WAIT Count RET Note: (1) The trigger is ignored when the count has not been written or Mode 2: Rate Generator. In mode 2, the signal from the when only one byte of the count has been written in 2-byte mode. OUT pin cyclically goes low for one clock period when the counter reaches 0001 H. The counter operates as a frequency divider. See table 7 and figure 12. Figure 11. Mode 1 Program Example Timing Chart Number of ClK Pulses . 1 - 80 - 1 - 60-100-'- - - 2 0 0 - - - - ' 1 GATE1 r Subroutine Start Return to Main Program 83-0008128 Figure 12. Mode 2 Operation Timing Chart ClKO GATEO LJ aUTO Count Value I n I 0003H I0002H I 0002H I 0003H I 0002H -~ WR aUTO Count Value I n I n-1 I 0006H I 0005H I 0004H I 0003H I 0002H 0001H 0004HI 0003H 10002H 83-0008138 13 pPD71054 NEe Mode 2 Program Example. This subroutine generates Table 8. Mode 3 Operation J. an interrupt to the CPU each time 10000 (decimal) Function Result clock pulses elapse. Counter 0 is in 2-byte mode and binary counting. See figure 13. Initial OUT High level GATE High Count enable GATE low Count disable. If GATE goes low when OUT is low, SUBR3: MOV Al,00110100B ;mode setting: counter 0, 2-byte OUT will go high (independent of the ClK pulse). OUT PCTRl,Al ;mode, count mode 2, binary MOV Al.10H GATE Trigger(1) Transfer is performed at the first ClK pulse after the OUT PCNTO,Al trigger. MOV Al,27H ;write count 10000 (decimal) Count Write Current operation is not. affected. The count is OUT PCNTO,Al transferred at the end of the half-period of the RET current square wave and the OUT pin goes high. Count Count data is transferred at the first ClK pulse after Mode 3: Square Wave Generator. Mode 3 is a freq uency Transfer the count write following the mode setting. Transfer divider similar to mode 2, but with a different duty and Operation is performed at the end of the current half-cycle and cycle. See table 8 and figure 14. the OUT pin is inverted. Transfer is also performed at the ClK pulse after the trigger. The operation performed depends on whether count n is even or Figure 13. Mode 2 Configuration odd. When n is even, the count is decremented by two on each following clock pulse. At the end of the Voo count of two, the count is again transferred and the OUT pin is inverted. This is taKen as a half-cycle and CPU repeated. When n is odd, n - 1 is transferred and the count is decremented by two on each follow- ing clock pulse. The half-cycle when the OUT pin is high continues until the end of count 0 and INT 1----0<: t - - - - - i OUTO n ,.- 1 is transferred again at the next ClK pulse. The half-cycle while OUT is low continues until the end of count 2. Thus, the half-cycle while 83-000814A OUT is high is one ClK longer than the half- cycle while OUT is low. Count Zero Occurs only when the count is odd. Miniinum Count 3 Note: (1) The trigger is ignored when the count has not been written after the mode is set or when only one byte of count has been written in 2-byte mode. Figure 14. Mode 3 Timing Chart. CLKO GATEO LJ OUTO CounlValue n-1 I 0004H I 0002H 0004HI 0002H 0004H I 0002H u I 0004H I 0004H I 0004H OUTO CounlValue n-1 I 0004H I 0002H I OOOOH 0004H I 0002H 0004H I 0002H I OOOOH 0004H 83·0008158 14 NEe pPD71 054 Mode 3 Program Example. This subroutine divides the Mode 4: Software-Triggered Strobe. In mode 4, when input ClK frequency (5.0688 MHz) by 264 to get a the specified count is reached, OUT goes low for one 19,200 Hz clock. Counter 2 is in 2-byte binary mode. ClK pulse. See table 9 and figure 16. See figure 15. Table 9. Mode 4. Operation Function Result SUBR4: MOV Al,10110110B ;mode setting: counter 2, 2-byte OUT PCTRl,Al ;mode, count mode 3, binary Initial OUT High level MOV Al,08H GATE High Count enable OUT PCNT2,Al MOV A,01H ;264 frequency division GATE low Count disable OUT PCNT2,Al Count Write Count is transferred at the next ClK pulse when the RET count is written. In 2-byte mode, data is transferred after the second byte is written. Figure 15. Frequency Division Count Count is transferred at the first ClK following the Transfer count write. If GATE is high, the down counter begins Voo and to decrement from the next ClK. If GATE is low, IlPD710S4 Operation decrement begins at the first ClK after GATE goes high. GATE2 Count Zero OUT is low for one ClK pulse and returns to high. The down counter Wraps to FFFFH (hexadecimal) or 9999 OUT2 ¢' [19200 Hz] (BCD) without stopping counter operation. ¢ [5.0688 MHz] - CLK2 Minimum Count 1 83-000816A Figure 16. Mode 4 Timing Chart OUTO Count Value I n I n-1 I 0004H I 0003H I 0002H I 0001H OOOOH I FFFFH FFFEH FFFDH FFFCH I I GATEO --------------------~ OUTO Count Value I n I n-1 I 0004H I 0004H I 0004H I 0003H I 0002H I 0001H OOOOH FFFFH I FFFEH OUTO Count Value I n I n-1 I OOOSH I 0004H I 0003H I 0002H I 0003H I 0002H I 0001H 83-0008178 15 pPD71054 NEe Figure 17. Mode 5 Timing Chart - - - - - - - - - - - - --, GATEO I OUTO Count Value I n I n-1 I n-2 I n-3 I 0002H I 0001 H ~ E::J ViR GATEO - - - - - - - - -; n-------------- ----- ------\ n ---- ------ OUTO ~ Count Value I n I n-1 I 0004H 10003H I 0002H I 0001H I OOOOH IFFFFH IFFFEH I0003H 10002H 83-0008188 Mode 5: Hardware-Triggeretl Strobe [Retriggerable]. Mode 5 Program Example. Use mode 5 to add a Mode 5 is similar to mode 4 except that operation is fail-safe function to an interface. For example, the triggered by the GATE input and can be retriggered. receiving equipment requests data by issuing a REO See table 10 and figure 17. signal to the sending equipment. The sending equip- ment responds by outputting data to the data bus and Table 10. Mode 5 Operation returning a SEND signal to the receiving equipment. In Function Result this type of system, if a malfunction exists in the sending equipment and no SEND signal is sent, the Initial OUT High level receiving equipment waits indefinitely for the SEND GATE Trigger(1) The count is transferred at the ClK pulse after the signal and system operation stops. The following trigger. The GATE has no effect on the OUT signal. subroutine remedies this situation. If no SEND signal is Count Write The count is written without affecting the current output within a given period (50 elK cycles in this operation. example) after the REO signal is output, the system Count Count is transferred at the first ClK pulse after a assumes the sending equipment is malfunctioning and Transfer trigger, providing that the mode and count have a FAil Signal is sent to the receiving equipment. and been written. Decrement begins from the first ClK Operation pulse after a data transfer. If a count of n is set, OUT goes low for n + 1 ClK pulses after the trigger. SUBR5: MOV Al,00011010B ;mode setting: counter 0, low Count Zero OUT is low for one ClK and goes high again. The ;1-byte down counter counts to FFFFH (hexadecimal) or OUT PCTRl,Al ;mode, count mode 5, binary 9999 (BCD) without stopping the counter operation. MOV Al,50 ;set interval: 50 ClK pulses Minimum Count OUT PCNTO,Al RET Note: (1) The trigger is ignored when the count has not been written after the mode is set or when only one byte has been written in 2-byte Figure 18. Interface Fail-safe Example mode. Data Bus Receiving P - - - _ _ . - - - - - - - - - - I S E N D Sending Equipment i-----+-------..-clREQ Equipment IlPD71054 83-000819A 16 NEe NEe Electronics Inc. pPD71055 Parallel Interface Unit Description 44-Pln Plastic QFP The JlPD71055 is a low-power CMOS programmable parallel interface unitforuse in microcomputer systems. Typically, the unit's three I/O ports interface peripheral devices to the system bus. Features NC NC Cs RESET D Three 8-bit liD ports GNO Do D Three programmable operation modes Al 01 D Bit manipulation command Ao 02 D Microcomputer compatible P27 03 D CMOS technology P26 04 D Single +5 V ±10% power supply P2s 05 D Industrial temperature range: -40 to +85°C P24 06 D 8 MHz and 10 MHz P 20 07 P2 1 Voo Ordering Information Part Number Clock (MHz) Package pPD71055C-8 8 40-pin plastic DIP C-10 10 83-001218A G-8 8 44-pin plastic QFP (P44G-80-22) 44-Pln Plastic Leaded Chip Carrier (PLCC) r----------, I!'-II aiiI G8-8 8 44-pin plastic QFP (P44G8-80-384) I- G8-10 10 ~ Q W ..... NM(J .. .,,"',..Q > L-8 8 44-pin PLCC ~ Q Q Q Q Z C Q Q Q L-10 10 WR 40 28 P17 P07 41 27 P16 Pin Configurations P06 42 26 P15 POs 43 25 P14 40-Pln Plastic DIP P04 44 24 P13 NC 1 0 pPD7105S 23 NC P03 2 22 P12 P02 21 Pll POl 20 Plo POo 19 P23 RD 18 P22 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ I~~~~~~~~~£& ~ ~ ~ ~ ~ 83-004205A 49-000610A 50010-1 (NECEL-153) pPD71055 NEe Pin Identification WR [Write Strobe] Symbol Function The WR input should be set low when data is to be CS Chip select input written to the pPD71055 data bus. The contents of GND Ground the data bus are written to the pPD71055 at the rising edge (low to high) of the WR signal. Address inputs 1 and 0 110 port 0, bits 7-0 A1, Ao [Address] 110 port 1, bits 7-0 The A1 and Ao inputs are used in combination with 110 port 2, bits 7-0 the RD and WR signals to select one of the three IC Internally connected ports or the command register. A1 and Ao are usually +5V connected to the lower two bits of the system VDD address bus (table 1). °rDo 110 data bus RESET Reset input Table 1. Control Signals and Opera,tion WR Write strobe input pPD71 055 Operation Operation RD Read strobe input o 0 0 0 Port 0 to data bus Input NC No connection o 0 Port 1 to data bus Input o Port 2 to data bus Input Pin Functions o o Use prohibited' 07-00 [Data Bus] o o x x DrDo make up an 8-bit, three-state, bidirectional o o o Data bus to port 0 Output data bus. The bus is connected to the system data o Data bus to port 1 Output bus. It is used to send commands to the JLPD71055 o o Data bus to port 2 Output and to send data to and from the pPD71 055. o o Data bus to command register Output CS [Chip Select] o x x Data bus high impedance The es input is used to select the pPD71055. When 1 x x x x es = 0, the pPD71055 is selected and the states of the DrDo pins are determined by the RD and WR inputs. RESET [Reset] When es = 1; the pPD71 055 is not selected and its data bus is high-impedance. When the RESET input is high, the JLPD71055 is reset. The group 0 and the group 1 ports are set to mode 0 RD [Read Strobe] (basic I/O port mode). All port bits are cleared to zero and all ports are set for input. The RD input is set low when data is being read from the pPD71 055 data bus. P07-POO, P17-P10, P27-P20 [Ports 0, 1, 2] WR [Write Strobe] Pins POrPOo, P1rP10, and P2rP20 are the port 0,1, and 2 I/O pins, bits 7-0, respectively. The WR input should be set low when data is to be written to the pPD7.1055 data bus. The contents of IC [Internally Connected] the data bus are written to the pPD71055 at the rising edge (low to high) of the WR signal. Pins marked Ie are used internally and must be left unconnected. A1, Ao [Address] The A1 and Ao inputs are used in combination with the RD and WR signals to select one of the three ports or the command register. A1 and Ao are usually connected to the lower two bits of the system address bus (table 1). 2 NEe pPD71 055 Block Diagram Data bus buffer R[jo--_od WRo--_od Read! A, o------l~ write control RESET o------l~ cs 0 - - - - - - - ' 49·0006118 Functional Description Ports 0, 1, 2 Group 0 Control and Group 1 Control The pPD71 055 has three a-bit I/O ports, referred to as These blocks control the operation of group 0 and port 0, port 1, and port 2. These ports are divided into group 1. two groups, group 0 and group 1. The groups can be in one of three modes, mode 0, mode 1, and mode 2. Read/Write Control Modes can be set independently for each group. The read/write control controls the read/write opera- When port 0 is in mode 0, port 0 and the four upper tions for the ports and the data bus in response to the bits of port 2 belong to group 0, and port 1 and the four RD, WR, CS, and address signals. It also handles lower bits of port 2 belong to group 1. When port 0 is RESET signals and the Ao, A1 address inputs. in mode 1 or 2, port 0 and the 5 upper bits of port 2 belong to group 0 and port 1 and the three lower bits of Data Bus Buffer port 2 belong to group 1. The data bus buffer latches information going to or Command Register from the system data bus. The host writes command words to the pPD71055 in this register. These commands control group 0 and group 1. Note that the contents of this register cannot be read. pPD71 055 NEe Absolute Maximum Ratings DC Characteristics (TA = 25°C) (TA = -40 to +85°C, Voo = 5 v ±10%) Power supply voltage, Voo -0.5 to +7.0 V Limits Input voltage, VI -0.5 to Voo + 0.3 V Parameter Symbol Min Typ Max Units Test Conditions Output voltage, Vo -0.5 to Voo + 0.3 V Input voltage VIH 2.2 Voo + 0.3 V high Power dissipation, PD MAX 500mW Input voltage VIL -0.5 0.8 V Operating temperature, Topt -40 to +85°C low Storage temperature, Tstg -65 to +150°C Output voltage VOH 0.7 Voo V 10H = -400 JJA Comment: These devices are not meant to be operated outside the high limits specified above. Exposure to stresses beyond those listed in Output voltage VOL 0.4 V 10L = 2.5 rnA Absolute Maximum Ratings could cause damage. Exposure to an low absolute maximum rating for extended periods may affect reliability. Darlington 10AR -1.0 -4.0 rnA See test drive current setup diagram Capacitance (TA = 25°C, Voo = GND = 0 V) Input leakage IUH 10 JJA VI = VOO current high Limits Test Input leakage IUL -10 JJA VI =OV Parameter Symbol MI.~ Typ Max Units Conditions current low Input CI 10 pF fc = 1 MHz Output leakage ILOH 10 JJA Vo = Voo capacitance Unmeasured current high pins returned 1/0 capacitance CIO 20 pF Output leakage ILOL -10 to 0 V JJA Vo=OV current low Supply current (dynamic) JJPD71055 1001 10 rnA Normal operation JJPD71055-10 1001 5 10 rnA Normal operation Supply current 1002 2 50 JJA Inputs: RESET (standby) = 0.1 V, others = Voo - 0.1 V Outputs: Open Test Setup for IDAR Measurement For up to 8 lines chosen arbitrarily from ports 1 and 2 83VL-6619A 4 NEe JlPD71 055 AC Characteristics (TA = -40 to +85°C. Voo = 5 v ±10%) 8 MHz Limits 10 MHz Limits Parameter Symbol Min Max Min Max Unit Test Conditions Read Timing A1. Ao. CS set-up to RD ~ tSAR 0 0 ns A1. Ao. CS hold from RD t tHRA 0 0 ns RD pulse width tRRL 160 150 ns Data delay from RD ~ tORO 120 100 ns CL=150pF Data float from RD t tFRO 10 85 10 60 ns CL = 20 pF; RL = 2 kn Read recovery time tRV 200 150 ns Write Timing A1. Ao. CS set-up to WR ~ tSAW 0 0 ns A1. Ao. CS hold from WR t tHWA 0 0 ns WR pulse width tWWL 120 100 ns Data set-up to WR t tsow 100 100 ns Data hold from WR t tHWO 0 0 ns Write recovery time tRV 200 150 ns Other Timing Port set-up time to RD ~ tSPR 0 0 ns Port hold time from RD t tHRP 0 0 ns Port set-up time to STB ~ Port hold time from STB t Port delay time from WR t tsps tHSP towp 0 150 350 0 150 200 ns ns ns CL = 150 pF ED STB pulse width tSSL 350 100 ns DAK pulse width tOAOAL 300 100 ns Port delay time from DAK ~(mode 2) tOOAP 300 150 ns CL = 150 pF Port float time from DAK t(mode 2) tFOAP 20 250 20 250 ns CL = 20 pF; RL = 2 kn OBF set delay from WR t tOWOB 300 150 ns CL=150pF OBF clear delay from DAK ~ tooAOB 350 150 ns IBF set delay from STB ~ tOSIB 300 150 ns IBF clear delay from RD t tORIB 300 150 ns INT set delay from DAK t tOOAI 350 150 ns INT clear delay from WR ~ tOWI 450 200 ns INT set delay from STB t tOSI 300 150 ns INT clear delay from RD ~ tORI 400 200 ns RESET pulse width tRESEn 50 50 ps During right after power-on tRESET2 500 500 ns During operation 5 JlPD71 055 NEe Timing Waveforms AC Test Waveform .Recovery Time 24 2~.2~______________~2~.2 0:4.===x> Test Points 0.8 ::::::::x=== 0.8 AD 49·000166A \VA - - - - - : L Timing Mode 0: Input 49-00027SA Mode 1: Input Port IBF _ _---,--J 07-00 ------------< 49·001140A Mode 0: Output INT _ _ _ _ _ _J Cs, A1,AO ~~--:----:-:-------,;jC 49-001142A WR ______ts'-A'-W"' J.-__t _HW_A_ _ __ Mode 1: Output 07-00 Port 49-001141A INT 07-00 Port _ _ _ _ _ _ _ _ _.J 49-000276A 6 NEe IIPD71 055 Timing Waveforms (coni) Mode 2 INT 07-00 IBF portO------------~----------~ Perlpheral- fLP071055 fLP071055 -Peripheral 49-000277A 7 pPD71 055 NEe pPD71055 Commands The RD and WR signals that appear in the descriptions of each mode refer to the port in question as addressed Two commands control pPD71055 operation. The by A1 and Ao. These signals only affect the port mode select command determines the operation of addressed by A1 and Ao. group 0 and group 1 ports. The bit manipulation command sets or resets the bits of port 2. These Where the port addressed may not be clear, 0 or 1 is commands are executed by writing an 8-bit command appended to the signal name to indicate the port. word to the command register (A1AO = 11). Mode 0 Mode Select In this mode the ports of the pPD71055 are used to ThepPD71055 port groups have three modes. Modes 0 perform basic 1/0 operations. Each port operates with and 1 can be specified for groups 0 and 1, but mode 2 a buffered input and a buffered latched output. See can only be specified for group O. The bits of all ports figure 4. are cleared when a mode is selected or when the Depending on the control word sent to the pPD71055 pPD71055 is reset. from the system bus, ports 0, 1, and 2 can be inde- Mode o. Basic input/output port operation. pendently specified for input or output. Mode 1. Strobed input/output operation controlled by Input Port Operation three or four bits of port 2 used as control/status signals. While the RD signal is low, data from the port selected by the A1 Ao signals is put on the data bus. See figure 5. Mode 2. (Only available for group 0). Port 0 is the bidirectional 1/0 port and the higher 5 bits of port 2 are Output Port Operation used for status and control signals. When the pPD71 055 is written to (WR = 0), the data on To specify the mode, set the command word as shown the data bus will be latched in the port selected by the in figure 1 and write it to the command register. A1AO signals at the rising edge of WR and output to the port pins (figure 6). Following the programming of Bit Manipulation Command mode 0, all outputs are at a low level. This command (figure 2) affects only port 2.lt is mainly By reading a port which is set for output, the output used in mode 1 and mode 2 to control the port 2 bits value of the port can be obtained. which are used as control/status signals. It is also used to enable and disable pPD71 055-generated interrupts Note: When group 0 is in mode 1 or mode 2, only bits and to set and reset port 2 general input/output pins. P22-P20 of port 2 can be used by group 1. Bit P23 belongs to group o. For example, to set bit 2 of port 2 to 1 (P22 = 1), set the command word as shown in figure 3 (05H) in the Mode 0 Example command register. This is an example of a CPU connected to an AID converter via apPD71055 (figure 7). Here both group 0 Operation in Each Mode and group 1 are set to mode 0 and port 2 is used to start The operation mode for each group in the pPD71055 conversion and detect the end of the conversion can be set according to the application. Group 0 can be process. in modes 0, 1, or 2, while group 1 is in mode 0 or 1. Figure 8 is a subroutine that reads the converted data Group 1 cannot be used in mode 2. from an AID converter. 8 NEe pPD71 055 Figure 1. Mode Select Command Word I 1 I I I I 1 J I Group 1 L,J ~ Port 2 (Lower) 0 OutpUI 1 Inpu1 0 Output Port 1 1 Inpu1 0 ModeD Mode 1 Model GroupO 0 Output Port 2 (Upper) 1 InpU1 0 OutpU1 PortO 1 InpU1 00 ModeD Mode 01 Model lX Mode 2 Command 0 Bit manlpulalion select 1 Mode select 49-0006138 Figure 2. Bit Manipulation Command Word I o I x I x I x I I I I I I I Y Bilsellresel l 0 J I 1 I Resel Sel 0 o 0 BilO 0 0 1 Bill 0 1 0 Bil2 Port 2 0 1 1 Bil3 bil select 1 o 0 Bit 4 1 o 1 Bit 5 1 1 0 Bit 6 1 1 1 Bit 7 Command I 0 IBit manipulation select I 1 I Mode select 49-0006148 Figure 3. Bit Manipulation Command Example I 0 I x I x I x I 0 I 1 I 0 I 1 I =05H f Bil Don't care Specifies bit 2 Bit set manipulation Command 49-000615A Q pPD71055 NEe Figure 4. Mode 0 Group 1 Mode 0 flPD71055 C O:OutPut A- ~ Port 1 <. 8 1: Input P1 7 -P1 0 T "Y GroupO 0: Output A. .A I Port 2 ( 4 I 2 t [1: Input r P23-P20 3· 1 0 " I 1 I 0 0 I I 0 I I L~ G~UP1 flPD71 055 0: Output .L ~ Port 2 1: Input , 4 <. r P2 7 -P2. 0: OUtput A. J. PortO 1: Input <. , 8 r P07 -POO 0 0 Mode 0 GroupO ~ 0 1 Mode 1 Group 0 Mode 0 mode 1 X Mode 2 Command 0 Bit manipulation I I select 1 Mode select I 49·000620A Figure 5. Mode 0 Input Timing Port input 0 -0 7 Ro~ 0 -------~--------------------- Internal delay Internal delay Internal delay (RD-D 7 -Do) (RD-D7 -Do) (Port-D7 -D o) 49-000618A Figure 6. Mode 0 Output Timing WR-----......\ ~ ~X'____ . . J~_x-~=~~=--~=-_:=-_:~-_==- 7 0 0 -0 _ _ _ _ _ +_.... ...... Port output -----------l~....J ,~ In~aldelay (WR-Port) 49·000619A 10 NEe pPD71055 Figure 7. AID Converter Connection Example CPU . fJ. Po71 055 P07 AID Converter B r 0 7 -0 0 I POD ' B 0 7 -00 A'N -- Analog signal P27 EOC __ START P20 - -i>u- 49-000621 A Figure 8. AID Converter Example READ---A/D: MOV AL,1 0011 OOOB ;pPD?1055 Mode Setting: OUT CTRLPORT,AL ;Group 0, group 1 in mode 0 ;Port 0 & port 2 (upper) are inputs ;Port 1 & port 2 (lower) are outputs MOV AL,00000001 B OUT CTRLPORT,AL ;Conversion starts by setting P20 high WAIT_EOC: IN AL,PORT2 ;End of conversion wait loop TEST1 AL,? ;Conversion ends when P27 = 0 BNZ WAIT_EOC IN AL,PORTO ;Read A/D converted values RET ~--------------~m Mode 1 Mode 1 Input Operation In this mode, the control and status signals control the I n mode 1 ,portO is the data port for grou pO, and port 1 I/O data. In group 0, port 0 functions as the data port for group 1. The control/status bits (port 2) are used as and the upper five bits of port 2 function as control/ listed below. Figure 10 shows the signal timing. status. In group 1, port 1 functions as the data port and the lower three bits of port 2 function as control/status. ffi [Strobe]. The data input at port 0 is latched in port Owhen the STBO input is brought low. The data input at In mode 1, the bit manipulation command is used to port 1 is latched in port 1 by STB1. write the bits of port 2. IBF [Input Buffer Full F/F]. The ISF output goes high to indicate thatthe input buffer has become full.IBF goes Group 0 Mode 1 high when the STB signal goes low. ISF goes low at the When group 0 is used in mode 1, the upper five bits of rising edge of the RD signal when STB = 1. port 2 become part of group O. Of these five bits, three The IBF F/F is cleared when mode 1 is programmed. are used for control/status and the remaining two can be used for I/O (using the bit manipulation command). INT [Interrupt Request]. INT goes high when the data See figure 9. is latched in the input port, when RIE is 1 and STB, IBF and RD are all high. INT goes low at the falling edge of Group 1 Mode 1 the RD signal. It can function as a data read request interrupt signal to a CPU. When group 1 is used in mode 1, the lower three or four bits of port 2 become part of group 1. Of these four bits, INT is cleared when mode 1 is programmed. three are used for control/status. The remaining bit, P23, can be used for I/O only if group 0 is in mode o. Otherwise, P23 belongs to group 0 as a control/status bit. See figure 9 and table 4. 11 pPD71055 NEe Figure 9. Mode 1 Input Command word , GroupO , Group 1 7 L 1 J 0 1 I 1 J I 1 1 I I L.----J i fJ,PD71055 ~ 0: Output 1: Input P27-P2. IBFO 5Teo P25 P2. I RI~O I O:Outp ut/ • _____ -1 ltlTO P2,· 1: Input ~ 5TB1 P22 - 00 Mode 0 IBF1 P2, ... _____ J GroupO 01 Mode 1 INTI P20 mode Port 1 -" 8 P1 7 -P1 0 1 X Mode 2 input PortO 1 8 P07-PO O input y Group 1 0 Mode 0 mode RIEO and RIEl 1 Model are controlled by bit manipulation command Command 0 Bit manipulation I select 1 Mode select I "Note: Bit P23 Is available In Group 1 only when Group 0 Is Mode O. For all other conditions P23 Is part 01 Group O. This diagram shows how bit P23 would be used II Group 1 waaln Mode 1. 49-0006'68 Figure 10. Mode 1 Input Timing RIE =1 IBF _ _ _ _- J Port input ----.J"\--->,Pt---+-~''---~-------+_-- Portlntemal - . . . , - - - -____,t~H-----M,:_------+_-- latch I~ __________- J Note: II STB goes low here belore IBF goes low, original contents 01 port latch will change. STB must be kept high untlllBF goes low to prevent loss 01 date. 49'OOO624A 1? NEe JlPD71 055 RIE [Read Interrupt Enable Flag]. RIE controls the Mode 1 Output Operation interrupt output. Interrupts can be enabled by using the bit manipulation command to set this bit to 1, and I n mode 1 output operation (figu re 11), the status/ disabled by resetting it to o. This signal is internal to the control bits (port 2) are used as listed below. Figure 12 pPD71055 and is not an output. The state of RI E does shows the signal timing. not affect the function of STSO or STS1, which are OBF [Output Buffer Full F/F]. OBF goes low when data inputs to the same bits (P2 4 and P22) of port 2. is received by the pP071 055 and is latched in output When input is specified in mode 1, the status of I SF, ports 1 or O. OBF functions as a data receive flag. OBF INT and RIE can be read by reading the contents of goes low at the risi ng edge of WR when OAK = 1 (write port 2. complete). It goes high when the OAK signal goes low. Figure 11. Mode 1 Output Command word GroupO Group 1 ! ! I 1 I 0 1 I 0 I I 1 0 I I f.li>D71055 L~ OBFO - - - - - - 1 P27 r DAKO 0: Output P2. P25-P24 I WI,:E 0 I 1: Input 0:0utPutjlNTO P23* .- ____ J l:lnput DAKl P22 ~,1 00 Mode 0 P2, ~ GroupO INn - - - - - - 1 P20 _ - - _..J ~ 01 Model mode Port 1 OX Mode 2 output PortO output Group 1 0 Mode 0 WIEO and WIEl mode 1 Model are controlled by manipulation command Command 0 Bit manipulation I select 1 Mode select I 'Note: Bit P23 is available in Group 1 only when Group 0 is Mode o. For all other conditions P23 is part of Group O. This diagram shows how bit P23 would be used II Group 1 was in Mode 1. 49·0006168 Figure 12. Mode 1 Output Timing WIE =1 ¥~ YL!.iA [Note] INT j?-- ~ I\: \ X " l\\),J \' Port output X "2J~ Note: If data is written to the IIPD71055 betore OBF goes high the original contents of the port latch will change. Data must not be written while OBF is low to prevent loss of data 49·000623A pPD71055 NEe OAK [Data Acknowledge]. When this input is low, it Table 2. Functions of Port 2 Bits In Mode 1 signals the pP071055 that output port data has been Group Bit Data Input Data Output taken from the 71055. P20 INT1 (Interrupt request) INT1 (Interrupt request) INT [Interrupt Request]. INT goes high when the 'P2'~"""i'BF1'('i~p~t'b~ff~~"f~ii'fif)""OB'F1''(O~tP'~'t'b'~'ff~~'f~'ii'f'if')"'" output data is taken when WIE is set to 1 and WR, OBF ·p2;......si=s-1..(St~~·b~·i~p·~·t)........·.... ·DAK1-(·D~t~·~~k·~·~;;i~dg·~.......... and OAK areall high. It goes low at the falling edge of input) the WR signal. INT therefore functions as a write RIE1 (Read interrupt WIE1 (Write interrupt request signal, indicating that new data should be enable flag) enable flag) ............ -....... __ ............................ -....... __ ..... --_ .. _---_ .... --_ .............. __ ........ -..... ---. sent to the.pP071055. ; P23 110 (Note) 110 (Note) WIE [Write Interrupt Enable Flag]. WIE controls the 0 .~?~...... !.~!.~..~!.~.~~!.~.~~~.~.e.~~.~.~.t1.....I.~.~~.~.I.~~.~.~.~~.~.~.!.~~.~.~~~! ......... . interrupt output. Interrupts can be enabled by using P24 STBO (Strobe input) 110 the bit manipulation command to set this bit to 1 and RIEO (Read interrupt disabled by resetting it to O. This signal is internal to the enable flag) ........ __ ............... ___ ... _..... ___ .... _.. __ ._ ... ··-_0.···· ... ··· ... ···· .. ···· .. ---- ... ···· .. ·_--.····· ....... . pP071 055 and is not an output. The state of WI E does P25 IBFO (Input buffer 110 not affect the function of OAK addressed to the same full flf) bits of port 2. ·P-2~ ..····I·i·o·· .. ·· .. ············ .. ··· ....·.. ·.. ········DAKO·(·D~t~·~·~·k~~·:;;i~d·g·~······· input) When output is specified in mode 1, the status of OBF, WIEO (Write interrupt enable INT and WIE can be obtained by reading the contents flag) of port 2. OBFO (Output buffer full f If) Table 2 shows a summary of these signals. Note: Can be used with group 1 only when group 0 is set to mode O. In other modes, P23 belongs to group O. Mode 1 Example This example (figure 13) demonstrates connecting a printer to the pP071055. Group 0 is used in mode 1 output. Group f can operate in mode 0 or 1; in this example it is set to mode 0: FIgure 13. Connection to PrInter CPU !,-P071055 Printer 0 7 -00 8 . r 0.,-0 0 P0 7 -POO 8 One-shot delay r OBFO(P27l OAKO(P2sl --9 1> -- STROBE ACK P2s BUSY 19-000625A 14 NEe pPD71055 Figure 14. Printer Example Subroutine ;This subroutine sends character strings to the printer INIT: MOV AL,10101000B ;pPD71055 Mode Setting: ;Group 0: mode 1 output ;Group 1: mode 0 OUT CTRLPORT,AL RET SENDPRN: MOV BW,DATA ;Output data address PRNLOOP: MOV AL,[BW] CMP AL,OFFH ;End if data = OFFH BNZ WAIT RET WAIT: IN AL,PORT2 TEST1 AL,7 ;Wait until output buffer is empty , BZ WAIT TEST1 AL,5 ;Wait until printer can accept data BNZ WAIT MOV AL,[BW] ;Send data to printer OUT PORTO,AL INC BW BR PRNLOOP Mode 2 Mode 2 can only be used by group o. In thismode, port a!the rising edge of the WRO signal (end of data write). It goes high when DAKO is low (output data from port 0 Ell received). o functions as a bidirectional 8-bit data port operating under the control of the upper five bits of port 2 as DAKo [Data Acknowledge]. DAKO is sent to the control/status signals. In this mode, port 0 combines pPD71055 in response to the OBFO signal. It should be the input and output operations of mode 1. See figures set low when data is received from port 0 of the 15 and 16. pPD71055. In mode 2, the status of the following signals can be WI EO [Write Interrupt Enable Flag]. WIEO controls the determined by reading port2: OBFO, IBFO, INTO, WIEO, write interrupt request output. Interrupts are enabled and RIEO. by using the bit manipulation command tosetthis bitto 1 and disabled by setting it to O. The state of WIE does The DAKO and STBO signals are used to select input or not affect the DAK function of this pin. output for port O. By using these signals, bidirectional operation between the pPD71 055 and peripheral can The following control/status signals are used for input: be realized. STBO [Strobe Input]. When STBO goes low, the data In mode 2, the bit manipulation command is used to being sent to the pPD71055 is ratched in port O. write to port 2. IBFO [Input Buffer Full F/F]. When IBFO goes high, it indicates that the input buffer is full. It functions as a Control/Status Port Operation signal which can be used to prohibit further data The following control/status signals are used for output: transfer. IBFO goes high when STBO goes low. It goes low at the rising edge of RDO when STBO = 1 (read 6ii'Fo [Output Buffer Full]. OBFO goes low when data complete). is received from the Do-D7 data bus and is latched in the port 0 output buffer. It therefore functions as a receive request signal to the peripheral. OBFO goes low 15 pPD71055 NEe Figure 150 Mode 2 Command word 4 3 iJ.P071055 OBFO P27 iB o 0 Mode 0 OAKO P2. GroupO mode o 1 Model IBFO P2 5 1 X Mode 2 STBO INTO P2. P23 ~~ P07-POO WIEO and RIEO are controlled by bit manipulation command 49-Q00627A Figure 160 Mode 2 Timing WIEO = 1 RIEO = 1 ~ I J CU INTO • {WINTO ~J \ RINTO / \ ~~ X Valid D< X Valid X CPU~71055 71055~CPU Y \: I 1 i I IBFO PO~POO--~--------~:=~~~---------------------- " Peripheral~7l055 71055~perlpheral Note: WINTO and RINTO are Internal signals and are write and read Interrupt request signals to the CPU, respectively. WINTO = 0iiF0 (0) WiEo (0) OAKO (0) WFiO RINTO = IBFO (0) RIEO (0) STBO (0) ROO Also note that INTO = WINTO (+) RINTO 49·00062813 16 NEe pPD71055 RIEO [Read Interrupt Enable Flag]. RIEO controls the Table 3. Functions of Port 21n Mode 2 read interrupt request output. Interrupts are enabled Bit Function by using the bit manipulation command to set this bit to P23 INTO (Interrupt request) 1 and disabled by setting it to O. The state of RI EO does not affect the STBO function of this pin. P24 STBO (Strobe input) RIEO (Read interrupt enable flag) This control/status signal is used for both input and P25 IBFO (Input buffer full f If) output: P26 DAKO (Data acknowledge input) INTO [Interrupt Request]. During input operations, WIEO (Write interrupt enable flag) INTO functions as a read request interrupt signal. P27 OBFO (Output buffer full f If) During output, it functions as a write request interrupt signal. Thissignal is the logical OR of the INTsignal for Mode 2 Example data read (RINTO) and the INTsignal for write (WINTO) in mode 1 (RINTO OR WINTO). Figures 17, 18, and 19 show data transfer between two CPUs. In mode 2, the status of OBFO, IBFO, INTO, WIEO, and RIEO can be determined by reading port 2. Table 3 is a summary of these signals. Figure 17. Connecting Two CPUs Main CPU f-lP071055 Sub CPU ,. 0 7 '°0 8 °7·°0 P0 7 -PO O 8 °7'°0 'I y 'I OBFO(P27 ) NMI INTO INT OAKO(P26 ) AD (P2,) IBFO(P2.) INT STBO(P2.) ViA 49-Q00626A 17 pPD71055 NEe Figure 18. Main CPU Flowchart Main routine 49-006298 18 NEe pPD71055 Figure 19. Sub CPU Flowchart Main routine Nonmaskable interrupt routine 9-000630B 19 pPD71055 NEe Mode Combinations Table 4 is a complete list of all the combinations of modes and groups, and the function of the port 2 bits in each mode. Table 4. Mode Combinations and Port 2 Bit Functions Group 0 Group 1 Mode P07-POO P27 P2& P25 P24 P23 Mode P1 7-P1 0 P23 P22 P2 1 P20 0 In D D D D NA 0 In D D D D 0 In D D D D NA 0 Out D D D D 0 In D D D D NA In B ST81 IBF1 INn (RIE1) 0 In D D D D NA Out B DAK1 OBF1 INT1 (WIE1) 0 Out D D D D NA 0 In D D D D 0 Out D D D D NA 0 Out D D D D 0 Out 0 D 0 D NA In 8 STB1 IBF1 INT1 (RIE1) 0 Out D D D D NA Out B DAK1 OBF1 INT1 (WIE1) In B B IBFO STBO INTO 0 In NA D D D (RIEO) In B B IBFO STBO INTO Out NA 0 0 D (RIEO) In B B IBFO STBO INTO In NA STB1 IBF1 INT1 (RIEO) (RIE1) In B B IBFO STBO INTO Out NA DAK1 OBF1 INT1 (RIEO) (WIE1) Out OBFO DAKO B B INTO 0 In NA D D D (WIEO) Out OBFO DAKO B B INTO Out NA D D D (WI EO) Out OBFO DAKO B B INTO In NA STB1 IBF1 INT1 (WI EO) (RIE1) Out OBFO DAKO B B INTO Out NA DAK1 OBF1 INT1 (WIEO) (WIE1) 2 I/O OBFO DAKO IBFO STBO INTO 0 In NA D D D (WIEO) (RIEO) 2 I/O OBFO DAKO IBFO STBO INTO 0 Out NA D D D (WIEO) (RIEO) 2 I/O OBFO DAKO IBFO STBO INTO In NA STB1 IBF1 INT1 (WI EO) (RIEO) (RIE1) 2 I/O OBFO DAKO IBFO ST80 INTO Out NA DAK1 OBF1 INT1 (WIEO) (RIEO) (WIE1) Note: (1) In this chart, "NA" indicates that the bit cannot be used by this group. (2) The symbol "8" indicates bits that can only be rewritten by the bit manipulation command. (3) In this chart, "D" indicates that is used by the user. (4) Symbols in parentheses are internal flags. They are not output to port 2 pins and they cannot be read by the host. (5) In indicates Input, Out indicates Output, and 1/0 indicates Input/Output. 20 NEe NEe Electronics Inc. pPD71059 Interrupt Control Unit Description Pin Configurations The tJPD71059 is a low-power CMOS programmable 28-Pin Plastic DIP interrupt control unit for microcomputer systems. It can process eight interrupt request inputs, allocating a Voo priority level to each one. It transfers the interrupt with AD the highest priority to the CPU, along with interrupt INTAK address information. By cascading up to eight slave INTP 7 tJPD71059s to a master tJPD71 059, a system can INTP. process up to 64 interrupt requests. System scale, INTPs INTP. interrupt routine address, interrupt request priority, INTP 3 03 and masking are all under complete program control. Oz INTP z 0, INTP, Features DO INTP o SAD INT o tJPD8085A compatible (CALL mode) SV[BUFR/Wl o tJPD70108/70116 compatible (vector mode) SA z o Eight interrupt request inputs per chip 83-001220A o Up to 64 interrupt request inputs per system (extended mode) 44-Pin Plastic QFP o Edge- or level-triggered interrupt request inputs o Each interrupt maskable o Programmable priority level CJ Z CJ Z CJ Z 10 Ie 0 >g C I~_ ZCJ ZCJ ~ ~ II/) 0 o Polling operation o Single +5 V ±10% power supply o Industrial temperature range: -40 to +85 DC o CMOS technology NC NC o 8 MHz and 10 MHz Ordering Information 07 06 Os INTP 7 1NTP6 1NTPs III 04 1NTP4 Part Number Package 03 1NTP3 pPD71059C-8 28-pin plastic DIP (600 mil) 02 INTP2 C-10 0, INTP, Do 1NTPo G-8 44-pin plastic QFP (P44G-80-22) NC NC GB-8 44-pin plastic QFP (P44GB-80-3B4) NC NC GB-10 L-8 28-pin PLCC L-10 CJ CJ C 0 ~ 0 !:! CJz :; ~ I- CJ Z Z I/) I/) Z CI rn I~ 1!: z "- ::J !!I. lin 83-001579A 50013-1 (NECEL-160) pPD71059 NEe Pin Configurations (cont) Pin Functions 28-Pin Plastic Leaded Chip Carrier (PLCC) 07-00 [Data Bus] The 8-bit 3-state bidirectional bus transfers data to and from the CPU through the system bus. The data bus becomes active when data is sent to the CPU in the I NTAK sequence. Otherwise, the data bus is high impedance. lNTAK 26 18 lNTPo Ao voo 27 28 17 16 INT SV[BUFR/Wj Cs [Chip Select] J.lPD cs 0 71059 15 SA2 The CPU uses the pPD71059's CS input to select a WR 14 GND pPD71059 to read from (IN instructions) or write to RD 13 SA1 (OUT instructions). The RD and WR signals to the 07 12 SAo o ... IlPD71 059 are enabled when CS is low. CS is not used DO 0) ,.. ,.... for the INTAK sequence. CD I.t) -.:t M (\I T"" Q C C C C C C C 63-004217A RO [Read Strobe] The CPU sets the RD input to 0 when reading the Pin Identification internal registers IMR, IRR and ISR, and during polling Symbol Function operations to read polling data. Data bus 1/0 WR [Write Strobe] Slave address 1/0, bits 2,1,0 The CPU sets the WR input to 0 when writing initializing GND Ground potential words IW1-IW4 and command words IMW, PFCW and IC Internally connected MCW. SV (BUFR/W) Slave (Buffer read write) 1/0 INT Interrupt output Ao [Address] INTPO-INTP7 Interrupt inputs The Ao input is used with CS, RD, and WR to read or INTAK Interrupt acknowledge input writeto thepPD71059. Normally, Ao is connected to Ao Address input of the address bus. Table 1 shows the relationship AO between read/write operations and the control signals VDD Power supply (CS, WR, RD, and Ao)~ CS Chip select input WR Write strobe input INTP7-INTPo [Interrupt Request from Peripheral] RD Read strobe input INTPrlNTPoare eight asynchronous interrupt request NC Not connected inputs. They can be set to be either edge-or level- triggered. These pins are pulled up by an internal resistance. Their power consumption is lower at high- level input than at low-level input. INT [Interrupt] INT is the interrupt request output from a pPD71059 to the CPU or master pPD71 059. When an interrupt from a peripheral is input to an INTP pin and acknowledged, the pPD71059 asserts INT high to generate an interrupt request at the CPU or master pPD71059. 2 NEe pPD71059 INTAK [Interrupt Acknowledge] SA2-SAO [Slave Address] The I NT AK input from the CPU acknowledges an These pins are only used in systems with cascaded interrupt from the pPD71 059. After acknowledging the pPD71 059s. The master pPD71 059 uses these pins to interrupt request, the CPU returns three low-level address up to eight slave pPD71 059s. These pins are pulses (pPD8085) or two low-level pulses (pPD70108/ output pins for masters, and input pins for slaves. 70116). Synchronizing to these pulses, thepPD71059 Note: In the single mode, SA2-SAO are output pins, but the output sends a CALL instruction in three bytes, or an interrupt data has no meaning. vector number in one byte through the data bus. Voo [Power Supply] SV [BUFR/W] [Slave, Buffer Read/Write] This is the positive power supply. This pin has two functions. When no external buffer is used in the data bus, it is the SV input. When SV is low, GND [Ground] the pPD71059 acts as a slave. It operates as a master This is the ground potential. when SV is high. SV has no master/slave meaning when the pPD71059 is set to single mode. IC [Internally Connected] As the BUFR/W output, this pin can allow a bus This pin must be left unconnected. transceiver to be controlled by the pPD71 059, if one is required. When the pPD71059 changes its data bus to output, it sets BUFR/W low. It sets BUFR/W high when the data bus changes to input. Table 1. Read/Write Operations CS iii WR AD Other Conditions pPD71 059 Operation CPU Operation 0 0 IRR set by MCW IRR to Data bus IRR read ---.---------------------- --- .. -----._-------------------------------------------- ISR set by MCW ISR to Data bus ISR read ----------------------._.------._----.------------------- m Polling phase (Note 1) Polling data to Data bus Polling 0 0 1 1 IMR to Data bus IMR read 0 0 0 D4 = 1 Data bus to IW1 register IW1 write "---------._-------._----- ---------"._--------._--- --.----------------- ------_.--. __ .__ .----.-._._--------- D4, D3 = 0 Data bus to PFCW register PFCW write ---------._-------------------- ---------------------.----- ----------.---------.----- -----_ ... _- .. -----------_ ............. .................. __ ._-_._ ... _----_ ... -_.- D4 = 0, D3 = 1 Data bus to MCW register MCW write 0 0 (Note 2) Data bus to IW2 register IW2 write ... _ ....... __ ...... _--_ ... _--.--- ... _ ........ _ ....... -..... Data bus to IW3 register IW3write --_ ... _--._ ..... _-._ ..... _---_ .. _._- ... -... _-- --_ .. __ ._- ........ _--- ..... _--_._ ... _--_ ... Data bus to IW4 register IW4write -----_ .. _---_ .... _._-- .... _-- .... -----_._._----._ .. _---. __ ..... _- .. ... _---._ .... _----- .. _-----_ .. _ After initializing Data bus to IMR IMWwrite 0 x Data bus high impedance 1 x x x 0 0 0 x Illegal Note: (1) In the polling phase, polling data is read instead of IRR and ISR. (2) Refer to Control Words section forlW2-IW4 writing procedure. JlPD71059 NEe Block Diagram SAD Initialization and Data Bus Command Word Buffer SA, Register Group SA 2 L-...._ _ _ SVI(BUFRIW) b o 4 - - - - INTAK RO---..a Control Logic Readl I - - - -. . INT WR---+<1 Write Control In INTP o cs --------' Service Priority Decision INTP, Register Logic (ISR) INTP 2 INTP 3 INTP. INTP s INTP. INTP 7 49OO0146B Block Diagram Functions Interrupt Request Register [IRR] Data Bus Buffer The interrupt request register shows which interrupt levels are currently being requested. If bit n of the IRR The data bus buffer is a buffer between Dr Do and the is 1, INTPn is requesting an interrupt. The CPU can pPD71059's internal bus. read this register. Read/Write Control In-Service Register [ISR] The read/write control controls the CPU's reading and The in-service register shows all interrupt levels cur- writing to and from the pPD71 059 registers. rently in service. If bit n of this register is 1, the interrupt routine corresponding to INTP n is currently being Initialization and Command Word Registers executed. The CPU can read this register. These registers store initializing words IW1-IW4 and command words PFCW (priority and finish control Slave Control word) and MCW (mode control word). The CPU Slave control is used in systems with cascaded cannot read these registers. pPD71 059s. A master pPD71 059 uses it to control slave pPD71059s, and a slave uses it to interface with the Interrupt Mask Register [IMR] master pPD71059. The interrupt mask register stores the interrupt mask word (IMW) command word. Each bit masks an inter- Control Logic rupt. If bit n of this register is 1, the interrupt request The control logic receives and generates the signals INTP n is masked and cannot be accepted by the that control the sequence of events in an interrupt. pPD71 059. The CPU can read this register by perform- ing an IN instruction with Ao = 1. 4 NEe J.lPD71 059 Priority Decision Logic DC Characteristics TA = -40 to +85°C; Voo = 5 V ±10% The priority decision logic determines which interrupt request from the IRR will be serviced next. The Limits decision is made based upon the current interrupt Parameter Symbol Min Typ Max Unit Test Conditions mask, interrupt service status, mode status, and current Input voltage, VIH 2.2 Voo + V priority. high 0.3 Input voltage, VIL -0.5 0.8 V Absolute Maximum Ratings low TA = 25°C Output voltage, VOH 0.7 x Voo V IOH = -400pA Power supply voltage, Voo -0.5 to +7.0 V high Input voltage, VI -0.5 to Voo + 0.3 V Output voltage, VOL 0.4 V IOL = 2.5 mA low Output voltage, Vo -0.5 to Voo + 0.3 V Input leakage IUH 10 pA VI = Voo Power dissipation, PDMAX 500mW current, high Operating temperature, Topt -40 to +85°C Input leakage IUL -10 pA VI =OV Storage temperature, Tstg -65 to +150°C current, low Comment: Exposing the device to stresses above those listed in the Output leakage ILOH 10 pA Vo = Voo absolute maximum ratings could cause permanent damage. The current, high device is not meant to be operated under conditions outside the Output leakage -10 pA Vo =0 V ILOL limits described in the operational section of this specification. current, low Exposure to absolute maximum ratings for extended periods may affect device reliability. INTP input IUPH 10 pA VI = Voo leakage current, high Capacitance TA = 25°C; Voo = GND = 0 V INTP input IUPL -300 pA VI =OV leakage Limits Test current, low Parameter Symbol Min Typ Max Unit Conditions Supply current Input CI 10 pF fc = 1 MHz (dynamic) capacitance 1/0 capacitance CIO 20 pF Unmeasured pins returned to 0 V pPD71059 pPD71059-10 Supply current 1001 1001 1002 3.5 4 2 9 9 50 mA mA pA Input pins: III (power down VIH = Voo- 0.1 V mode) VIL=0.1V Output pins: open (Note 1) Notes: (1) In power down mode, INTPo-INTP7, INTAK, and CS must be at high level (VIH = Voo - 0.1 V). pPD71059 NEe AC Characteristics TA = -40 to +85°C; Voo ± 5 v + 10% 8 MHz Limits 10 MHz limits Parameter Symbol Min Max Min Max Unit Test Conditions Read Timing Ao, CS setup to RD t tSAR 0 0 ns Ao, CS hold from RD t tHRA 0 0 ns RD pulse width low tRRL 160 120 ns RD pulse width high tRRH 120 90 ns Data delay from RD t tORO 120 95 ns CL = 150 pF Data float from RD t tFRO 10 85 10 60 ns CL = 100 pF Data delay from Ao, CS tOAD 200 120 ns CL = 150 pF BUFR/W delay from RD t tORBL 100 80 ns BUFR/W delay from RD t tORBH 150 100 ns Write Timing Ao, CS setup to WR t tSAW 0 0 ns Ao, CS hold from WR t tHWA 0 0 ns WR pulse width low. tWWL 120 100 ns WR pulse width high tWWH 120 90 ns Data setup from WR t tsow 120 100 ns Data hold from WR t tHWO 0 0 ns Interrupt Timing INTP pulse width tlPIPL 100 80 ns (Note 1) SA setup to second, third INTAK t tSSIA 40 40 ns Slave INTAK pulse width low tlAIAL 160 120 ns INTAK pulse width high tlAIAH 120 90 ns INTAK Sequence INT delay from INTP t tDiPI 300 200 ns CL = 150 pF SA delay from first INTAK t tOIAS 360 250 ns Master, CL = 150 pF Data delay from INTAK t tDiAO 120 95 ns CL = 150 pF Data float from INTAK t tFIAO 10 85 10 60 ns D.ata delay from SA toso 200 150 ns Slave, CL = 150 pF BUFR/W delay from INTAK t tOIABL 100 80 ns CL = 150 pF BUFR/W delay from INTAK t tDiABH 150 100 ns Other Timing Command recovery time tRV1 120 90 ns (Note 2) INTAK recovery time tRv2 250 90 ns (Note 3) INTAK/command recovery time tRv3 250 90 ns (Note 4) Notes: (1) The time to clear the input latch in edge-trigger mode. (2) The time to move from read to write operation. (3) The time to move to the next INTAK operation. (4) The time to move INTAK to/from command (read/write). 6 NEe JlPD71059 Timing Waveforms A C Test Input/Output Waveform INTAK Sequence (Vector Mode) 24 2~.2~____=-~~ ____ ~2~.2 =<::x=== ~I 11- r-tOIPI ,." ~ I~__\__------ 0:4-==X> Test Points 0.8 0.8 49·000166A Read Cycle INT 1 \'------------ AO,CS ----'1'-------------------------'1'--- tlAIAL 0 7 -0 0 --------------1--------1-<1 tRRL---~ AD ---+---, I 1,1.------- "f-----------fl SA 2 -SA o -----------~ INTP Input Should be Maintained..mJ:!!gh Level until the Leading Edge of the 1stlNTAK Pulse. 49-00016AA Write Cycle Other Timing 0 7 -0 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _--'1'--_____+--"1'\.______ _ INTAK~ ~ tOIABL =1 ~k----------------- 49-00016SA INTAK Sequence (CALL Mode) ~ 1=- r-tolPI WR-----------. 1 "" --f.=}- ~ 1....- - \ - - - - - - -____ INT L "IWR.".TAK~'~_I 0 7 -0 0 -----------+"' INTAK or RO/WR . il'---......J/ 49-000169A SA -SA _________________......J 2 o 83-001629A 7 pPD71059 NEe Interrupt Operation Software Features Almost all microcomputer systems use interrupts to The pPD71 059 has the following software features: reduce software overhead when controlling periph- • Interrupt types: CALL/vector erals. However, the number of interrupt pins on a CPU • Interrupt masking: Normal/extended nesting is limited. When the number of interrupt lines increases • End of interrupt: Self-FI/normal FI/ bey·ond that limit, external circuits like the pPD71 059 specific FI become necessary. • Priority rotation: Normal nested/extended The pPD71059 can process eight interrupt request nested/exceptional nested according to an allocated priority order and transmit Automatic priority rotation the signal with the highest priority to the CPU. It also Rotate to specific priority supplies the CPU with information to ascertain the • Polled mode interrupt routine start address. Cascading pPD71059s • CPU-readable registers by connecting up to eight "slave" pPD71059s to a single "master" pPD71 059 permits expansion to up to a Hardware Configurations maximum of64 interrupt request signals. The pPD71059 has the following hardware config- Interrupt system scale (master/slave), interrupt routine urations: addresses, interrupt request priority, and interrupt • Interrupt input: Edge/level sensitive request masking are all programmable, and can be set • Cascading pPD71059s: Single/extended by the CPU. (master/slave) Normal interrupt operation for a single pPD71059 is as • Output driver control: Buffered/non-buffered follows. First, the initialization registers are set with a sequence of initialization words. When the pPD71 059 Mode Control detects an interrupt request from a peripheral to an These features and configurations are selected and INTP pin it sets the corresponding bit of the interrupt controlled by the four initialization words (lW1-IW4) request register (IRR). The interrupt is checked against and the three command words (IMW, PFCW, and the interrupt mask register (IMR) and the interrupt MCW). The format of these words are shown in figures service register (ISR). If the interrupt is not masked 2 and 3, respectively. and there is no other interrupt with a higher priority in service or requesting service, it generates an INT signal to the CPU. Control Words There are two types of pPD71059 control words: The CPU acknowledges the interrupt by bringing the initialization words and command words. INTAK line low. The pPD71059 then outputs interrupt CALL or vector data onto the data bus in response to There are four initialization words: IW1-IW4. These INTAK pulses. During the last INTAK pulse, the words must be written to the pPD71 059 at least once to pPD71059 sets the corresponding bit in its ISR to initialize it. They must be written in sequence. indicate that this interrupt is in service and to disable There are three types of command words: interrupt interrupts with lower priority. It resets the bit in the IRR mask word (IMW), priority and finish control word at this point. When the CPU has finished processing (PFCW), and the mode control word (MCW). These the interrupt, it will inform the pPD71 059 by sending a words can be written freely after initialization. finish interrupt (FI) command. This resets the bit in the ISR and allows the pPD71 059 to accept interrupts with lower priorities. If the pPD71 059 is in the self-FI mode, the ISR bit is reset automatically and this step is not necessary. N'EC pPD71059 Initialization Words SIL (specify interrupt level) is set to 1 to change the priority order or designate an interrupt level. It is used Initialization sequence. When data is written to a with.the RP and FI bits (bits 07 and 05). When SIL = 1 JlP071059 after setting Ao = 0 and 04 = 1, data is and RP or FI = 1, the level identified by I L2-1 Lo is always accepted as IW1. This results in a default designated as the lowest priority level. The other initialization as shown below. See figure 1. priorities will be set correspondingly. When used with (1) The edge-trigger circuit of the INTP input is FI = 1, it resets the ISR bit corresponding to the reset. IRR is cleared in the edge-trigger mode. interrupt leveIIL2-ILo. (2) ISR and IMR are cleared. MCW [Mode Control Word]. This word is used to set the exceptional nesting mode, to poll the JlP071059, (3) INTP7 receives the lowest priority; INTPo and to read the ISR and IRR registers. receives the highest. (4) The exceptional nesting mode is released. IRR Figure 1. Initialization Sequence is set as the register to be read. (5) Register IW4 is cleared. The normal nesting START mode, non-buffer mode, FI command mode, and CALL mode are set. Initialization Words. The initialization words are written CPU Sends IW1 consecutively, and in order. The first two, IW1 and IW2, [AO=O,04=1] set the interrupt address or vector. IW3 specifies which interrupts are slaves for master systems, and defines the slave number of a slave system. Therefore, IW3 is only required in extended systems. TheJlP071059 will only expect it if bit D1 of IW1, SNGL = O. IW4 is only written if bit Do of IW1 , 14 = 1. See figu re 2 for the format of the initialization words. Command Words The command words give various commands to a JlP071059 during its operation to change interrupt masks and priorities, to end interrupt processing, etc. See figure 3. IMW [Interrupt Mask Word]. This word masks the IRR and disables the corresponding INTP interrupt re- quests. It also masks the ISR in the exceptional nesting mode. Bits MrMo correspond to the interrupt levels of INTPrINTPo, respectively. In the exceptional nesting mode, interrupts corre- sponding to the bits of IRR and ISR are masked if the Mn bit is set to 1. PFCW [Priority and Finish Control Word]. This word sets the FI (finish interrupt) command that defines the way that interrupts are ended, and the commands that change interrupt request priorities. When RP (rotate priority) is set to 1, the priorities of the interrupt requests change (rotate). The priority order of the 8 I NTP pins is as shown in figure 4. Setting a level as the lowest priority sets all the other levels corre- 83-0016308 spondingly. For example, if INTP3 is the lowest priority, INTP4 will be the highest. (INTP7 has the lowest priority after initialization). 9 pPD71059 NEe Bits SR and IS/IR are used to read the contents of the IRR and ISR registers. When SR = 0, no operation is performed. To read IRR or ISR, set Ao = 0 and select the IRR or ISR register by writing to MeW. To select the IRR register, write MeW with SR = 1 and IS/iR = O. To select the ISR, write MeW with SR = 1 and IS/iR = 1. The selection is retained, and MeW does not have to be rewritten to read the same register again. IRR and ISR are not masked by the IMR. Figure 2. Initialization Word Formats (Sheet 1 of 2) IW1 [Initializalion Word 1] D7 D. Ds D3 D2 D, A7 L A. 1 As 1 1 LEV 1 AG4 1 SNGL 1 14 1 I .1 IIW4 I 1 1 IW4Write 1 Selection 1 o 1 IW4 Not Written J The Higher 3 Bits of ~ Interrupt l 11 Single Mode 1 the Lower Byte of the Interrupt Routine Scale 1 o 1 Extended Mode J Address in CALL Mode _I CALL Mode 1 1 1 4 Bytes J -I Address Gap I o 1 8 Bytes 1 .1 INTP Input -I Trigger I 1 I Level-Trigger Mode I o 1 Edge-Trigger Mode 1 1 IW2 [Inilialization Word 2] AO Higher Byte of Interrupt Routine Address in CALL Mode V7 -V 3 : The Higher 5 Bits of Interrupt Vector Number in Vector Mode IW3 [Initialization Word 3] Master Mode INTP Input is a Slave INTP Input is Not a Slave 49-000160C 10 NEe J.lPD71 059 Figure 2. Initialization Word Formats (Sheet 2 of 2) IW3 [Initialization Word 3) Slave Mode D. 03 O2 0, I 0 I 0 I 0 I 0 I 0 SN 2 SN, SNo 0 0 0 0 Slave Number 0 0 1 1 0 1 0 2 0 1 1 3 1 0 0 4 1 0 1 5 1 1 0 6 1 1 1 7 IW4 [Initialization Word 4) 03 O2 0, I 0 I 0 I 0 I EXTN I BUF BSV I SFI VIC I LJ Interrupt 1 Vector Mode I Mode Select 0 CALL Mode ~ FI Mode 1 Self-FI Mode I 0 FI Command Mode BUF BSV Buffer 0 X Non-Buffer Mode Mode Select 1 1 Buffer Mode Master 1 0 Buffer Mode Slave Extended 1 Extended Nest Mode Nest 0 Normal Nest Mode I 49-000161C 11 J.lPD71059 NEe Figure 3. Command Word Format IMW [Interrupt Mask Word] O2 0, M2 M, I Mo I I I I J Interrupt 1 1 Set Interrupt Mask I Mask I 0 Reset Interrupt Mask PFCW [Priority Finish and Control Word] Ao 07 D. Os D. 03 O2 0, Do ~ RP 1 SIL 1 FI 1 0 1 IL2 IL, 1 ILo In~:~:~II----I_-+_-+-_-l No Level Without Rotation Normal FI Command FI Designation With Rotation Normal Rotation FI Command Com- mand Without Rotation Specific FI Command -~:. Priority With Level With Rotation Specific Rotation FI Command Rotation and Designation FI Command Without Rotation No Operation Non- FI With Rotation Specific Rotation Command Com- Without Rotation Self-FI Mode Rotation Reset mand No Level Designation With Rotation Self-FI Mode Rotation Set MCW [Mode Control Word] Ao 07 D. Os D. 03 O2 0, Do ~ X 1 SNM 1 EXCN 1 0 1 POL 1 SR 1 ISIIR I LI /l 1 1 1 Polling Command Polling 1 1 0 1No Operation 1 Read X No Operation Register ISRSelect Select IRRSelect Exceptional No Operation Nesting Exceptional Nesting Mode Set Mode Exceptional Nesting Mode Release 49~000162C 12 NEe pPD71059 Figure 4. INTP Priority Order Vector Mode [pPD7010S170116 CPUs] Highest In the vector mode, the pPD71059 outputs a one-byte Lowest Priority Priority interrupt vector number to the data bus in the INTAK sequence. The CPU uses that vector number to gen- erate an interrupt routine address. See figure 7. After Initialization The higher five bits of the vector number, Vr V3, are set by IW2 during initialization. The pPD71059 sets the remaining three bits to the number of the interrupt input (0 for INTPo, 1 for INTP1, etc). See figure B. The CPU generates an interrupt vector by multiplying After Rotation 83-001631A the vector number by four, and using the result as the address of a location in an interrupt vector table located at addresses 000H-3FFH. See figure 9. CALL or Vector Modes ThepPD71 059 passes interrupt routine address data to System Scale Modes the CPU in two modes, depending on the CPU type. The pPD71059 can operate in either single mode, with This mode is set by bit VIC in initialization word IW4. up to eight interrupt lines orextended mode, with more VIe is set to one to to select the vector mode for than one pPD71059 and more than eight interrupt pPD701 OB170116 CPUs, and reset to zero to select the lines. In extended mode apPD71 059 is in either master CALL mode for pPDBOB5A CPUs. or slave mode. CALL Mode [J.IPDSOS5A CPUs] Bit 01, SNGL (single mode), of the first initialization word IW1 designates the scale of the interrupt system. In this mode, when an interrupt is acknowledged by SNGL = 1 designates that only onepPD71059 is being the CPU, thepPD71 059 outputs three bytes of interrupt used (single mode system). SNGL = 0 designates an data to the data bus in its INTAK sequence. During the extended mode system with a master and slave fi rst I NT AK pu Ise from the CPU, the pPD71 059 outputs pPD71059s. In the single mode (SNGL = 1), the SV the CALL opcode OCDH. During the next INTAK pulse, input and IW4 buffer mode bits 03 and 02 do not nil it outputs the lower byte of a two-byte interrupt routine address. During the third INTAK pulse, it outputs the indicate a master/slave relation for the pPD71059. all upper byte of the address. The CPU interprets these Single Mode three bytes as a CALL instruction and executes the CALL interrupt routine. See figure 5 and the INTAK This mode is the normal mode of pPD71059 operation. sequence (CALL mode) pPDBOB5 diagram in the AC It has been described in the Interrupt Operation Timing Waveforms. description. See figure 10 for a system example. Interrupt routine addresses are set using words IW1 Extended Mode and IW2 during initialization. However, only the higher ten or eleven bits of the interrupt addresses are set, In this mode, up to 64 interrupt requests can be A1S-A6 or A1S-AS. The pPD71059 sets the remaining processed using a master (pPD71 059 in master mode) low bits (Os-Do or 04-00) to get the address of INTPn's connected to a maximum of eight slaves (pPD71059s interrupt routine. The addresses for INTP 1-INTP 7 are in slave mode). See figure 11 for a system example. set in order of interrupt level. The space between interrupt addresses is determined by setting the AG4 bit (address gap 4 bytes) of IW1. When AG4 = 1, the interrupt routine starting addresses are 4 bytes apart. Therefore, the starting address for I NTP n is the starting address for INTPo plus four times n. When AG4 = 0, starting addresses are eight bytes apart, so the starting address for INTP n is the starting address for INTPo plus eight times n. See figure 6. 13 pPD71059 NEe Figure 5. CALL Mode Interrupt Sequence Peripheral Circuit CPU (fl.PD8085A) [Connected to INTPnJ (Interrupt Enable) I I I Generated Interrupt I Request INTPn I I I I I I I I I I I I I Hold INTP n High until First I INTAK Pulse Is Generated I Reset Interrupt Request at INTPn INTAK Sequence Output Address Higher Byte (ADH ) to Data Bus I I I I I Set Bit n of ISR; Reset Bit n of IRR I I I I I I 49 0OOl~7C 14 NEe JlPD71 059 Figure 6. CALL Mode Interrupt Address Sequence • Address Lower Byte [AOLJ During Second INTAK AG4 = 1 (4-By1e Spacing Address) Interrupt Level 07 03 O2 0, INTP o A7 As As 0 0 0 0 0 INTP, A7 As As 0 0 1 0 . 0 INTP 2 A7 As As 0 1 0 0 0 INTP 3 A7 As As 0 1 1 0 0 INTP. A7 As As 1 0 0 0 0 INTP s A7 As As 1 0 1 0 0 INTPs A7 As As 1 1 0 0 0 INTP 7 A7 As As 1 1 1 0 0 AG4 = 0 (8-By1e Spacing Address) Interrupt Level 07 03 O2 0, INTP o A7 As 0 0 0 0 0 0 INTP, A7 As 0 0 1 0 0 0 INTP 2 A7 As 0 1 0 0 0 0 INTP 3 A7 As 0 1 1 0 0 0 INTP. A7 As 1 0 0 0 0 0 INTP s A7 As 1 0 1 0 0 0 INTP s A7 As 1 1 0 0 0 0 INTP 7 A7 As 1 1 1 0 0 0 Note: When AG4 = 0, bit As is ignored . • Address Higher Byte [AOHI During Third INTAK m 03 O2 0, A,s A'4 A'3 A'2 A" AlO 83-001632A ~----------------------------------------------------------------------------------------------~ 15 pPD71059 NEe Figure 7. Vector Mode Interrupt Sequence Peripheral Circuit CPU (.,.PD70108!70116) Connected to INTPn .,.PD71 059 (Interrupt Enable) I I I I I Hold INTPn High until FirstlNTAK Pulse is Generated FirstlNTAK Pulse is Generated when INT is INTAK Sequence Sel Bit n 01 ISR; Reset Bit n ollRR 49000148C 16 NEe pPD71059 Figure B. Vector Numbers Output in Vector Mode Output During the Second INTAK Interrupt Levels 03 O2 0, INTP o V7 V. Vs V. V3 0 0 0 INTP, V7 V. Vs V. V3 0 0 1 INTP 2 V7 V. Vs V. V3 0 1 0 INTP 3 V7 V. Vs V. V3 0 1 1 INTP. V7 V. Vs V. V3 1 0 0 INTP s V7 V. Vs V. V3 1 0 1 INTP. V7 V. Vs V. V3 1 1 0 INTP 7 V7 V. Vs V. V3 1 1 1 83-00'6338 Figure 9. Interrupt Vectors for the JiPD7010BI70116 Vector Table Address Interrupt Vector Table OOOH Program Counter Word Vector 0 Program Segment Word 004H Vector 1 008H Vector Number x 4 Vector 2 (Interrupt vector ;::---. table address is 3F8H obtained by multiplying vector Vector 254 number times four.) 3FCH Vector 255 ~ ____________________________________________________________________________________________________4_9-_OOO_'_52-"A ~ Figure 10. Single Mode System ",P071 059 f----------+j INTAK f-------------I INT f----------+j Ao 49000'49A 17 J1PD,71059 NEe Figure 11. Extended System Example with Three Slaves A j II Address Bus II II ( Control Bus '\ t \\ \\ \\ I ( .. . Data Bus .. .. i"- ~ cs Master Ao 0,-0 0 INTAK SA 2 -SA o T T T ~ Slave Address Local Bus t 1 -~ rI INTP o - - - - - - INTP 7 cs Ao 0,-0 0 INTAK cs Ao 0,-0 0 INTAK cs Ao 0,-0 0 INTAK Slave [SN ~ 5J If- Slave [SN ~ 6J SA 2 -SA o I- Slave [SN ~ 7J SA 2 -SA o If- r 'r- r'r- INT INTP o ... 'INTP 7 INT INTP o ... INTP 7 INT INTP o ... INTP 7 I I I ... ... ... 1 2 3 4 5 6 7 13 14 15 21 22 23 29 49-0001508 Master Mode Slave Mode When a pPD71059 is a master in an extended mode When a slave receives an interrupt request from a system, SrSo of IW3 (master mode) define which of peripheral, and the slave has no interrupts with higher I NTPrl NTPo are inputs from slave pPD71059s or priority in service, it sends an interrupt request to the , peripheral interrupts. master through its INT output. When the interrupt is accepted by the CPU through the master, the master Consider an interrupt request from INTP n. If Sn = 0, the outputs the slave's address on pins SA2-SAO' Each interrupt is from a peripheral (for example, INTPo of slave compares the address on SA 2-SAo to its own the master pPD71 059 in Figure 11), and the pPD71 059 address. The slave that sent the interrupt will find a treats it the same way it would if it were in the single match. It completes the INTAK sequence the same mode. SA2-SAO outputs are low level and the master way as a single pPD71059 would. provides the interrupt address or vector number. The master outputs slave address 0 when it is proces- If Sn = 1, the interrupt is from a slave (for example, sing a non-slave interrupt. Therefore, do not use 0 as a INTP 7 of the master). The master sends an interrupt to slave address if there are less than eight slaves con- the CPU if the slave requesting the interrupt has nected to the master. priority. The master then outputs slave address n to pins SA2-SAO on the first INTAK pulse by the CPU. It Figures 12 and 13 show the interrupt operating se- lets slave n perform the restof the INTAK sequence. quences for slaves in the extended mode. 18 NEe pPD71059 Figure 12. Interrupt from Slave (CALL Mode) Peripheral Circuit [Connected to INTP m Slave JlPD71059 Master JlPD71 059 CPU [JlPD8085A) In Slave) ISm =0) [Sn = 1) [Interrupts Enabled) I I I Hold INTPm High Until First INTAK Pulse is Generated Generate First INTAK Pulse After Accepting INT Opcode OCDH SA2 - SAD Output to Data Bus Output SA2 - SAD Generate Second INTAK Pulse INTAK Sequence Output Address Higher Byte (ADHl to Data Bus Set Bit m of ISR; Set Bit n Of ISR; Reset Bit m of IRR Reset Bit n of IRR ~ R_e_s_et_B_it~m_o_f_IS_R ~~I·~------------- __ __ Reset Bit n of ISR 19 pPD71059 NEe Figure 13. Interrupt from Slave (Vector Mode) Peripheral Circuit [Connected to INTP m Slave liP 071 059 Master IIPD71059 in SI.aveJ [Sm=OJ [S" = 1J IIPD70108/70116 [V201V30J I [ I I Generate Interrupt I Request to INTPm I II Hold INTP m High Until First INTAK Pulse is Generated Set Bit n of IRR I I Generate First iNTAK Reset Interrupt Request at INTP m INTAK Output Vector Sequence to Data Bus Set Bit m of ISR; Set Bit n 01 ISR; Reset Bit m of IRR Reset Bit n of IRR Reset Bit m of ISR Reset Bit n ot ISR 49-000154C 20 NEe pPD71059 Buffer and Non-Buffer Modes Figure 14. Buffer Mode In a large system, a buffer may be needed by the ............ ~ fJ.PD71 059 pP071059 to drive the data bus. A buffer mode is Buffer supplied, with a signal to specify the buffer direction. A ~ ~ -A In the buffer mode, SV (BUFR/W) is used to select the buffer direction and SV cannot be used to specify the " ,. A D B . I' D7- DO master/slave mode. The master/slave selection must en be set by IW4. IW4 bit 03, BUF (buffer) and D2 , BSV " In (buffered slave) are used together to set the buffer ~ Voo mode and master/slave relation. When BUF = 0, the non-buffer mode is set and BSV has no meaning. When BUF = 1, the buffer mode is set. In buffer mode, the pP071059 is a master when BSV = 1, a slave when BSV 4B The way apP071059 handles interrupts when there is High Level: A--B already an interrupt in service depends on the nesting Note 2: The /lPD71059 is set to input SV in its Initial mode. state and is pulled up by R to set D to the low level during initialization. 49-000155A Normal Nesting Mode This mode is set when IW4 is not written or when IW4 Figure 15. Normal Nesting Mode has EXTN = O. It is the most common nesting mode. See figure 15. Lowest Highest Priority Priority When an interrupt is being executed in this mode (cor- 7 6 responding bit of ISR = 1), only interrupt requests with I0 I 0 I 0 higher priority can be accepted. ISR P;0~1~ 0 I 0 0 I0 I 0 I I 0 Interrupts that can be accepted are INTP 5 through Extended Nesting Mode INTP 0 during execution of interrupt Level 6. This mode is only applicable to a master in the Request Generated in Level 2 extended mode. A slave's eight interrupt priority levels become only one priority level when viewed by the master. Therefore, a request made by a slave with a ISRl/offi1/1/0?EO$0?J«a 0 0 I Interrupt Level 2 has been accepted and is being executed. higher priority than a previous request from the same slave will not be accepted. This cannot be called complete nesting since priority ranking within slaves k> $ /% b?f If %0 a Request Generated in Level 4 loses its significance. IRR 0 1 0 0 I0 The extended nesting mode is set by setting bit 04 of IW4 in both the master and the slave. Interrupt requests ISR 1% 0 $ 1 a;; 0 :x: ;£ % <1 0 0 0 0 I Level 4 requests cannot be accepted. of a higher level than the one currently being serviced can be accepted in the master from the same slave in Level 2 FI Command Issued the extended nesting mode. Care should be exercised when issuing an FI (finish ISRI20$//t0/£1?1 0 10 10 10 Level 4 request can be accepted after processing of interrupt) command in the extended nesting mode. In Level 2 has been. ended, when high level is maintained an interrupt by a slave, the CPU first issues an FI at INTP4 until INTP4 is accepted. command to the slave. Then, the CPU reads the slave's 49-000144A in-service register (ISR) to see if that slave still has interrupts in service. If there are no interrupts in service, (ISR = OOH) an FI command is issued to the master, as in the single mode when an interrupt is made by a peripheral. 21 JlPD71059 NEe Exceptional Nesting Mode Figure 16. Exceptional Nesting Mode A pP071 059 in the normal or extended nesting mode [a] Acceptable cannot accept interrupts of a lower priority than the Priority Levels interrupts in service. Sometimes, however, it is desir- Levels ISR IMR [White blocks] able that requests with lower priority be accepted Highest while higher-priority interrupts are being serviced. Setti ng the exceptional nesti ng mode allows th is. After releasing the exceptional mode, the previous mode is resumed. The exceptional nesting mode is controlled by the SNM (set nesting mode) and EXCN (exceptional nest- Lowest ing mode) bits (06 and Os) of MCW. They set and Requests from INTPS and INTP7 cannot be accepted when only release the exceptional nesting mode. The mode bit 2 of the IMR is set to 1. doesn't change when SNM = O. Exceptional nesting is set if SNM and EXCN = 1 and released when SNM =1 [b] Acceptable and EXCN = O. Priority ISR IMR Levels Levels [White blocks] Setting a bit in the IMW in the exceptional nesting Highest mode, inhibits interrupts of that level and allows 1 _ Setting of exceptional unmasked interrupts to all other levels, higher or lower nesting mode - priority. The procedure for setting the exceptional nesting (EN) mode is as follows: (1) Read the ISR. Lowest (2) Write the ISR data to the IMR. All requests other than those being executed can be accepted when the IMR is set the (3) Set the exceptional nesting mode. same as the ISR, in exceptional nesting mode. 83·001634A In this way, all interrupt requests not currently in service will be enabled. Finishing Interrupts (FI) and Changing the Priority Levels Figure 16 (a) shows what happens if IMR is not set to ISR. When the exceptional nesting is set, bit 2 of ISR The priority and finish control word (PFCW) issues FI will be ignored, and bit 5 will be serviced. Servicing bit commands and changes interrupt priorities. 5 will mask the lower priority interrupts 6 and 7. When the ISR is set equal to the IMR as in (b), all interrupts Normal FI Command except 2 and 5 can be serviced when the exceptional nesti ng mode is set. 07 06 Os 04 03 02 01 Do Issuing an FI command to a level masked by the exceptional nesting mode requires caution. Since the ISR bit is masked, the normal FI command will not PFCW = Ia I I 0 0 I a I x I x Ix I work. Forthis reason, a specific FI command specifying When a normal FI command is issued, the pP071 059 the ISR bit must be issued. After the exceptional mode resets the ISR bit corresponding to the highest priority is released, the normal FI command may be used. level selected from the interrupts in service. This operation assumes that the interrupt accepted last has ended. When an interrupt routine changes the priority level or the exceptional nesting mode is set, this command will not operate correctly because the highest priority interrupt is not necessarily the last interrupt in service. 22 NEe pPD71059 Specific FI Command When the normal rotation FI command is issued, the pP071059 resets the ISR bit corresponding to the highest priority level selected from the interrupts in 07 06 Os 04 03 02 01 00 service, then rotates the priority levels so that the PFCW = I 0 I 1 I 1 I 0 I 0 IIL211L1 IILo I interrupt just completed has the lowest priority. Specific Rotation FI Command When the specific FI command is issued, thepP071 059 resets the ISR bit designated by bits IL2-ILo of the PFCW. This command is used when the normal nesting 07 06 Os 04 03 02 01 00 mode isn't being used. PFCW = I 1 I 1 11 I 0 I 0 IIL211L1 IILo I Self-FI Mode When the specific rotation FI command is issued, the When SFI of IW4 = 1, the pP071 059 is set to the self-FI pP071059 resets the ISR bit designated by bits IL2-ILo mode. In this mode, the ISR bit corresponding to the of the PFCW and rotates the interrupt priorities so that interrupt is set and reset during the third INTAK pulse. the interrupt just reset becomes the lowest priority. Therefore, the CPU does not have to issue an FI This change in priority levels is different from the normal command when the interrupt routine ends. In this nesting mode, therefore, it is the user's responsibility mode, however, the ISR does not store the routine in to manage nesting. service. Unless interrupts are disabled by the interrupt routine, newly generated interrupt requests are gen- Specific Rotation Command erated without priority limitation by the ISR. This can cause a stack overflow when frequent interrupt requests occur, or when the interrupt is level triggered. 07 06 Os 04 03 02 01 00 Self-FI Rotation PFCW = I 1 I 1 I 0 I 0 I 0 IIL211L1 IILo I Rotation of interrupt priorities can be added to the self-FI mode. In this case, the corresponding interrupt When the specific rotation command is issued, the is set to the lowest priority level when a bit is reset in pP071 059 sets the interrupt priority specified by I L2-1Lo nil the ISR at the end of the INTAK sequence. to the lowest priority. In this case also, the user must manage nesting. a. Self-FI Rotation Set: Triggering Mode 07 06 Os 04 03 02 01 00 Bit 03 of the first initialization word, IW1, is LEV (Ievel- PFCW = I 1 I 0 I 0 0 0 X X X trigger mode bit). LEV sets the trigger mode of the INTP inputs. The level-trigger mode is set when LEV = 1. The risi ng-edge-triggered mode is set when LEV = O. Self-FI Rotation Reset: Edge-Trigger Mode 07 06 Os 04 03 02 01 00 In the edge-trigger mode, an interrupt is detected by the rising edge of the signal on an INTP input. PFCW= oI oI oI oI 0 X X X Although an IRR bit goes high when INTP is high, the I IRR bit is not latched until the CPU returns an INTAK Normal Rotation FI Command pulse. Therefore, the INTP input should be maintained high until INTAK is received. This filters out noise spikes on the INT lines. To send the next interrupt 07 06 Os 04 03 O2 01 00 request, temporarily lower the INTP input, then raise it. PFCW= 0 0 0 X X X 23 pPD71059 NEe Level-Trigger Mode When the CPU performs a read operation with Ao = 0 in the polling mode, polling data as shown in figure 19 is In the. level-trigger mode, an I RR bit is set by the I NTP read instead of ISR or IRR. The pPD71059 then ends input being at a high level. As in the edge-trigger mode, the polling mode. the INTP must be maintained high until the INTAK is received. Interrupts are requested as long as the INTP Figure 19. Polling Data input remains high. Care should be taken so as not to cause a stack overflow in the CPU. See figure 17. 03 D. 0, Note: The JlPD71059 operates as if the INTP7 interrupt had MCW=LI_1_NT~__o__~1__o~l__o__~I__o~__PL~.~_P_L,~_PL~o~ occurred if the INTAK pulse is sent to theJlPD71 059 by the 83-00163SA CPU when the JlPD71 059 INT output level is low. Bit 7 of ISA is not set. Accordingly, if it is expected that this will occur, the INTP7 interrupt should be reserved for servicing The INT bit has the same meaning as the INT pin. incomplete interrupts. The FI should not be issued for When it is set to 1, it means that the pPD71059 has incomplete interrupts. See figure 18. accepted an INTP input. Figure 17. INTP Input The PL2-PLO (permitted level) bits show which INTP input requested an interrupt when INT = 1. If INT in the polling data is 1, thepPD71059 sets the ISR bit corresponding to the interrupt level shown by bits PL2-PLO of the polling data and considers that interrupt as being executed. The CPU then processes the interrupt accordingly, based on the polling data read. An FI command should be issued when this processing ends. Note: When a read is performed with AO = 1 after the polling command is sent to the JlPD71 059, the IMA will be read instead of polling data. However, when the polling command is sent, the JlPD71 059 operates in the same manner when Ao = 0 as it does when Ao = 1. This means that although Ao RESTG was set to 1, the JlPD71 059 will send the contents of the 49-000156A IMA, but it will also set an ISA bit just as it would if AO had been set to zero. This may disturb the nesting. Therefore, Figure 18. Incomplete Interrupt Request performing a read operation with Ao = 1 immediately after sending the polling command should be avoided. INTP-.-/ \I-_____~ INT--1 :i :I\....._----- First INTAK Pulse 'N~K-------~I~I~~~--- I I INT Ssmpllng by CPU _ _ 49-000157A Polling Operation When polling, the CPU should disable its INT input. Next, it issues a polling command to the pPD71059 using MCW with POL = 1. This command sets the pPD71059 in polling mode until the CPU reads one of the pPD71059's registers. 24 NEe NEe Electronics Inc. pPD71071 DMA Controller Description Ordering Information The pPD71071 is a high-speed, high-performance Part Number Package direct memory access (DMA) controller that provides pPD71071C-10 48-pin plastic DIP high-speed data transfers between peripheral devices L-10 52-pin PLCC and memory. A programmable bus width allows bidirectional data transfer in both 8- and 16-bit systems. In addition, the pPD71071 uses CMOS technology to Pin Configurations reduce power consumption. 48-Pin Plastic DIP The pPD71 071 can perform a variety of transfer func- tions including byte/word, memory-to-memory, and elK HlDRQ transfers between memory and I/O. The pPD71071 RESET HlDAK also utilizes single, demand, and block mode transfers; END/TC READY release and bus hold modes; and normal and com- DMAAK3 cs DMAAK2 MWR pressed timing. DMAAKl MRD DMAAKO IOWR Features DMARQ3 lORD UBE o Four independent DMA channels DMARQl AEN o 16M-byte addressing DMARQO ASTB o 64K-byte/word transfer count GND Ao o 8- or 16-bit programmable data bus width D1S/ A 2J Voo o Enable/disable of individual DMA requests D14/A22 D13/A21 Al A2 o Software DMA requests D12/A20 AJ o Enable/disable of autoinitialize A4 o Address increment/decrement 010/A1S As o Fixed/rotational DMA channel priority Dg/A17 As o Terminal count output signal Ds/A1S D7/A1S A7 Do/As o Forced transfer termination input Os/A14 Dl/Ag o Cascade capability Ds/A1J D2/Al0 o Programmable DMA request and acknowledge D4/A12 _o__ _ _---r- DJ/All signal polarities 83-001876A o High-performance data transfer bandwidth - 5.33 Mbyte/s at 8 MHz - 6.67 Mbyte/s at 10MHz o pPD70108/70116-compatible o CMOS technology o Low-power standby mode o Single power supply, 5 V ±10% o Industrial temperature range, -40 to +85°C o 10-MHz operation 50012-2 (NECEL-302) pPD71071 NEe Pin Configurations (cont) Pin Identification Symbol Function 52-Pin Plastic Leaded Chip Carrier (PLCC) A23- AS/ Bidirectional address/data bus D15- DO IC . Internally connected; leave open Ar A4 Address bus output NC Not connected DMAAKO 46 IOWR A3- AO Bidirectional address bus DMAR03 45 lORD DMAR02 44 UBE Vnn Power supply DMAR01 43 AEN ASTB Address strobe output DMAROO 42 ASTB AEN Address enable output GND 41 Ao UBE Upper byte enable input/ output D15/A23 40 Voo D14/A22 39 A1 lORD I/O read input/ output D13/A21 38 A2 10WR I/O write input/output D12/A20 37 A3 MRD Memory read output D11/A19 36 A4 D10/A18 35 A5 MWR Memory write output NC 34 NC CS Chip select input ~ N ~ ~ ~ ~ ~ m ~ Q ~ N M N N N N N N N N N ~ ~ ~ ~ READY Ready input ~~~;!~~~::~..r:.(~ HlDAK Hold acknowledge input ~~~~~~ ~~~"O g~lj~8cr BSQQ HlDRO Hold request output 83-004260A ClK Clock input RESET Reset input Pin Functions ENDITC End DMAtransfer input/terminal count output ClK [Clock] DMAAK3- DMA acknowledge output ClK controls the internal operation and data transfer DMAAKO speed of the JlPD71 071. DMAR03- DMA request input DMAROO RESET [Reset] GND Ground RESET initializes the controller's internal registers and leaves the controller in the idle cycle (CPU controls the DMARQ3-DMARQO [DMA Request] bus). Active high. DMARQ3-DMARQO accept DMA service requests from peripheral devices. DMARQ3-:DMARQO respond re- END/TC [End/Terminal Count] spectively to DMA channels 3-0 and the polarities are This is a bidirectional pin. The END input is used to user programmable. DMARQ must remain asserted until terminate the current DMA transfer. TC indicates the DMAAK is asserted. designates!....£ycles of the DMA count transfer have finished. END/TC is open drain and requires an ext- GND [Ground] ernal pull-up resistor. Active low. GND connects to the power supply ground terminal. DMAAK3-DMAAKO [DMA Acknowledge] A23-AS/D1S-Do [Address/Data Bus] DMAAK3-DMAAKO indicates to peripheral devices that DMA service has been granted. DMAAK3-DMAAKO A23-AS/D1S-DO function as a 16-bit, multiplexed address/ respond respectively to DMA channels 3-0 and the data bus when the JlPD71 071 is in the 16-bit data mode. polarities are user programmable. In the 8-bit data mode, A23-A16 (pins 13-20) become address bits only and A1s-As/DrDo (pins 21-28) remain an 8-bit multiplexed address/data bus. A23-AS/D1S-Do are three-state. 2 NEe pPD71071 A7-A4, A3-AO [Address Bus] CS [Chip Select] ArA4, A3-AO function as the lower eight bits of the address During the idle cycle, CS selects the j1PD71071 as an bus. ArA4 output memory addresses during the DMA I/O device. Active low. cycle and become high impedance in the idle cycle. A3-AO function as the lowerfour bits of the address bus. READY [Ready] In the idle cycle, A3-AO become address inputs to select During a DMA operation, READY indicates that a data internal registers for the CPU to read or write. In the transfer for one cycle has been completed and may be DMA cycle, A3-AO output memory addresses. terminated. To meet the requirements of low-speed I/O devices or memory, READY may be negated to insert Voo [Power Supply] wait states to extend the bus cycle until READY is again VDD connects to the +S-V power supply. asserted. ASTB [Address Strobe] HLDAK [Hold Acknowledge] ASTS latches address A23-A8 (16-bit mode)/ A15-A8 (8- When active, HLDAK indicates that the CPU has bit mode) from the address/data bus into an external granted the j1PD71 071 the use of the system bus. Active address latch at the falling edge of ASTS during a DMA high. cycle. Active high. HLDRQ [Hold Request] AEN [Address Enable] HLDRQ outputs a bus hold request to the CPU. Active AEN enables the output of an external latch that holds high. DMA addresses. AEN becomes high during the DMA cycle. Block Diagram Description The j1PD71 071 has the following functional units. UBE [Upper Byte Enable] USE indicates the upper byte of the data bus is valid • Sus control unit during 16-bit mode. In the idle cycle during data • DMA control unit • Address registers transfer, the j1PD71 071 acknowledges data on 015-08 • Address incrementer/decrementer when USE is asserted. During a DMA cycle, USE goes low to signify the presence of valid data on 015-08. • Count registers USE has no meaning in 8-bit mode and becomes high • Count decrementer • Control registers impedance in the idle cycle and high level in the DMA cycle. Three-state, active low. Bus Control Unit lORD [1/0 Read] The bus control unit consists of the address and data buffers, and bus control logic. The bus control unit In the idle cycle, lORD inputs a read signal from the generates and receives signals that control addresses CPU. In the DMA cycle, lORD outputs a read signal to and data on the internal address and data buses. an I/O device. Three-state, active low. DMA Control Unit 10WR [1/0 Write] The DMA control unit contains the priority and timing In the idle cycle, 10WR inputs a write signal from the control logic. The priority control logic determines the CPU. In the DMA cycle, 10WR outputs a write signal to priority level of DMA requests and arbitrates the use of an I/O device. Three-state, active low. the bus in accordance with this priority level. The DMA control unit also provides internal timing and controls MRD [Memory Read] DMA operations. During the DMA cycle, MRD outputs a read signal to memory. MRD is high impedance during the idle cycle. Three-state, active low. MWR [Memory Write] During the DMA cycle, MWR outputs a write signal to memory. MWR is high impedance during the idle cycle. Three-state, active low. 3 pPD71071 NEe Block Diagram Bus Control Unit < ~ ·· Address Bus Buffer II ~ Internal Address Bus (24) Address Incrementerl Decrementer · (24) cs ~ Data Bus Buffer I Address D Control Registers ClK RESET Registers I Current (24x4) I I Channel (5) I READY Bus Control I Base (24x4) I I Device Control (10) I ASTB logic AEN -~} I Status (8) I UBE MRD,MWR A II A Internal Data Bus (16) "\ I Mode Control (7x4) I 1\ < vi I I ~y \j ~ Temporary (16) DMA Control Unit Count Registers I Base (16x4) I I Request (4) I DMARQ3 DMARQO l Priority I Current (16x4) I I Mask (4) I Control logic ~J DMAAK3 ( DMAAKO 't " HlDRQ Timing Control Terminal Count Count HlDAK logic Decrementer (16) END/TC 49·0005188 Address Registers generates a terminal count when the count register is decremented to FFFFH. Each of the four DMA channels has one 24-bit base address register and one 24-bit current address register. Note: The number of DMA transfer cycles is actually the value The base address register holds a value determined by of the current count register + 1. Therefore, when pro- gramming the count register, specify the number of DMA the CPU and transfers this value to the current address transfers minus one, register during autoinitialization (address and count are automatically initialized). The channel's current Count Decrementer address register is incremented/decremented foreach transfer and alwQyscontains the address of the data to The count decrementer decrements the contents of the be transferred next. current count register by one when each DMA transfer cycle ends. Address Incrementer/Decrementer Control Registers The address incrementer/decrementer updates the contents of the current address register whenever a The pPD7i 071 contains the following control registers. DMA transfer completes. • Channel Count Registers • Device • Status Each of the four DMA channels has one i6-bit base • Mode count register and one i6-bit current count register. • Temporary The base count register holds a value written by the • Request CPU and transfers the value to' the current count • Mask register during autoinitialization. A channel's current These registers control bus mode, pin active levels, count register is decremented for each transfer and DMA operation mode, mask bits, and other pPD71 071 operating functions. 4 NEe pPD71071 Absolute Maximum Ratings DC Characteristics TA = -40 to +85°C, Voo = 5 V ±10% Power supply voltage, Voo -0.5 to +7.0 V limits Input voltage, VI -0.5 to Voo + 0.3 V Test Parameter Symbol Min Typ Max Unit Conditions Output voltage, Vo -0.5 to Voo + 0.3 V Input high VIH 3.3 Voo+ V ClK input pin Operating temperature, TOPT -40 to +85°C voltage 0.3 Storage temperature, TSTG -65 to +150°C 2.2 Voo+ V Other inputs Comment: Exposing the device to stresses above those listed in 0.3 Absolute Maximum Ratings could cause permanent damage. The Input low VIL -0.5 0.8 V device is not meant to be operated under conditions outside the voltage limits described in the operational sections of this specification. Exposure to absolute maximum rating conditions for extended Output high VOH 0.7 Voo V IOH = -400 IJA periods may affect device reliability. voltage Output low VOL 0.4 V IOL = 2.5 mA; Capacitance voltage 4.5 mA (TC) TA = 25°C Input leakage III ±10 IJA oV~ VI ~ Voo Limits current Test Parameter Symbol Typ Max Unit Conditions Output leakage ILO ±10 IJA oV~Vo ~ Voo current Output Co 4 8 pF fc =1.0 MHz capacitance unmeasured Supply current 1001 15 30 mA pins returned (dynamic) Input CI 8 15 pF to 0 V Supply current 1002 10 IJA Inputs stable capacitance (stable) outputs open I/O capacitance CIO 10 18 pF Supply current 1002 10 IJA (static) DJ 5 pPD71071 NEe AC Characteristics TA = -40 to +85°C, Voo = 5 V ±10% Parameter Symbol Min Max Unit Test Conditions DMA Mode Clock cycle tCYK 100 ns Clock pulse width high tKKH 39 ns Clock pulse width low tKKL 49 ns Clock rise time tKR 10 ns 1.5 V -3.0V Clock fall time tKF 10 ns 3.0V -1.5V Input rise time tlR 20 ns Input fall time tlF 12 ns Output rise time tOR 20 ns Output fall time tOF 12 ns DMARQ setup time to ClK high tSOQ 20 ns S1, SO, S3, SW, S4w HlDRQ high delay from ClK low tOHQH 5 70 ns S1. S4w HlDRQ low delay from ClK low tOHQL 5 70 ns S1. SO, S4w HlDRQ low level period tHQHQL 2tCYK - 50 ns S4w HlDAK high setup time to ClK low tSHA 20 ns SO,S4,S4w AEN high delay from ClK low tOAEH 5 70 ns S1, S2 AEN low delay time from ClK low tOAEL 5 70 ns S1, S4w ASTB high delay time from ClK low tOSTH 5 70 ns S1 ASTB low delay time from ClK high tOSTL 70 ns S1 ASTB high level period tSTSTH tKKL -15 ns ADR/UBE/RD/WR active delay from tOA 5 80 ns S1, S2 ClK low (Note 1) ADR/UBE/RD/WR float time tFA 70 ns S1, S4w from ClK low ADR setup time to ASTB low tSAST tKKL - 40 ns ADR hold time to ASTB low tHSTA tKKH - 20 ns 6 NEe pPD71071 AC Characteristics (cont) Parameter Symbol Min Max Unit Test Conditions DMA Mode (cont) ADR/UBE off delay time from ClK low tOAF 70 ns S1, S2 RD low delay time from ADR float tOAR -10 ns Input data delay time from MRD low tOMRIO 2tCYK - 80 ns S12 Input data hold time from MRD high tHMRID ns S14 Output data delay time from ClK low toaD 10 80 ns S22 Output data hold time from ClK high tHaD 10 ns S24 Output data hold time from MWR high tHMWOO tKKL - 35 ns RD low delay time from ClK high tOKHR ns S2 compressed timing RD low level period tRRL 1 2tCYK - 30 ns Normal timing tRRL2 tCYK + tKKH - 30 ns Compressed timing RD high delay time from ClK low tORH 10 70 ns S4 ADR delay time from RD high tORA tCYK - 30 ns WR low delay time from ClK low tOWL1 5 50 ns S3 normal write WR low delay time from ClK low tOWL2 5 50 ns S2 extended write, normal timing WR low delay time from ClK high tOWL3 5 50 ns S2 extended write, compressed timing WR low level period tWWL1 tCYK - 30 ns Normal write tWWL2 2tCYK - 30 ns Extended write, normal timing tWWL3 tCYK + tKKH - 30 ns Extended write, compressed timing WR high delay from ClK low RD low delay time from ClK low RD, WR low delay from DMAAK active tOWH tOKLR 5 5 0 50 50 ns ns ns S4 S2 normal timing S1, S2 BI tOOARW RD high delay time from WR high tOWHRH 5 ns DMAAK delay time from ClK high tOKHOA 5 70 ns S11/0 memory timing DMAAK delay time from ClK low tOKLOA 10 90 ns S1 cascade mode DMAAK inactive delay time from tOOAl1 5 ns S4 ClK high 7 pPD71071 NEe AC Characteristics (cont) Parameter Symbol Min Max Unit Test Conditions DMA Mode (cont) DMAAK inactive delay time from tOOAI2 5 tKKl + 70 ns S4 cascade mode, HlDAK low HlDAK low in S4 tOOAI3 4tKKl + 70 ns S4 cascade mode, HlDAK low except in S4 DMAAK active level period tOAOA ns Cascade mode TC low delay time from ClK high tnTcl 5 70 ns S3 TC off delay time from ClK high tOTCF 30 ns S4 TC high delay time from ClK high tOTCH tKKH + tCYK -10 ns oto 2.2 V (Note 2) TC low level period tTCTCl tCYK -15 ns END low setup time to ClK high tSED 20 ns S2 END low level period tEoEOL 50 ns READY setup time to ClK high tSRY 20 ns S3, SW READY hold time from ClK high tHRY 10 ns S3, SW Programming Mode and RESET IOWR low level period tlWIWL 80 ns CS low setup time to IOWR high tSCSIW 80 ns CS hold time from IOWR high tHIWCS 0 ns ADR/UBE setup time to IOWR high tSAIW 80 ns ADR/UBE hold time from IOWR high tHIWA 0 ns Input data setup time to IOWR high tSlDlW 80 ns Input data hold time from IOWR high tHIWID 0 ns lORD low level period tlRIRl 120 ns ADR/CS setup time to lORD low tSAIR 20 ns ADR/CS hold time from lORD high tHIRA 0 ns Output data delay time from lORD low tDiROO 10 100 ns Output data float time from lORD high tFIROO 80 ns RESET high level period tRESET 2tCYK ns VOO setup time to RESET low tsvoo 500 ns IOWRIIORD wait time from RESET low tSYIWR 2tCYK ns RESET low to first read/write IOWRIIORD recovery time tRVIWR 160 ns Notes: (1) RD/WR refers to i'O'R5 or MRD and IOWR or MWR, respectively. (2) For END/TC, output load capacitance = 75 pF maximum. To meet the tDTCH parameter use a 2.2-kO pull-up resistor with a load capacitance of 75 pF. For other than END/TC, output load capacitance = 100 pF maximum. 8 NEe pPD71071 Ti m i ng Waveforms Input/Output Edge Timing Timing Measurement Points 2.4 V J 2 . 2 v___ T~st _____ 2.2 vC tnput 1ttiF r 0.4 V 0.8 V- - Pomts - - 0.8 V 83-003764A Output 1[t OF r 49·000786A Clock Timing elK 49·000784A 9 -.L o ::::: ... '1::: 0 3' ." ClK Ji.J~~jif\00~J\00~JN f\~r\~ 3: ;' D I"OQ~L CD 3 0 CD .... ~ 1= --- 0 d. - OMARQ :;t (Active High) 1-'''0' - {",o, QI ~ til C ... CD ..3 0 .... --- HlORQ -------- ... CD' HlOAK I--tSHA ~S' CQ -.. en n 0 tOAEH- - I - tOSTL ++---+----+--+--+--+--+---+-+-ol ,,1-..;..1 - I-- tOAEL - :::I AEN _ _ _ _ _ _--rV I ~--- ASTB '::l-A __________________~V I ~--~--~~~~~--~~~--------­ tSASTf--:..... tOA- I- ~ tHSTA Ir,.-- A23-As --------------------------------~ I~----+-----~~---+--+-~~----~-+--+--------------- (A1S-AS107-00 if 8·bit data base) I'- r--- - I-!OA - I-- tFA ~-~~--~--~-+--~ A7-AO (A23-A 16. A7-Ao if 8·bit data base) - c-t~AF V+--~----+_----+__+--~ iJiiE OMAAK (Active Low) ""'y ':1\ -r"QA + ' ' 'r \- - H'''' tOOARWI-"I- tOOARW- I - tORH ____________+-'1-----<-- ""'--u \ -".U-~----Ir-----_ tOAR-+\ I- - -tORH f-. tOKHR READ - I-tOKLR -tORA-:- tOWL1-! I-- H I-tOWH t OWH'RH f-. tOW~3 1 I--tOWHRH ~ - \l-tOWL~~-+jr- tOWL:~ - ~ tOWH 1["________ WRiTE 1"---- .... tWWL1 tWWL1 I-tWWL2 -twWL3 Normal Timing Compressed Timing 83-0037S1C ~ NEe pPD71071 Timing Waveforms (conI) Memory-to-Memory Transfer Timing elK AEN ASTB ADRJDB - - - - . . . . . ( ] IFA ~~~----.....(] __ ~ ~+- _______ ~+-_-J MRi5-------'" eW~L1 IOWL2 fi 1 - IOWH MWR-----J/~-------------------~\~-_-_-_~_~~ 'H.WO:__________ IWWL2 83-003752C Ready Timing READY 83-0037538 11 pPD71071 NEe Timing Waveforms (cont) Programming Mode and RESET Timing VDD I ---' tSCSIW tSVDD tlWIWl RESET I tRESET tSYIWR tSAIW 1--""'::':'';:'';':'''--11-+1 tHIWA iOWA or iORi5 \ ADR/UBE tRVIWR tSIDW DB CS IOWR ADR lORD DB----------------~ 83-0037546 ENDITC Timing ClK TC --------------------------~----------~ SED -lt ~----~·\~'Sih~7~·~-------------------------- 83-0037558 1? NEe pPD71071 Timing Waveforms (cont) Bus Wait Timing ClK HlDAK t-----tHQHOL---+j HlDRQ tOAEL AEN DB/ADR - - - - - - - - - - - - - - - - - - " " ' " RD/WR - - - - - - - - - - - - - - - - - - - " 83-003756B Cascade Timing so S1 S2 S3 S4 S4 S4 SI ClK DMARQ------~----------------------~----~~ (Active High) tDHOL HlDRQ HlDAK tDKLDA tODAI2 1_------tDDAI3------+! DMAAK (Active High) _ _ _ _ _.1 ~-----------tDADA----------~ 83-003757B J,iPD71 071 NEe Functional Description Table 1 shows the relationship of the data bus width, Ao, UBE, and the internal registers. DMA Operation The pPD71071 functions in three cycles: idle, DMA, Table 1. Data Bus Width and standby. In an idle or standby cycle, the CPU uses Bus Width AO UBE Internal Read/Write Registers the bus, while in a DMA cycle, the pPD71071 uses it. 8 bits x X D7-DO - - 8-bit internal register Idle Cycle. In an idle cycle, there are no DMA cycles 16 bits 1 D7-DO - - 8-bit internal register active, but there may be one or more active DMA --------.------------- requests; however, the CPU has not released the bus. o --_._.--------------------------------------_ D1S-Ds - - 8-bit internal register .. -_ .. _-------._------._. The pPD71 071 will sample the four DMARQ input pins D1S-Do +---'>- 16-bit internal register at every clock. If one or more inputs are active, the corresponding DMA request bits (RQ) are set in the Figure 1. DMA Operation Flow status register and the pPD71071 sends a bus hold request to the CPU. The pPD71071 continues to sample DMA requests until it obtains the bus. After the CPU returns a HLDAK signal and the pPD71071 obtains the bus, the pPD71 071 stops DMA sampling and selects the DMA channel with the highest priority from the valid DMA request signals. Program- ming of the pPD71 071 is done when the pPD71 071 is in the idle cycle or the standby mode. DMA Cycle. In a DMA cycle, thepPD71071 controls the Idle Cycle bus and performs DMA transfer operations based on programmed information. Figure 1 outlines the sequen- tialflow of a DMA operation. • •••• (3) Standby Mode. The pPD71071 can also be used in standby mode. It is in standby mode and consumes the static supply current (IDD2) when the clock is turned off and no I/O read or write operations are being per- formed. All internal registers will retain their contents. • •••• (4) ThepPD71071 can be programmed (using IOWR) and read (using lORD) with the clock off. The pPD71071 only uses the clock for the DMA data transfer cycles. The clock may be turned off without altering the ••••• (5) DMA Cycle internal registers when the pPD71071 is in the idle cycle. If the clock is turned off during a DMA transfer, the pPD71071 will not operate correctly. When the clock is off, the DMARQ inputs will not be recognized. • •••• (6) The DMARQ inputs could be externally logically ORed and cause an interrupt to the CPU. The CPU could then turn on the clock, thus activating the pPD71 071. If the previously programmed mode of operation is still valid, the pPD71 071 does not have to be reprogrammed. ••••• (7) } Idle Cycle ~----r---"'" Data Bus Width 49-0005208 I n order to allow an easy interface with an 8- or 16-bit CPU, the data bus width of the pPD71071 is user programmable for 8 or 16 bits. A 16-bit data bus allows 16-bit memory-to-memory DMA transfers and also provides a one-I/O bus cycle access to the 16-bit internal registers. NEe pPD71071 Terminal Count For memory-to-memory byte transfer in 16-bit data bus mode, a read data from upper data bus is to be The JlPD71 071 ends DMA service when it generates a written to upper data bus, while a read data from lower terminal count (TC) or when the END input becomes data bus is to be written to lower data bus. Therefore, active. A terminal count is produced when a borrow is start addresses for source and destination must be the generated by the current count register and a low-level even-even or odd-odd. For word transfer, only even- pulse is output to the TC pin. Figure 2 shows that the even addresses are to be set forsource and destination. current count register is tested after each DMA (See Byte/Word Transfer paragraphs below.) When operation. DMARQO (channel 0) becomes active, the transfer is If autoinitialize is not set when DMA service ends, the initiated. mask register bit applicable to the channel where During memory-to-memory bus cycles in the 16-bit service ended is set, and the DMARQ input of that mode, data read from the DMAC's upper (lower) data channel is masked. bus is written to the upper (lower) data bus of the destination device. Thus, for word transfers, only even DMA Transfer Type source and destination addresses should be used. The type of transfer the JlPD71 071 performs depends The DMA request input pin or a software DMA request on the following conditions. to channel 0 may initiate memory-to-memory transfers. • Memory-to-memory transfer enable The JlPD71 071 performs the following operations until • Direction of memory-to-I/O transfer (each channel) a channel 1 terminal count or END input is present: • Transfer mode (each channel) • During the first bus cycle, the memory data pointed • Bus mode to by the current address register of channel 0 is read into the temporary register of the JlPD71071 Memory-to-Memory Transfer Enable. The JlPD71071 and the address and count of channel 0 are updated. can perform memory-to-I/O transfers (one transfer cycle in one bus cycle) and memory-to-memory trans- • During the second bus cycle, the temporary register fers (one transfer in two bus cycles). To select data is written to the memory location shown by the memory-to-memory transfer, set bit 0 of the device current address register of channel 1, and the control register to 1. The DMA channels used in address and count of channel 1 are updated. memory-to-memory transfers are fixed, with chan nel 0 Note: If DMARQ1 (channel 1) becomes active, the t.tPD71 071 as the source channel and channel 1 as the destination will perform memory-to-I/O transfer even though memory-to- channel. Channels 2 and 3 cannot be used in memory- memory transfer is selected. Since this may cause erroneous to-memory transfers. The contents of the count memory-to-memory transfers; mask out channel 1 (DMARQ1) registers and word/byte transfer modes of channels 0 by setting bit 1 of the mask register to 1 before starting memory-to-memory transfers. and 1 should be the same when performing memory- to-memory transfer. During memory-to-memory transfers, the addresses on the source side (channel 0) can be fixed by setting Figure 2. Generation of Terminal Count (TC) bit 1 of the device control register to 1. I n this manner, a Figure 3. Memory-to-Memory Transfer in 16-Bit Data Bus Mode 83-003758A 15 pPD71071 NEe range of memory can be initialized with the same value Figure 4 shows that in bus release mode, only one since the contents of the source address never change. channel can receive service after obtaining the bus. During memory-to-memory transfer, the DMAAK signal When DMA service ends (end of transfer conditions and channel O's terminal count (TC) pulse are not depend on thetransfer mode), the channel returns the output. (See figure 3.) bus to the CPU (regardless of the state of other DMA requests) and the pPD71071 enters the idle cycle. Direction of Memory-to-I/O Transfers. All DMA trans- When thepPD71071 regains use of the bus, a new DMA fers use memory as a reference pOint. Therefore, a operation begins. DMA read reads a memory location and writes to an 1/0 port. A DMA write reads an 1/0 port and writes the data Figure 4. Bus Modes to a memory location. In memory-to-I/O transfer, use Bus Release Mode the mode control register to set one of the transfer Right to Use directions in table 2 for each channel and activate the Bus CPU - - - , n n n r-- appropriate control signals. Service fLPD71071 W W W W Channel CHO CH1 CH2 CH3 Table 2. Transfer Direction Bus Hold Mode Transfer Direction Activated Signals Right to Use Bus Memory - lID (DMA read) 10WR, MRD Service Channel ~ CHO: CH I :CH2; CH3 110 - memory (DMA write) lORD, MWR 49·000522A Verify (Outputs addresses only. Does not perform a transfer.) In bus hold mode, several channels can receive service without releasing the bus after obtaining it. If there is another valid DMA request when a channel's DMA Transfer Modes. In memory-to-I/O transfer, the mode service is finished, the new DMA service can begin control register selects the single, demand, or block after the previous service without returning the bus to mode of DMA transfer for each channel. The conditions the CPU. End of transfer conditions depend on the for the termination of each transfer characterize each transfer mode. A channel cannot terminate (end count) transfer mode. Memory-to-memory transfers have no atransfer mode and immediately start on its next set of relationship to single, demand, or block mode. Memory-to- transfers. There must be anotherDMA channel service memory transfers are a separate and distinct type of interleaved or the pPD71 071 will put in an idle cycle. transfer'mode. Table 3 shows the various transfer The following shows an example of the possible se- modes and termination conditions. quences for Channel 2. Table 3. Transfer Termination CHAN2 - CHANn (n = 0,1,3) - CHAN2 Transfer Mode End of Transfer Conditions or, CHAN2 - idle - CHAN2 Single After each bytelword Demand END input The operation of single, demand, and block mode Generation of terminal count transfers depends on whether the pPD71 071 is in bus When DMA request of the channel in service release or bus hold mode. In bus release mode, only becomes inactive one type of bus mode (single, demand, or block) is When DMA request of a channel in higher priority used each time the pPD71071 has the bus. In bus hold becomes active (bus hold mode) mode, multiple types of transfers are possible. Channel Block END input o might operate in the demand mode, and channel 1, Generation of terminal count which could get the bus immediately after channel 0, Memory-to- END input could operate in block mode. memory Generation of terminal count Single Mode Transfer Bus Modes. The device control register selects either In bus release mode, when a channel completes the the bus release or bus hold mode. The bus mode transfer of a single byte or word, the pPD71 071 enters determines when thepPD71 071 returns the system bus the idle cycle regardless of the state of the DMA to the CPU. The pPD71071 can be in either the release request inputs. In this manner, other devices will be or hold modes for the single, demand, or block mode able to access the bus on alternate bus cycles. transfers. Therefore, there are six possible mode combinations. 16 NEe pPD71071 In bus hold mode, when a channel completes the Table 4. Address and Count Registers . transfer of a single byte or word, the jJPD71071 Register Byte Transfer Word Transfer terminates the channel's service even if it is still asserting a DMA request signal. The jJPD71071 will Address ±1 ±2 then service the highest priority channel requesting Count -1 -1 the bus. If there are no requests from any other channel, thejJPD71 071 releases the bus and enters the During word transfers, two bytes starting at an even idle cycle. address are handled as one word. If word transfer is selected and the initial value of the set address is odd, Demand Mode Transfer thejJPD71071 will always decrement that address by 1, thus making the address even for the data transfer. For In bus release mode, the currently active channel this reason, it is best to select even addresses when continues its data transfer as long as the DMA request transferring words, to avoid destroying data. Ao and of that channel is active, even though other DMA USE control byte and word transfers. channels are issuing higher priority requests. When the DMA request of the serviced channel becomes Table 5 shows the relationship between the data bus inactive, the jJPD71 071 releases the bus and enters the width, Ao and USE signals, and data bus status. idle state, even if the DMA request lines of other channels are active. Table 5. Data Bus Status In bus hold mode, when the active channel completes Data Bus Width Ao UBE Data Bus Status a single transfer, the jJPD71071 checks DMA request 8 bits X 1 (1) D7-DO valid byte lines (other request lines when END or TC, all request 16 bits 0 D7-DO valid byte lines including the last serviced channel when there is ------ ------------- 1 D15-Da valid byte no END or TC). If there are active requests, the ---- - jJPD71071 starts servicing the highest priority channel 0 D15-DO valid word requesting service. Ifthere is no request, the jJPD71 071 Note: releases the bus and enters the idle state. (1) Always 1 for an 8-bit bus. Block Mode Transfer Compressed Timing In bus release mode, the current channel continues In transfers between I/O and memory, a DMA transfer data transfer until a terminal count or the external END cycle is normally executed in four clocks. However, signal becomes active. During this time, the jJPD71 071 when the device control register selects compressed ignores all other DMA requests. After completion of timing, one DMA cycle can be executed in a three-clock the block transfer, the jJPD71 071 releases the bus and bus cycle. Compressed timing may be used in the enters the idle cycle even if DMA requests from other release or hold modes when doing block transfers channels are active. between I/O and memory. In the demand mode, only In bus hold mode, the current channel transfers data use compressed timing in the bus release mode. until a terminal count or the external END signal Compressed timing mode increases data transfer rates becomes active. When the service is complete, the by 33%. jJPD71071 checks all DMA requests without releasing The jJPD71071 is able to omit one clock period during the bus. If there is an active request, the jJPD71 071 compressed timing by not updating the upper 16 bits immediately begins servicing the request. The of the latched address. In block mode and demand bus jJPD71071 releases the bus after it honors all DMA release mode, addresses are output sequentially and requests or a higher priority bus master requests the the upper 16 bits of addresses latched in external bus. latches need not be updated except after a carry or Figure 5 shows the operation flow for the six possible borrow from A7 to A8. For this reason, during compres- transfer and bus mode operations in DMA transfer. sed timing, the 81 state (output of upper 16 bits of an address for external latching) is omitted in the bus Byte/Word Transfer cycles except during the first bus cycle when the upper 16 bits of an address are changed. Figure 6 shows one If the initialize command selects a 16-bit data bus word waveforms for normal and compressed timing. width, the mode control register can specify DMA transfer in byte or word units for each channel. Table 4 shows the update of the address and count registers during byte/word transfer. 17 J,lPD71,071 NEe Figure 5. Transf~r and Bus Modes Operations Bus Mode Bus Release Bus Hold Transfer Mode Single Demand Block 18 NEe pPD71071 Figure 6. Normal and Compressed Timing Waveforms Autoinitialize When the mode control register is set to autoinitialize a Normal TIming 51 52 5354 51 52 53 54 51 52 53 54 51 52 h h It- h channel, the IlPD71071 automatically initializes the A5TB - ..... - r- r- ~ f- '"'""" I-- r- ~ I-- address and count registers when END is input or a DB (Upper 16 bits of Address) - )--r- ~ r- ~ "'- Ir- I'- f- Ir- I'- ~ - r- ~ ~ ~ I-- terminal count is generated. The contents of the base address and base count registers are transferred to the A7- A O - current address and current count registers, respect- ively. The applicable bit of the mask register is Compressed TIming 51 52 5354 5253 54 52 53 54 5253 54 52 unaffected. The applicable bit of the mask register is h set for channels not programmed for autoinitialize. A5TB - DB (Upper 16 bits of Address) - 1'-11 Ir-I\ The autoinitialize function is useful for the following types of transfers. A7- A O - Repetitive Input/Output· of Memory Area. Figure 7 shows an example of DMA transfer between a CRT 49·000524A controller and memory. After setting the value in the base and current registers, autoinitialize allows re- Software DMA Requests petitive DMA transfer between the CRT controller and The IlPD71071 can accept software DMA requests in the video memory area without CPU involvement. addition to DMA requests from the four DMARQ pins. Continuous Transfer of Several Memory Areas. The Setting the appropriate bit in the request register CPU can indirectly write to the address or count generates a software DMA request. The mask register registers by writing to the base registers. New values does not mask software DMA requests. Software DMA can be written to the base registers. In the autoinitialize requests operate differently depending on which bus mode, the value in the base register will be transferred or transfer mode is used. to the address/count registers when termination is Bus Mode. When bus release mode is set, the highest reached in the address/count registers. Because of ~ priority channel among software DMA requests and this, the autoinitialize function can perform continuous ~ OMARQ pins is serviced, and all bits of the request transfer of several contiguous or noncontiguous mem- register are cleared when the service is over. Therefore, ory areas during single or demand bus release modes there is a chance that other software DMA requests will in the following manner. be cancelled. During the transfer of data in area 1 (the first area being When bus hold mode is set, only the corresponding bit transferred), the CPU can write address and count of the request register is cleared after a DMA service is information about area 2 (the second area to be over. Therefore, all software DMA requests will be transferred). Generation of a terminal count for area 1 serviced in the sequence of their priority level. results in the transfer of information of area 2 to the address and count registers. This will cause area 2 to Software OMA requests for cascade channels (see be transferred. Figure 8 illustrates this procedure. Cascade Connection) must be performed in bus hold mode. When a cascade channel is serviced, the master Channel Priority IlPD71071 operational mode is changed to bus release mode temporarily and all bits of the request register Each of the IlPD71 071 's four channels has its own are cleared when the cascade channel service is over. priority. When there are DMA requests from several To avoid this, it is necessary to mask any cascade channels simultaneously, the channel with the highest channels before issuing a software DMA request. After priority will be serviced. The device control register confirming that all DMA software services are complete selects one of two channel priority methods: fixed and and all bits of the request register are cleared, the rotational priority. In fixed priority, the priority (starting cascade channel masks can be cleared. with the highest) is channel 0, 1,2, and 3, respectively. I n rotational priority, priority order is rotated so that Transfer Mode. When single or demand mode is set, the channel that has just been given service receives the applicable request bits are cleared and software the lowest priority and the next highest channel OMA service ends with the transfer of one byte/word. number is given the highest priority. This method When block mode or memory-to-memory modes are prevents exclusive servicing of some channel(s). set, service continues until END is input or a terminal Figure 9 shows the two priority order methods. count is generated. Applicable request bits are cleared when service ends. 1Q JlPD71071 NEe Figure 7. Autoinitialize Application 1 Memory CRT :~~~::SS_{~"~~77TrTr.r.n~77~IIL--------------------~\ CRTC Base Count flP071 071 Set Values OMA r-----~ OMAAK Controller .----1 OMARQ flP071 071 49-0005258 Figure 8. Autoinitialize Application 2 1/0 Memory CPU I Write Area 1 Information I Base Current Registers Areal Transfer Auto- initialize Write Area 2 Information in Generated Base Register • Area 2 Transfer I 49-0005268 Figure 9. Priority Order Highest Rotational Priority Highest Fixed Priority Highest CHl Service £ u Lowest _ 49-0005278 NEe pPD71071 Cascade Connection Bus Wait Operation The pPD71 071 can be cascaded to expand the system In systems using a pPD70208/70216 (V40/V50) as the DMA channel capacity. To connect a pPD71071 for CPU, the refresh control unit in the CPU changes the cascading (figure 10), perform the following operations. HLDAK signal to inactive (even during a DMA cycle) and uses the bus. Here, the pPD71 071 automatically (1) Connect pins HLDRQ and HLDAK of the second- performs a bus wait operation. This system has a bus stage (slave) pPD71071 to pins OMARQ and DMAAK master (V40/V50) whose priority level is higher than of any chan nel of the fi rst-stage (master) that of the pPD71071. pPD71071. The pPD71 071 executes the bus wait operation when (2) To select the cascade mode of a particular channel the HLDAK signal becomes inactive in an operating of a master pPD71 071, set bits 7 and 6 of that mode where transfer is executed continuously in block channel's mode control register to 11. mode, during demand bus release mode, or during When a channel is set to the cascade mode in a master memory-to-memory transfer. pPD71071, DMARQ, DMAAK, HLDRQ, HLDAK, and When HLDAK becomes inactive during service in other RESET are the only valid signals in the master operating modes, the operation returns to the idle pPD71 071. The other signals are disabled. The master cycle and transfers control of the bus to the higher bus cascade channel only intermediates hold request/hold master. acknowledge between the slave and CPU. Figure 11 shows that when the HLDAK signal becomes The master pPD71071 always operates in the bus inactive during a continuous transfer, the pPD71 071 is release mode when a cascade channel is in service set up in an S4w state (bus wait). Operation moves to (even when the bus hold mode is set). Other DMA the idle cycle if DMARQ is inactive in the demand requests are ignored while a cascade channel is in mode. The HLDRQ signal is made inactive for a period service. When the slave pPD71071 ends DMA service of about two clocks and the bus is released. The S4w and moves into an idle cycle, the master also moves to state is repeated until the HLDAK signal again becomes an idle cycle and releases the bus. At this time, all bits active and the interrupted service is immediately _ _ of the master's request register are cleared. The master restarted. ~ operates its non-cascaded channels normally. Figure 10. Cascade Connection Example _DMA1 - HLDAK HLDAK DMA2 HLDRQ HLDRQ _DMA3 Cascaded (,"AAX HLDAK - DMA4 - Channel DMARQ ~ HLDRQ DMA5 CPU fJ.PD71071 (Master) -- DMA6 DMA7 fJ.PD71 071 (Slave) 49·0005288 21 pPD71071 NEe Figure 11. Bus Wait Operation Bus Master flP071 071 . I Higher Priority Bus Master ",P071071 CPU CPU OMARQ --1 HLOAK --1 \""'__-11 HLORQ 49·QO0529A Programming the pPD71071 Initialize To prepare a channel for DMA transfer, you must select Use the initialize command as a software initialize to the following characteristics. the pPD71 071 or to set the width of the data bus. When usi ng a 16-bit CPU, set the data bus width to 16 bits • Starting address for the transfer first. Figure 12 shows the initialize command format. • Number of byte/word transfers • DMA operating modes Bit O. When the RES bit is set, the internal state of the • Data bus widths pPD71071 is initialized and will be the same as when a • Active levels of the DMARQ and DMAAK signals hardware reset is used (except for data bus width selection). A software reset leaves bit 168 intact When reading from or writing to a pPD71 071 internal whereas a hardware reset selects the 8-bit data bus. register, address lines A3-AO select the register: lORD After initialization, the registers are as in table 8 and the or IOWR select the data transfer direction, and CS RES bit is cleared automatically. enables the transfer. Table 6 shows the register and command configurations. Table 8. Register Initialization Table 6. Register Configuration Register Initialization Operation Register Bit size Initialize Clears bit 0 only Channel 5 Address No change Base address 24 (4) Count No change Current address 24 (4) Channel Selects channel 0, current and base Base count 16 (4) Mode control Clears all bits Current count 16 (4) Device control Clears all bits Mode control 7 (4) Status Clears bits 3-0 only Device control 10 Request Clears all bits Status 8 Mask Sets all bits (masks all channels) Request 4 Temporary Clears all bits Mask 4 Temporary Bit 1. The 168 bit determines the data bus width. When 16 using the pPD71071 in a 16-bit system, set this bit Note: immediately after a hardware reset since a hardware When using a 16-bit CPU and selecting a 16-bit data bus, the word reset always initializes it to the 8-bit data bus mode. IN/OUT instruction can be used to read/write information two bytes at a time. However, commands in table 7 suffixed with 8 must be issued with the byte IN/OUT instruction. 22 NEe pPD71071 Table 7. Command Configuration Format LSB Address R/W Command Name MSB OH W(B) Initialize - I - - - I - I - I 16B I RES I R(B) Channel Register Read - I - - BASE SEL3 SEL2 SEL11 SELO I 1H Channel Register SE~CH W(B) Write - - - - - BAS I 2H R/W Count Register Read/Write C7 C6 C5 C4 C3 C2 C1 I CO I 3H R/W C15 C14 C13 I C12 C11 C10 C9 I C8 I 4H R/W I A7 A6 A5 A4 A3 A2 A1 I AO I 5H R/W Address Register Read/Write I A15 A14 A13 A12 A11 A10 I A9 I A8 I 6H R/W(B) I A23 A22 A21 A20 A19 A18 I A171 A16 I 8H R/W Device Control I AKL RQL EXW ROT CMP I DDMAI AHLD I MTM I Reg. Read/Write 9H R/W I - - - - - I - I WEV IBHLD I Mode Control OAH R/W(B) Reg. Read/Write I TMODE ADIR I AUTI I TDIR I - I WID I OBH R(B) Status Register Read I RQ3 RQ2 RQ1 I RQO I Te3 I TC2 I TC1 I TCO I OCH R Temporary Reg. (lower) Read I T7 T6 T5 I T4 I T3 I T2 I T1 I TO I ODH R Temporary Reg. (higher) Read I T15 T14 T13 I ml T11 I T10 I T9 I T8 I OEH R/W(B) Request Reg. Read/Write I - - - I - I SRQ31 SRQ21 SRQ1 I SRQO I OFH R/W(B) Mask Reg. Read/Write I - - - I - I M3 I M2 I M1 I MO I 49-tlOO603B Figure 12. Initialize Command Format OH I - I -I - 1 - 1 - 1 - 1 16B LRES OUT (Byte only) L Software Reset 0 1 No operation Reset 0 8-bit data bus '--------- 16-bil data bus 1 16-bit data bus 49-000604B Channel Register Base = 1. Only the base registers may be read or written to. This command reads and writes the channel register that selects one offour DMA channels for programming Channel Register Write the address, count, and mode control registers. Figure 13 shows the channel reg ister read/write format. SELCH. This bit selects the channel to be programmed. BASE. Base = O. The current register may be read. Channel Register Read During a write, the base and current registers will be SEL3-SELO. These mutually exclusive bits show which written to simultaneously. of the four channels is currently selected for Base = 1. Only the base registers may be read or programming. written to. BASE. Base = O. The current register may be read. During a write, the base and current registers will be written to simultaneously. 23 pPD71071 NEe Figure 13. Channel Register Format Channel Register Read 1H I - J- I - I BASE I SEL3 I SEL.2 I SEL1 I SELO f IN [Byte only] 0001 Channel 0 I Selected Channel 0010 0100 Channel 1 Channel 2 1000 Channel 3 0 Select Current (read), select both Base and Base Only Current (write) 1 Select Base (read/write) Channel Register Write 1H I -1 - I - I - 1 - IBASEI SELCH OUT (Byte only) 'L. Selected Channel' 00 01 10 11 Channel 0 Channel 1 Channel 2 Channel 3 Select Current (read), 0 select both Base and Base Only Current (write) 1 Select Base (read/write) 49·0006058 Count Register Read/Write The base register holds the starting address value until a new setting is made and this value is transferred to When the 16-bit bus mode is selected, the IN/OUT the current address register during autoinitialization. instruction can directly transfer 16-bit data. The For each DMAtransfer, the durrent address register is channel register selects one of the count registers. updated ±2 during word transfer and ±1 during byte When bit 2 of the channel register write is cleared, a transfer. Figure 15 shows the address register read/ write to the count register updates both the base and write format. current count registers with the new data. If bit 2 of the channel register write is set, a write to the count Device Control Register Read/Write register only affects the base count register. The device control command reads from and writes to The base count registers hold the initial count value the device control register. When using a 16-bit data until a new count is specified. If autoinitialize is bus, use the word IN/OUT instruction to read and write enabled, this value is transferred to the current count 16-bit data. Figure 16 shows the device control register register when an END or TCis generated. For each read/write format. DMA transfer, the current count register Is decre- mented by one. Figure 14 shows the count register read/write format. Address Register Read/Write When a 16-bit data bus width is selected, the IN/OUT instruction can directly transfer the lower two bytes (4H and 5H) of the register. You m;ust use the byte IN/OUT instruction with the upper byte (6H) of the register. The channel register selects one of the address registers. When bit2 of·thechannel register is cleared, a write to the address register updates both the base and current add ress reg isters with the new data. If bit 2 of the channel register is set, a write to the address register only affects the base address register. 24 NEe pPD71071 Figure 14. Count Register Read/Write Format Figure 15. Address Register Read/Write Format 2H I C7 C6 Cs C4 C3 C2 Cl Co Iiniout 4H I A7 A6 As A4 A3 A2 Al Ao Iiniout 3H I CIS C14 C13 C12 Cll Cl0 Cg Cs Iiniout 5H I AIS A14 A13 A12 All Al0 Ag As Iiniout 83-001951A 6H I A23 A22 A21 A20 A19 AIS A17 A16 I ;~y~eU~nIYJ 83-001952A Figure 16. Device Control Register Read/Write Format BH I AKL I RQL I EXW I ROT I CMP IDDMAI AHLD I MTM IN/OUT L Memory-to- Memory O 1 Disable Enable Fixed 0 Disable for CHO '------ Address [IJ Enable for CHO 1 Enable ( Disable DMA 0 Operation [2J 1 Disable Compressed 0 Normal Timing [3J 1 Compressed Rotational 0 Fixed Priority 1 Rotational Extended 0 Normal Writing [4J 1 Extended DMARQ 0 Active High Active Level 1 Active Low DMAAK 0 Active Low Active Level 1 Active High 9H 1-1-1-1-1-1 - I WEVlBHLDJ IN/OUT L Bus Mode 0 1 Bus Release Bus Hold 0 Disable ' - - - - - Wait Enable During 1 Enable Verify [5] Note: [IJ This bit Is only used when MTM = I, [memory-to-memory translersJ_ [2J Disables HLDRQ to thl! CPU to prevent Incorrect DMA operation while the pPD71071's registers are being Initialized or modified. [3] When I, causes the pPD71071 to use compressed timing In the demand bus release mode or In the block mode. [4] When EXW Is O,the write signal becomes active [normal wrlteJ during S3 and SW. When l,the write signal becomes active during S2, S3, and SW. See figures 27-29. [5J This bit enables or disables the walt state generated by the READY Signal during a verify transler. 49-000606C pPD71071 NEe Mode Control Register Read/Write Mask Register Read/Write This command reads from and writes to the mode This command reads from and writes to the mask control register to specify the operating mode for each register to mask or unmask external DMA requests for channel. The channel register selects the mode control the corresponding four DMA channels (DMARQ3- register to be programmed. This command must be DMARQO). This command may be issued by the byte issued by the byte IN/OUT instruction. Figure 17 IN/OUT instruction. Figure 21 shows the mask register shows the mode control register read/write format. read/write format. Status Register Read DMA Transfer Modes This command reads the status register for the in- Figures 22-27 show state transition diagrams for the dividual DMA channels. The register has DMA request different modes of DMA transfer. states and terminal count or END information. This Figure 23 shows the state of a master pPD71071 when command must be issued by the byte IN instruction. an input from a slave pPD71071 (cascaded pPD71 071) Figure 18 shows the status register read format. is using the system bus. Temporary Register Read Transfer Timing When a 16-bit data bus is selected, the IN instruction Figures 28-30 show pPD71071 timing waveforms. will read 16-bit data with this command. The last data transferred in memory-to-memory transfer is stored in Examples of System Configuration the temporary register. Figure 19 shows the temporary register read format. Figures 31-32 show system configuration examples using the 8- bitpPD701 08 CPU and the 16-bitpPD70116 Request Register Read/Write CPU. ThepPD71082 externally latches addresses and data. This command reads from and writes to the request register to generate DMA requests by software for the four corresponding DMA channels. This command may be issued by the byte IN/OUT instruction. Figure 20 shows the reguest register read/write format. Figure 17. Mode Control Register Read/Write Format OAH I TMODE I ADIA I AUTI I TDIA I - I W/B L~ L Word/byte Transfer [1] 0 1 Byte Word 00 Verify Transfer 01 I/O-to·memory Direction [2] 10 Memory.to-I/O 11 Not allowed Auto- 0 Disable Initialize [3] 1 Enable Address 0 Increment Direction [4] 1 Decrement 00 Demand Transfer 01 Single Mode [5] 10 Block 11 Cascade Note: [1] This bit selects byte or word transfer for DMA transfers. This bit Is used only In 16·blt data bus mode. [2] These bits select the DMA transfer direction between memory and I/O. These bits are meaningless during memory-to-memory transfer. [3] Channel 0 and 1 must have the same AUT I bit value when performing memory-to-memory transfer. [4] This bit decides the update direction of the Current Address Register. When ADIA Is 0, the register Increments by 1 for a byte transfer and by 2 for a word transfer. When ADIR Is 1, the register decrements by 1 for a byte transfer and by 2 for a word transfer. [5] These bits select the transfer mode during DMA transfer between memory and I/O and are meaningless during memory-to-memory transfer. 49-0006088 26 NEe pPD71071 Figure 18. Status Register Read Format OBH I R03 I R02 ROl I ROo I TC3 I TC2 I TCl I TCO IN (Byte only) I Terminal Count 0 1 Not ended (for each read) END or terminal count 0 No OMA request active OMA Request 1 External OMA [1] request present Note: [1) Bits R03-ROO will be set if an external hardware OMA request is pending even if its request bit is masked. Software·generated OMA requests, hardware reset, and software reset will not affect these bits. 49·000607B Figure 19. Temporary Register Read Format OCH I T7 T6 Ts T4 T3 T2 Tl To lin OOH I T1S T14 T13 T12 Tl1 Tl0 Tg Ta lin 83-001953A Figure 20. Request Register Read/Write Format Note: [1] In memory-to-memory applications, only bit SROO will be cleared at terminal count or when an EN 0 input is present. 83-0018878 Figure 21. Mask Register Read/Write Format 6 3 2 1 0 OFH I - I - I - I - I M3 I M2 I Ml L MO I IN/OUT (Byte only) 11.--__-11 OMARO I 0 1 Not masked J I Mask [1] I 1 I Masked J Note: [1] In memory-to-memory applications, only bits MO and Ml will be set at lerminal count or when an EN 0 input is present. 49-0006098 ')7 pPD71071 NEe Figure 22. Idle Cycle SI: DMA request idle c.ycle SO: HLDAK walt state Sl: Address latch state S2: Read signal output state S3: Write signal output state S4: Read/Write signal recovery state SW: READY walt state S4w: Bus walt state 1 : Memory-I/O Transfer 2: Memory-ta-Memory Transfer 3 : OMARa and HLDAK Inputs present N 49·0005318 28 NEe pPD71071 Figure 23. DMA Cycle, Cascade Mode Figure 24. DMA Cycle, Single Mode 49-000532A 49-000533C ')0 pPD71071 NEe Figure 25. DMA Cycle,Demand Mode SI Note: [1J Carry or borrow to upper two bytes of address? 49-000534C NEe pPD71071 Figure 26. DMA Cycle, Block Mode N N N Nole: [1J Carry or borrow 10 upper Iwo byles of address? 49-000535C pPD71071 ttlEC Figure 27. DMA Cycle, Memory-fo-Memory Transfer 511-514: Channel 0 Operation 521-524: Channel 1 Operation y o ~o 83-001674C NEe ,pPD71071 Figure 28. Memory-IIO Transfer, Normal Timing 51 51 50 50 51 52 53 54 51 52 53 54 51 51 elK J1lJl JlJl Jl Jl ~ Jl JlLn ~ JlL1l IrF OMARQ \ HlORQ - W L I--- HlOAK I AEN '\ A5TB 1\ n r-\ r-~ L-J IL.....-J A7-AO OC OC OMAAK I LW \ r-\ II \ 1,--' LV ~ V--' , [2J \ [2J '--- '--- L --l.. L f-..j 'Hmlnput 'T<::output Note: [IJ When an B-bit data bus is selected, OW08 are not used. Therefore, A23-A16 are not multiplexed address/data signals and will have the same liming as A7-AO' [2J The broken lines of the write signal are lor extended write liming; 49-000537C pPD71071 NEe Figure 29. Memory-IIO Transfer, Compressed Timing 51 51 50 so 51 52 53 54 52 53 54 51 51 elK Jl IJl W' ~ W' ~ lJl W"' J' UlW' ~ u- OMARQ \ HLORQ - U L I--- HLOAK I II 1\ AEN A5TB III Ir--I'\ 1\...--1-' OC IX V OMAAK I \.. W \ Ir-t\ II n. 1,11\ to- \ '--- [2[ ~L~ \.~J .L1,11\ L ~ENl)lnput L H l''fCOutput Note: (1) When an 8-bit data bus is selected, 0 15 -08 are not used_ Therefore, A23-A16 are not multiplexed address/data signals and will have the same liming as A7-AO_ 12) The broken lines of the write signal are for extended write tlmlng_ 49-000538C 34 NEe pPD71071 Figure 30. Memory-to-Memory Transfer 5tate SO 511 512 513 514 521 522 523 524 51 Note: [1) When an 8-blt data bus is selected, 015-08 are not used. Therefore, A23-A16 are not multiplexed address/data signals and will have the same timing as A7-Ao. [2) The broken lines of the MWR signal are for extended write timing. 49·0005396 Figure 31. END/TC Input/Output 5tate 51 52 53 54 elK TC (Output) END (Input) 83-003760A 35 pPD71071 NEe Figure 32. System Configuration with I1PD70108 !,P071082 x 3 ~ A19- A16 ) 01 U A19- A 16 DO v A1S-AS ") 01 "- Address Bus n A1S-As DO :) A19-AO L~ V· !,P070l0S A A7-AO " A07-AOO Kr- ~ 01. DO ASTB I--- , STB OE ~ /,>. A19-AS HLOAK HLORQ 07- 0 0 I "- 0~ Data Bus 07- 0 0 HLOAK HLORQ A7-AO A7-AO A 07- 0 0 A1S-AS/07- 0 0 I~ !,P071071 A19-A16 A23- A 16 !,P0710S2 "" -V > A1S-AS "- 01 DO AEN ASTB v STB OE L I .... v J 83-001673C 36 NEe pPD71071 Figure 33. System Configuration with pPD70116 pP071082 x 3 > ~ UBE, A19-A16 J UBE, A19-A16 01 DO v A J'.. - A1S-AS t... A01S-AOsl< " ~Ol DO A v> Address Bus UBE, A19-AO 11 pP070116 ~ A7-AO A07-AOO <; - ~Ol STB DO OE ./>. A19-AS, UBE - ~L- ~ ASTB f - - HLOAK HLORQ y7 01S- 0 0 01S-00 J'.. Data Bus 01S- 0 0 /";:.V HLOAK HLORQ A7-AS A7-AO V' 01S- DO ~A 07- 0 0 A1S-Asl 0 7-00 I~ ,,~ 01S-0S pP071082 x 2 pP071071 A1S-AS t... =>01 DO ) A19-AO, UBE v A19-A16 A23- A 1s10 1S- DS UBE AEN ASTB 1<" ~ 01 STB DO OE I ...... V' t I 83-001672C 37 pPD71071 NEe 38 NEe NEG Electronics Inc. pPD71082, 71083 8-Bit Latches Description Pin Configurations p.PD71082 and p.PD71083 are CMOS 8-bit transparent 20-Pin Plastic DIP latches with three-state output buffers. They are used as bus buffers or bus multiplexers in microprocessor sys- tems. Their high-drive capability makes them suitable for 010 Voo data latch, buffer, or I/O port applications. 011 000/000 012 001/001 013 002/002 Features 014 003/003 015 004/004 o CMOS technology 016 005/005 o 8-bit parallel data register 017 006/006 OE 007/007 o Three-state output buffer Vss STB o High drive capability output buffer (IOL = 12 rnA) 83-000225A o p.PD8085A, 8048, 8086, 8088, p.PD70108/116, and p.PD70208/216 system compatible 2O-Pin Plastic SOP o p.PD71082 - non-inverted output; p.PD71083 - inverted output 010 Voo o Single +5 V ± 10% power supply 011 000/000 012 001/001 o Transparent operation 013 002/002 o Industrial temperature range: -40 to +85°C 014 003/003 015 004/004 Ordering Information 016 005/005 017 006/006 Part Number Package Output OE 007/007 ,uPD71082C 20-pin plastic DIP Non-inverted Vss STB ,uPD71082G 20-pin plastic SOP 83-004227A ,uPD71083C 20-pin plastic DIP Inverted ,uPD71083G 20-pin plastic SOP Pin Identification Symbol Function Data input, bits 0-7 Data output, bits 0-7; non-inverted (,uPD71082) or inverted (,uPD71083) STS Strobe input Output enable input Voo +5 V power supply Vss Ground 50150 pPP71082, 71083 NEe PIN FUNCTIONS latch. Data is latched on the falling edge of STS. When STS is low, the 000-007/000-007 outputs do not DIQ-DI7 (Data Input) change. 010-017 are data input lines to the 8-bit data latch. 'Data on 01 lines passes through the latch while STS is high. OE (Output Enable) The data is latched to 00/00 with the falling edge of OE input is the output enable signal for the three-state STS. 00/00 lines. When OE is high, 00/00 lines are high impedanc$. When OE is low, data from the a-bit latch is DOo-D07/i5oo-D~ (Data Output) output to 000-007/000-007. See table 1. 000-007/000-007 are the three-state data output lines from the a-bit data latch. When OE is high, these lines go Tabl. 1. I..IItch Operation into the high-impedance state. When OE is low, data STB OE 000-00.,1000-00., 8-Blt Oata Latch from the latch is output, either non-inverted (p.P0710a2) Low Low Latched data from 8·blt 01 line data has been or inverted (p.P071083). data latch Is enabled latched with failing edge of STB (hIgh to low) High High Impedance STB (Strobe) High Low Data on 010-017 01 passed through to STS is the input strobe signal for the 8-bit latch. When High High Impedance oollm STS is high, data on the 01 lines passes through the 8-bit Block Diagram pP071082 pP071083 OE O - - - - - Q '>-----, STB STB ,---------- I 1 010 0--+- ~ >----'---0 000 010 0--+---1 I 1 1 1 1 1 L ____ - - - - - - - - - - 1 1 1- - - - - - - - - -----..j Oh~ 4001 011 G-------j L-o 001 1-------------.J f------------- J 012~ ~002 012 o---i i--o 002 ,------------, 0 13 ()------i 1----0 003 01 3 ~ I-- - - - - - - - - - - -'-l 't----O 003 L-------------1 L-------------"l I 01 4 0---4 ~ 004 014 ~ 1",,- ,---v 004 0 15 ()-----1 ,-----------, ~ 005 015 G-------j ,-------------1 1---0 005 L ____________ -j 1------------ 1 I 01 6 0---4r - - - - - - - ',- - - - ,~ 017 0-------1 r----o 007 006 01 60-:_ - 0 17 ()------i - - - - - l--o 007 - - - - r 006 L ____________ J L _____________ J 83-0002266 2 NEe pPD71082, 71083 FUNCTIONAL DESCRIPTION Capacitance TA - 25°C; Voo - +5 V The #,PD71082 and #,PD71083 are 8-bit data latches Min Max Units Conditions Parameter Symbol strobed by the STS signal. They have high-drive capa- bility output buffers controlled by the OE signal. Data on Input capacitance Cln 12 pF f - 1 MHz the 01 lines is latched by the trailing edge of STS (high to low). When STS is high, data passes through the latch. AC CharacteristiCS When OE is high, DO lines are high impedance. When OE TA - -40 to +85°C; Voo - 5 V :1:10% is low, the contents of the latches are output on 000- Parameter Symbol Min Max Units Conditions 007. The DO lines are isolated from OE switching noise. Input to tOIO 5 40 ns Loading circuit (a) output delay ELECTRICAL SPECI FICATIONS STe to output toSTBO 10 60 ns delay Absolute Maximum Ratings Data float tFCTO 5 30 ns Loading circuit (b) TA - 25°C; Vss - OV time from 'OE Power supply voltage, Voo -0.5 to +7.0 V high Input voltage, VI -1.0 to Voo + 1 V Data output toCTO 10 40 ns delay from 'OE Output voltage, Vo -0.5 to Voo + 0.5 V low Power diSSipation, POMAX, DIP SOOmW Input to STe tSISTB 0 ns Loading circuit (a) Power diSSipation, POMAX, SO 200mW setup time Operating temperature, Topt -40 to +85°C Input to STe tHSTBI 25 ns hold time Storage temperature, Tstg STe high tPWSTB 20 ns Exposing the device to stresses above those listed In the absolute pulse width maximum ratings could cause permanent damage. Exposure to Signal rise 20 ns 0.8 to 2.0V lLH absolute maximum ratings for extended periods may affect device time reliability. Signal fall tHL 12 ns 2.0 to 0.8V time DC Characteristics TA .. -40 to +85°C; Voo - 5V :1:10% Parameter Input voltage, Symbol VIH Min 2.2 Max Units Conditions V VOL = 0.45 V Loading Circuits for AC Testing [a] VOL, VOH Outputs [b] Three-State Output II high VOH = Voo -0.8V 2.87V 2.87V ~'''O Input voltage, VIL 0.8 V VOL = 0.45 V fJ low VOH = Voo -0.8V Out Out Output voltage, VOH Voo -0.8 V 10H = -4mA high r200PF 6750 r200 pF Output voltage, VOL 0.45 V 10L = 12mA low Loading Conditions: IOl = 12 mA, IOH = -4 mA, Cl = 200 pF Input current -1.0 1.0 p.A VI = Voo, VSS 83-000228A Leakage 10FF -10 10 p.A DE = Voo current, high impedance Power supply 100 80 p.A VI = Voo, VSS current (static) Power supply loodyn 20 rnA fin = 10MHz current C = 200pF (dynamic) 3 pPD71082, 71083 NEe Timing waveforms 01 tSISTB tHSTBI STB tPWSTB tOIO tOSTBO 00/00 --------(1 83-0042166 Timing IIeasurement Point. Input Output 2.4 V 2.2 V 2.2 V 2.2 V 2.2 V Measurement Points Measurement Points 0.8 V 0.8 V 0.8 V 0.8 V 0.4 V 83-0042116 4 NEe NEC Electronics Inc. II PD71 084 Clock Pulse Generator/Driver Description Pin Configurations The p,PD71084 is a clock pulse generator/driver for mi- 18-Pin Plastic DIP croprocessors including the V20® and V30® and their peripherals using NEe's high-speed CMOS technology. CKSYN VDD PRCLK X1 Features REN1 X2 RDY1 RDYSYN o CMOS technology READY EXFS o Clock pulse generator/driver for p,PD70108/70116 or FIX other CMOS or NMOS CPUs and their peripherals asc CLK RESIN o Frequency source can be crystal or external clock Vss RESET input 83-001580A o Reset signal with Schmitt-trigger circuit for CPU or peripherals 2O-Pin Plastic SOP o Bus ready signal with two-bus system synchronization CKSYN VDO o Clock synchronization with other p,PD71084s PRCLK X1 o Single +5 V ±10% power supply NC NC REN1 X2 o Industrial temperature range: -40 to + 85°C RDY1 RDYSYN READY EXFS Ordering Information RDY2 FIX Part Number elK Out, Max Package REN2 asc CLK RESIN ~PD710S4C-S SMHZ 1S-pin plastic DIP Vss RESET C-10 10 MHz 83-0041S3A G-S SMHz 20-pin plastic SOP V20 and V30 are registered trademarks of NEC Corporation. 50190 pPD71084 NEe Pin Identification ClK (Processor Clock) Symbol Function ClK output supplies the CPU and its local bus peripher- CKSYN Clock synchronization input als. ClK is a 33% duty cycle clock, one-third the fre- PRClK Peripheral clock output quency of the frequency source. The ClK output is REN1 Bus ready enable input 1 +0.4 V higher than the other outputs. RDY1 Bus ready input 1 PRClK (Peripheral Clock) READY Ready output RDY2 Bus ready input 2 PRClK output supplies a 50% duty cycle clock at one- half the ClK frequency to drive peripheral devices. REN2 Bus ready enable input 2 ClK Processor clock output OSC (Oscillator) Vss Ground potential OSC outputs a Signal at the same frequency as the RESET Reset output crystal input. When EXFS is selected, the OSC output is RESIN Reset input powered down, and its output will be high. asc Oscillator output CKSYN (Clock Synchronization) FIX External frequency source/crystal select EXFS External frequency source input CKSYN input synchronizes one p.PD71084 to other Ready synchronization select input p.PD71084s. A high level at CKSYN resets the internal counter, and a low level enables it to count. X2 Crystal input X1 Crystal input RESIN (Reset) VDD . +5 V power supply This Schmitt-trigger input generates the RESET output. NC No connection It is used as a power-on reset. PIN FUNCTIONS RESET (Reset) X1, X2 (Crystal) This output is a reset signal for the CPU. Reset timing is provided by the RESIN input to a Schmitt-trigger input When the FIX input is low, a crystal connected to X1 and gate and a flip-flop which will synchronize the reset X2 will be the frequency source to generate clocks for a timing to the falling edge of ClK. Power-on reset can be CPU and its peripherals. The crystal frequency should provided by a simple RC circuit on the RESIN input. be three times the frequency of ClK. RDY1, RDY2 (Bus Ready) EXFS (External Frequency) A peripheral device drives the RDY1 or RDY2 inputs to EXFS is the external frequency input in the external TTL signal that the data on the system bus has been received frequency source mode (FiX high). A TTL-level clock or is ready to be sent. REN1 and REN2 enable the RDY1 signal three times the frequency of the ClK output and RDY2 signals. should be used for the source. REN1, REN2 (Address Enable) FiX (Frequency/Crystal Select) REN1 and REN2 inputs qualify their respective RDY FIX input selects whether an external TTL-level input or inputs. an external crystal input is the frequency source of the ClK output. When FIX is low, ClK is gene~ated from the RDYSYN (Ready Synchronization Select) crystal connected to X1 and X2. When FIX is high, ClK RDYSYN input selects the mode of READY signal syn- is generated from an external TTL-level frequency input chronization. A low-level signal makes the synchroniza- on the EXFS pin. At the same time, the internal oscillator tion a two-step process. Two-step synchronization is circuit will stop and the OSC output will be high. used when RDY1 or RDY2 are not synchronized to the microprocessor clock and therefore cannot be guaran- teed to meet the READY setup time. A high-level signal makes synchronization a one-step process. One-step 2 NEe pPD71084 synchronization is used when RDY1 and RDY2 are syn~ ity. The values of C1 and C2 (C1 = C2) can be calcu- chronized to the processor clock. See Block Diagram. lated from the load capacitance (C0 specified by the crystal manufacturer. READY (Ready) C1 xC2 C The READY output signal to the processor is synchro- CL = + S C1 + C2 nized by the ROY inputs to the processor ClK. READY is cleared after RDY goes low and the guaranteed hold time Cs is any stray capacitance in parallel with the crystal, such as the p.PD71084 input capacitance 01 of the processor has been met. Figure 1. Crystal Configuration Circuit CRYSTAL The oscillator circuit of the p.PD71084 works with a X1 ~ parallel-resonant, fundamental mode, "AT-cut" crystal connected to pins X1 and X2. .1 C1 ~C2 T ~PD71084 Figure 1 shows the recommended circuit configuration. Capacitors C1 and C2 are required for frequency stabil- X2 83VL·7023A ",PD71084 Block Diagram X1 OSC X2 FIX PRClK EXFS CKSYN REN1 ClK RDY1 REN2 READY RDY2 RDYSYN RESIN RESET 83-0015838 3 IIPD71084 NEe ELECTRICAL SPECIFICATIONS DC Characteristics TA = -40 to +85°C; V OD = 5 V :t 10% Absolute Maximum Ratings Parameter Symbol Min Max Unit Conditions TA = 25°C; Vss = OV Input voltage, high VIH 2.2 V Power supply voltage, Voo -0.5 to + 7.0 V 2.6 V RESIN input Input voltage, VI -1.0 V to VDD + 1.0 V Input voltage, low VIL 0.8 V Output voltage, Vo -0.5 V toVDD + 0.5 V Output voltage, VOH Voo - 0.4 V ClK output, Operating temperature, TOPT high IOH = -4mA Storage temperature, TSTG -65 to + 150°C Voo -0.8 V IOH = -4mA Power dissipation, Po (DIP) 500mW Output voltage, low VOL 0.45 V IOL =4mA Power dissipation, Po (SOP) 200mW Input leakage liN -1.0 1.0 p.A current Exposure to Absolute Maximum Ratings for extended periods may -400 1.0 p.A RDYSYN input affect device reliability; exceeding the ratings could cause permanent RESIN hysteresis 0.25 V damage. Power supply 100 200 p.A current (static) Power supply IDDdyn 30 mA fin = 24 MHz current (dynamic) Capacitance TA = 25°C; Voo = +5V Parameter Symbol Min Max Unit Conditions Input capacitance Cln 12 pF f = 1 MHz 4 NEe pPD71084 AC Characteristics TA = -40 to +85°C; VDD 5 V ± 10% Parameter Symbol Min Max Unit Conditions Parameter Symbol Min Max Unit Conditions EXFS high tEHEL 16 ns At2.2V ClKto RESET tCLlL 40 ns delay EXFS low tELEH 16 ns At 0.8V ClK to PRClK tCLPH 22 ns EXFS period tELEL 40 ns t delay XTAl frequency 12 25 MHz ClKto PRClK tCLPL 22 ns RDY1, 2 setup tRWCL, 35 ns .!.delay to ClK.!. tRWCH OSC ClKt tOLCH -5 22 ns RDY1, 2 hold to tCLR1X 0 ns delay ClK.!. OSC ClK.!. tOLCL 2 35 ns RDYSYN setup tRSYVCL 50 ns delay to ClK.!. Signal rise time ~H 20 ns 0.8 to 2.0V RDYSYN hold to tCLRSYX 0 ns (except ClK) ClK Signal fall time tHL 12 ns 2.0 to 0.8 V REN1, 2 setup tA1RW 15 ns (except ClK) to RDY1, 2 Notes: REN1,2 hold to tCLA1X 0 ns ClK.!. (1) Test points are specified in accordance with V-Series CMOS peripherals. CKSYN setup to tYHEH 20, ns EXFS (2) Test points are specified in accordance with the ~PD8284. CKSYN hold to tEHYL 20 ns (3) tpHPL + tpLPH total must meet a minimum of 250 ns. EXFS CKSYN width tYHYL 2tELEL ns Timing Waveforms RESIN setup to tl 1HCL ClK RESI N hold to tCLl1H 65 20 ns ns AC Test Input (Except RESIN) D ClK ClK cycle period tCLCL 125 ns 2.6 v ==>{ 2.2 v 0.45 V 0.8 V Test Points 2. 2V 0.8 V X= ClK high tCHCL 41 ns 3V, fosc = RESIN: Input high level 3.00 V Measurement point 2.6 V 24 MHz Input low level 0.45 V Measurement point 0.8 V (Note 1) 83-004046A 1/3 (tCLCU +2 ns 1.5V, fosc s 24 MHz AC Test Output (Except CLK) (Note 2) ClKlow tCLCH 68 ns 1.5V, fosc = 24 MHz (Note 1) ==>{2.2V 0.8 V Test Points 2. 2V 0.8 V X= 83-004047A 2/3 (tCLCU -15 ns 1.5V, fosc s 24 MHz (Note 2) CLKOutput ClK rise and tCLH, tCHL 10 ns 1.5 to 3.5 V, fall time 3.5 to 1.5V PRClKhigh tPHPL tCLCL - 20 ns (Note 3) PRClKlow tpLPH tCLCL - 20 ns (Note 3) READY inactive tRYLCL 8 ns to ClK! READY active tRYHCH 8 ns to ClK t 83YL-7024A 5 pPD71084 NEe eLK, RESET Signals ClK PRClK ---I-.I-o----tPHPL----+--+l CKSYN ~~-----~--------~ RESET ~r---t Note: (1 J VtN to 0.8 V or 2.2 V to VIN (2J 1.5 V to 3.0 V or 3.0 V to 1.5 V 83-000'988 6 NEe pPD71084 READY Pin (RDSYN = High) ClK RDY1, RDY2 _ _ _ _ _ _ _ _ _- . 1 REN1,REN2 ------~ RDYSYN _ _ _ _ _ _ _ _ _.1 --------~l'~------------ READY---------------- 83-0001999 READY Pin (RDSYN = Low) ClK RDY1, RDY2 - - - - - - - - - - - REN1, REN2 - - - - - - - " " " " RDYSYN -------------~ READY _______________,""c, I~I- - - - - - - - - - - 93·70259 7 pPD71084 NEe Test Circuit for CLK High or Low Time Test Circuit for CLK to READY (Crystal Oscillation Mode) (EXFS Oscillation Mode) Vee .----_-~ X1 ClK FIX ClK REN1 '---+----1 X2 71084 . -........--,---1 EXFS FIX READY CKSYN 71084 83-004173A 1 - - - - - - 1 R DY2 Test Circuit for CLK to READY REN2 (Crystal Oscillation Mode) CKSYN 83-004176A Vee REN1 ClK Loading Circuits ,....---+---1 X1 Load 1 Load 2 FLPFl ' - - -.......---1 X2 Output except ClK I READY 71084 71084 1C'~30PF 71084 ~---tRDY2 CL = 100 F/i( REN2 OSC 83-004177A CKSYN 83-004174A Test Circuit for CLK High or Low Time (EXFS Oscillation Mode) Vee FIX ClK 71084 r - - - - t EXFS CKSYN 83-004175A 8 NEe NEG Electronics Inc. pPD71086, 71087 8·Bit Bus Buffer/Drivers Description Pin Configurations p.PD71086 and p.PD71087 are 8-bit, bidirectional bus 20-Pin Plastic DIP and SOP buffer/drivers with three-state outputs. The system bus outputs are noninverted (p.PD71086) or inverted (p.PD71087). These devices are used to expand CPU bus voo drive capability. The input/output lines are isolated from SBo/SBo OE and BUFR/W switching noise. SB1/SB 1 SB2/SB 2 Features SB3/SB 3 SB4/SB4 o CMOS technology SBs/SBs SBs/SBs o Bidirectional 8-bit parallel bus buffer SB7/SB7 o Three-state output BUFRtW o High system bus-drive capability (IOL = 12 mA) 83SL·6912A o Compatible with p.PD70108/116, p.PD70208/216, and other CMOS or NMOS designs Pin Identification Symbol Function o p.PD71086: noninverted system bus output p.PD71087: inverted system bus output CPU local I/O data bus, bits 7-0 o Single +5 V ±10% power supply System I/O data bus, bits 7-0; noninverted (,uPD71086) or inverted (,uPD71087) o Industrial temperature range: -40 to +85°C Output enable input Ordering Information BUFR/W Buffer read/write input Part Number Package Output Voo +5 V power supply ,uPD71086C 20-pin plastic DIP (300 mil) Noninverted Vss Ground G 20-pin plastic SOP ,uPD71087C 20-pin plastic DIP (300 mil) Inverted G 20-pin plastic SOP 50152 pPD71086, 71087 NEe PIN FUNCTIONS OE (Output Enable) LB7-LBo (Local Data Bus) OE input controls the output buffers. When OE is high, all output buffers go to the high-impedance state. When OE LBrLBo are three-state inputs/outputs that connect to is low, data is output from the buffers specified by the the CPU local data bus. They move data between the BUFR/W signal. CPU and memory, I/O, or other peripherals. Data read/ write mode is controlled by the BUFR/W signal input. BUFR/W (Buffer Read/Write) SB7-SBO/SB7-SBo (System Data Bus) The data read/write mode is controlled by the BUFR/W signal input. When BUFR/Wis, high, LB lines are inputs SB 7 -SBoISB 7 -SB o are three-state inputs/outputs that and SB lines are outputs. When BUFR/W is low, SB lines connect to the system bus, along with the memory, I/O, are inputs and LB lines are outputs. See table 1. or other peripherals. The p,PD71086 causes no signal inversion, the p,PD71087 inverts the signal. Input/output Table 1. Data Read/Write Mode condition is determined by BUFR/W status. See table 1. OE BUFR/W LB Pins 5B/SB Pins Mode Low Low Output Input System bus to local bus Low High Input Output Local bus to system bus High Don't care High-Z High-Z p.PD71086, 71087 Block Diagram "PD71086 "PD71087 6E 0--....-------, 6E 0--....------, BUFR/W o--_--~+-~ r-------' LBO o-----+-~ ~---+---o SBo LBO o----J.---. ....----+---0 SBo I I I I ~-----------...j I I 1------------, LB1 o-------J ~ SB, LB, 0-------1 ~ SB, L ___________ J I I t- - - - - - - - - - - - I I I LB2 ~ ~SB2 LB2 ~ 1-------0 SB2 ~-------------1 I-----------...j LB3 o-----l ~ SB3 LB3 o--------j t--------o S B3 ~-----------...j ~-------------l L B4 o-------l ~ SB4 LB4 o-------l t--------o SB4 t-----------~ 1------------1 I I - LBs ~ ~SBs LB s Q--------j r-----<> SBs L-----------~ ~------------I LB6 o-----i ~ SB6 LB6~ ~SB6 1---------------1 ,-----------1 LB7 o----J ~ SB7 LB7 0----1 ~ SB7 L __________ -1 L __________ -.J 83-0011418 2 NEe pPD71086, 71087 ELECTRICAL SPECIFICATIONS Absolute Maximum Ratings AC Characteristics TA = 25°C; Vss = OV TA = -40 to 85°C; Voo = 5 V ±10% Power supply voltage, Voo -0.5 to +7.0 V Parameter Symbol Min Max Units Conditions Input voltage, VI -1.0 to Voo + 1.0 V Input to output tOIO 5 40 ns Load (1), (1') delay and (2), (2') Output voltage, Vo -0.5 to Voo + 0.5 V BUFR/W hold tHCTRW 5 ns Power dissipation, Po time from OE DIP 500mW SOP 200mW BUFR/W setup tSRWCT 10 ns time to OE Operating temperature, TOPT Data float time tFCTO 5 30 ns Load (3) and Storage temperature, TSTG -65 to +150°C from DE (3') --------------~------------------ Exposure to Absolute Maximum Ratings for extended periods may Data output tOCTO 10 40 ns affect device reliability; exceeding the ratings could cause permanent delay from OE damage. Signal rise time tR 20 ns 0.8 to 2.0V Capacitance Signal fall time tF 12 ns 2.0 to 0.8V TA = 25°C; Voo = +5 V Parameter Symbol Min Max Units Conditions Loading Circuit for AC Test Input capacitance 24 pF fc = 1 MHz LB to SB/SB 2.87 V [1J [2J [3J DC Characteristics TA = -45 to +85°C; voo = 5 V ±10% 1"'" Parameter Symbol Min Max Units Conditions 206 n 306 n Input voltage high VIH 2.2 V Input voltage low VIL 0.8 V Out Out 0------.----, Output voltage VOH Voo V 10H = -4mA 0"' high -0.8 675 n Output voltage low VOL 0.45 V LB, 10L = 4mA Output voltage low VOL 0.45 V SB, 10L = 12mA Input leakage IlL -1.0 1.0 p.A VI = Voo, Vss current SB/SB to LB 2.05 V Leakage current, 10FF -10 10 p.A OE = Voo [1'J [2'J [3'J high impedance Power supply 100 80 p.A VI = Voo, VSS current (static) 4130 1008 n Power supply loodyn 40 mA fin = 2 MHz current (dynamic) Out Out Out 1'"'" roo"' 876 n -=- 1100PF 83-001137A 3 pPD71086, 71087 NEe * AC Test Voltages OAV X 2AV ---"""90,...O,..,..Yo..... 10% Test Point 1.5 V 't;;;....._ _ _ _ _ _ _ _ _---J _ _ _ ~ VOZ +0.1 V =r.VO_H-_O.1 v '-_ _ _ _..:=:J VOL +0.1 V VOZ -O.1 V 83YL·7002B Timing Waveforms BUFRIw tHCTRW Input Output ----------....(1 83ML·615OB 4 NEe NEG Electronics Inc. pPD71088 System Bus Controller Description 20-Pin Plastic SOP The p.PD710SS is a CMOS system bus controller for a lOB Voo p.PD7010S (V20@) or p.PD70116 (V30@) microprocessor ClK BSO system. It controls the memory or I/O system bus. BS1 BS2 BUFR/W ICE/PBEN Features ASTB DBEN AEN CEN o CMOS technology MRD iiii'fAi( o Bus controller for microcomputer system expansion AMWR lORD MWR AIOWR o Command outputs for system bus control Vss 10WR o Control outputs for I/O peripheral bus control 83-004058A o High drive capability for command and control outputs (IOl = 12 mA) Pin Identification o Three-state outputs for command outputs Symbol Function o Advanced I/O and memory write command outputs lOB Input/output bus mode input o p.PD7010S, p.PD70116 compatible ClK Clock input o +5-volt ± 10% single power supply BS1 Bus status input 1 o 20-pin plastic DIP (300 mil) or SOP package BUFR/W Buffer read/write output o Industrial temperature range: -40 to +S5°C ASTB Address strobe output Address enable input Ordering Information Memory read output Part Number Clock (MHz) Package Type Advanced memory write output ,uPD710aac-a a 20-pin plastic DIP Memory write command output C-10 10 Vss Ground G-a a 20-pin plastic SOP I/O write command output Advanced I/O write command output Pin Configurations I/O read command output 20-Pin Plastic DIP Interrupt acknowledge output CE N Command enable input Voo DBEN Data buffer enable output BSO ICE/PBEN Interrupt cascade enable/Peripheral data bus BS2 enable output ICE/PBEN OBEN BS2 Bus status input 2 CEN BSO Bus status input 0 iNTAK Voo Power supply lORD AIOWR 10WR 83-004181 A V20 and V30 are registered trademarks of NEC Corporation. 50151 II PD71088 NEe PIN FUNCTIONS 10WR (I/O Write Command) BSO-BS2 (BuS Status Inputs '0, 1, 2) The 10WR output is the signal to write data to an I/O device. 10WR is three-state, active low. The BSO-BS2 inputs are connected to the encoded .cPU status outputs. The I'PD71088 decodes these status AIOWR (Advanced I/O Write Command) outputs into command and 'control outputs for timing control. See table 1 f~r an explanation of. these inputs. This,command output is the same as 10WR~ exceptthat it is generated one state (clock cycle) earlier than 10WR. ClK (Clock) INTAK (Interrupt Acknowledge) The ClK input is connected to the same Clock output that drives the CPU ciock, usually the ClK output of a The INTAK output acknowledges interrupt requests. Re- I'PD71084 or a I'PD71011. It is the internal system clock questing devices output an interrupt vector address in response to INTAK. INTAK is three-state, activ~ low. of the I'PD71088. AEN (Address Enable) ASTB (Address Strobe) The ASTB output control signal. latches the address The AEN input controls the command output buffers. outputs from the CPU into an external address latch, When lOB is low, a low-level AEN causes the command such as a I'PD71082 or I'PD71083. Address data should buffers to output command output signals. A high-level be strobed with the trailing edge (high to low) of ASTB. AEN makes'all command lines go to high impedance. When lOB is high, the I'PD71088 is in I/O bus mode, and DBEN (Data Buffer Enable) the command lines are not affected by AEN . The DBEN output activates a data bus buffer/driver such CEN (Command Enable) as a I'PD71086 or I'PD71087 to input or output data between the CPU local bus and the memory or I/O The CEN input controls DBEN, PBEN and all command system bus. . outputs. When CEN is high, all these outputs are active. When CEN is low, they are inactive. BUFR/W (Buffer Read/Write) lOB (I/O Bus Mode) The BUFR/W output controls the direction in which data moves' through a transceiver between the CpU and the When the lOB· input is high, the bus control mode is I/O memory or I/O peripherals. When BUFR/W is high, data bus mode. When lOB is low, the bus control mode is is transferred from the CPU local bus to the memory or system bus mode. I/O system bus. When BUFR/W is low, data is transferred from the memory or I/O system bus to the CP.U local bus. MRD (Memory Rea~ Command) ICE/PBEN (Interrupt Cascade Enable/Peripheral The MRD output is the signa:! to read data from a memory Data Bus Enable) device. MRD is three-state, active low. The meaning of this output signal depends on lOB. If lOB MWR (Memory Write Command) is low (system bus" mode), it is the ICE output. ICE controls the cascade address transfer from a master The MWR output is the Signal to write data to a memory priority interrupt controller to slave priority interrupt device. MWR is three-state, active low. controllers. The slave reads the add ress from the master when ICE goes high. , AMWR (AdvanCed Memory Write Command) When lOB is high, it becomes PBEN. PBEN controls the This command output is the same as MWR, except that I/O bus the same way that DBEN controls the system it is generated one state (clock cycle) earlier than MWR. bus. In this case, however, the output is active low. lORD (I/O Read Command) The lORD output is the signal to read data from an I/O device. lORD is three-state, active low. 2 NEe pPD71088 Block Diagram MRD MWR ~{ BS2 AMWR Status Command Command BS1 lORD Output Input Decoder Process BSO IOWR AIOWR INTAK ~-{ Signal Input ClK AEN CEN Control Process BUFR/W DBEN ICE/PBEN }e,_, Output lOB ASTB 49-0003668 Absolute Maximum Ratings Capacitance TA = 25°C; Vss = OV TA = 25°C; Voo = +5 V Power supply voltage, VOO -0.5 to +7.0 V Parameter Symbol Min Max Units Conditions Input voltage, VI -1.0 to Voo + 1.0 V Input capacitance 12 pF f = 1 MHz Output voltage, Vo -0.5 to Voo + 0.5 V Operating temperature, TOPT -40 to +85°C Storage temperature, TSTG -65 to +150°C Power dissipation, Po (DIP) 500mW Power dissipation, PD (SO) 200mW Exposure to Absolute Maximum Ratings for extended periods may affect device reliability; exceeding the ratings could cause permanent damage. DC Characteristics TA -40°C to +85°C; Voo = 5 V ±10% Parameter Symbol Min Max Unit Conditions Input voltage, high VIH 2.2 V Input voltage, low VIL 0.8.- V Output voltage, high VOH VOD -0.8 V Controls: IOH = -8 mA @ 10 MHz, -4 mA @ 8 MHz Output voltage, low VOL 0.45 V Commands: IOL = 24 mA @ 10 MHz, 12 mA @ 8 MHz Controls: IOL = 8 mA@ 10 MHz, 4 mA@8 MHz Input current leakage IlL -1.0 1.0 p.A Leakage current at high impedance IOFF -10 10 p.A Power supply current (static) 100 80 p.A Power supply current (dynamic) loodyn 20 mA fin = 10 MHz 3 pPD71088 NEe AC Characteristics TA =-40 to +85°C; voo = 5 V ±10% I'PD71 088 I'PD71088C-10 Parameter Symbol Min Max Min Max Units Conditions ClK cycle period tcVCK 125 100 ns ClK pulse width, high tpWCKH 40 41 ns ClK pulse width, low tPWCKL 60 49 ns Setup time for bus status active to CLK l' tSBSV 40 35 ns Hold time for bus status inactive from CLK ~ tHBSV 10 10 ns Setup time for bus status inactive to CLK .j. tSBSIV 35 35 ns Hold time for bus status inactive from ClK i tHBSIV 10 10 ns Command active delay from ClK ~ toCML 10 40 10 35 ns Command inactive delay from ClK ~ toCMH 10 ·40 10 35 ns Command output on delay from AE N .j. toAECM 40 40 ns Command active output delay from AE N .j. toAECML 100 295 115 200 ns Command disable delay from AE N i tFAECM 50 20 ns Command active delay from CE N l' toCECM tOCML tOCML ns IOL = 4 mA IOH = -4 mA ASTB active delay from CLK ~ toCKSTH 30 20 ns CL = 100 pF ASTB active delay from BS2, 1, 0 toBSST 25 20 ns ASTB inactive delay from ClK i toCKSTL 7 25 7 25 ns DBEN, PBEN active delay from ClK ~ toCTV 10 50 10 35 ns DBEN, PBEN inactive delay from ClK i toCT 10 50 10 35 ns DBEN, PBEN active delay from AEN ~ to AECT 30 30 ns DBEN, PBEN active delay toCECT 30 30 ns BUFR/W i delay from CLK i tOCKWR 40 40 ns BUFRIW ~ delay from ClK i toCKRo 60 40 ns ICE active delay from ClK ~ toCKIC 30 30 ns ICE active delay from BS2, 1,0 toBSIC 25 20 ns ICE inactive delay from CLK ~ tolCL 10 50 10 40 ns Input rise time tRI 20 20 ns 0.8Vto 2.0V Output rise time tRO 20 20 ns Input fall time tFI 12 12 ns 2.0 Vto 0.8 V Output fall time tFO 12 12 ns 4 NEe #,PD71088 Timing Waveforms General ClK BSO, BS1, BS2 tOCML_ tOCML- ASTB BUFIi/W +------Write Mode--------t----<~I DBEN tOCTV tOCK1)C. tOBSIC ------. ICE Note: The rising edges of ASTB and ICE are determined by the last event: ClKI or bus status going active. 83-0040568 5 pPD71088 NEe Timing Waveforms (cent) DBEN, PBEN, and Command Output lOB / _---J }~ \t- CEN }r- ~. tOAECT DBEN ;'- tOCECT- - ~, tOCECT- -- -'r- }"- I~ -tOCECM_ tOCECM _I - - tFAECM - - - _I Command Outputs +- \ -T . tOAECML ~ 83-0040576 AC Test Input Output Test Loads 2.4 V 0.45 V =x 2.2 V ... Test Points 2.2 V ) C 0;,;;.8..;V_ _ _ _ _ _ _ _ _ _ _... O.;,;;8..... V. Voo 4700 83-004055A AC Test Output -::- 820 0 I 200 pF =x 2.2 V _0~.8~V~ _ _ _ _Test _ _Points 2.2V)C _ _ _ _ _ _ _... 0;,;;.8~V 83-004D47A Voo 1.2 kO -::- 1 kO r100 pF Notes: [1] For co~d outputs MRD. lORD. MWR, IOWR, INTAK, AMWR, and AIOWR. [2] For other outputs. 83-004182A 6 NEe pPD71088 FUNCTIONAL DESCRIPTION Table 1. Command Logic ~PD71088 Command Logic BS2 BS1 BSO CPU Status Command Output The PD71088 decodes the CPU bus status outputs into Low Low Low Interrupt INTAK command outputs. The bus status outputs (BSO-BS2) acknowled ge and their decoded commands are shown in table 1. Low Low High I/O read mode lORD Low High Low I/O write mode IOWR,AIOWR Bus Control Mode High High Halt mode None Low The CEN, lOB, and AEN signals control the bus control- High Low Low Instruction MRD ler mode as shown in table 2. fetch mode High Low High Memory read MRD mode High High Low Memory write MWR,AMWR mode High High High No bus cycle None mode Table 2. Bus Control Mode Control Input Command Output Control Output Memory I/O CEN lOB AEN MRD, MWR, AMWR IOWR, AIOWR, lORD, INTAK ICE/PBEN ASTB, BUFRrw, DBEN H H H High impedance Outputs enabled (NC) PBEN (NC) Outputs enabled (NC) (110 bus mode) II L Outputs enabled H L H High impedance High impedance ICE (NC) Outputs enabled (NC) (System bus mode) L Outpus enabled Outputs enabled L x x H H PBEN = H Outputs enabled (Command (DBE N = L:ASTB, disable mode) BUFR/W are NC) Note: x = Don't care, NC = No change, H = High, L = Low 7 fJPD71088 NEe NEe NEG Electronics Inc. pPD71641 Cache Memory Controller Description Features The pPD71641 is an LSI cache controller chip offering o General-purpose interface supports high- advanced features, unequaled flexibility, and built-in performance microprocessors reliability to system designers. The pPD71641 makes it o Transparent to application programs practical and economical to use sophisticated caches in microprocessor-based systems. o Flexible placement algorithm: direct 2-, 4-way set- associative The implementation of pPD71641 is transparent to the o Large tag memory configuration: application program. The pPD71641 is configurable - 1024 sets x 1 way x 2 sub-blocks from direct-mapped to 4-way set-associative mapping. -512 sets x 2 ways x 2 sub-blocks The pPD71641 allows up to 128K bytes of cache mem- - 256 sets x 4 ways x 2 sub-blocks ory. Cache updating is made efficient with sub-block partition and burst mode features. o Programmable sub-block size up to 64 bytes The pPD71641 can be easily used with many general- o Bus replacement cycle variable from 1 to 16 words purpose, high-performance 32-bit or 16-bit micropro- o Supports large cache memory up to 128K bytes cessors. Its architecture is suitable for multiprocessors o Supports up to 4G bytes of main memory and multi master environments. Cache data consis- tency is ensured by bus monitoring and dual compar- o LRU replacement algorithm ator techniques. The pPD71641 uses a write-through o Write-through strategy strategy to update main memory, which guarantees o Data consistency check by bus monitoring the best cache consistency in a multiprocessor and multimaster system. External data storage is flexible in o External PURGE input to flush tag store size and organization. The pPD71641 will work with any o Increased reliability through internal error word width. detection - Parity check on tag store The pPD71641 is unique in offering features to imple- -Incorrect match check ment a highly reliable cache memory subsystem. The - Multiple hit check pPD71641 provides built-in reliability checks, such as - LRU output check address tag parity check, multiple hit detection, and self-diagnosis for directory faults. Upon detection of an o Unique level degradation feature to maximize erroneous condition, the pPD71641 can either be dis- cache system up time abled, or continue to operate in a functionally de- o 16- and 20-MHz operation graded mode. o 132-pin PGA package Ordering Information Max Clockout Part Number Frequency Package pPD71641R 25 MHz 132-pin Ceramic PGA 50135-1 JlPD71641 NEe Pin Configuration Pin Symbol Pin . Symbol 132-Pln Ceramic PGA 01 MAg K14 ~1 PNML KJ HGFE DCBA 02 MAs l1 MA25 14 o 0 0,0 0 0 '0 0 0 0 0 0 0 0 14 03 l2 MAa MA28 13 00000000000000 13 12 00000000000000 12 012 GNO l3 MAa1 11 0 0 0, o 00 11 10 000 o 00 10 013 As l12 Aao 9 000 o 00 9. 014 Ag l13 A27 8 000 o 00 8 7 000 pPD71641 o 00 7 E1 l14 MA12 A24 6 000 o 00 6 5 000 o 00 5 E2 MA10 M1 MA26 4 000 e 0 00 4 E3 MA7 M2 MAao 3 o 0 0 000 0 00 0 0 0 0 0 3 200000Qoooooooo 2 E12 A7 M3 GNO 10000000000000.1 E13 A 10 M4 BOY P N M L K J H G FED C BA E14 A12 M5 OPAR Bottom Vie';'; F1 MA14 M6 GNO e Orientation Pin F2 MA13 M7 VOO • Index Mark 83-004660A F3 MA11 M8 GNO F12 A11 M9 msg F13 A13 M10 10 Pin Identification Pin Identification F14 GNO M11 VDO Pin Symbol Pin Symbol G1 MA16 M12 GND A1 lffim B9 10 01 G2 MA15 M13 'Az3 A2 G3 GNO M14 A25 A3 mR Pin Symbol G12 A14 N1 MA29 A4 lV\S B10 RBOY G13 A15 N2 VDO A5 R02 B11 'OW2O G14 A16 N3 ~ A6 RAO B12 CR21 H1 MA17 N4 BYPf A7 RA2 B13 VOO H2 MA18 " N5 PURGE A8 RA3 B14 k H3 MA19 N6 FAULT A9 10 01 MAs H12 A18 N7 OlK A10 l3Ef!fR 02 M~ H13 Voo N8 CR3 A11 AT/BY 03 Voo H14 A17 N9 ~ A12 m:IDY 04 GNO J1 MA20 N10 "CW3 A13 CR20 05 02 J2 MA21 N11 10 A14 Aa 06 ROO J3 MA23 N12 AHIT B1 Mk 07 VOO J12 A22 N13 GND B2 GNO 08 GNO BRO J13 ~o N14 A28 B3 Do 09 J14 A19 P1 RJW B4 03 010 ~ K1 MA22 P2 OM) B5 R01 011 CW21 K2 MA24 P3 RESET B6 R03 012 GNO K3 MA27 P4 FATAL B7 RA1 013 ~ K12 A26 P5 OlAMP B8 10 014 As K13 A23 P6 'CRO 2 NEe pPD71641 Pin Identification is asserted, the p.PD71641 will treat the cycle as non- (coot) cacheable, and assert BYPO. The cache memory is not Pin Symbol Pin Symbol accessed. P7 CR1 P11 SYPO DPAR (Data Parity). This active-high input signals that P8 00 P12 Ie an error has occurred in the cache data store. When these errors are received, the p.PD71641 will disable the P9 'CWO P13 tROY current level and enter a functionally degraded mode. P10 "CW2 P14 Aa1 That is, if a parity error occurs in bank 3 of a 4-way set-associative cache memory, level 3 will be disabled. PIN FUNCTIONS AHIT (Asynchronous Cache Hit). This active-high CPU Interface asynchonous output is. asserted when the current ad- dress inputs (Aa-A31)' produce a tag match, indicating A3-A31 (Address Bus). CPU address outputs are con- that the data being accessed is mapped into the cache nected to these inputs. Depending on cache organiza- data store. tion, from. 8 to 10 of the low address bits are used to select a set of tags. These inputs are latched internally CRDY (CPU Ready). This active-low output can be used once a p.PD71641 cycle begins. to sign~1 the CPU that the bus cycle can be ended. CRDY is asserted when the. cycle is a cache hit, when the BCY (Bus Cycle Start). This active-low input is sampled requested data is available at the end of a cache update on the rising edge of ClK It indicates that a CPU cycle is cycle, when a CMD access is completed, or when a ready to be submitted to the p.PD71641. When BCY is bypass cycle has completed (actually controlled by detected, the p.PD71641 will begin its cycle. external logic via the SRDY input). CS (Chip Select). This active-low input is sampled on MISS (Cache Miss). This active-low output is asserted the rising edge of ClKlf this pin is not asserted, then the when the p.PD71641 has detected a cache miss on a CPU cache will not operate. This input is used to separate read cycle. It remains asserted throughout the cache cacheable (e.g., memory access) and non-cacheable update operation. MISS is distinct from AHIT because it (e.g., I/O) CPU bus cycles. If this input is not asserted, is synchronous to the ClK, while AHIT is not. MISS is BCY is ignored, but CMD operations can still take place also asserted when an internal error. forces a cache and the bus monitor function continues to operate. update, or if a cache bypass cycle is aborted by BERR. ~ R/W (Read/Wrlte). This input is used to separate CPU BYPO (Bypass Out). This active-low output indicates to 11:61 read cycles from CPU write cycles, since the p.PD71641 external hardware that the current CPU bus cycle will handles each type of cycle differently. If this input is low bypass the cache memory. Either the address is not when BCY is sampled, a cache write operation will cacheable, or the cycle is a memory write. In the case of begin. If RiW is high, read operation will begin. This input a memory write, the data will be written in parallel to the is also used during CMD accesses. cache memory. External logic must complete the bus cycle. This output is asserted whenever the BYPI input is CMD (Command Mode). This active-low input is sam- ~sserted at the start of a cycle, during all cache write- pled on the rising edge of ClK It should be asserted through cycles, and whenever the p.PD71641 is unable to when the CPU needs to access one of the p.PD71641's complete a cycle due to an internal error condition. internal registers. Inputs RAO-RA3 select which internal register will be used. CMD overrides the BCY and CS FAULT (Fault). This active-high output indicates that the inputs. p.PD71641 is operating in a functionally degraded mode, that is, some portion of the tag store has been disabied CLAMP (Clamp Address Input). This active-high input due to an internal or external error. prevents any problems due to a floating level on any p.PD71641 inputs. In the event it becomes necessary to FATAL (Fatal Fault). This active-high output in conjuc- float the inputs to the p.PD71641 (e.g., during,DMA), this tion with FAULT indicates the status of the p.PD71641. If input should be asserted. If this input is used, external an unrecoverable internal error occurs, and the pullup resistors will not be required. p.PD71641 removes itself from the system, this output will remain asserted. BYPI (Bypass In). This active-low input is sampled on the rising edge of ClK If this input is asserted when BCY RAO-RA3 (Replacement Address). These inputs select the internal register for a CMD access. They also supply the starting offset for a fetch bypass operation. During 3 IIPD71641 NEe normal replacement operations, the replace cycle begins A write cycle to global memory could change a memory at an offset of O. If fetch bypass is enabled, the first bus location that has been cached. If this happens, the data cycle of the replacement will be to the address deter- in the local cache is no .longer consistent with global mined by these inputs, so that the data requested by the memory. To ensure cache data consistency, the CPU will be available as soon as possible. p.PD71641 provides bus monitoring. When an address is presented on these MA inputs, the p.PD71641 will per- 00-03 (Data Bus). These bidirectional pins form the 4-bit data bus used to access the p.PD71641 internal form a tag search on that address. If a high is detected, registers. This bus is also used to output tag store the indicated sub-block will be invalidated. This tag contents during a cache directory dump operation. search operation is completely independent from the CPU address tag search, since the p.PD71641 tag store is CRO-CR3 (4-Way Cache Read Strobes). When a 4-way fully dual-ported with two sets of comparators. set-associative cache organization is selected, these four active-low outputs select which of the four banks of MAa-MAa1 become outputs during cache' dump opera- cache data storage will supply the data on a CPU read tions, supplying the upper address bits for the dump. cycle. They are also asserted during a cache memory dump operation. System Bus Interface CR20-CR21 (2-Way Cache Read' Strobes).When a 2- RREQ (Replacement Request). This active-low output way set-associative cache organization is selected, is asserted when the p.PD71641 wants to use the global these two active-low outputs select which of the two bus for· a cache data replacement cycle or for a cache banks of cache data storage will supply the data on a directory or data dump operation. CPU read cycle. ' RACK (Replacement Acknowledge). This active-low They are also asserted during a cache memory dump input is asserted by the system bus interface when operation. These outputs are also used for direct- access to the shared memory for a replacement or a mapped caches. CR20 and CR21 must be logically dump cycle has been granted. Once begun, replacement ORed with external logiC to produce a single read strobe or dump cycles can be suspended by desserting this for the one bank of RAM. input. The p.PD71641 will interrupt the miss cycle, thereby releasing the global bus to a higher priority bus CWO-CW3 (4-Way Cache Write Strobes). When a 4- master, and will resume the interrupted operation when way set-associative cache organization is sele,cted, RACK is asserted again. Bus monitoring is disabled while these four active-low outputs select which bank of the the replacement or dump cycle is suspended. cache data store will be written during a CPU write cycle. RAE (Replacement Address Enable). This active-low CW20-CW21 (2-Way Cache Write Strobes). When a output indicates that the p.PD71641 has begun a cache 2-way .set-associative cache organization is selected, data replacement cycle to service a cache read miss. these two active-low outputs select which bank of the This output should be used to control the multiplexing cache data store will be written during a CPU write cycle. between the RC outputs and CPU address. Also, any These outputs are also used for direct-mapped caches. other logic that changes during a replacement cycle CW20 and CW21 must be logically ORed with external should use the RAE signal. logic to produce a single write strobe for the one bank of RAM. RCO-RC3 (Replacement Count). Sub-blocks can be up to 16 words in length. During a replacement cycle, the Bus Monitor Interface RC outputs provide the offset address in the sub-block. Depending on the size of the sub-block, not all these pins MAS (Bus Monitor Address Strobe). This active-low will be used. input is sampled on the riSing edge of ClK. When it is sampled low, the p.PD71641 will begin a cache invalidate RBCY (Replacement Bus Cycle Start).This active-low cycle on the address presented on inputs MAs-MAs1. output signals the start of a replacement bus cycle or a Each' check-and-invalidate operation takes two clocks. dump cycle. MA3-MA31 (Bus Monitor Address). These inputs. are SRDY (System Ready). This active-low input is asserted sampled when MAS is sampled low. The system bus by the system bus interface or shared memory control address lines should be logically connected to these logic when the bus operation that the p.PD71641 re- inputs. quested has been completed. The p.PD71641 will pass this signal through to the CPU via its CRDY output. 4 NEe pPD71641 BRC (Burst Replacement Cycle). This active-high in- Other Signals put determines on a cycle-by-cycle basis if the replace- RESET (Reset). This active-high input will reset the ment cycle is to use a burst data transfer. ~PD71641. All tag stores will be invalidated, all preset BERR (Bus Error). This active-low input signals a sys- commands will be cleared, and all status bits will be tem bus error. If the current cycle is a replacement cleared. The cache will be disabled until enabled by the operation, RT/BY can be used to either abort the cycle or software command. RESET must be asserted for at least try it again. If the current cycle is a cache bypass (such 10 clock pulses. as a CPU data write cycle), the ~PD71641 will assert its PURGE (Purge). This active-high input will purge all the MISS output to let the CPU know that the operation did tag stores when it is asserted. An identical software- not complete. generated PU RG E operation is also available. RT/BY (Retry/Bypass). When BERR has been detected, PU RGE may be used to invalidate the cache tag store in the p.PD71641 uses the state of this input pin to decide the event the bus monitoring function is unable to keep whether to abort the cycle (RT/BY = 0) or to retry the up with external bus activity. cycle (RT/BY = 1). The PURGE input must be asserted until the purge This input is also used to implement external write operation is complete. This takes a maximum of 5 clocks, buffering, or a "posted write" system write perfor- so PURGE must be asserted for at least 5 clocks. mance. Normally, during a CPU data write cycle, boththe CPU and the p.PD71641 are suspended waiting for the CLK (Clock). This is the p.PD71641 clock and should be write cycle to end. However, if the RT/BY input is high, the sychronized to the CPU clock. p.PD71641 will not wait for SRDY. It will immediately end IC. Internally connected; leave disconnected. its internal cycle and go into the Ti state, allowing the VDD. Supply pins for +5 V power supply. p.PD71641 to begin processing the next CPU bus cycle if one is available. External logic can finish the write cycle. GND. Supply pins for power ground. Block Diagram elK RESET A 31-A3 DPAR FAULT L - - - - - - - - - o PURGE FATAL L-_ _ _ _ _ _ _ _ _ _ _ _ _ ~ ~S BCY AHIT CADY 5 JlPD71641 NEe Figure 1. lIemery Size Expansion ' Cache Access Address A 83YL·6162B Figure 2. TypICllI System Configuration Main Memory 83YL·6163B 6 fttIEC IIPD71641 INTERNAL BLOCK FUNCTIONS CPU Interface Controller Dual-Port Address Tag Memory The CPU interface controller generates a normal/not- normal response (data acknowledge, bus error, fatal Dual-port address tag memory is dual-port memory that error, etc.). decodes the index field input Independently from the CPU side and monitor side and outputs the contents of Replace Sequencer the memory (block entry) as address tag. When a mis-hit occurs during CPU access, a new block address is The replace sequencer regenerates the replace timing registered. and replace count value when a mis-hit occurs. Valid Bit Memory Bus Interface Control Block Valid bit memory is a group of flags that indicate whether The bus Interface control block generates the read/write each block entry Is valid or Invalid. These flags are set strobe signal to the external cache data memory. each time the replacement of a sub-block Is completed, and reset upon a monitor hit. Table 1 describes each of the bus states. Figure 3 Is a state diagram for the bus interface. Comparators Ts6/. 1. Sua Int.rlse. SIs'. Two comparators are provided. One is for the CPU side Bu. State o..crlptlon and the other Is for the monitor side. The comparator on" TI Idle state. waiting for BeY and ~ to be asserted. the CPU side is used to check if the address tag regis- tered In the directory coincides with the address used to T2 First state of any cacheable CPU cycle or 10 cycle to access the system bus. "PD71641 registers. T2 Is the dispatch state that decides what the "PD71641 will do. If there Is a cache hit or a 2-clock cycle request, T21s also the last active state. Parity Generator If there Is a miss, Tm Is entered. If this Is a cache write cycle, Tb Is entered. Tc Is entered If It Is a "PD71641 The parity generator generates the parity for the address command cycle. tag associated with CPU accessing, and compares it Tc Command Mode state. If this Is a I'PD71641 command with the address parity registered in the directory. This cycle, the Tc Is entered following T2, then repeated compare operation Is performed simultaneously with the before returning to the Idle state. ~ CPU address comparison. When a mis-hit occurs, the Tm Miss state. Entered If there Is cache read miss. The . . generated parity is registered together with the new system bus Is requested, and the RTistate Is entered. If address. RACK Is already asserted, the AT state sequence Is entered. Status Register RTI Replacement Transfer Idle state. walts for the system bus to be granted via RACK, then transitions to AT1. The status register indicates reduction data related to parity errors or mUlti-hit errors. In addition, it also indi- Rn First Replacement Transfer state. While RACK Is on, cates whether or not the "PD71641 is in the fatal state. proceeds directly to RT2. RT2 Second replacement transfer state. walts for SRl5Y to be LRU and LRU Memory asserted, Indicating the system bus memory Is ready to begin the transfer, the goes to RT3. LRU and LRU memory manage the CPU block accessing RT3 Third RT state. The read data Is written to the cache data order and perform LRU calculations based on valid bit, store, and If the sub-block transfer Is complete or the error status, number of associative units, etc. transfer Is aborted, the RTw state Is entered. If not complete, and burst transfers are not requested, a Main Sequencer return Is made to RT1 to begin another single-word transfer. If In burst mode, RT41s enered to get the rest of The m~ sequencer decodes the bus cycle signals (BCY, the sub-block. If a retry Is requested, RTr Is entered. CS, R/W, BYPI, CMD, etc.) generated by the CPU, and RT4 Fourth RT state. Used only for burst transfers, which generates the timing for the basic cache memory oper- take two clocks each. Until replacement Is complete, the ation cycle. The main sequencer determines whether the state machine ping-pongs between RT4 and RT5. The data Is written at RT5. accessing is a cache memory access, a cache memory bypass access, or a cache command access. The main RT5 Last RT state. Accepts data from burst transfers. If the sequencer enters the standby state when the replace transfer Is over, RTw Is entered. On a retry request, RTr Is entered. sequencer is in operation. 7 JlPD71641 NEe Tabl. 1. Bus In'erface Bus State Description St.,.. (conI) Diagnosis Sequencer· The dlagnosis sequencer consists of the direetory trace RTr m retry state. nansltlons directly to Rn, which begins sequencer and the internal diagnosis sequencer. The the cycle again. directory trace sequencer performs cache self- RTw RT recovery state. During this state, If the replacement diagnostics and dump processing. The internal diagno.- was successful, the "PD71641 tag store Is updated. and sis sequencer sequentially generates the memory diag- the data thatthe CPU requested Is made avallable.lfthe cycle was aborted, the bypass state Is entered. nostics data for the issuance of internal diagnostics commands. and the collects the data. Tb Bypass state. The bypass cycle was started by T2 soTb walts for the system memory to respond with SRDY, then returns to TI. Tf Fatal error state. If during Tm an unrecoverable error occurs. Tf Is entered to record the error. then a bypass cycle Is entered by going to Tb. Flgur.3. SIM Sta'. DIagram Always Not Burst Mode' Replacement Not Completed SRDY# Asserted Fatal Internal Error Replacement Completed + (BERR# Asserted, RT/BY# = 0) SRDY# Asserted Replacement Replacement Completed Bus Error Abort (BERR# Asserted; RT/BY# = 0) Replacement Completed Repeat Once 83YL-6288B 8 NEe pPD71641 ELECTRICAL SPECI FICATIONS AC Characteristics (cont) Parameter Symbol Min Max Unit Condition Absolute Maximum Ratings ns VIL 2 = 1.7V ClK low-level width ~KL 20 TA = 25°C ClK rise time tRK 3 ns 1.7 to 3.0 V Supply voltage,Voo -0.5 to + 7.0 V ClKfall time tFK 3 ns 3.0 to 1.7V Input voltage Other than ClK, VI1 -0.5 to Voo +0.3 V Reset, Purge ClKVI2 -0.5 to Voo +1.0 V Number of reset tCYKRS 10 tCYK CL = 100 pF clock Output voltage, Vo -0.5 to Voo +0.3 V RESET setup time tSRSK 7 ns Operating temperature range, TOPT -10to +70°C (vs. ClK.!.) Storage temperature range, TSTG -SO to + 15O"C RESET retention tHKRS 8 ns time (vs. ClK .!.) Exposure to Absolute Maximum Ratings for extended periods may affect device reliability; exceeding the ratings could cause permanent Number of purge tCYKPG 3 tCYK damage. clock PURGE setup time tSPGK 7 ns Capacitance (vs. ClK.!.) TA = +25°C; Voo = GND = 0 V PURGE retention 8 ns tHKPG Parameter Symbol Min Max Unit Condition time (vs. ClK .!.) Input capacitance CI 15 pF f = 1 MHz; CPU Input unmeasured Output capacitance Co 15 pF Address setup time tSAK 5 ns CL = 100 pF pins returned (vs. ClK 1) Input/output CIO 15 pF to OV capacitance Address retention tHKA 15 ns time (vs. ClK 1) DC Characteristics ~setuptime tSBCK 7 ns TA = -10 to +70°C; Voo = +5.0V::I:10% (VS. ClK 1) Parameter Symbol Min Max Unit Condition ~ retention time tHKBC 8 ns (vs. ClK1) Input voltage, VIH1 2.2 Voo + 0.3 V Other than ClK high 4.0 Voo + 0.3 V ClK CS' setup time tSCSK 7 ns V1H2 (vs. ClK 1) Input voltage, VIL1 -0.5 0.8 V Other than ClK low CS' retention time tHKCS 8 ns VIL2 -0.5 0.6 V ClK (vs. ClK 1) Output voltage, VOH 2.4 V 10H = -400 p.A 'CMi5 setup time tSCMK 7 ns high (vs. ClK 1) Output voltage, VOL 0.45 V 10L = 3.2mA CMD retention tHKCM 8 ns low time (vs. ClK 1) Input leakage III ::1:10 p.A lWPi setup time tSBIK 7 ns current (vs. ClK 1) Output leakage ILO ::1:10 p.A 1WPi retention time tHKBI 8 ns current (vs. ClK 1) Operating 100 250 mA fiN = 20 MHz RJW setup time tSRWK 7 ns current (VS. ClK 1) RJW retention time tHKRW 8 ns AC Characteristics (vs. ClK 1) TA = -10 to +70°C; Voo = +5 V ::1:5% CLAMP setup time tSCPK 25 ns Parameter Symbol Min Max Unit Condition (vs. ClK 1) Clock CLAMP retention tHKCP 0 ns time (vs. ClK 1) Clock frequency tCYK 50 125 ns RT/BY setup time tSRTK 7 ns ClK high-level ~KH 20 ns VIH2 = 3.0V (vs. ClK.!.) width 9 pPD71641 NEe AC Characteristics (cont) Replace/Bypass Timing Specifications Parameter Symbol Min Max Unit Condition Parameter Symbol Min Max Unit Conditions RT/BY retention tHKRT 8 ns CL = 100 pF BRC setup time tSBRK 7 ns CL = 100 pF time (vs. ClK J.) (ClKJ.) OPAR setup time tSOPK 7 ns BRC hold time tHKBR 8 ns (vs. ClKJ.) (ClKJ.) OPAR retention tHKDP 8 ns ClKt-lmEO tOKRRQ 25 ns time (vs. ClK .1.) valid delay mR setup time tSRKK 7 ns CPU-Side Output Timing Specifications (ClK.1.) Parameter Symbol Max Unit Condition mRholdtlme tHKRK 8 ns (ClKJ.) Add valid - AHIT delay tOAAH 50 ns CL = 25pF ClK .1. - 'OFIDV valid delay 25 ns CL = 100pF ClK J. - AAE valid tOKRAE 25 ns tOKCRY delay ClK J. - ~ valid delay tOKMS 25 ns ClK t - 'FfBOY tOKRB 25 ns ClK t - BYJ50 valid delay tOKBO 25 ns valid delay ClK t - CRO - 'OR3 J. delay tOKCRL 25 ns ClK t - RC valid tOKRC 25 ns delay ClK J. - CRO - 'OR3 t delay tOKCRH 25 ns ClK t - RC float tFKRC ns ClK J. - 'CWO - mv3 valid delay tOKCW 25 ns delay ClK t - ~ - CR21 J. delay tOKCR2L 25 ns SRD'Y setup time tSSRYK 7 ns ClK J. - ~ - 'Ci121 t delay tOKCR2H 25 ns (ClKJ.) ClK J. - 'CW2O- 'OW21 delay tOKCW2 25 ns SRI5Y hold time tHKSRY 8 ns (ClKJ.) ClK t - FATAL valid delay tOKFT 25 ns §Ei1R setup time tSBEK 7 ns ClK t - FAULT valid delay tOKFL 25 ns (ClKJ.) ~holdtlme tHKBE 8 ns Command Access/Bus Monitor Timing (ClKJ.) Specifications Parameter Symbol Min Max Unit Conditions DUMP Timing Specifications RAO-RA3 set·up time (ClK 1) tSRAK 10 ns CL = 100 pF Parameter Symbol Min Max Unit Conditions RAO-RA3 hold time (ClK 1) tHKRA 10 ns CL = 100 pF ClK J. - M~·MAa1 tOKMA 25 ns 00-03 setup time (ClK 1) tSOK 15 ns delay 00-03 hold time (ClK 1) tHKD 8 ns ClK J. - MAa·~A31 tFKMA ns floating 00-03 valid delay tOKD 25 ns 00-03 float delay tFKD ns MA hold time (ClK J.) tHKMA 8 ns MA setup time (ClK J.) tSMAK 15 ns MAS' hold time (ClK.1.) tHKMS 10 ns MAS' setup time (ClK J.) tSMSK 10 ns 10 NEe pPD71641 Timing Waveforms AC Test IlIIOutput (except CLK) Resel/PU'1Ie Timing 2.4 V --y. 2.2 V 2.2 V V- elK 0.45V ~...;0.;.;..8....;.V_ _ _ _ _ _..;.;0.~8~VA- 83YL-6151A AC Test IlIIOutput (CLK) RESET 4.0 V --y. 3.0 V 3.0 V V- 0.6 V ~_1_.7_V_ _ _ _ _ _....;.1....;.7 V __A - 83YL-6152A Clock Timing elK elK PURGE 83YL-6154A 83YL-6153A 11 pPD71641 CPUlnpuf T1 T2 DPAR :C ~_ _ _ _ _ _ _ 83YL-6155B 12 ttiEC IIPD71 641 CPU Output T1 T2 ClK A31-A3 ~ tDAAH I I ~~~__~_______ AHIT ~--------~~-------- _t:DKCRYh~1 '----- CRDY =x _lbK+?-~1'----- MISS =x I I tDKCRl y ___b_ tDKFT FATAL =x __ _]tDKFL FAULT ----------- 83VL-6156A 13 pPD71641 NEe Command Access Timing T2 TC TC TI ClK RA3- RAO D3-DO 83YL·6159B Bus Monitor Timing ClK 'MA31 - MA3 83YL-616OA 14 NEe pPD71641 ReplBee Timing Tm RT1 RT1 ClK BRC tOKRRC \4----+1 tOKRAE t+---~ tOKRB 14-------.1 tOKRC RC3-RCO --------------------------------------------------~ 83YL-6157B Bypsss Timing Dump Timing RT2 RT3 RT1 RT2 RT1 Tc Ti 1\1 ClK \ IDKMAF~:.. MA31-MA3~ 15 pPD71641 1tIEC 16 NEe Development Tools 6-1 Development Tools NEe Section 6 Development Tools CC7011S Sa V-Series C Compiler DDK-70320 Sb Evaluation Board for V25 Microcomputer DDK-70330 Sc Evaluation Board for V35 Microcomputer IE-70136 Sd In-Circuit Emulator for p.PD70136 (V33) Microprocessor IE-70136-PC Se In-Circuit Emulator for p.PD70136 (V33) Microprocessor IE-70208, IE-70216 Sf In-Circuit Emulators for p.PD70208 (V40) and p.PD70216 (V50) Microprocessors IE-70320 S9 In-Circuit Emulator for p.PD70320/70322 (V25) Microcomputers IE-70330 6h In-Circuit Emulator for p.PD70330/70332 (V35) Microcomputers RA70116 6i Relocatable Assembler Package for V20-V50 Microprocessors RA70136 6j Relocatable Assembler Package for V33 Microprocessor RA70320, Sk Relocatable Assembler Package for V25N35 Microcomputers V25N35 MINI-IE Plus 61 In-Circuit Emulator V40N50 MINI-IE 6m In-Circuit Emulator 6-2 NEe NEC Electronics Inc. CC70116 V-Series C Compi ler Description o Runs under a variety of operating systems -MS .. DOS The CC70116 C Compiler package converts standard C -VAXNMS® source code into relocatable object modules for the NEC - VAX/UNIXTM 4.2 BSD or Ultrix® V20® (~PD70108), V30® ~PD70116), V40™ ~PD70208), and V50™ ~PD70216) microprocessors and the V25™ ~PD70320) and V35 ™ ~PD70330) single-chip micro- Ordering Information computers. These modules are compatible with those Part Number Description produced by the RA70116 V20-V50 Relocatable Assem- CC70116-D52 MS-DOS, 5" double-density floppy diskette bler package and the RA70320 V25N35 Relocatable As- CC70116-WT1 VAX/VMS, 9-track 1600BPI magnetic tape sembler package and may be linked with other modules CC70116-VXT1 VAX/UNIX 4.2 BSD or Ultrix, 9-track 1600BPI using the appropriate linker provided with the assembler magnetic tape package. Features Extensions to Standard C o Standard Kernighan and Ritchie C Enumeration data type: Similarto the enumerated type in - Defined in UNIX System III Pascal, this allows the definition of a limited set of o Supports small and large memory models [mnemonic] values for a variable, thus preventing as- signment of invalid values to the variable. o NEC enhancements - Enumeration data type support Assignment of all members by a structure name: Allows - Assignment of all members by a structure name assignment of all the members of a structure from - Ability to use identical names in identifiers of another structure of the same type simply by using the different types in different structures names of the structures. - Addition of a void type to declare functions with Ability to use identical names for identifiers of different no return val ue types in different structures: Allows the same member - Addition of char as a data type for which name in two different structures to have a different name unsigned can be specified in each. - Ability to initialize structures with bit fields o CC70116 library conforms to UNIX System III Addition of a void type: Prevents the use of functions ~ which return no value in expressions where a return ~ specifications value is required. - MS-DOS® and CP/M-86® dependent functions included Addition of char as a data type for which unsigned can o C macros for sorting and converting ASCII code be specified: Allows the full 8 bits of the char data type to characters be used as a value, rather than only the low-order 7 bits. o User-selectable object code optimizer Ability to initialize structures with bit fields: Allows structure with bit-field members to be initialized via the C construct. Compiler Options The CC70116 C Compiler supports the following options V20 and V30 are registered trademarks of NEC Corporation. V25, V35, V40 and V50 are trademarks of NEC Corporation. during compilation. UNIX is a trademark of AT&T. CP/M-86 is a registered trademark of Digital Research Corporation. A Generates assembly language listing MS-DOS is a registered trademark of Microsoft Corporation. B VAX, VMS, and Ultrix are registered trademarks of Digital Equipment Specifies drive for compiler phases Corporation. C Leaves comments in C source image file (used with P) D Defines a name 50222 CC70116 NEe E Outputs C source image to a standard output fdopen lseek* qsort strncpy device after only compiler control line fflush mktemp rand swab processing fgetc mpm1* read* ungetc H Generates an object module for the interrupt fgets mpm2* rewind unlink* handling section of RX116 (realtime operating fopen mpm3* sbrk* write* system) fprintf mpm4* scanf fputc mpm5* setbuf Specifies drive for include files fputs mpm6* sprintf NS Suppresses symbol table information in object module C Macros o Selects optimization P Outputs C source image to a file after only Included with the C compiler are C macros for sorting compiler control line processing and converting ASC II code characters. These macros T Limits· compiler phases to be input from drive are listed below. selected by B option _to lower getchar isgraph isxdigit U Nullifies the initial definition of the name _toupper salnum islower putc defined by 0 option feof isalpha isprint putchar X Generates object code for the large model ferror isascii ispunct toascii fileno iscntrl isspace Memory Models getc isdigit isupper The CC70116 supports the small and .large memory models. With the small model, a total of 128K bytes of Start-Up Modules memory can be accessed: 64K bytes for data and 64K Six small and large start-up modules are included in the bytes for code.· With the large model, up to 1M byte of CC70116 C Compiler package to initialize programs memory can be accessed for code and data. In addition, generated by the compiler: modules for embedded sys- data constants can be permanently encoded into the tems; modules for executing programs under the MS- ROM space. Programs using the small memory model DOS operating system; modules for executing programs are more efficient in terms of space utilization and under the CP/M-86 operating system. execution speed and are recommended when your pro- gram can fit into one data and one code segment. Operating Environment CC70116 Library Functions The CC70116 package can be supplied to run under a variety of operating systems. One version is available for The CC70116 C Compiler library conforms to the UNIX an MS-DOS system with one or more disk drives and at System III library specifications. Some library routines least 128K bytes of system memory. Other versions are are operating system dependent and may only be used available to run on a Digital Equipment Corporation VAX to create programs that run under MS-DOS or CP/M-86; computer with UNIX 4.2 BSD or Ultrix or VMS (Version other functions do not call the operating system, and 4.1 or later) operating systems. may be used in any program. To produce executable programs, a linker (LK70116 or In the list below, the asterisk (*) means user system, LK70320) and a hexadecimal object code converter MS-DOS, or CP/M-86 dependent. (OC70116 or OC70320) program are required and the librarian (LB70116 or LB70320) program is useful. These abort* fread MSDOS1* srand programs are available separately from NEC Electronics abs freopen MSDOS2* sscanf Inc. as part of the RA70116 V20-V50Relocatable Assem- access* fscanf MSDOS3* strcat bler package or the RA70320 V25N35 Relocatable As- atoi fseek open* strchr sembler package. atol ftell perror strcmp The linker produces an absolute load module containing close* fwrite .printf strcpy both symbol and source code line number information creat* getchar putchar strlen and the absolute object code. This module may be exit* gets puts strncat loaded directly into the appropriate NEC in-circuit emu- fclose getw putw strncmp lator for execution with full symbolic debug capabilities. 2 NEe CC70116 The hexadecimal object code converter produces an extended hexadecimal format object code file that may be loaded into a PROM programmer. Documentation For further information on source program format, com- piler operation, and actual program examples, the fol- lowing documentation is furnished with the CC70116 compiler package. Additional copies may be obtained from NEC Electronics Inc. • CC70116, V-Series C Compiler Operation Manual (MS-DOS) • CC70116, V-Series C Compiler Operation Manual (VMS) • CC70116, V-Series C Compiler Operation Manual (UNIX) License Agreement CC70116 is sold under terms of a license agreement that must be completed and returned to NEC Electronics before the C compiler is shipped. A copy of this license agreement may be obtained from any NEC Electronics Sales Office. Software updates are provided to regis- tered users. 3 CC70116 NEe 4 NEe NEG Electronics Inc. DDK·70320 Evaluation Board for V25 Microcomputer Description Ordering Information Part Number Description The DDK-70320 is an evaluation board for NEC's ~PD70320 (V25 TM) 16-bit, single-chip microcomputer. DDK-70320 ~PD70320 Evaluation Board The DDK-70320 gives you maximum flexibility when evaluating and designing with the ~PD70320. It features V25 and V35 are trademarks of NEC Corporation. PCJ)(T and PC AT are registered trademarks of International Business a ~PD70320 with 32K bytes of EPROM, 32K bytes of Machines Corporation. RAM, two RS-232C communication ports, and a power- ful monitor program. The DDK-70320 is on an IBM PC DDK-70320 Evaluation Board compatible card and includes a prototyping area for building your application-specific hardware. A copy of RA70320, the V25N35™ Family Relocatable Assembler package for use on an IBM PC, PCf)(T®, PC AT®, or compatible host computer, is shipped with each DDK-70320 to allow you to develop code for evaluation purposes. Also included with the DDK-70320 is an emu- lator controller program for the IBM PC, a variety of V-Series software utilities, a small demonstration pro- gram, and a complete set of documentation. This total package provides you with a fast, efficient means for evaluating the capabilities of the ~PD70320 for your application. Features o ~PD70320 (V25) Evaluation Board with power supply Hardware o On-board memory The DDK-70320 (figure 1) features 64K bytes of on-board - 32K-byte EPROM (user expandable to 64K bytes) memory: 32K bytes of EPROM and 32K bytes of RAM. - 32K-byte RAM (user expandable to 64K bytes) The EPROM area, which is dedicated to a powerful o Powerful on-board debug monitor monitor program, can be expanded up 64K bytes. The - Real-time and single-step operation RAM area can also be expanded to 64K bytes and ~ - Display/change memory and internal registers - Display/change special-function registers contains the interrupt vector space, the monitor work 1:6:1 area, and a user area for program downloading. - Line assembler and disassembler - Multiple software breakpoints A ~PD71051 serial communications controller is con- -Input/output from I/O ports nected through an RS-232C driver/receiver to a DB25 pin - User program downioad capability connector. The monitor uses this serial interface to o Two RS-232C serial interfaces communicate with an external terminal or host com- - One for a terminal or host computer puter. A second RS-232C channel is connected to serial - One for auser application port 0 of the V25 for user applications. o Prototyping area for user circuitry A RESET switch returns the DDK-70320 to the power-up o IBM PC card form factor state with or without losing the contents of the external RAM. An NMI switch returns control to the monitor from o RA 70320 V25N35 Relocatable Assembler package a user program while saving the user's state. o Host control software for IBM PC, PC/XT, PC AT, or An ac/dc converter supplies power to the DDK-70320 in compatibles the stand-alone mode. The DDK-70320 can also receive o V-Series software uti lities and demonstration its power directly from the IBM PC bus. programs 50228 ODK-70320 Software The DDK-70320 has 10 address breakpoints, which are set in the GO command line. The monitor sets a break- The DDK-70320 comes with a powerful interactive mon- point by substituting a BRK 3 instruction (opcode CCH) itor to facilitate software design using the p.PD70320. A for an instruction in the user's program. user program can be downloaded into user' RAM and executed, in real-time with or without breakpoints, or it Additional commands are available to display, fill~ change,or move memory; display or change the general- can be executed one instruction at a time. During purpose' and special-funbtion registers; input from or single-stepping{ the registers, program counter, and the output to an 1/0 port; disassemble memory; assemble a next instruction to be executed are displayed. line of source code; and display the command list. Table 1 lists all of the DDK-70320 monitor commands. Figure 1. DDK-703~O Block Diagram Address/Control Bus r--- ! EPROM I ) Buffers " I SRAM V25 ----- V25 System Bus 1 I r--- "I Data Bus l' -1 UART I ;, ' " Buffers ... .- " " A ") Expansion ... Connector '---- 83YL·6696B Table 1. DDK-70320 Command Us, RA70320 Relocatable Assembler Command Description Package' A A(ssemble) a line of source ,code The RA70320 Relocatable Assembler package converts D D(ump) memory symbolic source code for NEC's V25N35 family of mi- E E(nter) memory crocomputers into executable absolute address object F F(ill) memory code. A copy of RA70320 is included with the DDK-70320 for use on an IBM PC; PC/XT, PC AT, or compatibles. With G G(o) with optional breakpoints this software, you can easily write evaluation programs H H,(elp) menu for the p.PD70320., I(nput) a byte from an I/O port L L(oad) a HEX file onto the DDK-70320 Emulator Controller Program M M(ove) a block of memory Absolute address object files produced by the RA70320 o O(utput) a byte to an I/O port Relocatable Assembler package can be downloaded to R R(egister) display/alter R[reg] the DDK-70320 using the NEC Emulator Con,troller pro- gram supplied with the ODK-70320. This controller pro- S S(pecial) function register display/alter gram allows you to download files from your IBM PC or T T(race) execution compatible to the DDK-70320board.'The program pro- U(nassemble) a block of rr\emory vides the following additional capabilities. ? H(elp) menu • Complete DDK-70320 control from host 'console • On-line help facilities • Host system directory and file display • Storage of debug session on disk' 2 ~EC DDK·70320 Documentation For further information, refer to the DDK-70320 User's Manual supplied with the evaluation board. Additional copies may be obtained from NEC Electronics Inc. License Agreement RA 70320 is provided under the terms of a license agree- ment included with the DDK-70320 board. The accom- panying card must be completed and returned to NEC Electronics Inc. to register the license. Software updates are provided to registered users. 3 DDK·70320 NEe 4 NEe NEG Electronics Inc. DDK·70330 Evaluation Board for V3S Microcomputer Description o Host control software for IBM PC, PCIXT, PC AT, or compatibles The DDK-70330 is an evaluation board for NEC's ~PD70330 (V35™) 16-bit, single-chip microcomputer. o V-Series software utilities and demonstration The DDK-70330 gives you the maximum flexibility when programs evaluating and designing with the ~PD70330. It features a ~PD70330 with 128K bytes of EPROM, 128K bytes of Ordering Information RAM, two RS-232C communication ports, and a power- Part Number Description ful monitor prog'ram. The DDK-70330 board includes a DDK·70330 ~PD70330 Evaluation Board prototyping area for building your application specific hardware. Hardware A copy of RA70320, the V25 ™N35 ™ Family Relocatable Assembler package for use on an IBM PC, PCIXT@, PC The DDK-70330 (figure 1) features 256K bytes of on- AT@, or compatible host C?omputer, is shipped with each board memory: 128K bytes of EPROM and 128K bytes of DDK-70330 to allow you to develop code for evaluation RAM. The EPROM area includes a powerful monitor purposes. Also included with the DDK-70330 is an emu- program and a user area. The RAM area can be ex- lator controller program for the IBM PC, a variety of panded to 512K bytes by replacing the 64K x 4 dynamic V-Series software utilities, a small demonstration pro- RAMS with 256K x 4 dynamic RAMS. This RAM space gram, and a complete set of documentation. This total contains the interrupt vectors, the monitor work area, package provides you with a fast, efficient means for and a user area for program downloading. eval uating the capabilities of the ~PD70330 for your A ~PD72001 multiprotocal serial communications con- application. troller is connected through an RS-232C driver/receiver to a DB25 pin connector. The monitor uses this serial Features interface to communicate with an external terminal or o ~PD70330 (V35) Evaluation Board with power supply host computer. A second RS-232C channel is available for connection to the second channel oft he ~PD72001 or o On-board memory one of the serial ports of the ~PD70330 for user applica- - 128K-byte EPROM tions. DMA interface circuitry between the ~PD72001 -128K-byte RAM (user expandable to 512K bytes) and the V35 is provided to allow the you to evaluate the ~ o Powerful on-board debug monitor DMA capabilities of both devices. I:i:I - Real-time and single-step operation - Display/change memory and internal registers A RESET switch returns the DDK-70330 to the power-up - Display/change special-function registers state with or without lOSing the contents of the external - Line assembler and disassembler RAM. An NMI switch returns control to the monitor from - Multiple software breakpoints a user program while saving the user's state. An ac/dc - Input/output from I/O ports converter supplies power to the DDK-70330. - User program download capability o Two RS-232C serial interfaces - One for a terminal or host computer - One for a user application o Prototyping area for user circuitry o RA 70320 V25N35 Relocatable Assembler package V25 and V35 are trademarks of NEC Corporation. PC/XT and PC AT are registered trademarks of International Business Machines CorporatIon. 50221 DDK·70330 NEe Figure 1. DDK-70330 Block Diagram I Expansion I I RS-232C PO-P2 I I Serial Ports I Serial VO Options I I I Controls I Control DMALoglc I I Logic Options I V35 CPU High-Byte Data 1 DMAByte ~ Serial Data Xaver VO Low-Byte Data I Address Address I Demux I .t=; ~ " " - - 64K or 256K DRAM .t::::::j ~ - - J-- .- ,..-- - 128K EPROM r--- - I Expansion I --- 83SL-6683B 2 NEe DDK·70330 Software RA70320 Relocatable Assembler Package The DDK-70330 comes with a powerful interactive mon- The RA 70320 Relocatable Assembler package converts itor to facilitate software design using the p.PD70330. A symbolic source code for NEC's V25N35 family of mi- user program can be downloaded into user RAM and crocomputers into executable absolute address object executed in real-time with or without breakpoints, or it code. A copy of RA70320 is included with the DDK-70330 can be executed one instruction at a time. During for use on an IBM PC, PC/XT, PC AT, or compatibles. With single-stepping, the registers, program counter, and the this software, you can easily write evaluation programs next instruction to be executed are displayed. for the p.PD70330. The DDK-70330 has 10 address breakpoints, which are Emulator Controller Program set in the GO command line. The monitor sets a break- point by substituting a BRK 3 instruction (opcode CCH) Absolute address object files produced by the RA70320 for an instruction in the user's program. Relocatable Assembler package can be downloaded to the DDK-70330 using the NEC Emulator Controller pro- Additional commands are available to display, fill, gram supplied with the DDK-70330. This controller pro- change, or move memory; display or change the general- gram allows you to download files from your IBM PC or purpose and special-function registers; input from or compatible to the DDK-70330 board. The program pro- output to an I/O port; disassemble memory; assemble a vides the following additional capabilities. line of source code; and display the command list. Table 1 lists all of the DDK-70330 monitor commands. • Complete DDK-70330 control from host console • On-line help facilities Table 1. DDK-70330 Command Us, • Host system directory and file display Command Description • Storage of debug session on disk A A(ssemble) a line of source code D D(ump) memory Documentation E E(nter) memory For further information, refer to the DDK-70330 User's F F(ill) memory Manual supplied with the evaluation board. Additional G G(o) with optional breakpoints copies may be obtained from NEC Electronics Inc. H H(elp) menu L I (nput) a byte from an I/O port L(oad) a HEX file onto the DDK-70330 License Agreement RA 70320 is provided under the terms of a license agree- ment included with the DDK-70330 board. The accom- II M M (ove) a block of memory panying card must be completed and returned to NEC • 0 O(utput) a byte to an I/O port Electronics Inc. to register the license. Software updates R R(egister) display/alter R[reg] are provided to registered users. S S(pecial) function register display/alter T T(race) execution U U(nassemble) a block of memory ? H(elp) menu 3 DDK·70330 ~EC 4 NEe NEC Electronics Inc. IE-70136 In-Ci rcuit Emulator for pPD70136 (V33) Microprocessor Description o Trace buffer: disassemble, frame, and code trace display The IE-70136 is a portable, stand-alone, in-circuit emu- - 8192 frames by 64 bits lator that provides hardware emulation and softwa:re - Programmable enable/disable points debug capabilities for the ItP070136 (V33 TM) 16-bit mi- croprocessor. o Performance modes avai lable for software performance evaluation: time interval, module Real-time and single-step emulation-coupled with soft- activity, and count modes ware performance analysis, sophisticated memory map- ping, symbolic debugging, macrofile command facili- o Full symbolic debug capabilities ties, user-programmable breakpoints and trace o Symbolic line assembler and disassembler qualifiers-create a powerful development environment. o Macrofile command capability Command entry is simplified by eight dynamically re- o Dual window display in emulation mode programmed function keys, called softkeys, that visually prompt a user with the next level of commands. User o Softkey and menu-driven user input programs can be uploaded/downloaded from a variety of o System commands are available while in emulation host systems by a serial link or they can be loaded mode directly from an MS-OOS® disk. Ordering Information Features Part Number Description o Portable, stand-alone, in-circuit emulator IE-70136-A016 In-circuit emulator for p.PD70136 (V33) - 9.5-inch amber CRT display EP-70136L-A 68-pin PLCC/PGA emulation probe/socket - Two 5-inch, 640K-byte floppy-disk drives EP-70136GJ-A 74-pin plastic QFP emulation probe - ASCII keyboard with eight function keys - EPROM programmer: 2732, 2764, 27128, 27256, 27512 HARDWARE DESCRIPTION - Supports NEC's V20®, V30®, V25 TM, V35 TM, V40 ™, The IE-70136 (figure 1) consists of a system chassis with V50 TM, V53 ™ , and V60 ™ microprocessors a detachable ASCII keyboard and an emulation pod unit. o Precise real-time and single-step emulation The chassis houses a 9.5-inch amber CRT, two 5-1/4 - Selectable internal clock: 8 MHz or 16 MHz inch, 640K-byte floppy-disk drives, an EPROM program- - Up to 16-MHz external TTL clock mer, a card cage, a power supply, and three control o Emulation memory bus size selection boards. T, he boards are main CPU, expansion system . . , o 256K bytes of memory for prototype memory memory, and emulation pod interface. ~ emulation; mappable into 16M-byte address space in The main CPU board contains a supervising CPU, 512K 4K-byte units bytes of system memory, and the peripheral interfaces. o Automatic break with disconnected target I/O The expansion system memory board provides an addi- access tional 512K bytes of system memory. o Six user-programmable hardware breakpoints The em41ation pod interface contains the clock selection - Real-time break on address, data, CPU status, or logic, emulation bus sizing switch, and enabling of the external input ROY and 8S8/8S16 signals from the target to emulator - Selectable as execution or nonexecution memory. The emulation pod contains the V33 EVACHIP, o 256 user-programmable software breakpoints external event input, trigger out, and target interface. This' unit connects to the target system by the EP- V20 and V30 are registered trademarks of NEC Corporation. 70136L-A emulation probe forthe 68-pin PLCC/PGA For V25, V33, V35, V40, V50, V53, and V60 are trademarks of NEC Corporation. the 74-pin plastic QFP, an EP-70136GJ-A probe adapter MS-DOS is a registered trademark of Microsoft Corporation. is also needed. 50224 IE-70136 NEC The IE-70136 supports the following external interfaces: The target NMI and INT signals may be enabled or two RS-232C serial ports, one Centronics parallel printer disabled by the Configure command. port, and one RG B video output. Emulation The emulator can be converted to support NEC's V20, V25, V30, V35, V40, V50, V53, and V60 CMOS micropro- The IE-70136 executes #,PD70136 user programs in real cessors by exchanging the appropriate control boards time in three different modes: break, trace, and perfor- and the emulation pod unit. mance. In break emulation mode, 'the program is run in real time or in single-step mode until a breakpoint is Figure 1. IE-70136 System Configuration encountered. In trace emulation mode, the program is executed in real time while filling the trace buffer with bus information. In performance emulation mode, the emulator. can: (1) Measure the execution time between enable and disable points (2) Measure the accumulated execution time in three areas of memory and then display the ratio of time spent within each area in both absolute and rela- tive terms (3) Count the number of times a particular trigger point is satisfied between enable and disable points. Once emulation is stopped in either break or trace mode, the trace automatically displays one screen of data, Memory and I/O Mapping Capabilities ending on the laslinstruction executed. In performance The IE-70136 contains 256K bytes of zero wait-state mode, time is shown in a table and in a bar graph. At this emulation memory; 252K bytes are available for emulat- point, it is possible to display the contents of memory, ing target RAM (read/write) or ROM (read only) and the the general-purpose and special registers, the symbol remaining 4K bytes are reserved for use by the system tables, directories, and other information. All can be monitor. displayed individually or in split screen with the trace display. The windows may be scrolled independently. The complete 16M-byte memory space of the #,PD70136 must be mapped into one of the following categories. Break Capabilities Target Memory resident in target system (read/ The IE-70136 has six hardware breakpoints. Five can be write) set to occur in· response to a real-ti me event with the ROM External ROM emulation memory (read BCond command. The remaining one is reserved for only) setting a real-time address (execution only) breakpoint RAM External RAM emulation memory (read/ with the GO command. write) You can use the BCond command to set breakpoints to Locked Access inhibited memory (remaining occur on an address, a data value, or a CPU state. unmapped addresses) Hardware breakpoints can be either an execution or All memory mapping is executed in 4K-byte blocks using nonexecution type. An execution break occurs when an the Configure and Mapping softkey commands. If an instruction is clocked into the execution unit of the V33. A nonexecution break occurs when the bus condition is address mapped as "Iocked" is accessed or a write i.s satisfied regardless of the status of the instruction attempted to ROM, a break in the emulation will occur. queue. The I/O space of the #,PD70136 is always mapped to the An enable and disable point can also be specified to target. If the probe is not connected to a target system, a indicate when detection of hardware break and trace is break will occur in emulation when any target I/O is to start and stop. If not specified, trace and break accessed. detection is enabled when the GO command is exe- 2 t-IEC IE·70136 cuted. The external channel can also be used to create Run-Time Interval Mode. Execution time from the en- a breakpoint. Either the rising or falling edge can be able point to the disable point is repeatedly measured, selected. ' and the mean value, the maximum value, the minimum value, and the distributed values are stored. The mea- Up to 256 software breakpoints can be set plus an sured distribution values, from a maximum of six time additional one in the GO command. To set a software intervals, can be displayed graphically. breakpoint, the emulator replaces an instruction in the user's program with a BRK 0 instruction. A break will Module Activity. The accumulated execution time for occur when this instruction is executed, and the user's three areas of code (from enable to disable points) can program will be restored. This capability is not available be measured. The ratio of time spent in each one for program code executing out of ROM. A Check com- compared to the total measured time (ABS) and the ratio mand is provided to verify that the breakpoint can of time spent in each one compared to the time spent in all three areas (REL) can be displayed. If the overall actually be set. processing speed does not satisfy the desired speed, the portion of the code taking more time can be deter- Trace Capabilities mined and improved. This mode can be very effective for The trace buffer is 8192 frames by 64 bits wide and increasing total throughput. sampling is done on every machine cycle. The buffer is Count Mode. The number of times a trigger point is filled in round-robin fashion. The emulator traces the satisfied within an area of code (from enable to disable external address and data buses, the CPU and queue points) can be counted. Up to four trigger points can be status, and control signals. set and the ratio of the number of times each trigger The IE-70136 has five trace trigger pOints. When the point is satisfied to the total number of all triggers is trigger condition is true, a positive logic pulse is output displayed. on the TRIGGER OUT pin of the emulator pod. Separate ENABLE and DISABLE points can be set to restrict Address Specification tracing pr trigger detection to a particular section of An address can be specified as either a 24-bit absolute program code. If not used, tracing and trigger detection address (beginning with a ;) or as a segment:offset will be enabled when the GO command is issued. An address. Segment:offset addresses can be either physi- address point can be set with the GO command to cal, addressing only the base 1M byte, or logical. Logical record the trace after, about, or before the condition is addresses are converted to 24-bit physical addresses by true. The external input can also be used as a trigger the emulator according to the address extension table point. Either a positive or negative edge can be speci- fied. (EXPAND TABLE) specified by the SEText command. The trace data may be displayed in one of three modes: There are two types of expand tables. One uses the MMU disassembly, frame, or code. In disassembly mode, fetch (Memory Management Unit) in the CPU. However, con- and execution cycles are displayed separately, and bus version is done only during a break if the XA flag is set. . . , cycles are rearranged so that a fetch cycle and its Otherwise, no conversion is performed. A user-defined 1:6:.1 associated execution cycle are displayed next to each expand table is independent of the MMU. This table is other. In frame mode, the CPU bus cycle conditions are defined by loading the extended linker locator output file displayed as traced. In code mode, only the executed (EL70136), by definition in the program stage, or by fetch cycles are displayed. In disassembly and code copying the contents of the MMU. With the user-defined modes, the fetch cycle is displayed bright, the execution table,:conversion is performed regardless of the status of cycle is dim, and a trigger point is indicated by reverse the XA flag. video. If the user-defined expand table is selected, conversion back to logical address is performed according to this SOFTWARE DESCRIPTION table when displaying trace results in disassembly mode. Software Performance Analysis System Software Using the IE-70136, software performance can be eval- The IE-70136 is controlled by the MIOS/U proprietary uated in real-time in anyone of three different modes: operating system. Command input is simplified by eight run-time interval mode, module activity mode, and count function keys, providing a choice of up to 24 softkeys mode. Improvements in software performance can be within any menu level. The dynamically reprogrammed statistically measured. softkeys visually prompt with the next valid set of com- 3 IE·70136 NEe mands. The softkeys are at the bottom of the display that runs in the emulator itself and is supplied as part of screen and correspond to the eight function keys on the the IE-70136 package. The Multiple File Handler allows keyboard. To select a command, press a softkey. The the emulator to read MS-DOS disks, among others. softkeys are automatically relabeled with the next set of commands. Symbolic Debug and Line Assembly! Disassembly All system functions can be used in emulator mode. The IE-70136 system software uses an overlay method so The IE-70136 supports complete symbolic debugging of that a necessary program is loaded when a command is programs produced by NEC's RA70136 Relocatable As- input and then executed. File handling, communica- sembler Package and various third-party software pack- tions, and PROM writing can be performed during emu- ages, including those from Intel and Microsoft. The lation, reducing development time. symbols can be used as address and data constants in break, trace, and emulation control commands and are Table 1 shows some of the utility programs provided with displayed during disassembly. A symbolic line assembler the emulator. is also available to make modifications to existing pro- grams or to enter code from the keyboard. Table 1. IE-70136 Utility Programs Utility Function SPECIFICATIONS EMUV35 IE-70136 emulator software Table 2 gives the electrical, environmental, and physical KERMIT Communication program for file transfer specifications of the equipment. FI LESEFW File management for system disks Table 2. IE-70136 Specifications EDITOR Full screen editor AC power 90 to 132 V, 50/60 Hz, 400 W maximum FORMAT Floppy-disk formatter Temperature Operating: +5 to +40°C PROM Built-in EPROM programmer control program Storage: -20 to +50°C TERMINAL Terminal utility program for file transfer between emulator and another intelligent device Relative humidity Operating: 20 to 80% (noncondensing) SYMBOL Symbol table converter; converts non-SROC symbol Storage: 10 to 90% formats to SROC format Weight Main chassis: 40 pounds o BJCONV Object fi Ie converter: converts object files to and from Pod and cables: 4-3/4 pounds the Motorola SROC format Dimensions (L x W x H) 19.7 x 16.7 x 8.7 inches TIMESET Internal battery backed-up clock and calendar setting DE FINE Soft key definition DOCUMENTATION MDEVICE Disk format specification The following manuals are supplied with the in-circuit emulator. Additional copies may be obtained from NEC Connecting to Host Systems Electronics Inc. Host systems may be connected to the IE-70136 using • IE-70136 In-Circuit Emulator User's Manual the RS-232C connectors at the rear of the machine. • IE-70XXX-A Hardware User's Manual Parameters such as baud rates, character length, parity, and number of stop bits are software programmable to • IE-70XXX-A Software Utilities User's Manual suit the system being attached. The KERMIT communi- cations program is supplied with the emulator and can be used for uploading and downloading files. NEC cur- VAX and VMS are registered trademarks of Digital Equipment rently provides KERMIT for the VAX® under VMS® and Corporation. UNIXTM 4.2BSD or Ultrix™, the IBM PC, IBM PC/XT®, IBM Ultrix is a trademark of Digital Equipment Corporation. PC/AT®, or compatibles under PC-DOS® or MS-DOS. UNIX is a trademark of AT&T. PC/XT, PC AT, and PC-DOS are registered trademarks of International Files may also be transferred to the emulator via the Business Machines Corporation. RS-232C ports using the TERMINAL utility. The emulator MS-DOS is a registered trademark of Microsoft Corporation. acts as a terminal for data transfer. Another means of loading files into the IE-70136 is available with the Multiple File Handler utility, a program 4 t\'EC NEG Electronics Inc. IE-70136-PC In-Ci rcuit Emulator for pPD70136 (V33) Microprocessor Description o User-programmable software breakpoints - 100 logical/physical address breakpoints The IE-70136-PC is a low-cost in-circuit emulator that maximum provides hardware emulation and software debug capa- - Forced break possible bilities for the NEC ILPD70136 (V33™) 16-bit micropro- cessor. It is designed to be used with an IBM PC, PC/XT®, o Memory display/fill/move capability in byte or word PC AT®, or compatible machine under PC-DOS® or format MS-DOS®. - Access to normal or extended memory - Disassembler Features o Macro/batch processing capabilities o Interfaces to host PC via a parallel interface o Direct access to PC-DOS and MS-DOS system - PC interface card and cable included commands o Real-time and single-step emulation o LED displays for CPU status: RUN, NOREADY, -16-MHz internal clock HOLD, HALT - 2- to 16-MHz external clock o Load/Save programs using Extended CO F F, NEC - 65,535 instructions can be stepped in single LN K, Intel Extended HEX, and Motorola SROC command formats DOne 64K-byte block of emulation memory o Four user-programmable breakpoints Ordering Information - Real-time break on address during instruction Part Number Description fetch, data memory read/write, or I/O read/write IE-70136-PC In-circuit emulator for ~PD70136/70332 EP-70136L-PC 68-pin PLCC/PGA emulation probe/socket V33 is a trademark of NEC Corporation. IBM PC, PC/XT, PC AT, and PC-DOS are registered'trademarks of International Business Machines Corporation. MS-DOS is a registered trademark of Microsoft Corporation. Figure 1. IE-70136-PC System Configuration 50225 IE· 70i36·PC 2 NEe NEC Electronics Inc. IE·70208, IE-70216 In-Circuit Emulators for pPD70208 (V40) and pPD70216 (V50) Microprocessors Description o Trace buffer: machine cycle, mnemonic, and jump trace display The IE-70208 and.IE-70216 are portable, stand-alone, -1024 frames by 64 bits in-circuit emulators providing both hardware emulation - Programmable trigger point and trace qualifiers and software debug capabilities for the NEC p.PD70208 (V40TM) and p.PD70216 (V50™) 16-bit microprocessors. o Eight optional probes for tracing target system signals Real-time and single-step emulation in both native and 8080 emulation modes-coupled with sophisticated o Full symbolic debug capabilities memory mapping, user-programmable breakpoints and o Symbolic line assembler and disassembler trace qualifiers, symbolic debug, and macrofile com- o Macrofile command capability mand facilities-create a powerful development environ- ment. o Dual window display in emulation mode Command entry is simplified by eight dynamically re- o Softkey and menu driven user input programmed function keys, called softkeys, that visually prompt the user with the next level of commands. User Ordering Information programs can be uploaded/downloaded from a variety of Part Number Package host systems by a serial link or loaded directly from an IE-70208-A010 In-circuit emulator for ~PD70208 (with V40 pod) MS-DOS® disk. IE-70216-A010 In-circuit emulator for #,PD70216 (with V50 pod) Features IE-70000-2958 68-pin PLCC package emulation probe IE-70000 -2959 68-pin PGA package emulation probe o Portable, stand-alone, in-circuit emulator - 9.5-inch amber CRT display IE-70208-2010 Optional pod unit for ~PD70208 emulation - Two 5-inch, 640K-byte floppy-disk drives IE-70216-2010 Optional pod unit for ",PD70216 emulation - ASCII keyboard with eight function keys IE-70000-2954 Optional external logic probe. - EPROM programmer: 2732, 2764, 27128, 27256, IE-70000-2957 Optional 512K-byte expansion emulation 27512 memory - Supports NEC's V20®, V25 TM, V30®, V33 ™, V35 ™, V53 ™, and V60 ™ microprocessors o Precise real-time and single-step emulation HARDWARE DESCRIPTION - Programmable internal clock: 2 to 10 MHz in The IE-70208/216 (figure 1) consists of a system chassis 1-kHz steps with a detachable ASCII keyboard and an emulation pod ftI - External clock: 2 to 10 MHz unit. The chassis houses a 9.5-inch amber CRT, two 5-1/4 a:.I o Memory and I/O space mappable in 1K-byte blocks inch 640K-byte floppy disk drives, an EPROM program- o 256K bytes of memory for prototype memory mer, card cage, power supply, and three control boards. emulation; expandable to 768K bytes The boards are main CPU, emulation control, and trace- emulation memory. o Eight user-programmable hardware breakpoints - Real-time break on address, data, CPU status, or The main CPU board contains the supervising CPU, external probes 512K bytes of system memory, and the peripheral inter- - Break on pass count and register, memory, or I/O faces. The emulation control board controls the memory values mapping, event detection, and the break and emulation - Selectable as execution or code fetch break CPU status circuitry. The trace-emulation board con- o 16 user-programmable software breakpoints tains a trace buffer and 256K bytes of external emulation memory. The optional IE-70000-2957, a 512K-byte ex- panSion emulation memory board, may be installed to increase the external emulation memory to 768K bytes. V20 and V30 are registered trademarks of NEC Corporation V25. V33. V40. V50, V53. and V60 are trademarks of NEC Corporation 50227 IE-70208, ·1 E"70216 NEe The external emulation pod unit houses the emulation Memory and I/O Mapping Capabilities CPU, high-speed buffers, and clock selection logic. The emulation pod unit can be connected to the target The IE-70208/216 contains 256K bytes (expandable to 768K bytes) of emulation RAM (0 wait states) for emu- system with one oftwo emulation probes: IE-70000-29S8 lating external RAM or ROM. The complete 1M-byte supports the 68-pin PLCC package and the IE-70000- 29S9 supports the 68-pin PGA package. These probes memory space of the #tPD70208/70216 must be mapped are ordered separately. into one of the following categorie~ of memory: The IE-70208/216 supports the following external inter- Target Memory resident in target system faces: two RS-232C serial ports, one Centronics parallel (read/write) printer port, an RG B video output, and eight optional ROM External ROM emulation memory external logic probes. These probes (IE-70000-29S4) can (read only) be used for tracing and/or breaking on signals from the RAM External RAM emulation memory target system. (read/write) Ease of migration within the V-Series family 91. emulators Locked Access inhibited memory is provided in the system design. To alternate between (remaining unmapped addresses) V40 and VSO emulation simply requires changing the All memory mapping is done in 1K-byte blocks using the emulation pod unit. The emulator can also be converted Configure and Memory softkey commands. If an address to support the V20, V2S, V30, V33, V3S, VS3, and· V60 mapped as "Iocked" is accessed, a break in the emulation CMOS microprocessors by exchanging the appropriate will occur. control boards and the emulation pod unit. The complete 64K-byte I/O space ofthe #tPD70208/70216 Figure 1. IE-70208/216 System Configuration must be mapped in 1K-byte blocks to the emulation memory, the target system, or as "Iocked" memory. Emulation The IE-70208/216 executes #tPD70208 and #tPD70216 user programs in real~time in four different modes: break, trace, count, and time. (1) In break emulation mode, the user's program is executed in real-time or in single-step until a break- point is encountered. (2) In trace emulation mode, the user's program is executed until the trace buffer is filled. (3) During the count emulation mode, the emulator counts the number of times a particular trigger point is reached within a given set of conditions. (4) In time emulation mode, the emulator measures execution time between the specified enable and disable points. The measurable time range is from 0 to 72 minutes (in microseconds). 2 NEe IE· 70208, IE· 70216 Once emulation is stopped in either break ortrace mode, Trace Capabilities the trace automatically displays one screen of data, ending on the last instruction executed. In count or time The trace buffer is 1024 frames by 64 bits wide and mode, the current count or elapsed time is displayed. At sampling is done on every machine cycle. The buffer is this point, it is possible to display the contents of filled in a round-robin fashion. The emulator traces the memory, the general-purpose and· special registers, the external address and data buses, the CPU and queue symbol tables, directories, and other information. All can status, and the eight external logic probes. be displayed individually or by split screen with the trace The IE-70208/216 has eight trace specification points. display. The windows may be scrolled independently. One of these is reserved for setting a trigger point in the Prior to the start of emulation, the user can specify GO command. The other seven can be specified as trace whether an external or internal clock will be used for trigger,enable, disable, qualify, or check points. Check ~mulation, whether the internal or external ready sigDal points are used to display register, memory, or I/O IS used, and whether the NMI signal from the target contents each time a certain event or address occurs. system should be enabled or disabled. If the internal The trace buffer can be split into a maximum of 64 clock is used, it can be set from 2 to 10 MHz in 1-kHz partitions to allow tracing of particular segments of the steps. user program (Le., subroutines). The trace data may be displayed in one of three modes: Break Capabilities machine, disassembly, or jump. In machine display The IE-70208/216 has eight hardware breakpoints. Seven mode, all bus activity is displayed in machine code. In can be set to occur on a real-time event or a non- disassembly mode, all instructions are disassembled. In real-time condition. The remaining one is reserved for jump mode, only instructions that alter program flow are setting a real-time address breakpoint in the GO displayed. command. SOFTWARE DESCRIPTION A real-time breakpoint can be set to occur on an address, a data value, a CPU state, or the external probe status. System Software A non-real-time breakpoint can be set to occur after The IE-70208/216 is controlled by the MIOS/U propri- satisfying an address/condition setting a certain number etary operating system. Command input is simplified by of times (maximum 4096). eight function keys (providing a choice of up to 24 Conditions pertaining to the general-purpose registers, softkeys within any menu level). The dynamically repro- memory locations, I/O locations or the external probes grammed soft keys visually prompt with the next valid set can be defined. For non-real-time breakpoints, the user of commands. The softkeys are at the bottom of the program is executed in real time until it reaches the display screen and correspond to one of the eight address, then emulation pauses while the conditions are function keys on the keyboard. To select a command, checked. If the conditions are not satisfied, emulation press a softkey. The softkeys are automatically relabeled ftt will continue in this manner until they are met. with the next set of commands. UI To distinguish between the condition occurring at an Table 1 lists the utility programs provided with the op-code fetch or at the execution of an instruction, each emulator. breakpoint can be tagged with either a nonexecution or execution flag. Up to 16 software breakpoints can be set plus an additional one in the GO command. To set a software breakpoint, the emulator replaces an instruction in the user's program with a BRK 0 instruction. A break will occur when this instruction is executed, and the user's program will be restored. This capability is not available for program code executing out of ROM. 3 IE-70208,IE·70216 NEe Table 1. IE-7020B/216 Utility Programs Symbolic Debug and Line Assembly/ Utilities Function Disassembly EMUV4050 IE-70208/216 emulator software The IE-70208/216 supports complete symbolic debug- KERMIT Communication program for file transfer ging of programs produced by NEC's RA70116 Relocat- FILESEFN File management for system disks able Assembler Package and various other third-party software packages, including those from Intel and Mi- EDITOR Full screen editor crosoft. The symbols can be used as address and data FORMAT Floppy-disk formatter constants in break, trace, and emulation control com- PROM Built-In EPROM programmer control program mands and are displayed during disassembly. A sym- TERMINAL Terminal utility program for file transfer between bolic line assembler is also available to make modifica- emulator and another intelligent device tions to existing programs or to enter code from the Symbol table converter; converts non-SROC keyboard. SYMBOL symbol formats to SROC format. OBJCONV Object file converter; converts object files to SPEC IFICATIONS and from the Motorola SROC format. Table 2 gives the electrical, environmental, and physical TIMESET Internal battery backed-up clock and calendar specifications of the equipment. setting DEFINE Softkey definition Table 2. IE-7020B/216 Specifications MDEVICE Disk format specification AC power 90 to 132 V, 50/60 Hz, 400 W maximum Temperature Operating: +5 to +40°C Connecting to Host Systems Storage: -20 to +50°C Relative humidity Operating: 20 to 80% Host systems may be connected to the IE-70208/216 via (noncondensing) the RS-232C connectors at the rear of the machine. Storage: 10 to 90% Parameters such as baud rates, character length, parity, Weight Main chassis: 40 pounds and number of stop bits are software programmable to Pod and cables: 4-3/4 pounds, suit the system being attached. The KERMIT communi- Dimensions (L x W x H) 19.7 x 16.7 x 8.7 inches cations program supplied with the emulator can be used for uploading and downloading files. Currently, NEC provides KERMIT for the VAX® under VMS® and UNIXTM DOCUMENTATION 4.2 BSD or Ultrix™, and the IBM PC, PC/XT®, PC AT®, or The following manuals are supplied with the in-circuit compatibles under PC-DOSTM or MS-DOS®. emulator. Additional copies may be obtained from NEC Files may also be transferred to the emulator via the Electronics Inc. RS-232C ports by using the TERMINAL utility. The em- • IE-70208/216 In-Circuit Emulator User's Manual ulator acts as a terminal for data transfer: • IE-70XXX-A Hardware User's Manual Another means of loading files into the IE-70208/216 is • IE-70XXX-A Software Utilities User's Manual available with the Multiple File Handler utility, a program that runs in the emulator itself and is supplied as part of the IE-70208/216 package. The Multiple File Handler allows the emulator to read MS-DOS disks, among others. VAX and VMS are registered trademarks of Digital Equipment Corporation. Ultrix is a trademark of Digital Equipment Corporation. UNIX is a trademark of AT&T. PCIXT, PC AT, and PC-DOS are registered trademarks of International Business Machines Corporation. MS-DOS is a registered trademark of Microsoft Corporation. 4 ~EC IE-70320 In-Ci rcuit Emulator NEC Electronics Inc. for pPD70320/70322 (V2S) Microcomputers Description o 16 user-programmable software breakpoints The IE-70320 is a portable, stand-alone, in-circuit emu- o Trace buffer: machine cycle, mnemonic, and jump lator that provides hardware emulation and software trace display debug capabilities for the NEC jtPD70320/70322 0125 TM) - 2047 frames by 108 bits 16-bit, single-chip microcomputers. - Programmable trigger point and trace qualifiers Real-time and single-step emulation, coupled with so- o Eight optional probes for tracing of target systems phisticated memory mapping, symbolic debugging, signals macrofile command facilities, and user-programmable o Full symbolic debug capabilities breakpoints and trace qualifiers create a powerful devel- o Symbolic line assembler and disassembler opment environment. o Macrofile command capability Command entry is simplified by eight dynamically re- programmed function keys, called softkeys, that visually o Dual window display in emulation mode prompt a user with the next level of commands. User o Soft key and menu-driven user input programs can be uploaded/downloaded from a variety of host systems by a serial link or they can be loaded Ordering Information directly from an MS-DOS® disk. Part Number Package Features IE-70320 -AOOS In-circuit emulator for MPD70320/70322 IE-7032'b-RTOS MPD79011 RTOS System Software for IE-70320 o Portable stand-alone in-circuit emulator: EP-70320L MPD70320/70322 84-pln PLCC emulation probe - 9.5-inch amber CRT display IE-70000 -2957 Optional 512K-byte expansion emulation - Two 5-inch, 640K-byte floppy-disk drives memory - ASCII keyboard with eight function keys IE-70000 -2954 Optional external logic probes - EPROM programmer: 2732, 2764, 27128, 27256, 27512 EP-70320GJ Optional 94-pln plastic QFP package probe - Can be converted to support NEC's V20®, V30®, adapter for use with EP-70320L V33 TM, V35 TM, V40 TM, V50 TM, V53 ™ , and V60 ™ microprocessors Hardware ~ The IE-70320 (figure 1) consists of a system chassis with ~ o Precise real-time and single-step emulation - Programmable internal clock: 1 to 16 MHz in a detachable ASCII keyboard and an emulation pod unit. 1- kHz steps - Up'to 16 MHz external TTL clock The chassis houses a 9.5-inch amber CRT, two 5-1/4 inch 640K-byte floppy-disk drives, an· EPROM programmer, o Memory and I/O space mappable in 4K-byte blocks card cage, power supply, and five control boards. The o 32K bytes of memory for-internal ROM emulation boards are main CPU, expansion system memory, emu- o 124K bytes of memory for prototype memory lation control I and II, and trace emulation memory. emulation; expandable to 636K bytes The main CPU board contains a supervising CPU, 512K o Eight user-programmable hardware breakpOints bytes of system memory, and the peripheral interfaces. - Real~time break on address, data, CPU status, or The expansion system memory board provides an addi- external probes tional 512K bytes of system memory. - Break on pass count and register, memory, or I/O values The two emulation control boards control memory map- - Selectable as execution or nonexecution ping, event detection, and the break and emulation CPU status circuitry. The trace emulation board contains a trace buffer and 124K bytes of external emulation mem- V20 and V30 are registered trademarks of NEC Corporation. ory. The optionaIIE-70000-2957, a 512K-byte expansion V25, V33, V35, V40, V50, V53, and V60 are trademarks of emulation memory board, may be installed to increase NEC Corporation. MS-DOS is a registered trademark of Microsoft Corporation. the external emulation memory to 636K bytes. 50229 IE·70320 NEe The emulation pod unit houses the I!-PD70329 EVACHIP INTROM Internal I!-PD70322 ROM emulation memory used to emulate the I!-PD70320 or I!-PD70322, the internal (0, 8, 16, or 32K bytes selectable) ROM emulation memory, the high-speed buffers, and the ROM External ROM emulation memory clock selection logic. This unit can be connected to the (read only) target system by the EP-70320L, an emulation probe for RAM External RAM emulation memory the 84-pin PLCC. For the 94-pin plastic QFP package, an (read/write) EP-70320GJ probe adapter is also needed. Target Memory resident in target system The IE-70320 supports the following external interfaces: (read/write) two RS-232C serial ports, one Centronics parallel printer Locked Access inhibited memory port, and one RG B video output. (remaining unmapped addresses) An optional external logic probe unit (lE-70000-2954) is All memory mapping except INtrom is executed in 4K.. also available . The eight probes contained in the unit byte blocks using the CONFIGure and MEMory softkey allow signals on the target system to be used in the commands. If an address that has been mapped as break and trace functions. "locked" is accessed, a break in emulation will occur. The emulator can be converted to support NEC's V20, The complete 64K-byte input/output space of the V30, V33, V35, V40, V50, V53, or V60 CMOS microproces- I!-PD70320 or I!-PD70322 must be mapped in 4K-byte sors by exchanging the appropriate control boards and blocks eitherto the RAM emulation memory, to the target the emulation pod unit. . system, or as "locked" memory. Figure 1. IE-70320 System Configuration Emulation The IE-70320 executes I!-PD70320 and I!-PD70322 user programs in real time in four different modes: break, trace, count, and time. (1) In break emulation mode, the program is runin real ti~e or in single step until a breakpoint is encoun- tered. (2) In trace emulation mode, the program is executed until the trace buffer is filled. (3) In count emulation mode, the emulator counts the number of times a particular trigger pOint is reached within a given set of conditions. (4) In time emulation mode, the emulator times execu- tion between the specified enable and disable points. The measurable time range is from 0 to 72 Memory and I/O Mapping Capabilities minutes (in microseconds). The IE-70320 contains two kinds of emulation memory: Once emulation is stopped in either break or trace mode, 32K bytes of high-speed RAM that can be accessed in the trace automatically displays one screen of data, one clock cycle per byte for emulating the internal ROM ending on the last instruction executed. In count or time of the I-l-PD70322, and 124K bytes (expandable to 636K mode, the current count or elapsed time is displayed. At bytes) of two-cycle RAM (0 wait states) for emulating this point, it is possible to display the. contents of external RAM or ROM. memory, the general-purpose and special registers, the symbol tables, directories, and other infqrmation. All can The complete 1M-byte memory space of the I!-PD70320/ be displayed individually or by split screen with the trace I!-PD70322 must be mapped into one of the following display. The windows may be scrolled independently. categories: 2 NEe IE·70320 Prior to the start of emulation, the user can specify the dress occurs. The trace buffer can be split into a maxi- internal ROM size (if any), whether an external or inter- mum of 128 partitions to allow tracing of particular nal clock will be used for emulation, and whether the segments of the user program (i.e., subroutines). NMI, READY, and HOLD signals from the target system The trace data may be displayed in one of three modes: should be enabled or disabled. If the internal clock is machine, disassembly, or jump. In machine display used, it can be set from 1 to 16 MHz in 1-kHz steps. mode, all bus activity is displayed in machine code. In disassembly mode, all instructions are disassembled. In Break Capabilities jump mode, only instructions that alter program flow are The IE-70320 has eight hardware breakpoints. Seven can displayed. be set to occur on a real-time event or a non-real-time condition. The remaining one is reserved for setting a IE-70320 -RTOS System Software real-time address breakpoint in the GO command. The optionaIIE-70320-RTOS system software allows the IE-70320 to be used for hardware emulation and soft- A real-time breakpoint can be set to occur on an address, ware debugging for the ~PD79011, a V25 16-bit, single- a data value, a CPU state and an external probe status. chip microcomputer with an on-board real-time operat- A non-real-time breakpoint can be set to occur after an ing system (RTOS). When using the IE-70320-RTOS address/condition setting has been satisfied for a cer- system software, the RTOS object code is loaded into tain number of times (maximum 4096). the 16K bytes of internal ROM emulation memory when- Conditions pertaining to the general-purpose registers, everthe IE-70320 is powered uporthe CAncel command memory locations, input/output locations, or external is executed. probes can be defined. For non-real-time breakpoints, In addition, the IE-70320-RTOS system software adds the user program is executed in real time until it reaches the following commands to the IE-70320. the break address. Emulation stops while the conditions are checked. If the conditions are not satisfied, emula- Mem/reg SYstime Sets system time of the RTOS. tion will continue in this manner until they are met. Display TStat Displays system time, task To distinguish b~tween an address condition occurring status, number of unused at any memory read/write access or the execution of an memory blocks, segment val ue instruction, each breakpoint can be tagged with either a of all messages queued in the nonexecution or execution flag. TC B, start address of the initialization routine, and Up to 16 software breakpoints can be set plus an interrupt return address in the additional one in the GO command. To set a software TC B for a specified task. breakpoint, the emulator replaces an instruction in the user's program with a BRK 0 instruction. A break will Display MAil box Displays status of specified occur when this instruction is executed, and the user's mailbox. program will be restored. This capability is not available Display SEmaph 4 Displays number of tasks for program code executing out of ROM. waiting for specified semaphore and remaining Trace Capabilities number of free resources. The trace buffer is 2047 frames by 108 bits wide and Display TMap Displays a list of all tasks sampling is done on every machine cycle. The buffer is currently being managed by filled in a round-robin fashion. The emulator traces the RTOS and their state. external address and data buses, the internal ROM address and data buses, the CPU and queue status, the DMMKO/DMMK1 pins, and the eight external logic probes. The IE-70320 has eight trace specification points. One of these is reserved for setting a trigger point in the GO command. The other seven can be specified as trace trigger, enable, disable, qualify, or check points. Check points are used to display the register, memory, or input/output contents each time a certain event or ad- 3 IE·70320 NEe System Software Files may also be transferred to the emulator via the RS-232C ports by using the TERMINAL utility. The em- The IE-70320 is controlled by the MIOS/U proprietary ulator acts as a terminal for data transfer. operating system. Command input is simplified by eight function keys (providing a choice of up to 24 softkeys Another means of loading files into the IE-70320 is within any menu level). The dynamically reprogrammed available with the Multiple File Handler utility, a program softkeys visually prompt the user with the next valid set that runs in the emulator itself and which is also supplied of commands. The softkeys are at the bottom of the as part of the IE-70320 package. The Multiple File Han- display and correspond to the eight function keys. To dier allows the emulator to read MS-DOS disks, among select a command, the desired softkey is entered, and others. the softkeys are automatically relabeled with the next set of commands. Symbolic Debug and Line Assembly/ Disassembly Table 1 shows some of the utility programs provided with the emulator. The IE-70320 supports complete symbolic debugging of programs produced by NEC's RA70320 Relocatable As- Table 1. IE-70320 Utility Programs sembler package and various other third-party software Utility Function packages, including those of Intel and Microsoft. The symbols can be used as address and data constants in EMUV25 IE-70320 emulator software break, trace, and emulation control commands and are KERMIT Communication program for file transfer displayed during disassembly. A symbolic line assembler FILESEFW File management for system di sks is also available to make modifications to existing pro- EDITOR Full !lcreen editor gr~ms or to enter code from the keyboard. FORMAT Floppy-disk formatter Specifications PROM Built-In EPROM programmer control program Table 2 gives the electrical, environmental, and physical TERMINAL Terminal utility program for file transfer between emulator and another intelligent device specifications of the equipment. SYMBOL Symbol Table Converter: converts non-SROC symbol formats to SROC format. Table 2. IE-70320 Specifications Ac power 90 to 132 V, 50/60 Hz, 400 W maximum OBJCONV Object File Converter: converts object files to and from the Motorola SROC format. Temperature Operating: +5 to +40°C TIMESET Internal battery backed-up clock and calendar Storage: -20 to +50°C setting Relative humidity Operating: 20 to 80% DEFINE Softkey definition (noncondensing) .. Storage: 10 to 90% MDEVICE Disk format specification Weight Main chassis: 40 pounds Pod and cables: 4-3/4 pounds Connecting to Host Systems Dimensions (L x W x H) 19.7 x 16.7 x 8.7 inches Host systems may be connected to the IE-70320 by the RS-232C connectors at the rear of the machine. Param- Documentation eters such as baud rates, character length, parity, and number of stop bits are software programmable to suit The following manuals are supplied with the in-circuit the system being attached. The KERMIT communica- emulator.. Additional copies may be obtained from NEC tions program is supplied with the emulator and can be Electronics Inc. used for uploading and downloading files. NEC currently provides KERMIT for the VAX.® under VMS® and UNIXTM • IE-70320 In-Circuit Emulator User's Manual 4.2 BSD or Ultrix®, the IBM PC, PC/XT®, IBM PC AT®, or • IE-70XXX-A Hardware User's Manual compatibles under PC-DOS® or MS-DOS. • IE-70XXX-A Software Utilities User's Manual • IE-70320-RTOS I-t-PD79011 RTOS System Software VAX, VMS, and Ultrix are registered trademarks of Digital Equipment User's Manual Corporation. UNIX is a trademark of AT&T Bell Laboratories PCJ)(T, PC AT, and PC-DOS are registered trademarks of International Business Machines Corporation. 4 NEe NEe Electronics Inc. IE-70330 In-Ci rcuit Emulator for pPD70330/70332 (V3S) Microcomputers Description o 16 user-programmable software breakpoints The IE-70330 is a portable, stand-alone, in-circuit emu- o Trace buffer: machine cycle, mnemonic, and jump lator that provides hardware emulation and software trace display debug capabilities for the /tPD70330/70332 (V35 TM) 16- - 2047 frames by 108 bits bit, single-chip microcomputers. - Programmable trigger point and trace qualifiers o Eight optional probes for tracing target system Real-time and single-step emulation, coupled with so- signals phisticated memory mapping, symbolic debugging, macrofile command facilities, and user-programmable o Full symbolic debug capabilities breakpoints and trace qualifiers, create a powerful de- o Symbolic line assembler and disassembler velopment environment. o Macrofile command capability Command entry is simplified by eight dynamically re- o Dual window display in emulation mode programmed function keys, called softkeys, that visually prompt a user with the next level of commands. User o Soft key and menu-driven user input programs can be uploaded/downloaded from a variety of host systems by a serial link, or they can be loaded Ordering Information directly from an MS-DOS® disk. Part Number Description IE-70330 -AQ08 In-circuit emulator for ~PD70330/70332 (V35) Features IE-70330-RTOS ~PD79021 RTOS system software for o Portable, stand-alone, in-circuit emulator IE-70330-A008 - 9.5-inch amber CRT display EP-70320L ~PD70320/70322 84-pln PLCC emulation probe - Two 5-inch, 640K-byte floppy-disk drives IE-70000 -2957 Optional 512K-byte expansion emulation - ASCII keyboard with eight function keys memory - EPROM programmer: 2732, 2764, 27128, 27256, Optional external logic probes IE-70000 -2954 27512 EP-70320GJ Optional 94-pin plastic QFP package probe - Supports NEC's V20®, V30®, V33 ™ , V25 ™ , V40 ™ , adapter for use with EP-70320L V50 TM, V53 ™, and V60 ™ microprocessors o Precise real-time and single-step emulation - Programmable internal clock: 1 to 16 MHz in Hardware 1-kHz steps The IE-70330 (figure 1) consists of a system chassis with - Up to 16-MHz external TTL clock a detachable ASCII keyboard and an emulation pod unit. ~ o Memory and I/O space mappable in 4K-byte blocks The chassis houses a 9.5-inch amber CRT, two 5-1/4 inch I:11III 640K-byte floppy-disk drives, an EPROM programmer, o 32K bytes of memory for internal ROM emulation card cage, power supply, and five control boards. The o 124K bytes of memory for prototype memory boards are main CPU, expansion system memory, emu- emulation; expandable to 636K bytes lation controll.and II, and trace emulation memory. o Eight user-programmable hardware breakpoints The main CPU board contains a supervising CPU, 512K - Real-time break on address, data, CPU status, or bytes of system memory, and the peripheral interfaces. external probes The expansion system memory board provides an addi- - Break on pass count and register, memory, or I/O tional 512K bytes of system memory. values - Selectable as execution or nonexecution V20 and V30 are registered trademarks of NEC Corporation. V25, V33, V3S, V40, V50, V53, and V60 are trademarks of NEC Corporation. MS-DOS is a registered trademark of Microsoft Corporation. !I022O IE·70330 NEe The two emulation control boards control memory map- The complete 1M-byte memory space of the p.PD70330/ ping, event detection, and the break and emulation CPU 70332 must be mapped into one of the following cate- status circuitry. The trace emulation board contains a gories: trace buffer and 124K bytes of external emulation mem- ory. The optionaIIE-70000-2957, a 512K-byte expansion INTROM Internal p.PD70332 ROM emulation memory emulator memory board, may be installed to increase (0, 8, 16, 32K bytes selectable) the external emulator memory to 636K bytes. ROM External ROM emulation memory (read only) The emulation pod unit houses the p.PD70339 EVACHIP RAM External RAM emulation memory used to emulate the p.PD70330 or p.PD70332, the internal (read/write) ROM emulation memory, the high-speed buffers, and the clock selection logic. This unit can be connected to the Target Memory resident in target system target system by the EP-70320L, an emulation probe for (read/write) the 84-pin PLCC. For the 94-pin plastic QFP, an EP- Locked Access inhibited memory 70320GJ probe adapter is also needed. (remaining unmapped addresses) The IE-70330 supports the following external interfaces: two RS-232C serial ports, one Centronics parallel printer All memory mapping except INTROM is executed in port, and one RG B video output. 4K-byte blocks using the Configure and Memory softkey commands. If an address that has been mapped as An optional external logic probe unit (IE-70000-2954) is "Iocked" is accessed, a break in emulation will occur. also available. The eight probes contained in the unit The complete 64K-byte input/output space of the allow signals on the target system to be used in the p.PD70330 or p.PD70332 must be mapped in 4K-byte break and trace functions. blocks either to the RAM emulation memory, to the target The emulator can be converted to support NEC's V20, system, or as "locked" memory. V25, V30, V33, V40, V50, V53, and V60 CMOS micropro- cessors by exchanging the appropriate control boards Emulation and the emulation pod unit. The IE-70330 executes p.PD70330 and p.PD70332 user programs in real time in four different modes: break, Figure 1. IE-70330 System Configuration trace, count, and time. (1) In break emulation mode, the program is run in real time or in single step until a breakpoint is encoun- tered. (2) In trace emulation mode, the program is executed until the trace buffer is filled. (3) In count emulation mode, the emulator counts the number of times a particular trigger point is reached within a given set of conditions. (4) In time emulation mode, the emulator times execu- tion between the specified enable and disable points. The measurable time range is from 0 to 72 minutes (in microseconds). Once emulation is stopped in either break or trace mode, the trace automatically displays one screen of data, Memory and I/O Mapping Capabilities ending on the last instruction executed. In count or time The IE-70330 contains two kinds of emulation memory: mode, the current count or elapsed time is displayed. At this pOint, it is possible to display the contents of 32K bytes of high-speed RAM that can be accessed in memory, the general-purpose and special registers, the one clock cycle per byte for emulating the internal ROM symbol tables, directories, and other information. All can of the p.PD70332, and 124K bytes (expandable to 636K be displayed individually or by split screen with the trace bytes) of two-cycle RAM (0 wait states) for emulating display. The windows may be scrolled independently. external RAM or ROM. 2 NEe IE·70330 Prior to the start of emulation, the user can specify the The IE-70330 has eight trace specification points. One of internal ROM size (if any), whether an external or inter- these is reserved for setting a trigger point in the GO nal clock will be used for emulation, and whether the command. The other seven can be specified as trace NMI, READY, and HOLD signals from the target system trigger, enable, disable, qualify, or check points. Check should be enabled or disabled. If the internal clock is points are used to display the register, memory, or used, it can be set from 1 to 16 MHz in 1-KHz steps. input/output contents each time a certain event or ad- dress occurs. The trace buffer can be split into a maxi- Break Capabilities mum of 128 partitions to allow tracing of particular segments of the user program (i.e., subroutines). The IE-70330 has eight hardware breakpoints. Seven can be set to occur on a real-time event or a non-real-time The trace data may be displayed in one of three modes: condition. The remaining one is reserved for setting a machine, disassembly, or jump. In machine display real-time address breakpoint in the GO command. mode, all bus activity is displayed in machine code. In disassembly mode, all instructions are disassembled. In A real-time breakpoint can be set to occur on an address, jump mode, only instructions that alter program flow are a data val ue, a CPU state, or an external probe status. A displayed. non-real-time breakpoint can be set to occur after an address/condition setting has been satisfied for a cer- System Software tain number of times (maximum 4096). The IE-70330 is controlled by the MIOS/U proprietary Conditions pertaining to the general-purpose registers, operating system. Command input is simplified by eight memory locations, input/output locations, or external function keys (providing a choice of up to 24 softkeys probes can be defined. For non-real-time breakpoints, within any menu level). The dynamically reprogrammed the user program is executed in real time until it reaches softkeys visually prompt the user with the next valid set the break address. Emulation stops while the conditions of commands. The softkeys are at the bottom of the are checked. If the conditions are not satisfied, emula- display screen and correspond to the eight function keys tion will continue in this manner until they are met. on the keyboard. To select a command, the desired To distinguish between an address condition occurring softkey is entered, and the. softkeys are automatically at any memory read/write access or the execution of an relabeled with the next set of commands. instruction, each breakpoint can be tagged with either a Table 1 lists some of the utility programs provided with nonexecution or execution flag. the emulator. Up to 16. software breakpoints can be set plus an additional one in the GO command. To set a software IE-70330-RTOS System Software breakpoint, the emulator replaces an instruction in the The optionaIIE-70330-RTOS system software allows the user's program with a BRK 0 instruction. A break will IE-70330 to be used for hardware emulation and soft- occur when this instruction is executed, and the user's ware debugging for the p.PD79021, a V35 16-bit single- ~ program will be restored. This capability is not available for program code executing out of ROM. chip microcomputer with an on-board real-time operat- l:.1li ing system (RTOS). The RTOS object code is loaded into the 16K bytes of internal ROM emulation memory when- Trace Capabilities ever the IE-70330 is powered uporthe CAncel command The trace buffer is 2047 frames by 108 bits wide and is executed. sampling is done on every machine cycle. The buffer is In addition, the IE-70330-RTOS system software adds filled in a round-robin fashion. The emulator traces the the commands in table 2 to the IE-70330. external address and data buses, the internal ROM address and data buses, the CPU and queue status, the DMAAKO/1 pins, and the eight external logic probes. 3 IE-70330 NEe Table 1. IE-70330 Utility Programs Files may also be transferred to the emulator via the Utility Function RS-232C ports by using the TERMINAL utility. The em- ulator acts as a terminal for data transfer. EMUV35 IE-70330 emulator software KERMIT Communication program for file transfer Another means of loading files into the IE-70330 is available with the Multiple File Handler utility, a program FILESE~ File management for system disks that runs in the emulator itself and is supplied as part of EDITOR Full screen editor the IE-70330 package. The Multiple ,File Handler allows FORMAT Floppy-disk formatter the emulator to read MS-DOS disks, among others. PROM Built-in EPROM programmer control program Symbolic Debug and Line Assembly! TERMINAL Terminal utility program for file transfer between emulator and another intelligent device Disassembly SYMBOL Symbol table converter; converts non-SROC symbol The IE-70330 supports complete symbolic debugging of formats to SROC format programs produced by NEC's RA70320 RelocatableAs- OBJCONV Object file converter; converts object files to and from sembler package and various other third-party software the Motorola SROC format packages, incl uding those of Intel and Microsoft. The TIMESET Internal battery backed-up clock and calendar setting symbols can be used as address and data constants in break, trace, and emulation control commands and are DEFINE Softkey definition displayed during disassembly. A symbolic line assembler MDEVICE Disk format specification is also available to make modifications to existing pro- grams or to enter ~ode from the keyboard. Table 2. IE-70330-RTOS Commands Command Description Specifications Mem/reg SYstime Sets RTOS system time. Table 3 gives the electrical,environmental, and physical Display TStat Displays system time, task status, number of specifications of the equipment. unused memory blocks, segment value of all messages queued in the TCB, start address of Table 3. IE-70330 Specifications initialization routine, and interrupt return address in the TCB for a specified task. Ac power 90 tQ 132 V, 50/60 Hz, 400 W maximum Display MAilbox Displays status of specified mailbo~. Temperature Operating: +5 to +40°C Display SEmaph Displays number of tasks waiting for specified Storage:-20 to +50°C semaphore and remaining number of free Relative humidity Operating: 20 to 80% resources. (noncondensing) Storage: 10 to 90% Display TMap Displays a list of all tasks currently being managed by RTOS and their current state. Weight Main chassis: 40 pounds Pod and cables: 4-3/4 pounds . Connecting to Host Systems Dimensions (L x W x H) 19.7 x 16.7 x 8.7 inches Host systems may be connected to the IE-70330 through RS-232C connectors at the rear of the machine. Param- eters such as baud rates, character length, parity, and Documentation number of stop bits are software programmable to suit The following manuals are supplied with the in-circuit the system being attached. The KERMIT communica- emulator. Additional copies may be obtained from NEC tions program is supplied with the emulator and can be Electronics Inc. used for uploading and downloading files. NEC currently provides KERMIT for the VAX® under VMS® and UNIXTM • IE-70330 In-Circuit Emulator User's Manual 4.2BSD or Ultrix®, the IBM PC, PC/XT®, IBM PC AT®, or • IE-70XXX-A Hardware User's Manual compatibles under PC-DOS® or MS-DOS. • IE-70XXX-A Software Utilities User's Manual • IE-70330-RTOS, Il-PD79021 RTOS System Software VAX, VMS, and Ultrix are registered trademarks of Digital Equipment User's Manual Corporation. UNIX is a trademark of AT&T Bell Laboratories. PC/XT, PC AT, and PC-DOS are registered trademarks of International Business Machines Corporation. 4 NEe NEG Electronics Inc. RA70116 Relocatable Assembler Package for V20 -V50 Microprocessors Description Ordering Information Part Number Package The RA70116 Relocatable Assembler package converts symbolic source code for the ~PD70108 (V20®) , RA70116-D52 MS-DOS, 5-1/4" double-density floppy-diskette jA-PD70116 (V30®) , ~PD70208 (V40™), and jA-PD70216 RA70116-WT1 VAX/VMS, 9-track 1600-BPI magnetic tape (V50™) microprocessors into executable absolute ad- RA70116-VXT1 VAX/UNIX 4.2BSD or Ultrix, 9-track 1600-BPI dress object code. The package consists offour separate magnetic tape programs: an assembler (RA70116), a linker (LK70116), a hexadecimal format object code converter (OC70116), SOFTWARE DESCRIPTION and a librarian (LB70116). Program Syntax RA70116 translates a symbolic source module into a relocatable object module. This symbolic source module An RA70116 source module consists of a series of code, can contain both V20-V50 microprocessor instructions data, or stack segments. Each segment consists of and Intel 8087 Floating-Point Arithmetic Coprocessor statements composed of up to four fields: symbol, mne- instructions. The assembler verifies that each instruc- monic, operand, and comment. tion assembled is valid and produces a listing file and a relocatable object module. The symbol field may contain a label whose value is the instruction or data address, or a name that represents an LK70116 combines relocatable object modules and ab- instruction address, data address, or constant. The mne- solute load modules and converts them into an absolute monic field may contain an instruction or assembler load module. OC70116 converts an absolute object mod- directive. The operand field contains the data or expres- ule or an absolute load module to an expanded hexadec- sion for the specified instruction or directive. Explana- imal (7-bit ASCII) object file. tions of statements may be inserted in the comment LB 70116 allows commonly used relocatable object mod- field. ules to be stored in one file and linked into multiple Character constants are translated into 7-bit ASCII programs, greatly increasing programming efficiency. m When the input of the linker contains a library file, the codes. Numeric constants may be specified as binary, linker first extracts only those modules required to re- octal, decimal, or hexadecimal. Arithmetic expressions solve external references from the file and relocates and may include the operators +, -, *, I, MOD, OR, AND, links them. NOT, XOR, EO, NE, LT, LE, GT, GE, SHR, SHL, LOW, • HIGH, PTR, SHORT, THIS, SEG, OFFSET, SMSIZE, Features GRSIZE, SMOFFSET, GROFFSET, TYPE, LENGTH, SIZE, MASK, WIDTH, (), [ ], period (.), colon (:), < >. o Absolute address object code output o Macro and code macro capability Macro and Code Macro Capability o User-selectable and directable output files RA70116 allows the definition of macrocode sequences o Extensive error reporting with parameters, LOCAL symbols, and special repeated o Powerful Librarian code sequences. The macrocode sequence is different from a subroutine call. That is, the invocation of a macro o Runs under the following operating systems: in the source code results in the direct replacement of a - MS-DOS® macro call with the defined code sequence. - VAXNMS® and VAX/UNIX® 4.2BSD or Ultrix® V20 and V30 are registered trademarks of NEC Corporation. RA70116 also allows the definition of code macros to V40 and V50 are trademarks of NEC Corporation. give the user the capability of defining a new instruction MS-DOS is a registered trademark of Microsoft Corporation. VAX., VMS, and Ultrix are registered trademarks of Digital Equipment (mnemonic). Although an instruction definition could Corporation. also be defined using the ordinary macro facility, code UNIX is a trademark of AT&T Bell Laboratories. macros specify the allowable operand types for the new instructions whereasordinary macros cannot. 50223 RA70116 NEe Assembler Directives Figure 1. Relocatable Assembler Functional Diagram Assembler directives give instructions to the assembler but are not translated into machine code during assem- bly. Basic assembler directives include those for storage definition and allocation (DB, Ow, DO, DBS, DWS, DDS, STRUC/ENDS, RECORD); symbol control (EQU, LABEL, PURGE); and location counter control (ORG, EVEN, ALIGN). Program control directives include those for segment definition and control (SEGMENT/ENDS, PROC/END P, ASSUME, GROUP, END); linkage (NAME, PUBLIC, EX- TRN); and PARITY. The relocation types for SEGMENT/ENDS directives are specified in the operand column and include BYTE, WORD, PARA, PAGE, and INPAGE. The combination 83YL-6471A types of PUBLIC, COMMON, AT, STACK, and MEMORY, which are also specified in the operand column, define the means of linking segments and groups of the same Linker name. The LK70116 linker combines relocatable object modules Assembler Controls and absolute load modules and produces one absolute load module. See figure 2. The controls for LK70116 may Two types of assembler controls are available for the be specified in either the command line or in a parameter RA70116. file. In addition to being able to specify the module name • Basic controls (specified in the assembler command and the starting address and order for code/data/stack line) segments, you can also protect areas of memory from - File specification being .assigned. Furthermore, you can instruct the pro- - Output file selection gram to create a list file containing a link map, a local '- Output file destination symbol table, or a pUQlic symbol table. The absolute load - Listing format controls module contains symbol information for the symbolic - Debug information output selection debugger and absolute object code. - Symbol case selection - Macro processing selection • General controls (speCified in the source program) - Inclusion of other source files - Page eject - Generation/suppression of listing - Generation/suppression of macro listings - Listing titles A list file may contain the complete assembly listing, or it may contain only lines with errors and a symbol or cross-reference table. The symbol table lists all defined symbols in alphabetical order and also shows their types, attributes, and the values initially assigned to them. The cross-reference table contains all defined symbols as well as the numbers of all statements refer- ring to them. The object file contains the relocatable object module. The format of this module is an NEC proprietary relocat- able object module format. Figure 1 is a functional diagram of the assembler. 2 NEe RA70116 Figure 2. Unker Functional Diagram Figure 3. Hexadecimal Object Code Converter Functional Diagram Library Module File System , Console System Temporary Console - Work Files * Absolute addresses with no external references. 83YL·6473A Librarian 83YL·6472A The LB70116 librarian creates and maintains files con- taining relocatable object modules. The program re- Hexadecimal Object Code Converter duces the number of files that need to be linked together by allowing several modules to be kept in a single file. It The OC70116 object code converter translates an abso- also provides an easy way to link frequently used. mod- lute load module file into an expanded hexadecimal ules into programs. Modules may be added to, deleted format (7-bit ASCII) file that may be downloaded to a from, or replaced within a library file. PROM programmer. Addresses may be specified as Operating Environment being output in the order in which they were input or in ascending order. Figure 3 is a functional diagram of the hexadecimal object code converter. The RA70116 package can be supplied to run under several different operating systems. One version is for an II • MS-DOS system with one or more disk drives and at least 512K bytes of system memory. Other versions run on a Digital Equipment Corporation VAX computer with UNIX 4.2 BSD or Ultrix, or VMS (Version 4.1 or later) operating systems. 3 RA70116 NEe Downloading Files Into the Emulator DOCUMENTATION Absolute load modules produced by the RA70116 pack- For further information on source program formats, age for the V40 and V50 can be debugged using the NEC assembler operation, and actual program examples, IE-70208 (V40) or IE-70216 (V50) stand-alone in-circuit refer to the following manuals supplied with the emulator. Communication between these emulators and RA70116. Additional copies may be obtained from NEC the host system is through an RS-232C serial line using Electronics Inc. the KERMIT communication protocol developed at Co- lumbia University. With the appropriate version of the • RA70116 V20-V50 Relocatable Assembler Package KERMIT Communication Program running on both the Language Manual emulator and host system, absol ute load modules or • .RA70116 V20-V50 Relocatable Assembler Package hexadecimal object code files may be transferred be- Operation Manual (MS-DOS) tween machines. • RA70116 V20-V50 Relocatable Assembler Package Operation Manual (UNIX) A version of the KERMIT Communication Program is supplied with the IE-70208 and IE-70216. Versions of • RA 70116 V20-V50 Relocatable Assembler Package KERMIT run on the IBM PC, PC/XT®, PC AT®, or com- Operation Manual (VMS) patibles under MS-DOS, and the DEC VAX under VMS, UNIX 4.2BSD or Ultrix. An appropriate version is pro- LICENSE AGREEMENT vided with each relocatable assembler package at no RA70116 is sold under terms of a license agreement extra charge. Versions of KERMIT for other host systems included with purchased copies of the assembler. The are available directly from Columbia University. accompanying card must be completed and returned to A second means of loading files into the emulator is also NEC Electronics Inc. to register the license. Software available in the Multiple File Handler, a utility program updates are provided to registered users. that runs in the emulator and is supplied with the IE-70208 and IE-70216. The Multiple File Handler allows the emulator to read MS-DOS formatted disks, among others. . PC/XT, PC AT, and PC-DOS are registered trademarks of International Business Machines Corporation. 4 NEe NEe Electronics Inc. Relocatable Assembler Package for V33 Microprocessor RA7.013~ Description Cl Powerful Librarian The RA70136 Relocatable Assembler package converts Cl Runs under the following operating systems symbolic source code for the #-,PD70136 (V33 TN) micro- -MS-DOS® processor into executable absolute address object - VAXNMS® and VAX/UNIXTM 4.2BSD or Ultrix™ code. The package. consists of five separate programs: an assembler (RA 70136), a linker (LK70136), an extended Ordering Information mode locater (EL70136), a hexadecimal format object Part Number Description code converter (OC70136), and a librarian (LB70136). RA70136·D52 MS·DOS, 5-1/4" double-density floppy diskette RA70136 translates a symbolic source module into a RA70136·WT1 VAX/VMS, 9·track 1600·BPI magnetic tape relocatable object module. This symbolic source module RA70136·VXT1 VA:XIUNIX 4.2 BSC or Ultrlx, 9·track 1600·BPI can contain both V33 microprocessor instructions and magnetic tape NEC #-,PD71291 Advanced Floating-Point Processor (AFPP) instructions. The assembler verifies that each SOFTWARE DESCRIPTION instruction assembled is valid and produces a listing file and a relocatable object module. Program Syntax LK70136 combines relocatable object modules and ab- An RA70136 source module consists of a series of code, solute load modules and converts them into an absolute data, or stack segments. Each segment consists of load module. If V33 normal addressing mode is being statements composed of up to four fields: symbol, mne- used, OC70136 is used to convert an absolute object monic, operand, ~nd comment. module or an absolute load module to an expanded hexadecimal (7-bit ASCII) object file. If V33 extended The symbol field may contain a label, whose val ue Is the addressing mode is being used, the EL70136 converts instruction or data address, or a name that r~presents an load modules produced by LK70136 to an extended load instruction address, data address, or constant. The mne- module file in extended COFF format. monic field may contain an instruction or assembler directive. The operand field contains the data or expres- LB70136 allows commonly used relocatable object mod- sion for the specified instruction or directive. explana- ules to be· stored in. one file and linked into multiple tions for statements maybe inserted in the comment programs, greatly increasing programming efficiency. field. m When the input of the linker contains a library file, the linker first extracts only those modules required to re- Character constants are translated into 7-bit ASCII solve external references from the file and relocates and codes. Numeric constants may be specified as binary, links them. octal, decimal, or hexadecimal.. Arithmetic expressions • may include the operators +, -, ., I, MOD, OR, AND, Features NOT, XOR, EO, NE, LT, LE, GT, GE, SHR, SHL, LOW, Cl Absolute address object code output HIGH, PTR, SHORT, THIS, SEG, OFFSET, SMSIZE, - In extended hexadecimal format for normal GRSIZE, SMOFFSET, GROFFSET, TYPE, LENGTH, addressing mode SIZE, MASK, WIDTH, (), []i period (.), colon (:), < >. -In extended COFF format for extended add ressing mode Macro and Code Macro Capability Cl Macro and code macro capability RA70136 allows the definition of macrocode sequences Cl User-selectable and directable output files with parameters, LOCAL symbols, and special repeated code sequences. The macrocode sequence is different Cl Extensive error reporting from a subroutine call. That is, the invocation of a macro in the source code results in the direct replacement of a V33 Is a trademark of NEC Corporation. macro call with the defined code sequence. MS·DOS Is a registered trademark of Microsoft Corporation. VAX, VMS, and Ultrlx are registered trademarks of Digital Equipment RA70136 also allows the definition of code macros to Corporation. give the user the capability of defining anew instruction UNIX Is a trademark of AT&T. (mnemonic). Although an instruction definition could RA70136 NEe also be defined using the ordinary macro facility, code The object file contains the relocatable object module. macros specify the allowable operand types for the new The format of this module is an NEC proprietary relocat- instructions whereas ordinary macros cannot. able object module format. Figure 1 is a functional diagram of the assembler. Assembler Directives Figure 1. Relocstable Assembler Functional Assembler directives give instructions to the assembler Dillgram but are not translated into machine code during assem- bly. Basic assembler directives include those for storage definition and allocation (DB,r:m. DO, DO, OS, Dl, DBS, Source Module Include r:J.NS, DDS, DOS, DSS, DlS, STRUC/ENDS, RECORD); File File symbol control (EaU, LABEL, PURGE); and location counter control (ORG, EVEN, ALIGN). Program control directives Include those for. segment System definition and control (SEGMENT/ENDS, PROC/ENDP, Console ASSUME, GROUP, END); linkage (NAME, PUBLIC, EX- TRN); and PARITY. The relocation types for SEGMENT/ENDS directives are specified in the operand column and include BYTE, WORD, PARA, PAGE, and INPAGE. The combination types of PUBLIC, COMMON, AT, STACK, and MEMORY, 83VL-6474A whIch are also specified in the operand column, define the means of linking segments and groups of the same name. Linker Assembler Controls The lK70136 linker combines relocatable object mod- ules and absolute load modules and produces one ab- Two types of assembler controls are available for the solute load module. See figure 2. The controls for RA70136. lK70136 may be specified in eitherthe.command line or In a parameter file. In addition to being ,able to specify the • Basic controls (specified in the assembler .command module name and the starting address and order for line) code/data/stack segments, you can also protect areas of - File specification memory. from being assigned. Furthermore, you can - Output file selection instruct the program to create a list file containing a 1i1J~ - Output file destination map, a local symbol table, or a public symbol table.' The - Listing format controls - Debug information output selection absolute load module contains symbol information for - Symbol case selection the symbolic debugger and absolute object code. '- Macroprocessing selection • General controls (specified in the source program) -Inclusion of other source files - Page eject - Generation/siJppressionof listing - Generation/suppression of macro listings - Listing titles A list file may contain the complete assembly listing, or it may contain only lines with errors and a symbol or cross-reference table. The symbol table lists all defined symbols in alphabetical order and also shows their type~, attributes, and the values initially ass,igned to them. The cross-reference table contains all defined symbols as well as the numbers of all statements refer- ring to them. ' 2 NEe RA70136 Figure 2. Unker FunctlonalDlllIJram Figure 3. HeXJIdecimalObject Code Converter FunctlolllllDi.,am Object Absolute Module Load File Module * File System Temporary Console - Work Files * Absolute addresses with no external references. 83YL·6476A Extended Mode Locater 83YL·6475A The EL70136 extended mode locater converts multiple load modules produced by LK70136 Into one extended Hexadecimal Object Code Converter load module file in extended COFF format (figure 4). This program is used with the V33 in extended address The OC70136 object code converter translates an abso- mode (16M-byte address space). Starting addresses for lute load module file into an expanded hexadecimal each load module are specified in the Locate Information format (7-bit ASC II) file that may be downloaded to a file. The name of this file along with the name of the PROM programmer. This program is used with the V33 in extended load module file and any locater options are normal addressing mode (1 M-byte address space). Ad- included in the command line when EL70136 is invoked. dresses may be specified as being output in the order in EL70136 can be instructed to create a locate map file which they were input or in ascending order. Figure 3 is a and to include debugging information in the extended functional diagram of the hexadecimal object code con- verter. load module file. To support debugging with the IE- 70136, EL70136 also sets initial values for the IE-70136 . . . PGR tables in the extended load module file. ~ To simplify the task of using the extended addressing mode of the V33, NEC Electronics provides three sub- routines with the RA70136 package. (1) V33_MAP. Maps the #,PD70136 Page Registers (PGRs) (2) V33-BRK. Branches from the normal address mode to the interrupt routine starting address in the ex- tended address mode. (3) V33_RET. Branches from the extended address mode to the interrupt routine starting address in the normal address mode. 3 RA70136 ttiEC Figure 4. Extended Locater Functional Dlllllram Ultrix. An appropriate version is provided with each relocatable assembler package at no extra charge. Ver- sions of KERMIT for other host systems are available Load Module directly from Columbia University. File 1 A second means of loading files into the emulator is also available in the Multiple File Handler, a utility program that runs in the emulator and is supplied with the IE-70136. The Multiple File Handler allows the emulator EL70136 Extended Mode to read MS-DOS formatted disks, among others. Locater DOCUMENTATION For further information on source program formats, assembler operation, and actual program examples, refer to the following manuals supplied with the RA70136. Additional copies may be obtained from NEC 83VL-64nA Electronics Inc. RA70136 V33 Relocatable Assembler Package Lan- Librarian guage Manual The LB70136 librarian creates and maintains files con- RA70136 V33 Relocatable Assembler Package Opera- taining relocatable object modules. The program re- tion Manual. duces the number of files that need to be linked together by allowing several modules to be kept in a single file. It LICENSE AGREEMENT also provides an easy way to link frequently used mod- RA70136 is sold under terms of a license agreement ules into programs. Modules may be added to, deleted included with. purchased copies of the assembler. The from, or replaced witl1in a library file. accompanying card must be completed and returned to NEC Electronics Inc. to register the license. Software Operating Environment updates are provided to registered users. The RA70136 package can be supplied to run .under many different operating systems. One version is for an MS-DOS system with one or more disk drives and at PC/XT and PC AT are registered trademarks of International Business least 512K bytes of system memory. Other versions run Machines Corporation. . on a DEC VAX computer with UNIX 4.28S0 or Ultrix, or VMS (Version 4.1 or later) operating systems. Downloading Files Into the Emulator Absolute load modules and extended load modules produced by the RA70136 package for the V33 can be debugged by using the NEC IE-70136 stand-alone in- circuit emulator. Communication between the IE-70136 and the host system is through an RS-232C serial line using the KERMIT communication protocol developed at Columbia University. With the appropriate version of the KERMIT Communication Program running on both the emulator and host system, absolute load modules, ex- tended load modules, or hexadecimal object code files may be transferred between machines. A version of the KERMIT Communication Program is supplied with the IE-70136.. Versions of KERMIT run on the IBM PC, PC/XT®, PC AT®, or compatibles under MS-DOS, and the DEC VAX under VMS, UNIX 4.28SD or 4 NEe NEC Electronics Inc. RA70320 Relocatable Assembler Package for V25N35 Microcomputers Description Ordering Information The RA 70320 Relocatable Assembler package converts Part Number Description symbolic source code for the V25 ™N35 ™ family of RA70320-D52 MS-DOS; 5-1/4" double-density floppy diskette microprocessors into executable absolute address ob- WT1 VAX/VMS; 9-track 1600 BPI magnetic tape ject code. The package consists of four programs: VXT1 VAX/UNIX 4.2B5D or Ultrix; 9-track 1600 BPI RA70320 assembler, LK70320 linker, OC70320 hexadec- magnetic tape imal object code converter, and LB70320 librarian. The RA70320 assembler translates a symbolic source Assembler module into a relocatable object module. The LK70320 linker combines relocatable object modules and abso- The RA70320 assembler program translates a symbolic lute load modules and converts them into one absolute source module into a relocatable object module by first load module. The OC70320 converts an absolute object verifying that each instruction assembled is valid for the' module or absolute load module to an expanded hexa- target microprocessor and then producing a list file and decimal (7-bit ASCII) object file. a relocatable object module (figure 1). The LB70320 librarian allows commonly used relocat- Figure 1. Relocatable Assembler Functional able object modules to be stored in one file and linked Diagram into multiple programs, greatly increasing programming efficiency. When the input of the linker contains a library file, the linker first extracts only those modules required Source to resolve external references from the file and then Module Include File File relocates and links these modules. Features o Absolute address object code output I 1 o Macro and code macro capability System RA70320 Temporary Console ~ Relocatable I--'- Work o User-selectable and directable' output files Assembler Files o Extensive error reporting o Powerful librarian o Multisystem compatibility j J -MS-DOS® Object Assembler Module List -VAX®NMS® File File - VAX/UNIXTM 4.2BSDor Ultrix® 83-004615A V25 and V35 are trademarks of NECCorporation. MS-DOS is a registered trademark of Microsoft Corporation. VAX., VMS, and Ultrix are registered trademarks of Digital Equipment Corp. UNIX is a trademark of AT&T. 50230 RA70320 NEe Program Syntax The relocation types for SEGMENT/ENDS directives are specified in the operand column and include BYTE, An RA70320 source module consists of a series of code, WORD, PARA, PAGE, and INPAGE. The combination data, or stack segments. Each segment contains lines types of PUBLIC, COMMON, AT, STACK, and MEMORY, composed of up to four fields: symbol, mnemonic, oper- which are also specified in the operand column, define and, and comment. the means of linking segments and groups of the same The symbol field may contain either a label-whose name. value is an instruction or data address-or a name that represents an instruction address, data address, or con- Controls stant. The mnemonic field may contain an instruction or There are two types of assembler controls for the assembler directive. The operand field contains the data RA70320: or expression for the specified instruction or directive. Explanations forthe statements may be inserted into the • Basic (specified in the assembler command line) comment field. - File specification - Output file selection Character constants are translated into 7-bit ASCII - Output file destination codes. Numeric constants may be specified as binary, - Listing format controls octal, decimal, or hexadecimal. Arithmetic expressions - Debug information output selection may include the operators +, -, *, /, MOD, OR, AND, - Symbol case selection NOT, XOR, EO, NE, LT, LE, .GT, GE, SHR, SHL, LOW, - Macro processing selection HIGH, PTR, SHORT, THIS, SEG, OFFSET, SMSIZE, GRSIZE, SMOFFSET, GROFFSET, TYPE, LENGTH, • General (specified in the source program) SIZE, MASK, WIDTH, (), [], period (.), colon (:), and -Inclusion of other source files < >. - Page eject - Generation/suppression of listing Macro and Code Macro Capability - Listing titles RA70320 allows the definition of macro code sequences A list file may contain the complete assembly listing or it with parameters, LOCAL symbols, and special repeated may contain only lines with errors and a symbol or code sequences. The macro code sequence is different cross-reference table. The symbol table lists all defined from a subroutine call in that the invocatiqn of a macro in symbols in alphabetical order and also shows their the source code results in the direct replacement of a types, attributes, and the values initially assigned to macro call with the defined code sequence. them. The cross-reference table contains all defined symbols, as well as the numbers of all statements refer- RA70320 also allows the definition of code macros to ring to them. give the user the capability of defining a new instruction (mnemonic). Although an instruction definition could The object file contains the relocatable object module. also be defined using the ordinary macro facility, code The format of this module conforms to NEC's proprietary macros specify the allowable operand types for the new relocatable object module format. instructions whereas ordinary macros cannot. Linker Directives The LK70320 linker combines relocatable object mod- Assembler directives give instructions to the program ules and absolute load modules and produces one ab- but are not translated into machine code during assem- solute load module (figure 2). The controls for the linker bly. Basic directives include those for storage definition may be specified in either the command line or ina and allocation (DB, Ow, DO, DO, DT, DBS, DWS, DDS, parameter file. In addition to being able to specify the DOS, DTS, STRUC/ENDS, RECORD); symbol control date, the module name, the starting address and the (EOU, LABEL, PURGE); and program counter control order for code/data/stack segments, it is also possible to (ORG, EVEN, ALIGN). Program control directives in- protect areas of memory from being assigned. Further- clude those for segment definition and control more, it is possible to instruct the program to create a (SEGMENT/ENDS, PROC/ENDP, ASSUME, GROUP, list file containing a link map, a local symbol table, or a END); special function registers and internal RAM public symbol table. The absolute load module contains (SETIDB, ASGNSFR); linkage (NAME, PUBLIC, EXTRN); symbol information for the symbolic debugger and the and PARITY. absolute object code. 2 NEe RA70320 Hexadecimal Object Code Converter IE-70320 and IE-70330 packages. The Multiple File Han- dier allows the emulator to read MS-DOS formatted The OC70320 object code converter (figure 3) translates disks, among others. an absolute load module file into an expanded hexadec- imal (7-bit ASC II) file that may be downloaded to a PROM Figure 2. Unker Functlona'DI.am programmer. Addresses may be specified as being out- put in the order in which they were input or in ascending order. Library Module File Librarian The LB70320 librarian creates and maintains files con- taining relocatable object modules. The program re- duces the number of files that need to be linked together Absolute Absolute by allowing several modules to be kept in a single file, Load Module .... Load Module Object Module File 1 .... Object Module File n and also provides an easy way to link frequently used File 1 File n modules into programs. Modules may be added, deleted, or replaced within a library file. l I Operating Environment J 1 System Temporary LK70320 Work The RA70320 package has been designed to run under a Console Linker File. variety of operating systems. One version is available to run on an MS-DOS system with one or more disk drives and at least 512K of system memory. Other versions are available to run on a Digital Equipment Corporation VAX j j computer under the UNIX 4.2BSD, Ultrix, and the VMS Absolute Linker Load List (Version 4.1 or later) operating systems. Module File File Downloading Files Into the Emulator 83-004616A Absolute load modules produced by the RA70320 Relo- Figure 3. HeXlldeclmalObject Code catable Assembler package can be debugged by using Converter Functionsl Diagram the NEC IE-70320 (V25) or IE-70330 (V35) stand-alone in-circuit emulator. Communication between these emu- lators and the host system is handled through an RS- Object Absolute Module Load 232C serial line that uses the KERMIT communications File Module File protocol developed at Columbia University. With the appropriate version of KERMIT running on both the emulator and host system, absolute load modules or I OR J hexadecimal object code files may be transferred be- ~ tween machines. OC70320 System ~ Hexadecimal Format A version of the KERMIT Communication Program is Console Object Converter supplied with each NEC emulator. NEC supplies versions of KERMIT to run on the IBM PC, PC/XPM, PC ApM, or compatibles under MS-DOS operating systems, and the Digital Equipment VAX under VMS, UNIX 4.2BSD, or J Ultrix. An appropriate version is provided with each Hexadecimal relocatable assembler package at no extra charge. Ver- Object Code sions of KERMIT for other host systems are available File directly from Columbia University A second means of loading files into the emulator is also * Absolute addresses with no external references available in the Multiple File Handler, a utility program 83-004617A that runs in the emulator and is supplied as part of the PC/XT and PC AT are trademarks of International Business Machines Corp. 3 RA70320 NEe Documentation. For further information on source program formats, assembler operation, and actual program examples, refer to the following manuals $upplied with the RA70320. Additional copies may be obtained from NEC Electronics Inc. • RA70320 V25N35 Relocatable Assembler Package Language Manual • RA 70320 V25N35 Relocatable Assembler Package Operation Manual. License Agreement RA 70320 is sold under terms of a license agreement included with purchased copies of the assembler. The accompanying card'musfbe completed and returned to NEC Electronics Inc. to register the license. Software updates are provided to registered users. 4 NEe NEG Electronics Inc. V25!V35 MINI-IE Plus In-Ci rcuit Emulator Description o Optional real-time trace (RTl) board - 8K frames by 48-bit trace buffer·· The V25 MINI-IE Plus and V35 MINI-IE Plus are low-cost - Two hardware breakpoints with don't care In-Circuit Emulators for'· the JlPD70320 (V25™), features JlPD70325 (V25 Plus), JlPD70330 (V35™), and JlPD70335 - Eight external data inputs (V35 Plus) microcomputers from NEC Electronics. Low - Hardware trigger output cost is achieved by using an IBM PCJ)(T®, PC AT®, IBM - Qualifier controlled recording PS/2™, or compatible machine. -32-bit timer with 250~ns resolution The control software for the MINI-IE Plus is AdVICE o Executes NEC .LNK absolute files and Microsoft (Advance V-Series In~Circuit Emulator), which acts as .COM and .EXE files both a monitor and debugger. Debugging with break- - Files can be downloaded to and uploaded from point and non-real-time tr,acing of executing programs the MINI-IE Plus are accomplished in software using a V25N35 micro- - Supports real-time and single-step emulation computer located on the MINI-IE Plus board. An op- - User programmable public symbol buffer size tional real-time trace (RTT) board is avai lable for those who need this additional tool. o Controlled by powerful AdVICE monitor and . debugging program The AdVICE software is designed to provide a very -Symbolic full screen debugger user~friendly operating-debugging interface using a - Displays six window areas with second-level custom multiwindow display. User code developed break setup window with standard PC software development tools can be - Updates display information as program single- directly loaded (.EXE and .MAP files) into the MINI-IE- steps PluS. The AdVICE control program can even be left in - On-line assembler PC memory as a background TSR while code modifica- - Programmable trace and symbol buffer sizes tion is performed.. -On-line help menus - Keyboard macros speed up repetitive operations Features - User definable commands o Emulates JlPD70320/70330 at up to 8 MHz. - Resident operation with hot key activation - Message exchange capabilities between PC and o Emulates JlPD70325/70335 at up to 10 MHz emulator o Jumper selectable internal or external (target) o Sample batch file contains demonstration clock. program o Parallel interface with host PC; interface card and cable included Ordering Information o Connects to target system via flexible PLCC socket Part Number Description adapter EB-V25MI NI-IE-P pPD70320/70325 MINI-IE Plus package - Emulation memory may be mapped to MINI-IE EB-V35MINI-IE-P pPD70330/70335 MINI-IE Plus package Plus or target system EB-V25/35-RTT V25/V35 MINI-IE Plus real-time trace option - Supports two 64K-byte mappable user emulation RAM areas o Software break and trace capabilities - Up to eight conditional breakpoints plus 'one in command line -Additional breakpoints can be given in the command line - Various actions can be programmed to take place on a break IBM PC/XT, IBM PC AT, and IBM PS/2 are registered trademarks of - Error checking of break entry conditions International Business Machines Corporation. V25 and V35 are trademarks of NEC Corporation. 150231-1 V25N35 MINI·IE Plus NEe HARDWARE An optional real-time trace (RTl) board can be plugged on top of the emulator card to provide a 4S-bit by SK The V25N35 MINI-IE Plus package consists of five deep trace buffer. Eight external logic pins can be components. monitored along with the V25N35 bus sigl1als. e V25N35 MINI-IE Plus box with target adapter Command control of the EA pin of the V25N35 allows e Modified printer adapter card use of ROM-bas;ed devices~ After initialization, EA is e Interface cable forced low to access external memory, but can be e Dc power plug forced high by command or may be controlled by the target hardware. e AdVICE software and user's manual The NMI signal is normally used by the MINI-IE Plus to The MINI-IE Plus contains two 64K-byte blocks of static stop program execution using interrupt vector 02. Use RAM that is allocated by software to any 64K-byte of the target NMI signal in an application is possible by boundary within the 1M-byte address range of the assigning an unused interrupt vector in place of the V25/35. ROM simulation is performed by write protect- normal vector. Any high-to-Iow transitions of the target ing this memory. An additional64K bytes of RAM and a NMI signal will cause the emulator to execute this new 12S-byte I/O block are used by the internal monitor and vector. can be relocated by command to ~void conflicts with The interface card is a modified printer adapter card external addressing needs. that allows fast bidirectional communications between Typical memory mapping allocates one block at the the host PC and the MINI-IE Plus. This card is not beginning of the addressspace (OOOOOH) and the other needed with an IBM PS/2. The interface cable connects at address OFOOOOH. This may represent the final hard- the MINI-IE Plus to the interface card onPC/XT/AT or ware configuration. The upper block would contain compatible or to the printer port of an IBM PS/2. Power program code and be write protected. Any writes to for the MINI-IE Plus is supplied via the interface card. this area would stop the program execution and allow With PS/2, the dc power" plug and a user-supplied external + 5-volt power supply power the MINI-IE Plus. the user to analyze the program. This feature allows debug when the program tries to write to ROM. Execu- The flexible target adapter allows direct connection to tion of the reset procedure is done by activating the a PLCC socket of the target hardware. The cable is target's RESET pin. Emulator hardware/software will approximately 16 cm long and protrudes from the front not be reset by this action. of the MINI-IE Plus box. See figure 1. Figure 1. MINI-IE Plus Front Panel Power Connector for • Connector for Clock Selection External Probes Target PLCC Adapter 83-6759A 2 NEe V251'l35 MINI-IE Plus SOFTWARE Emulation The control software (AV35N .EXE or AVRTT35N .EXE) User programs loaded into emulator RAM can be exe- uses the PC screen to display program and memory cuted in real-time or in single-step mode. Single-step data. All information is updated after every command, mode executes only one instruction, and procedure and it keeps the user informed of the current state of step executes an entire subroutine or software inter- the emulation. The screen is divided into seven areas. rupt routine. Real-time execution is command acti- These areas display the current contents of the regis- vated and terminates when a breakpoint is encoun- ters and bottom of stack, the command line, two tered or the user terminates execution from the memory dump areas with an additional ASCII dump keyboard. Program execution is also stopped when an display, the disassembler, and function key assign- exception interrupt or an interrupt with an unitialized ments. See figure 2. vector occurs. Help and other setup screens, such as breakpoint Message exchange between the PC and an executing menus, overlay some of the windows described above. application program is provided. See figure 4. An inter- Executing a new command will restore the display to rupt function similar to the DOS INT21 allows commu- the original screen. Figure 3 .shows the AdVICE screen with a help window and the command line prompts. nication to the application program without a keyboard or display attached to the target system. AdVICE controls all the monitor and debug functions of the V25N35 MINI-IE Plus including upload and down- load of programs, breaking, tracing, program execu- tion, disassembly, line assembly, and register/memory display and manipulation. The cursor can be moved anywhere within the window displays for immediate change of the memory areas, registers, flags, and breakpoi nts. Figure 2. AdVICE Main Screen AW noo IX 0000 PS F800 PC OOOF Stack +0 FfFF PSW F002 IntM:l V25 0000 Bioi IY 0000 DS noo +2 423E RB 7 CW 3BA8 BP 0000 ES 0000 HS 0040 +4 23C3 V OIR IE S Z AC P CY OW 0000 SP OOFE SS 0040 FS 0040 Resident +6 A352 o a a 0 0 a 0 a 0m ) 1 a 1 2 3 4 5 6 7 1 OS 0000 FF FF FF FF FF FF FF FF RESET: OS 0008 FF FF FF FF FF FF FF FF 0000 B8FFFF MOV AW,FFFF OS 0010 FF FF FF FF FF FF FF FF 0003 8E08 MOV OS,AW OS 0018 FF FF FF FF FF FE' FF FF 0005 C6060FOOF7 MOV [OOOFj,F7 OS 0020 02 00 00 00 00 00 00 00 OOOA B800F7 MOV AW,F700 OS 0028 00 00 00 00 00 81 00 00 0000 8E08 MOV OS,AW OS 0030 00 00 00 00 00 00 00 00 OOOF C606020FFF MOV PMCO,FF OS 0038 00 00 00 00 00 00 00 00 0014 C606E10FB2 MOV RFM,B2 OS 0040 FF FF FF FF FF FF FF FF 0019 C706E80F5555 MOV WTC,5555 OS:0048 FF FF FF FF FF FF FF Ff 2 0 1 2 3 4 5 6 7 8 9 A B C 0 E F FS:OOOO CC OF 42 6C 04 2F EE A2 1F 00 76 FE 98 84 7F FO ~. B1 \0/ £6 .. v·Y= FS:0010 47 40 FE FB 5E 2A AC 53 OC 99 FO E7 6F 6B 81 FB GM.r"'~S .0 1 "coki.ll FS 0020 FF FF FF FF FF FF FF FO FF FF 3F FF FO FF FF FF 1 7 1 FS 0030 FF FF FF FF FF FF FF FF FF FF FF FF FF 7F FF FF FS 0040 22 44 CE AE A2 C7 67 FO B2 09 EF F7 11 05 7F 73 "Of«6f-g3 I·n::::.s 1 Step 2ProcStep 3Retrieve 4Help ON 5BRK Menu 6 DOS 7 up 8 dn 9 Ie 10 ri 83-6760A 3 NEe Figure 3. AdVICE Screen With He*, Menu.andCommand Une Prompts AW F700 IX 0000 PS F800 PC OOOF Stack +0 FFFF PSW F002 IntM:l V25 BW 0000 IY 0000 DS F7'OO +2 423E RB 7 CW 3UA8 BP 0000 ES 0000 liS 0040 +4 23C3 V DIR IE S Z AC P CY DW 0000 SP OOFE SS 0040 FS 0040 Resident +6 A352 0 O. a a a a 0 0 D or DEF or DIR IC~D >D 1 0 1 2 3 4 5 6 "7 FFB8- OS:OOOO FF FF FF FF FF FF FF FF 00E7 8BOF MOV BW,IY OS:0008 FF FF FF FF FF FF FF FF .00E9 2EFFl5 CALL .PS: [IY] 08:0010 FF FF FF FF FF FF FF FF OOEe EBC6 BR V40--,CLI OS:0018 FF FF FF FF FF FF Ff FF VECTOR_TABLE: D8:0020 02 00 00 00 00 00 00 00 OOEE 56 PUSH IX OS:0028 00 00 00 00 00 81 00 00 OOEF 029802FO ADD BL, [F002+BW+IX] ~'S: 0030 00 00 00 00 00 00 00 00 OOF3 0450 ADD AL,50 ;OS: 0038 00 00 00 00 00 00 00 00 00F5 03B40328 ADD· IX, [2803+IX] OS:0040 FF FF FF FF FF FF FF FF 00F9 024805 ADD eL, [B\HIX+05] OS:0048 FF FF FF FF FF FF FF FF o (/~ ON I OFF) addr Display - code at the specified address. With '0 1<' or 'Ctrl-Enter' the address of the current instruction will b~ used~ If a memoiy location is accessed by the actual instruction its value is shown on the screen. Use to optional /M parameter to control the display of this memory data. ~ Standard segment PS: ________________________________W'ith PgUp/PgDn text can be paged ______________ ~ 1 Step 2ProcStep 3Retrieve 4l1elp OFF SBRK Menu 6 DOS 7 up 8 dn 9 Ie 10 ri 8U761 A Figure 4. Executing Program ""ith MeSSllge Exchange AW F700 IX 0000 PS 0065 PC 0000 stack +0 FFFF PSW F002 IntM:l V25 Bioi 0000 IY 0000 OS F700 +2 340C RB 7 CW 00B2 BP 0000 ES 0000 liS 0060 +4 0012 V OIR IE S Z !l.C P CY DW 0000 SP OlFE S8 0040 FS 0040 Resident +6 5400 0 0 0 0 0 0 0 0 or GC 1 a 1 2 3 4 5 6 7 08:0000 FF FF FF FF FF FF FF FF 2 ,> 1<1<1< E X E C U T I N G I< 1< 1< Analyze 08:0008 FF FF FF FF FF FF FF FF Emulator Messages < from emulator ) to emulator =123 OS:[IX]= /W ES:32B4 CY=l For more details refer to the user's manual. BR# Break AOR Condition Count Occur 'Action 1 HAIN20 ........................................................................ 1 1 trace ON 2 MAIN60 .............. ........................................................ .. 1 1 TR OFF A ON 3 SWTIH >= 0100 ........................ " .................. 1 1 br 4 - ........................................................................ 0 0 5 - ........................................................................ 0 0 6 - ........................................................................ 0 0 7 - ........................................................................ 0 0 8 - ........................................................................ 0 0 Address AddrH Type Oir Oat OaM ExO ExM P2 P2M Action EV1 TIMER FFFFF H R 0 00 0 0 0 00 RT ON TI ON EV2 0 FFFFF H R 0 00 0 0 0 00 QUA 0 000 X X 0 0 RTT Mode: C IView Trace 3Read Setup 4 Help OFF 5 CMO line 7Save Setup 9Clear BRIOClear" OCC 8H763A Figure 6. Soft Trace Buffer Oi$play T R A C E B U F F E R 0 I S P LAY Buffer Offset 0 1<1<1< Begin of TRACE buffer 1<1< HAIN20: AW=FFOO IX=0004 PS=0065 8tack+0 E80] 0027 CALL INIT_TIMER BW=OOOO IY=0074 OS=0060 +2 340C >8tarted by BRI V OIR IE 8 Z AC P CY CW=00B2 BP=OOOO ES=FFOO +4 0012 0 0 0 0 1 0 1 0 OW=1388 SP=OIFE S8=0040 +6 5400 INIT_TIMER: AW=FFOO IX=0004 PS=0065 Stack+O 002A 003E MOV ES:TMCO,CO BW=OOOO IY=OO74 OS=0060 +2 E80] V OIR IE S Z AC P CY CW=00B2 BP=OOOO ES=FFOO +4 140C 0 0 0 0 1 0 1 0 OW=1388 8P=01FC 8S=0040 +6 5400 0044 MOV ES:MOO,0140 AW=FFOO IX=0004 PS=0065 Stack+O 002A BW=OOOO IY=0074 OS=0060 ' +2 E803 V OIR IE S Z AC P CY CW=00B2 BP=OOOO ES=FFOO +4 340C 0 0 0 0 1 0 1 0 OW=1388 SP=OlFC SS=0040 +6 5400 004B HOV ES:TMICO,07 AW=FFOO IX=0004 PS=0065 Stack+O 002A BW=OOOO IY=0074 OS=0060 +2 E803 V OIR IE S Z AC P CY CW=00B2 BP=OOOO ES=FFOO +4 340C 0 0 0 0 1 0 1 0 DW=1388 SP=01FC SS=0040 +5 5400 0051 RET AW=FFOO IX=0004 PS=0065 'Stack+O 002A BW=OOOO IY=0074 OS=0060 +2 E803 VOIR IE S Z AC P CY CW=00B2 BP=OOOO ES=FFOO +4 340C 0 0 0 0 1 0 1 0 DW=1388 8P=01FC SS=0040 +6 5400 Use cursor keys to scroll data up and down F1 or '---1' to return 83-6764A 6 NEe V25N35 MINI·IE Plus Figure 7. Real-Time Trace Buffer Display R e a 1 - T i m e T r a c e D a t a Addr Ctl Data External P2 Record : 1 of 2271 00B02 M R fA ff=l1111111 ff astart: FADI 00B03 M R B8 FF-=l1111111 FF B82103 MOV AW,0321 00B04 M R 21 FF=11111111 FF vdgroupqJ: 00B05 M R 03 fF=11111111 ff 00B06 M R BB ff= 11111111 fF BB2103 MOV nW,0321 00B07 M R 21 FF=11111111 fF 00B08 M R 03 fF=11111111 fF 00B09 M R 89 Ff=l1l11111 FF B98003 MOV CW,03BO OOBOA M R BO Ff=11111111 FF OOBOB M R 03 FF=11111111 FF OOBOC M R B9 FF=11111111 FF 891202 MOV CW,0212 OOBOD M R 12 fF=1111l111 fF OOBOE M R 02 FF=l1l1l111 FF OOBOF M R FC FF= 11111111 FF FC CLR1 DIR 00B10 M R 8E FF=11111111 FF 8EDB MOV DS,BW OOB11 M R DB FF=1l111111 FF 00B12 M R BA FF=l111l111 FF BAFFFF MOV DW,FFFF OOB13 M R FF FF=lll11111 FF OOB14 M R FF FF=11111111 FF 00B15 M R 8E FF=l1l11l11 FF 8EC2 MOV ES,DW 00B16 M R C2 FF=11111111 FF lShow MK1 2Show MK2 3Set MKl 4Set MK2 Ctl-PgDn/Up:+/- 100 Ctl-End/Home:+/-10OO 8J.e7e&A V25 PLUS AND V35 PLUS EMULATION The V35 MINI-IE Plus can emulate the V35 in the same manner as described above. Note that 10-MHz opera- The V25 MINI-IE Plus oan emulate both the standard tion also requires the faster SRAMS. The V25 MINI-IE V25 and the V25 Plus. This is accomplished by simply Plus cannot be used to emulate either the V35 or V35 switching the V25 in the emulator with the V25 Plus Plus devices; the V35 MINI-IE Plus cannot be used to chip. The emulator can be upgraded to support the V25 emulate either the V25 or V25 Plus devices. Plus at 10 MHz, either by changing the 16-MHz crystal in the emulator with a 20-MHz crystal or by· using an The control program of the V25 MINI-IE Plus and V35 external 20-MHz frequency source. (Do not use an MINI-IE Plus will automatically sense the CPU in the external crystal as a frequency source because the crystal may not oscillate due to probe cable effects.) In addition to changing the emulator CPU, 10-MHz oper- emulator upon power-up and adjust the internal Spe- cial Function Registers to support the installed CPU. EI ation requires replacement of memory devices in the emulator. The V25 MINI-IE Plus requires 70-ns access time (or faster) and 32K-byte by a-bit static memory chips when run at zero wait states and 10 MHz. 7 V25N35 MINI·IE Plus NEe 8 NEe NEC Electronics Inc. V40N50 MINI-IE In-Circuit Emulator Description o Controlled by powerful AFD-Sym monitor and debugging program The V40 MINI-IE and VSO MINI-IE are low-cost in-circuit - Symbolic full-screen debugger emulators for the JJPD70208 (V40TM) and JJPD70216 - Uses function keys as well as direct command (VSOTM) microcomputers. The MINI-IE is designed to be entry used with an IBM PCIXT®, PC AT®, IBM PS/2., or com- - Displays six window areas with second-level patible machine. The control software for the MINI-IE is break setup window AFD-Sym (Advanced Full-Screen Debug with Symbols), - Updates disp1ay information as program single which acts as both a monitor and debugger. Debugging steps with breakpoints and non-real-time tracing of execut- - On-line assembler ing programs are accomplished in software using a -Evaluates and displays arithmetic expressions V40NSO microprocessor located on theMINI-IE board. - Displays color on color systems - Programmable trace and symbol buffer sizes Features -On-line help menus o Emulates JJPD70208/70216 at 8 MHz - Macro command capability o Parallel interface with host PC; interface card and o Sample batch file contains demonstration cable included program o Connects to target system via PGA or PLCC probe Ordering Information o MINI-IE hardware Part Number Description - 64K bytes of static RAM starting at address 0000:0 EB-V40MINI-IE pPD70208 (V40) PC-based MINI-IE with adapter - MINI-IE reserved PROM at address F800:0 through FFFF:F EB-V50MINI-IE pPD70216 (V50) PC-based. MINI-IE with - MINI-IE memory may be disabled to use target adapter memories ADAPT68PGA68PLCC Adapter for 68-pin PLCC socket - 32 bytes of MINI-IE I/O starting at address (shipped with MINI-IE) 8000:0 o Software break and trace capabilities HARDWARE ~ The MINI-IE (figure 1) consists of a parallel interface ~ - Up to eight conditional breakpoints in break definition mode - Additional breakpoints can be given in the board providing bidirectional data communication and command line a JJPD70208 or JJPD70216 emulation board (or MINI-IE - Various actions can be programmed to take board). The parallel board fits into a free slot in the PC place on a break and is hardwired for address 0278H within the PC I/O - Error checking of break entry conditions space. o Executes NEC .LNK absolute files and Microsoft The MINI-IE board consists of aJJPD70208 or JJPD70216, .COM and .EXE files 32K bytes of EPROM, 64K bytes of static RAM, decod- - Files can be downloaded to and uploaded from ing logic, and a parallel interface. It can receive power the MINI-IE from the PC, the target system, or an external supply. - Supports real-time and single-step emulation The MINI-IE board connects to the parallel board in the - User-programmable public symbol buffer size PC by a 2S-line cable. The MINI-IE can be connected directly into a 68-pin IBM PC/XT, IBM PC AT, and IBM PS/2 are registered trademarks of International Business Machines Corporation. PGA socket on the target system or into a 68-pin PLCC Hercules is a registered trademark of Hercules Computer socket on the target system through· adapter Technology Inc. ADAPT68P~68- PLCC. In this. configuration, the V40 and V50 are trademarks of NEC Corporation. MINI-IE RAM and EPROM can be disabled via jumpers so that target memory is accessed, or a combination of MINI-IE and target memories can be used. 60232-1 V40/y50 MINI·IE NEe Figure 1. V40/V50 MINI-IE Board (Component Side) INI T .. nnnn, .17 .14.13 .15 III a =- s s ....... V4~ YOO ..• a ~ I/OPAL o LOVRAM HIG~At1 1 IlNE! o :. 6b~OD '" :. "II • ~ II JD~~ i7ilt 71155 tJul:JtJ~~ HEHPAL .8;!-6766A Figure 2. AFD-Sym Main Screen A'i'l 0207 IX OCOO PS 0221 PC 0000 Stack +0 FFFF PSW F002 IntM:1 V40 SW 0000 IY 018.4 DS 0220 +2 340C CW 0089 BP 0000 ES 0000 HS 0220 +4 0012 V DIR IE S Z AC P CY DW FFFD SP OlFE SS 0200 FS 01BB +6 0000 0 0 0 o· 0 0 0 0 or GC !'r---G Gm >G 1 DS:OOOO 0 1 2 3 OC 34 12 00 4 5 6 7 00 00 00.00 2 > 1<*1< E X E C U T I N G *** Analyze DS:0008 00 00 00 00 00 00 00 00 ~lAIN : DS:0010 B8 20 02 8E D8 90 FA: 33 0000 682002 MOV A\oj',0220 DS:0018 CO 8E ,CO 90 FC BF ~O 01 0003 8ED3 MOV DS, A~~ DS:0020 B8 65 00 AB 8C C8 AB E'8 0005 90 NOP DS:0028 08 00 33 CO FB 40 90 EB 0006 FA DI DS:0030 FC CC BA FC FF BO 00 EE 0007 33CO XOR AW,AW DS:0038 BA FA FF BO 60 EE BA F9 0009 8Eeo MOV ·ES,AW DS :.0040 FF BO 50 EE BA FO FF BO OOOB 90 NOP Ds:0048 01 EE BA FD FF B8 02 00 2 3 4 5 .6 7 8 9' A B C D E F 0 1 2 HS 0003 00 00 00 00 00 00 00 00 00 00 00 00 00 B8 20 02 ........ , . , " " , HS 0013 8E D8 90 FA 33 CO 8E CO 90 FC BF 80 01 B8 65 00 ;tti03LAL £l1~<;:"e. HS 0023 AB 8C C8 AB E8 O~ 00 33 CO FB 40 90 EB FC CC ~,,3 !~~ i~'\~! BA Y.a HS 0033 FC FF BO 00 EE ~ I W0i~i'; I BA FA FF BO 60 EE BA F9 FF BO 50 E HS 0043 EE BA FO FF BO 01 EE BA FD FF B8 02 00 EE BO 13 '2' , , , E tll, 1 Step 2ProcStep 3Retrieve 4Help ON 5BRK Menu 6 7 up 8 dn 9 Ie 10 r1 83-6767A 2 NEe V40N50 MINI·IE SOFTWARE Programs generated using NEC's RA 70320 Relocatable Assembler package allow symbols to be loaded directly The control software, AFD-Sym, provides six windows with the program code. Programs produced with devel- on the main screen display (figure 2). opment tools that generate .EXE or .COM files can be • p.PD70208/70216 registers and flags and the top four loaded into the MINI-IE, but symbols must be loaded words of the stack separately. Several symbol files can be loaded into the • Command entry line internal symbol table. The buffer used for symbol stor- • Offset addresses, opcodes, and disassembly of eight age is allocated in the PC and can be varied in size from lines of the program load area 1K to 64K bytes. Symbols can be added, deleted, and renamed interactively. • 80-byte memory dump area • Second 80-byte memory dump area Break Capabilities • ASCII equivalent of the second 80M-byte memory area Two types of breakpoints are available. Immediate break- points are entered directly with the execution command AFD-Sym controls all the monitor and debug functions of and stop execution when the instruction at the specified the MINI-IE including uploading and downloading pro- location is to be executed. The second type of break- grams, program execution with or without breakpoints, point is specified in a separate breakpoint menu. recording of trace history, dlsassembly, in-line code assembly, and register/memory display and manipula- The breakpoint entry menu (figure 3) is a. second-level tion. The cursor may be moved anywhere within the menu and can be entered by F 5 key of the PC keyboard. window displays for immediate change of the memory The menu contains six fields: breakpoint number, break- areas, registers, flags, and breakpoints. point conditions, a count, number of occurrences, and action to be taken. AFD-Sym software running on a PC requires 75K to 147K bytes of system memory depending on the options Up to eight address breakpoints can be defined in the required. It may be copied to a hard disk or run directly menu. They can be tagged with conditions and a count from the floppy diskette. value (up to 65,535) for the number of times the break- point is satisfied. Up to eight conditions may be entered Emulation RAM area starting at address 0000:0 is partly for each breakpoint, including satisfying other break- used by the AFD-Sym monitor and the interrupt vectors. points and comparisons of register and memory con- The lowest available user memory is indicated by the tents (direct or indirect addressing modes) with those of segment registers after reset and depends on the trace other registers, memory locations, and immediate buffer size allocated. The AFD-Sym code in EPROM is values. JI!!!III!!II!I located at F800:0 and the following 32K bytes are re- served for this purpose. The action field defines an operation or operations to be ~ done when a breakpoint occurs. Such actions include Emulation trace on/off, analyze on/off, restart the breakpoint, browse through a file, turn on/off the snap feature, and User programs loaded into emulator RAM or EPROM can jump to a different section of code. be executed in real-time or in single-step mode. Single- step mode executes only one instruction; procedure To set up the analyze mode, an address field in the step executes an entire subroutine or software interrupt breakpoint menu is left empty but conditions are placed routine. It is possible to Single-step a hardware interrupt in the condition field. Then, on enabling the analyze handler when the associated interrupt mode is selected. mode, the program is run in single-step mode while the Real-time execution is command activated and termi- conditions are checked. In the snap mode, the instruc- nates when a breakpoint is encountered or the user tion and the register values are put in the trace buffer terminates execution from the keyboard. Program exe- when conditions for a breakpoint are met. cution is also stopped when an exception interrupt or an Actions are performed when the occurrence counter is interrupt with an uninitialized vector occurs. equal to a specified count. This occurrence counter is incremented only when all specified conditions are true. When emulation is to resume after a breakpoint, an option can be used in the GO command that will not reset the occur field and the trace mode. 3 V40N50 "MINI·IE NEe Trace' Capabil ities CONNECTION TO IBM PC The MINI-IE trace is handled in software by the' AFD- The V40 or V50 MINI-IE. can be ,used with IBM PC/XT/AT Sym. When, trace is active, the current register pontents or full compatibles, and on IBM PS/2. A monochrome, and the top four words of the stack are saved to the traoe CGA, Hercules@ color graphics or EGA adapter and buffer, along with the instruction that is to be executed corresponding monitor is·'required. With IBM PC/XT/AT, at least one expansion slot must be available for use with in single-step mode.' Program execution is .not in real the parallel interface adapter included with the MINI-IE. time when trace or analyze modes are enabled. Interrupt routines are, however, executed in real time and 'are' not At least one printer port address should' also be, avail- recorded in the trace buffer (unless the user selects able. IBM PS/2 models will use the system printer port interrupt step mode of the MINI-IE). and will require a user-provided +5-volt dc power supply to power the MINI-IE. A minimum of 75K bytes of free The trace buffer resides in the emulation mel110ry and its memory is, needed to run AFD-Sym. A hard disk is not size can be set from 1K to 64K bytes by the user. The required but is recommended. default size of 4Kbytes allows 100 records to be stored: The parallel board of the MINI-IE is hardwired for address Trace data, which can be displayed from the main SQreen 0278H of the PC I/O space. A provision on the parallel or from the menu screen, can be shown with register board allows you to change the I/O address to a different contents or instructions only. See figure 4. Records can value, and a command line switch tells AFD-Sym where be print~d or saved to a file. If symbols are lOaded, they the parallel board is located. will be shown in the trace records. With the MINI-IE board conne~ted to the parallel board via the 25-line cable,. running the AFD-Sym program initiates communications with the MINI-IE and/or the target system. , ' Figure 3. BreakpointEntry,Menu AW 02AO IX 0000 PS 0221 PC OOIE Stack +0 FFFF PSW,F216 IntH:I V40 BW 0000 IY 0184 OS 0220 +2 340C CW 0089 BP 0000 ES 0000 HS 0~20 +4 0012 V OIR IE S Z AC P CY OW FFFO SP 01FE SS 0200 FS 01BB +6 0001 o 0 1 0 0 1 1 0 Defines the address of a breakpoint. With - as the first character the breakpoint is inactive. A breakpoint with an empty address field will be checked on ~very break if count>O and an action is specified for this breakpoint. With 'Alt'+n (n=1..8) the address of the actual instruction will be stored to the corresponding breakpoint. ~tandard,segment PS: , BR# Break ADR Condition Count Occur Action . 1 MAIN20 1 1 trace ON 2 MAIN60 1 1 TR OFF A,ON 3 SWTIM >= 0100 ............... ~ . ; ... . 1 1 br 4 - o o .5 - . . ,. . . . . . . . . . . . . . . . . ,. . . . . . . . ." . .- .'. . . -: ~ o o 6 - o o ' 7 - o o 8 - •••••••••••••••••••••••••••••••• . . !II . ••• o o IView TraCe 3Read Setup 4 Help OFF 5 CHD line 7-Save Setup 9Clea'r BRIOClear OCC 83-6768A 4 NEe V40N50 MINI·IE Figure 4. Trace Buffer Display T R A C E B U F F E R 0 I S P LAY Buffer Offset 0 1< 1< -A Begin of TRACE buffer I< 1< MAIN20: .~W=0221 IX=OOOO PS=0221 Stack+O fFFf 0017 CALL INITV40 BW=OOOO IY=0184 OS=0220 ... 2 340C >Started by BR1 V OIR IE S Z AC P CY CW=0089 BP=OOOO ES=OOOO ... 4 0012 0 0 0 0 1 0 1 0 DW=FFFD SP=OlFE SS=0200 +6 0000 INITV40: AW=0221 IX=OOOO PS=0221 Stack+O 001.\ 0022 MOV DW,FFFC BW=OOOO IY=0184 OS=0220 +2 fFFF V OIR IE S Z AC P CY CW=0089 l3P=OOOO ES=OOOO +4 340C 0 0 0 0 1 0 1 0 DW=FFFD SP=OlFC SS=0200 +6 0000 0025 MOV AL,OO AW=0221 IX=OOOO PS=0221 Stack+O 001.~ BW=OOOO IY=0184 OS=0220 +2 FFFF V OIR IE S Z AC P CY CW=0089 BP=OOOO ES=OOOO +4 340C 0 0 0 0 1 0 1 0 DW=FFFC SP=OlFC SS=0200 ... 6 0000 0027 OUT DW,AL AW=0200 IX=OOOO PS=0221 Stack+O 00lA BW=OOOO IY=0184 DS=0220 +2 FFFF V DIR IE S Z AC P CY CW=0089 BP=OOOO ES=OOOO +4 340C 0 0 0 0 1 0 1 0 DW=FFFC SP=OlFC SS=0200 +6 0000 0028 MOV DW,FFFA AW=0200 IX=OOOO PS=0221 Stack+O 001A BW=OOOO IY=0184 DS=0220 +2 ffFF V OIR IE S Z AC P CY CW=0089 BP=OOOO ES=OOOO +4 J40C 0 0 0 0 1 0 1 0 DW=FFFC SP=OlFC SS=0200 ... 6 0000 Use cursor keys to scroll data up and down F1 or '~' to return US1aOA 5 V40N50· MINI·IE NEe 6 NEe Package Drawings II 7-1 Package Drawings NEe Section 7 Package Drawings Package/Device Cross-Reference 7-3 18-Pin Plastic DIP 7-5 20-Pin Plastic DIP (300 mil) 7-5 20-Pin Plastic SOP (300 mil) 7-6 24-Pin Plastic DIP (600 mil) 7-6 28-Pin Plastic DIP (600 mil) 7-7 28-Pin PLCC 7-8 40-Pin Plastic DIP (600 mil) 7-8 44-Pin Plastic QFP (P44G-80-22) 7-9 44-Pin Plastic QFP (P44G 6-80-364) 7-9 44-Pin PLCC 7-10 48-Pin Plastic DIP 7-11 52-Pin Plastic QFP 7-12 52-Pin PLCC 7-13 68-Pin PLCC 7-14 68-Pin Ceramic PGA 7-15 74-Pin Plastic QFP 7-16 80-Pin Plastic QFP 7-17 84-Pin PLCC 7-18 84-Pin Ceramic LCC 7-19 94-Pin Plastic QFP 7-20 120-Pin Plastic QFP 7-21 132-Pin Ceramic PGA 7-22 7-2 NEe P~ckage Drawings Package/Device Cross-Reference Package Device, "PO Package Device, "PO lS-Pin Plastic DIP 7l0llC-S 44-Pin Plastic QFP 71037GB-l0 7l011C-l0 (P44G B-SO-3B4); 7l051GB-S 7l0S4C-S 2.70 mm thick 71051 GB-l0 710S4C-10 71054GB-S 20-Pin Plastic DIP (300 mil) 710S2C 71054GB-10 710S3C 71055GB-S 710S6C 71055GB-10 710S7C 71059GB-S 710SSC-S 71059GB-10 710SSC-10 44-Pin PLCC 7010SL-S 20-Pin Plastic SOP (300 mil) 71011G-S 7010SL-10 710S2G 70116L-S 710S3G 70116L-10 710S4G-S 71037LM-10 710S6G 71055L-S 710S7G 71055L-10 710SSG-S 4S-Pin Pla$tic DIP 71071 C-10 24-Pin Plastic DIP (600 mil) 71054C-S 52-Pin Plastic QFP 7010SGC-S 71054C-10 7010SGC-10 2S-Pin Plastic DIP (600 mil) 71051C-S 70116GC-S 71051 C-10 70116GC-10 71059C-S 52-Pin PLCC 71071 L-10 71059C-10 6S-Pin PLCC 70136L-12 2S-Pin PLCC 71051 L-S 70136L-16 71051 L-10 7020SL-S 71054L-S 7020SL-10 71054L-10 70216L-S 71059L-S 70216L-10 71059L-10 6S-Pin Ceramic PGA 70136Fl-12 40-Pin Plastic DIP (600 mil) 7010SC-S 70136R-16 7010SC-10 70116C-S 70116C-10 7020SR-S 7020SR-10 IB 70216R-S 71037CZ-10 70216R-10 71055C-S 74-Pin Plastic ·QFP 70136GJ-12 71055C-10 70136GJ-16 44-Pin Plastic QFP 71054G-S SO-Pin Plastic QFP 7020SGF-8 (P44G-80-22); 1.45 mm thick 71055G-S 7020SGF-10 71059G-S 70216GF-S 70216GF-10 7-3 Package Drawings NEe Package/Device Cross-Reference (cont) Package Device, "PD 84-Pin PLCC 70320L 70320L-8 70322L-xxx 70322L-8-xxx 70325L-8 70325L-10 70327L-8-xxx 70330L-8 70332L-8-xxx 70335L-8 70335L-10 70337L-8-xxx 79011L-8 79021L-8 84-Pin Ceramic LCC 70P322KE-8 94-Pin Plastic QFP 70320GJ 70320GJ-8 70322GJ-xxx 7022GJ-8-xxx 70325GJ-8 70325GJ-10 70327GJ-8-xxx 70330GJ-8 70332GJ-8 -xxx 70335GJ-8 70335GJ-10 70337GJ-8-xxx 79011GJ-8 79021GJ-8 120-Pin Plastic QFP 70236GD-10 70236GD-12 70236GD-16 132-Pin Ceramic PGA 70236R-10 70236R-12 70236R-16 71641R 7-4 NEe Package Drawings 18-Pin Plastic DIP ~ : : : ~ : : : ;.1 Item Millimeters Inches A 22.86 max .900 max B 1.27 max .050 max C 2.54 (TP) .100 (TP) D 0.50 ±0.10 .020 ~:gg~ F 1.2 min .047 min G 3.5 ±0.3 .138 ±.012 H 0.51 min .020 min A 4.31 max .170 max 5.08 max .200 max K* 7.62 (TP) .300 (TP) 6.4 .252 M 0.25 ~g:6g .010 ~ :gg~ N 0.25 .010 P 1.0 min .039 min * Item K to center of leads when formed parallel. 49NR·506B P18C·l OO·300A. C (4/89) 20-Pin Plastic DIP (300 mil) 20 11 Item Millimeters Inches A 25.40 max 1.000 max F::: 0-: : : : ;.1 B 1.27 max .050 max C 2.54 (TP) .100 (TP) D 0.50 ±0.10 .020 ~ :gg~ F 1.1 min .043 min G 3.5 ±0.3 .138±.012 H 0.51 min .020 min A 4.31 max .170 max 5.08 max .200 max K* 7.62 (TP) .300 (TP) L 6.4 .252 M 0.25 ~g:6g .010 ~:gg~ N 0.25 .010 P 0.9 min .035 min * Item K to center of leads when formed parallel. P20C·l 00-300A. C 49NR·624B (11/89) 7-5 Package Drawings NEe 20-Pin Plastic SOP (300 mil) Item Millimeters Inches 20 11 A 13.00 max .512 max R B 0.78 max .031 max C 1.27 (TP) .050 (TP) 0 0.40 ~&6~ .016 ~:gg~ E 0.1 ±0.1 .004 ±.004 F 1.8 max .071 max G 1.55 .061 A H 7.7 ±0.3 .303 ± .012 6~!i~ I 5.6 .220 1.1 .043 K 0.20 ~g:6~ .008 ~:gg~ 0.6 ±0.2 .024 ~:gg~ M 0.12 .005 [TI I$l M @i P20GM·SO·300B. c 49NR·S94B (9189) 24-Pin Plastic DIP (600 mil) hem Millimeters Inches A 33.02 max 1.300 max 24 13 B 2.54 max .100 max C 2.54 (TP) .100 (TP) 0 0.50 ±0.10 .020 ~:gg: F 1.2 min .047 min G 3.5 ±0.3 .138 ±.012 H 0.51 min .020 min I 4.31 max .170 max 5.72 max .226 max K* 15.24 (TP) .600 (TP) L 13.2 .520 M N 0.2S ~g:6~ 0.25 .010 ~:gg~ .010 A 12 J * Item K to center of leads when formed parallel. IT] L [TI I$l N @i P24C-1oo·600 49NR·S92B (9/89) 7-6 ttiEC Package Drawings 2B-Pin Plastic DIP (600 mil) Item Millimeters Inches A 38.10 max 1.500 max B 2.54 max .100 max C 2.54 (TP) .100 (TP) D 0.50 ±0.10 .020 :::gg~ F 1.2 min .047 min G 3.6 ±0.3 .142 ± .012 H 0.51 min .020 min 4.31 max .170 max 5.72 max .226 max K* 15.24 (TP) .600 (TP) L 13.2 .520 M N 0.25 ::g:6~ 0.25 .010 :::gg~ .010 1 ~ A 14 .1 * Item K to center of leads when formed parallel. 0 L M 0-15° [£J f$l N @I 49NR·514B P2SC-100·600A1 (5/89) II 7-7 Package Drawings t\'EC 28-PinPLCC Item MlIIlmeters Inches A 12.45 ±0.2 .490 ±.008 B 11.50 .453 C 11.50 .453 0 12.45 ±0.2 .490 ±.008 E 1.94 ±0.15 .076 ~:gg~ 28 F 0.6 .024 G 4.4 ±0.2 173 + .00ll . -.008 H 2.8 ±0.2 .110 ~:gg~ 0.9 min .035 min 3.4 .134 K 1.27 (TP) .050 (TP) M 0.40 ±0.10 .016 ~:gg: ~~-~~~~~~~u N P 0.12 10.42 ±0.20 .005 .410 ~:gg~ G , I r lf~T Q 0.15 .006 T 0.8 rad .031 rad 0.20 ~g:~~ .008 ~ :gg~ 1.0~ @I.I U N P 49NR·52SB P28L·50Al (5/89) 4O-Pin Plllstlc DIP (600 mil) . Item Millimeters Inches A 53.34 max 2.100 max B 2.54 max .100 max C 2.54 (TP) .100 (TP) 0 0.50 ±0.10 .020 ~:gg: F 1.2mln .047 min G 3.6 ±D.3 .142 ±.012 H 0.51 min .020 min 4.31 max .170 max J 5.72 max .226 max K* 15.24 (!P) .600 (TP) L 13.2 .520 M 0.25 ~:6~ .010 ~:gg~ N 0.25 .010 • Item K to center of leads when formed parallel P4OC·I00-600A 83.o·6140B (1/90) 7-8 NEe Package Drawings 44-Pin Plastic QFP (p44G-80-22); 1.45 mm thick A Item Millimeters Inches B A 13.6 ±0.4 .535 ~:g~~ B 10.0 ±0.2 .394 ~ :ggg c 10.0 ±0.2 .394 ~ :gg~ D 13.6 ±0.4 .535 ~:g~~ C D F 1.0 .039 G 1.0 .039 H 0.35 ~g:~g .014 ~:gg~ 0.15 .006 0.8 (TP) .031 (TP) K 1.8 ±0.2 .071 ~ :ggg L 1.0 ±0.2 .039 ~ :gg~ I$l I @I OJ M 0.15 ~g:6~ .006 ~:gg~ Enlarged detail of lead end N 0.15 .006 P 1.45 ±0.1 .057 ~:gg~ Q 0.0 ±0.1 .000 ±.004 S 1.65 max .065 max Q P44G-SO·22 49NR·636B (11/89) 44-Pin Plastic QFP (P44GB-BO-3B4); 2.70 mm thick Item Millimeters Inches A 13.6 ±0.4 .535 ~:g~~ B 10.0 ±0.2 .394 ~ :gg~ C 10.0 ±0.2 .394 ~ :ggg D 13.6 ±0.4 .535 ~:g~~ C D F 1.0 .039 G 1.0 .039 H 0.35 ±0.10 0.15 0.8 (TP) .014 ~:gg~ .006 .031 (TP) II K 1.8 ±0.2 .071 ~:ggg 0.8 ±0.2 .031 ~:gg~ I$l I @I OJ M 0.15 ~g:6~ .006 ~:gg~ N 0.15 .006 Enlarged detail of lead end K AUlliDwlDJlD[D~ ---.l ~ P 2.7 .106 Q 0.1 ±0.1 .004 ±.004 R 0.1 ±0.1 .004 ±.004 M ~~~l S 3.0 max .119 max a R P44GB--60·3B4·1 49NR·556B (1/90) 7-9 Package Drawings NEe 44-PinPLCC Item A B Millimeters 17.5 ±C.2 16.58 Inches .689 ±.008 .653 F: C 16.58 .653 0 17.5 ±C.2 .689 ±.008 E 1.94 ±C.15 .076 ±.006 44 F 0.6 .024 1 C 0 G 4.4 ±C.2 .173 ±.008 Jll H 2.8 ±C.2 .110 ±.008 0.9 min .035 min 3.4 .134 K 1.27 (!P} .050 (TP) M 0.40 ±C.10 .016 ±.004 N 0.12 .005 P 15.50 ±O.20 .610 ±.008 a 0.15 .006 T 0.8 radius .031 radius F U 0.20 ~:6~ .008 ~:gg: G T ....-----P------.I P44L·50A1·1 3190 83VL·58048 7-10 NEe Package Drawings 48-Pin Plastic DIP Item Millimeters Inches A 63.50 max 2.500 max B 15.24 [TP) .600 [TP) C 13.8 .543 0 5.72 max .225 max 25 E 4.31 max .170 max F 3.6±O.3 .142 ±.012 G 2.54 max .100 max H 2.54 [TP) .100 [TP) 1.1 min .043 min J 0.51 min .020 min K 0.50±O.10 .02O±.004 L 0.25 ~:6~ .010 ~:gg~ A M 0.25 .010 [[J ---t~ j 0-15' c P4SC·l00-600A ~138B(6/89) II 7-11 Package' Drawings: 52-Pin Plastic QFP Item MIllimeters Inches A 17.6 ±0.4 .693 ±.016 B 14.0 ±0.2 .551 ~ :gg: c 14.0 ±0.2 .551 ~ :gg: D 17.6 ±0.4 .693 ±.016 F 1.0 .039 G 1.0 .039 C 0 H 0.40 ±0.10 .016 ~:gg~ 0.20 .OOS 1.0 (TP) .039· (TP) K 1.S ±0.2 .071 ~:ggg O.S ±0.2 .031 ~ :gg: M 0.15 ~g:J~ .006 ~:gg~ N 0.15 .006 P 2.7 .106 Q 0.1' ±0.1 .004 ±.004 R 0.1 ±0.1 .004 ±.004 'K . Enlarged detail of lead end ~c+ ~ S 3.0 max .119 max Q R P52GC·100-386 49NR-493B (5189) 7-12 NEe Package Drawings 52-PinPLCC Item A B M""meters 20.1iO.2 19.12 Inches .791 ±.008 .753 F: C 19.12 .753 0 20.1 iO.2 .791 ±.008 E 1.94 iO.15 .076 ±.006 F 0.6 .024 52 G 4.4 iO.2 .173 ±.008 C 0 H 2.8 iO.2 .110 ±.008 0.9 min .035 min J 3.4 .134 K 1.27 (IPl .050 (TPl M 0.40 iO.10 .016 ±.004 N 0.12 .005 P 18.04 iO.20 .710 ±.008 Q 0.15 .006 T 0.8 radius .031 radius U 0.20 ~~1~ .008 ~.~~~ F G H T I+-------P-------+j P52L·50A1 83YL·5805B II 7-13 Package Drawings NEe 68-PinPLCC A B Item A MillImeters 25.2±O2 Inches .992±.00S Ii- DDDDDDDD B 24.20 .953 C 24.20 .953 D 25.2±O.2 .992±.00S E 1.94±O.15 .076 ~:gg~ F 0.6 .024 G 4.4±O.2 .173~:gg~ 68 C D H 2.S±O.2 .110~:gg~ 0.9 min .035 min 3.4 .134 K 1.27 (IPI .050 (IPI M 0.40 ±O.10 .016~:gg~ N 0.12 .005 P 23.12±O.20 .910 ~:gg~ Q 0.15 .006 T O.S radius .031 radius U 0.2O~:~~ .00s~:gg: F T ....---....:.:..:...----P--------_ (2/90) P68L-5OAH 83YL·5561B N'EC Package Drawings 68-Pin Ceramic PGA Item Millimeters Inches A 27.94 ± 0.4 D 27.94 ±0.4 E 1.27 .050 F 2.54 (TP) .100 (TP) G 2.8 ±0.3 H 0.5 min .019 min 2.70 .106 4.57 max .180 max K 1.2 ±0.2 dia L 0.46 ± 0.05 dia M 0.5 .020 [£J f$l M @I Top View IE A ~ I Bottom View 0 0 0 0 0 0 0 0 11 0 @ 0 0 0 0 0 0 @ 0 10 0 0 0 0 9 0 0 8 0 0 0 0 7 D 0 0 0 0 6 0 0 0 0 5 0 0 0 0 4 0 0 0 0 3 0 @ 0 0 0 0 0 0 0 @ 0 2 0 0 0 0 0 0 0 0 0 K H G F E D C B A II 49NR·528B ($/89) 7-15 Package Drawings ttlEC 74-Pin Plastic QFP Item Millimeters Inches A B A 23.2 ±0.4 .913 :::g~~ B 20.0 ±0.2 .787 :: :gg~ F2 c 20.0 ±0.2 .787 :::gg~ D 23.2 ±0.4 .913 :::g~~ F1 2.0 .079 F2 1.0 .039 G1 2.0 .079 G2 1.0 .039 C D H 0.40 ±0.10 .016 :::gg~ I 0.20 .008 J 1.0 (TP) .039 (TP) K 1.6 ±0.2 .063 ± .002 L 0.8 ±0.2 .031 :: :gg~ F1 M 0.15 ::g:6~ .006 :: :gg~ N 0.15 .006 P 3.7 .146 Q 0.1 ±0.1 .004 ± .004 R 0.1 ±0.1 .004 ± .004 S 4.0 max .158 max Enlarged detail of lead end S74G.J·100-5BJ-1 ~ Q R 49NR-347B (2190) 7-16 NEC Package Drawings SO-Pin Plastic QFP Item MIllimeters Inche. A 23.6:10.4 .929±016 +.00:1 B 3>.0:102 .7fIl -.QC8 C 14.0:102 .551 +.00:1 -roJ 0 17.6:10.4 .6OO±016 F 10 .039 G OB .031 +004 H 0.35:10.10 .014 -00) Q15 .006 c 0 OB(TP) .031 erp) +.00:1 K 1B:I02 .071 -.000 L 0.8:102 .Q31 +.00:1 -.000 M Q15 +0.10 006+004 -0.05 . -002 N Q15 .006 P 2.7 .1 I" ./ c 0 > ) ) j ) ) ) ) 4 ) ) ~ ~ - r > ..,.. I~ ~ ---- ---~ ,-"-' ~ "4 U • X84KW-5OA "4 B • 838 L·5401 B (3/90) 7-19 Package ,Drawings NE~ 94-Pin Plastic QFP A Item MIllimeters Inches A 23.2 ±O.4 .913 +.017 -.016 B 20.0 ±O.2 .787 +.009 -.008 C 20.0 ±O.2 .787 +.009 -.008 0 23.2 ±O.4 .913 +.017 -.016 F, 1.6 .063 F2 0.8 .031 G, '.6 .063 G2 0.8 .031 H 0.35 ±O.10 .014 +.004 C 0 -.005 0.15 .006 0.8 (TP) .031 (TP) K 1.6 ±O.2 .063 ±.008 0.8 ±O.2 .031 +.009 -.008 M 0.15~:ci~ .006 +.004 -.003 N 0.15 .006 3.7 .146 a 0.1 ±O.l .004 ±.004 R 0.1 ±O.l .004 ±.004 S 4.0 max .158 max Detail of lead end P S R Q (2190) S94GJ·80·5BG·l 83YL·5810B 7-20 NEe Package Drawings 120-Pin Plastic OFP Item Millimeters Inches A 32.0 ±0.4 1.260 ±.016 B 28.0 ±0.2 1.102 ~ :gg~ c 28.0 ±0.2 1.102~:gg~ 0 32.0 ±0.4 1.260 ± .016 F 2.4 .094 G 2.4 .094 H 0.35 ±0.10 .014 ~:gg~ 0.15 .006 J 0.8 (TP) .031 (TP) K 2.0 ±0.2 .079 ~ :gg~ L 0.8 ±0.2 .031 ~:gg~ + .004 M 0.15 ~g:6~ .006 -.003 N 0.15 .006 P 3.7 .146 Q 0.1 ±0.1 .004 ± .004 R 0.1 ±0.1 .004 ±.004 S 4.0 max .157 max Enlarged detail of lead end K P120GD·BO·5BB fEDt t Q tR o N ~+ 49NR·653B (12/89) • 7-21 Package Drawings 132-Pin Ceramic PGA P N M L K J H G FED C B A © 0 0 0 0 0 0 0 0 0 0 0 0 © 14 o 0 0 0 0 0 0 0 0 0 0 0 0 0 13 o 0 0 0 0 0 0 0 0 0 0 0 0 0 12 000 o 0 0 11 000 o 0 0 10 000 o 0 0 9 000 o 0 0 8 000 o 0 0 7 000 o 0 0 6 : 000 o 0 0 S \. j 000 o 0 0 0 o 0 0 0 0 0 000 0 000 0 °N°~~~ o 0 0 0 2 ©0 0 0 0 0 0 0 0 o 0 0 © 1 ~torpin !J J I i -H-LKu u u u uuu u u u 0~-~ Ii Item Millimeters Inches A 3S.S6 ±O.4 1.400~:g~~ D 3S.S6 ±O.4 1.400~:g~~ G W _ .• E -H- RIB M@I E F 1.27 2.S4 (TP) .OSO .100 (TP) G 2.8±O.3 .110~:g~~ H O.Smln .019 min I 2.9 .114 J 4.57 max .180 max K s1.2±O.2 S.047~:gg~ L s0.46 ±O.OS S.018~:gg~ M O.S .020 6189 X132R-l00A 83YL·5817B 7-22 NEe NEC Electronics Inc. pPD70236 (V53) 16-Bit Microprocessor: High-Speed, High-Integration, CMOS Addendu m 1 (April 1991) Scope Changes This addendum to the J,lPD70236 (V53) data sheet, Pages 14 and 15. Replace with the AC Characteristics document no. 50159-1, revises the AC Characteristics table in this addendum. table to include data for operation with CPU clock frequencies of 10, 12.5, and 16 MHz. AC Characteristics TA = -10 to + 70°C; Voo = 5 V ±10%; CL of output terminals = 100 pF max; tCYK = CPU clock period; n = number of wait states· Maximum CPU Clock Frequency 10 MHz 12.5 MHz 16 MHz Parameter Symbol Min Max Min Max Min Max Unit Clocks (figure 1) CLKOUT period tCYK 100 500 80 500 62.5 500 ns CLKOUT high-level width tKKH 0.5tCYK - 12 0.5tCYK-10 0.5tCYK-7 ns CLKOUT low-level width tKKL 0.5tCYK -12 0.5tCYK-10 0.5tCYK-7 ns CLKOUT rise time (1.0-3.5 V) tKR 12 10 7 ns CLKOUT fall time (3.5-1.0 V) tKF 12 10 7 ns X1 input period tcyx 50 250 40 250 31.25 250 ns X1 input high-level width txKH 20 15 13 ns X1 input low-level width txKL 20 15 13 ns X1 input rise time txKR 7 5 5 ns X1 input fall time txKF 7 5 5 ns X1 to CLKOUT delay tOXK 10 35 10 35 10 35 ns PCLKOUT period tCYPK 4tcyx 1000 4tcyx 1000 4tcyx 1000 ns PCLKOUT high-level width tpKH 2tcyx - 12 2tcyx -10 2tcyx -7· ns PCLKOUT low-level width tpKL 2tCYX -12 2tCYX -10 2tCyx-7 ns PCLKOUT rise time (1.0-3.5 V) tpKR 12 10 7 ns PCLKOUTfall time (3.5-1.0 V) tpKF 12 10 7 ns Input signal rise time tlR t 15 15 12 ns Input signal fall time tlF t 10 10 10 ns Output signal rise time tOR t 15 15 12 ns Output signal fall time tOF t 10 10 10 ns Reset (figure 2) RESET setup to CLKOUT ! tSRSTK 30 30 30 . ns RESET hold from CLKOUT ! tHKRST 15 15 15 ns RESET low-level width tWRSTL 6 6 6 tCYK RESOUT delay from CLKOUT! tOKRO 0 40 0 40 0 40 ns t This parameter is not shown on the timing waveforms. 50159-1Al pPD79236 . (V53), .. Acjdendum 1 (April 1991) NEe AC Characteristics (cont) Maximum CPU Clock Frequency 10 MHz 12.5 MHz 16 MHz Parameter Symbol Min Max Min Max Min Max Unit Read, Write (figures 3-12,16,18-19, 22,28-31) Address/status setup time tOARL t 0.5tCYK -15 0.5tCYK- 15 0.5tCYK-15 ns before assertion of MRD, lORD ~ Data hold time from MRD, tHRO t 0 0 0 ns lORD t Address/status setup time tOAWL t 0.5tCYK -15 0.5tCYK- 15 0.5tCYK-15 ns before assertion of MWR, IOWR~ MWR, IOWR low-level width twWL t (n+1)tCYK,...10 (n+1)tCYK-10 (n+ 1)tCYK -10 ns Address/status hold time from tHMWHA t 0.5tCYK -15 0.5tcYK -15 0.5tCYK -15 ns MWRt BCYST delay from CLKOUT ~ tOKBC 5 45 5 45 5 40 ns BCYST low-level width tBCBCL tCYK-10 tCYK-10 tCYK-10 ns BCYST high-level width tBCBCH (n+ 1)tCYK - 10 (n+ 1)tCYK - 10 (n+ 1)tCYK -10 ns Address delay from CLKOUT ~ tOKA 5 45 5 45 5 40 ns Control 2 delay from CLKOUT tOKCT2 5 45 5 45 5 40 ns (Control 2 = MWR, IOWR in DMA cycles) Status delay from CLKOUT ~ tOKST 5 45 5 45 5 40 ns Data float delay from CLKOUT t tFK 0 40 0 35 0 30 ns DSTB ~ delay from CLKOUT ~ tOKOS 5 45 5 45 5 40 ns DSTB low-level width tOSOSL (n+ 1)tCYK - 10 (n+ 1)tCYK - 10 (n+ 1)tCYK -10 ns DSTB high-level width tOSOSH 0.5tCYK-10 0.5tCYK- 10 0.5tCYK- 10 ns CLKOUT to IOWR delay tOKIW 0 45 0 45 0 40 ns CLKOUT to lORD delay tOKIR 0 45 0 45 0 40 ns CLKOUT to MRD delay tOKMR 0 45 0 45 0 40 ns CLKOUT to MWR delay tOKMW 0 45 0 45 0 40 ns CLKOUT t to DSTB t tOKOSH 5 45 5 45 5 40 ns Address/status output delay to tOAOSL 0.5tCYK-15 0.5tCYK-15 0.5tCYK-15 ns DSTB ~ Address/status hold time from tHOSHA 0.5tCYK - 15 0.5tCYK-15 0.5tCYK - 15 ns DSTB t Data output delay from DSTB t tOOSHO 0.5tCYK-15 0.5tCYK- 15 0.5tCYK-15 ns Data output delay from address/ tOAO 0.5tCYK -15 0.5tCYK- 15 0.5tCYK - 15 ns status output Data output delay from tOKO 5 45 5 45 5 40 ns CLKOUT t Data setup time to CLKOUT ~ tSOK 10 10 10 ns Data hold time from CLKOUT ~ tHKO 7 7 7 ns Data hold time from DSTB high tHOSO 0 0 0 ns Data hold time from change tHASO 0 0 0 ns point of address or status 2 NEe IIPD70236 (V53), Addendum 1 (April 1991) AC Characteristics (cont) Maximum CPU Clock Frequency 10 MHz 12.5 MHz 16 MHz Parameter Symbol Min Max Min Max Min Max Unit Data hold time from RIW t tHRWO 0 0 0 ns READY setup time to CLKOUT t tSRYK 10 10 7 ns READY hold time from tHKRY 20 20 15 ns CLKOUT t Bus Sizing (figures 13, 14) 8S8/8S16 setup time to tSBSK 10 10 7 ns CLKOUT t 8S8/BS16 hold time tHKBS 15 15 10 ns from CLKOUT t Bus Hold (figure 17) HLDRQ setup time to tSHQK 10 10 7 ns CLKOUT t HLDRQ hold time from tHKHQ 20 20 15 ns CLKOUT t CLKOUT t to HLDAK delay tOKHA 5 45 5 45 5 40 ns Output tristate to HLDAK delay tOFHA 0.5tCYK-15 0.5tCYK - 15 0.5tCYK-15 ns Input Setup and Hold (figure 15) NMI, INTPO-INTP7, CPBUSY tSIK 15 15 10 ns setup time to CLKOUT ~ NMI, INTPO-INTP7, CPBUSY tHKT 15 15 10 ns hold·time from CLKOUT ~ Timer/Counter Unit, TCU (figure 20) TCTLO-TCTL2 setup time to tSGK 50 50 50 ns CLKOUT + TCTLO-TCTL2 hold time from tHKG 100 100 100 , ns CLKOUT + TCTLO-TCTL2Iow-level width tGGl 50 50 50 ns TCTLO-TCTL2 high-level width taGH 50 50 50 ns TOUTO-TOUT2 output delay tOKTO 100 100 100 ns from CLKOUT ~ TCLK period tCYTK 100 100 100 ns TCLK rise time tTKR 15 15 15 ns TCLK fall time tTKF 15 15 15 ns TCLK low-level width tTKTKl 45 45 45 ns TCLK high-level width tTKTKH 30 30 30 ns TCTLO-TCTL2 setup time to tSGTK 50 50 50 ns TCLK t TCTLO-TCTL2 hold time from tHKTG 100 100 100 ns TCLK t TOUTO-TOUT2 output delay tOTKTO 100 100 100 ns from TCLK ~ TOUTO-TOUT2 output delay tOGTO 100 100 100 ns from TCTLO-TCTL2 ~ 3 pPD70236 (V53),I'AddendUm 1 (A.,rU 199:1) &lEe AC Characteristics (cont) Maximum CPU Clock Frequency 10 MHz 12.5 MHz 16 MHz Parameter Symbol Min 'Max Min Max Min Max Unit Serial Contro/Unit, SCU (figure 21) RxD setup time to SCU internal tSRX ns clock + RxD hold time to SCU internal tHRX ns clock f TOUn t to TxD delay tOTX 500 500 500 ns Direct Memory Access, DMA (figures 23-26) CLKOUT +to MRD, lORD t tOKRH 0 45 0 45 0 40 ns delay CLKOUT +to MRD, lORD + tOKRL 0 45 0 45 0 40 ns delay CLKOUT t to DMAAKO-DMAAK3 tOKHOA 0 45 0 45 0 40 ns d.elay lORD, IOWR +delay from tOOARW 0.5tCYK -15 0.5tCYK -15 0.5tCYK - 15 ns DMAAKO -DMAAK3 + DfVlAAKO-DMAAK3 t delay from tORHOAH 0.5tCYK -,5 0.5tCYK ~ 15 .o.5tCYK - 15 ns IORD.f CLKOUT to control 1, delay, . tOKCT1 0 45 0 45 0 40: ns (Control 1 = BUFEN, INTAK, REFRQ) lORD t delay to IOWR t tOWHRH 5 45 5 45 5 40 ns TC OIJ~put delay from GLKOUT t tOKTCL 0 45 0 45 0 40 ns TC off output delay from tOKTCF 0 45 0 45 0 '40, " , ns CLKOUTt T~ pullup delay from CLKOUT t tOKTCH 0 45 0 45 0 40 ns TC low-level width tTCTCL tCYK - 20 tCYK- 20 tCYK - 15 ns END·setup time to CLKOUT t tSEOK 35 35 35 ns END low-level width tEOEOL 100 100 100 ns IORD,MRD low-level width tRR 2tCYK- 45 2tCYK- 45 2tCYK- 40 ns IOWR, MWR low-level width tWW1 2tCYK- 45 2tCYK- 45 2tCYK - 40 ns (expanded write) IOWR, MWR low-level width tWW2 2tCYK- 45 2tCYK - 45 2tCYK- 40 ns (normal write) DMARQO-DMARQ3 setup time tSOQK 20 20 15 ns to CLKOUTt CLKOUT +to DMAAKO-DMAAK3 tOKLOA 0 45 0 45 0 40 ns delay Interrupt Control Unit, ICU (figure 27) INTPO-INTP7 low-level width tlPIPL 100 100 100 ns NEe Notes: NEe NEe Notes: FIELD SALES OFFICES EASTERN REGION EASTERN REGION [cont] EASTERN REGION [cont] CENTRAL REGION [cont] WESTERN REGION [cont] 901 Lake Destiny Drive 2525 Meridian Parkway One Windsor Plaza 1105 Schrock Road Encino Office Park Two Suite 321 Suite 320 7535 Windsor Drive Suite 515 6345 Balboa Blvd. Maitland, FL 32751 Durham, NC 27713 Suite Bl0l Columbus, OH 43229 Suite 240 TEL: 407-875-1145 TEL: 919-544-4132 Allentown, PA 18195 TEL: 614-436-1778 Encino, CA 91316 FAX: 407-875-0962 FAX: 919-544-4109 TEL: 215-391-9094 FAX: 614-436-1769 TEL: 818-342-3112 FAX: 215-391-9107 FAX: 818-342-0842 The Centre at Stirling 200 Perinton Hills 30050 Chagrin Blvd. and Palm Office Park CENTRAL REGION Suite 120 200 E. Sand pointe 9900 Stirling Road Fairport, NY 14450 Pepper Pike, OH 44124 Bldg. 8 1500 West Shure Drive Suite 206 TEL: 716-425-4590 TEL: 216-831-0067 Suite 150 Suite 250 Cooper City, FL 33024 FAX: 716-425-4594 FAX: 216-831-0758 Santa Ana, CA 92707 Arlington Heights, IL 60004 TEL: 305-436-8114 TEL: 714-546-0501 300 Westage Business Center TEL: 708-577-9090 16475 Dallas Parkway FAX: 305-436-8116 FAX: 714-432-8793 Suite 200 FAX: 708-577-2147 Suite 380 6625 The Corners Parkway Fishkill, NY 12524 Dallas, TX 75248 14001 East Iliff Avenue 201 E. Big Beaver Road Suite 210 TEL: 914-897-2101 TEL: 214-931-0641 Suite 411 Suite 350 Norcross, GA 30092 FAX: 914-897-2215 FAX: 214-931-1182 Aurora, CO 80014 Troy, M I 48084 TEL: 404-447-4409 TEL: 303-755-6353 8 Old Sod Farm Road TEL: 313-680-0506 12777 Jones Road FAX: 404-447-8228 FAX: 303-755-6728 Melville, NY 11747 FAX: 313-680-1015 Suite 196 One Natick Executive Park TEL: 516-753-7526 Houston, TX 77070 NORTHERN CALIFORNIA 1550 East 79th Street Natick, MA 01760 FAX: 516-753-7137 TEL: 713-955-2191 REGION Suite 805 TEL: 508-650-4100 FAX: 713-955-2198 Bloomington, MN 55425 401 Ellis Street FAX: 508-655-1605 TEL: 612-854-4443 129 Woodland Trail PO. Box 7241 FAX: 612-854-1346 Leander, TX 78641 Mountain View, CA 94039 TEL: 512-259-4947 TEL: 415-965-6200 FAX: 512-259-2556 FAX: 415-965-6683 WESTERN REGION One Embassy Centre 9020 S.w. Washington Square Road Suite 400 Tigard, OR 97223 TEL: 503-671-0177 FAX: 503-643-5911 NEe NEe Electronics Inc. CORPORATE HEADOUARTERS 401 Ellis Street For literature, call toll-free 7 a.m. to 6 p.m. Pacific time: P.O. Box 7241 1-800-632-3531 Mountain View. CA 94039 DOC NO. 50054-1 TEL 415-960-6000 @1991 NEC Electronics Inc.lPrinted in U.S.A. TLX 3715792 ~~ .