EN
NEC logo
Official user manual

NEC PD78076Y

627 pages·2.4 MB·Network Card·PDF·ENDEFRITNLJA
NEC PD78076Y
Table of Contents 332 sections COVER · Major Revisions in This Edition · INTRODUCTION · CHAPTER 1 OUTLINE (uPD78078 SUBSERIES) · … ShowHide
COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 1 of the NEC PD78076Y user manual — User’s Manual
Page 1 · click to enlarge
Page 1

User’s Manual

µ PD78078, 78078Y Subseries

8-bit Single-chip Microcontrollers

µ PD78076 µ PD78078 µ PD78P078 µ PD78076Y µ PD78078Y µ PD78P078Y

Document No. U10641EJ4V0UM00 (4th edition) Date Published December 1997 N

Printed in Japan ©

Page 2 of the NEC PD78076Y user manual — [MEMO]
Page 2 · click to enlarge
Page 2

[MEMO]

Page 3 of the NEC PD78076Y user manual — MS-DOS, Windows, and WindowsNT are either registered trademarks or trademarks of Microsoft
Page 3 · click to enlarge
Page 3

NOTES FOR CMOS DEVICES

1 PRECAUTION AGAINST ESD FOR SEMICONDUCTORS

Strong electric field, when exposed to a MOS device, can cause destruction of the gate oxide and

ultimately degrade the device operation. Steps must be taken to stop generation of static electricity

as much as possible, and quickly dissipate it once, when it has occurred. Environmental control

must be adequate. When it is dry, humidifier should be used. It is recommended to avoid using

insulators that easily build static electricity. Semiconductor devices must be stored and transported

in an anti-static container, static shielding bag or conductive material. All test and measurement

tools including work bench and floor should be grounded. The operator should be grounded using

wrist strap. Semiconductor devices must not be touched with bare hands. Similar precautions need

to be taken for PW boards with semiconductor devices on it.

2 HANDLING OF UNUSED INPUT PINS FOR CMOS

No connection for CMOS device inputs can be cause of malfunction. If no connection is provided

to the input pins, it is possible that an internal input level may be generated due to noise, etc., hence

causing malfunction. CMOS devices behave differently than Bipolar or NMOS devices. Input levels

of CMOS devices must be fixed high or low by using a pull-up or pull-down circuitry. Each unused

pin should be connected to VDD or GND with a resistor, if it is considered to have a possibility of

being an output pin. All handling related to the unused pins must be judged device by device and

related specifications governing the devices.

3 STATUS BEFORE INITIALIZATION OF MOS DEVICES

Power-on does not necessarily define initial status of MOS device. Production process of MOS

does not define the initial operation status of the device. Immediately after the power source is

turned ON, the devices with reset function have not yet been initialized. Hence, power-on does

not guarantee out-pin levels, I/O settings or contents of registers. Device is not initialized until the

reset signal is received. Reset operation must be executed immediately after power-on for devices

having reset function.

FIP, EEPROM, IEBus, and QTOP are trademarks of NEC Corporation.

MS-DOS, Windows, and WindowsNT are either registered trademarks or trademarks of Microsoft

Corporation in the United States and/or other countries.

IBM DOS, IBM PC/AT, and PC DOS are trademarks of International Business Machines Corporation.

HP9000 Series 700 and HP-UX are trademarks of Hewlett-Packard Company.

SPARCstation is a trademark of SPARC International, Inc.

SunOS is a trademark of Sun Microsystems, Inc.

Ethernet is a trademark of XEROX Corporation.

OSF/Motif is a trademark of Open Software Foundation, Inc.

NEWS and NEWS-OS are trademarks of Sony Corporation.

TRON is an abbreviation of The Realtime Operating System Nucleus.

ITRON is an abbreviation of Industrial TRON.

Page 4 of the NEC PD78076Y user manual — M7 96.5
Page 4 · click to enlarge
Page 4

The export of these products from Japan is regulated by the Japanese government. The export of some or all of these products may be prohibited without governmental license. To export or re-export some or all of these products from a country other than Japan may also be prohibited without a license from that country. Please call an NEC sales representative.

License not neededµ PD78P078KL-T, 78P078YKL-T

The customer must judge the need for license:

µPD78076GC-xxx-7EA, 78076GC-xxx-8EU, 78076GF-xxx-3BA, µPD78076YGF-xxx-3BA µPD78078GC-xxx-7EA, 78078GC-xxx-8EU, 78078GF-xxx-3BA, µPD78078YGF-xxx-3BA µPD78P078GC-7EA, 78P078GC-8EU, 78P078GF-3BA, 78P078YGF-3BA

The application circuits and their parameters are for reference only and are not intended for use in actual design-ins.

Purchase of NEC I2C components conveys a license under the Philips I2C Patent Rights to use these components in an I2C system, provided that the system conforms to the I2C Standard Specification as defined by Philips.

The information in this document is subject to change without notice. No part of this document may be copied or reproduced in any form or by any means without the prior written consent of NEC Corporation. NEC Corporation assumes no responsibility for any errors which may appear in this document. NEC Corporation does not assume any liability for infringement of patents, copyrights or other intellectual property rights of third parties by or arising from use of a device described herein or any other liability arising from use of such device. No license, either express, implied or otherwise, is granted under any patents, copyrights or other intellectual property rights of NEC Corporation or others. While NEC Corporation has been making continuous effort to enhance the reliability of its semiconductor devices, the possibility of defects cannot be eliminated entirely. To minimize risks of damage or injury to persons or property arising from a defect in an NEC semiconductor device, customers must incorporate sufficient safety measures in its design, such as redundancy, fire-containment, and anti-failure features. NEC devices are classified into the following three quality grades: “Standard”, “Special”, and “Specific”. The Specific quality grade applies only to devices developed based on a customer designated “quality assurance program” for a specific application. The recommended applications of a device depend on its quality grade, as indicated below. Customers must check the quality grade of each device before using it in a particular application.

StandardComputers, office equipment, communications equipment, test and measurement equipment, audio

and visual equipment, home electronic appliances, machine tools, personal electronic equipment and industrial robots Special: Transportation equipment (automobiles, trains, ships, etc.), traffic control systems, anti-disaster systems, anti-crime systems, safety equipment and medical equipment (not specifically designed for life support) Specific: Aircrafts, aerospace equipment, submersible repeaters, nuclear reactor control systems, life support systems or medical equipment for life support, etc. The quality grade of NEC devices is “Standard” unless otherwise specified in NEC’s Data Sheets or Data Books. If customers intend to use NEC devices for applications other than those specified for Standard quality grade, they should contact an NEC sales representative in advance. Anti-radioactive design is not implemented in this product.

M7 96.5

Page 5 of the NEC PD78076Y user manual — NEC do Brasil S.A. Cumbica-Guarulhos-SP, Brasil Tel: 011-6465-6810 Fax: 011-6465-6829
Page 5 · click to enlarge
Page 5

Regional Information

Some information contained in this document may vary from country to country. Before using any NEC product in your application, please contact the NEC office in your country to obtain a list of authorized representatives and distributors. They will verify:

  • Device availability
  • Ordering information
  • Product release schedule
  • Availability of related technical literature
  • Development environment specifications (for example, specifications for third-party tools and components, host computers, power plugs, AC supply voltages, and so forth)
  • Network requirements

In addition, trademarks, registered trademarks, export restrictions, and other legal issues may also vary from country to country.

NEC Electronics Inc. (U.S.) Santa Clara, California Tel: 408-588-6000

NEC Electronics (Germany) GmbH Benelux Office Eindhoven, The Netherlands Tel: 040-2445845 Fax: 040-2444580

NEC Electronics Hong Kong Ltd. Hong Kong Tel: 2886-9318 Fax: 2886-9022/9044

800-366-9782 Fax408-588-6130

NEC Electronics Hong Kong Ltd. Seoul Branch Seoul, Korea Tel: 02-528-0303 Fax: 02-528-4411

NEC Electronics (France) S.A. Velizy-Villacoublay, France Tel: 01-30-67 58 00 Fax: 01-30-67 58 99

NEC Electronics (Germany) GmbH Duesseldorf, Germany Tel: 0211-65 03 02 Fax: 0211-65 03 490

NEC Electronics Singapore Pte. Ltd. United Square, Singapore 1130 Tel: 253-8311 Fax: 250-3583

NEC Electronics (France) S.A. Spain Office Madrid, Spain Tel: 01-504-2787 Fax: 01-504-2860

NEC Electronics (UK) Ltd. Milton Keynes, UK Tel: 01908-691-133 Fax: 01908-670-290

NEC Electronics Taiwan Ltd. Taipei, Taiwan Tel: 02-719-2377 Fax: 02-719-5951

NEC Electronics Italiana s.r.1. Milano, Italy Tel: 02-66 75 41 Fax: 02-66 75 42 99

NEC Electronics (Germany) GmbH Scandinavia Office Taeby, Sweden Tel: 08-63 80 820 Fax: 08-63 80 388

NEC do Brasil S.A. Cumbica-Guarulhos-SP, Brasil Tel: 011-6465-6810 Fax: 011-6465-6829

J97. 8

800-729-9288

Page 6 of the NEC PD78076Y user manual — Major Revisions in This Edition
Page 6 · click to enlarge
Page 6

Major Revisions in This Edition

PageDescription ThroughoutThe following products have been changed from “under development” to “already developed”. µPD78078Y Subseries: µPD78076Y, 78078Y, 78P078Y The following packages have been added to the µPD78078Y Subseries. 100-pin plastic LQFP (Fine pitch) (14 × 14 mm, resin thickness 1.4 mm) p. 139 to 143, 149, 153Block diagrams of ports have been changed. Figure 6-5. Block Diagram of P20, P21, P23 to P26, Figure 6-6. Block Diagram of P22 and P27, Figure 6-7. Block Diagram of P20, P21, P23 to P26, Figure 6-8. Block Diagram of P22 and P27, Figure 6-9. Block Diagram of P30 to P37, Figure 6-16. Block Diagram of P71 and P72, Figure 6-20. Block Diagram of P100 and P101 p. 169Table 7-2. Relationship between CPU Clock and Minimum Instruction Execution Time has been added. p. 1818.1 Outline of Timers Incorporated into µPD78078, 78078Y Subseries has been added. p. 241Figure 9-10. Square Wave Output Operation Timing has been added. p. 262Figure 10-13. Square Wave Output Operation Timing has been added. p. 277Figure 12-1. Block Diagram of Watchdog Timer has been corrected. p. 316, 366Precautions have been added to 17.1, 18.1 Serial Interface Channel 0 Functions. p. 323, 374Precautions have been added to 17.3 (2), 18.3 (2) Serial Operating Mode Register 0 (CSIM0). p. 372Note about the BSYE flag in Figure 17-5. Serial Bus Interface Control Register Format has been changed. p. 336Precautions have been added to 17.4.3 (2) (a) Bus release signal (REL), (b) Command signal (CMD). p. 44919.4.3 (3) (d) Busy control option, (e) Busy & strobe control option, and (f) Bit slippage detection function have been changed to (4) Synchronization control, and the explanation has been improved. p. 48120.4.2 (2) (d) Reception Conditions of INTSR generation when receive error occurrs has been corrected. p. 482Figure 20-10. Receive Error Timing has been corrected, and note has been added. p. 49020.4.3 (3) MSB/LSB switching as the start bit has been added. p. 49120.4.4 Restrictions on using UART mode has been added. p. 569Precautions have been added to Table 27-1. Differences between µPD78P078, 78P078Y and Mask ROM Versions. p. 597APPENDIX A DIFFERENCES BETWEEN µPD78078, 78075B SUBSERIES AND µPD78070A has been added. p. 599 to 612APPENDIX B DEVELOPMENT TOOL Entirely revised: Supports in-circuit emulator IE-78K0-NS p. 613, 614APPENDIX C EMBEDDED SOFTWARE Entirely revised: Fuzzy inference developing support system has been deleted. The markshows major revised points.
Page 7 of the NEC PD78076Y user manual — INTRODUCTION
Page 7 · click to enlarge
Page 7

INTRODUCTION

Readers This manual has been prepared for user engineers who understand the functions of the µPD78078 and 78078Y Subseries and design and develop its application

systems and programs. The µPD78078 and 78078Y Subseries consist of the following members.

  • µ PD78078 Subseries: µ PD78076, 78078, 78P078
  • µ PD78078Y Subseries: µ PD78076Y, 78078Y, 78P078Y

because they are not intended for use in equipment that will be mass-produced and do not have enough reliability.

  • µ PD78P078KL-T and 78P078YKL-T

Purpose This manual is intended for users to understand the functions described in the Organization below.

Organization The µPD78078 and 78078Y Subseries manual is separated into two parts: this

manual and the instructions edition (common to the 78K/0 Series).

µPD78078, 78078Y Subseries 78K/0 Series User’s Manual User’s Manual (This manual) — Instructions —

  • Pin functions
  • CPU functions
  • Internal block functions
  • Instruction set
  • Interrupt
  • Explanation of each instruction
  • Other on-chip peripheral functions

How to Read This Manual Before reading this manual, you should have general knowledge of electric and

logic circuits and microcontroller.

When you want to understand the functions in general: →Read this manual in the order of the contents.

How to interpret the register format: →For the circled bit number, the bit name is defined as a reserved word in RA78K/

0, and in CC78K/0, already defined in the header file named sfrbit.h. When you know a register name and want to confirm its details:

→Read “APPENDIX D REGISTER INDEX” To know the differences between the µPD78054 and 78054Y Subseries:

→See sections 1.10 and 2.10, titled “Differences with µPD78054 Subseries”

and “Differences with µPD78054Y Subseries”, respectively.

To know the µPD78078 and 78078Y Subseries instruction function in detail: →Refer to “78K/0 Series User’s Manual—Instructions (U12326E)”

To know the application example of each function of the µPD78078 and 78078Y Subseries:

→Refer to separately available Application Note.

Page 8 of the NEC PD78076Y user manual — INTRODUCTION
Page 8 · click to enlarge
Page 8
Chapter OrganizationThis manual divides the descriptions for the µ PD78078 and 78078Y Subseries into different

chapters as shown below. Read only the chapters related to the device you use.

ChapterµPD78078 SubseriesµPD78078Y Subseries Chapter 1 Outline (µPD78078 Subseries)√— Chapter 2 Outline (µPD78078Y Subseries)—√ Chapter 3 Pin Function (µPD78078 Subseries)√— Chapter 4 Pin Function (µPD78078Y Subseries)—√ Chapter 5 CPU Architecture√√ Chapter 6 Port Functions√√ Chapter 7 Clock Generator√√ Chapter 8 16-Bit Timer/Event Counter√√ Chapter 9 8-Bit Timer/Event Counters 1 and 2√√ Chapter 10 8-Bit Timer/Event Counters 5 and 6√√ Chapter 11 Watch Timer√√ Chapter 12 Watchdog Timer√√ Chapter 13 Clock Output Control Circuit√√ Chapter 14 Buzzer Output Control Circuit√√ Chapter 15 A/D Converter√√ Chapter 16 D/A Converter√√ Chapter 17 Serial Interface Channel 0 (µPD78078 Subseries)√— Chapter 18 Serial Interface Channel 0 (µPD78078Y Subseries)—√ Chapter 19 Serial Interface Channel 1√√ Chapter 20 Serial Interface Channel 2√√ Chapter 21 Real-Time Output Port√√ Chapter 22 Interrupt and Test Functions√√ Chapter 23 External Device Expansion Function√√ Chapter 24 Standby Function√√ Chapter 25 Reset Function√√ Chapter 26 ROM Correction√√ Chapter 27 µPD78P078, µPD78P078Y√√ Chapter 28 Instruction Set√√
Page 9 of the NEC PD78076Y user manual — INTRODUCTION
Page 9 · click to enlarge
Page 9

Differences between µPD78078 and µPD78078Y Subseries

The µPD78078 and µPD78078Y Subseries are different in the following functions of the serial

interface channel 0.

Mode of serial interface channel 0µPD78078 SubseriesµPD78078Y Subseries 3-wire serial I/O mode√√ 2-wire serial I/O mode√√ SBI (serial bus interface) mode√— I2C (Inter IC) bus mode—√
√Supported
—Not supported
Legend Data significanceHigh digits on the left and low digits on the right
Active low representations : xxx (line over the pin and signal names) Note : Description of note in the text Caution : Information requiring particular attention Remark : Additional explanatory material Numeral representations : Binary ... xxxx or xxxxB Decimal ... xxxx Hexadecimal ... xxxxH Related Documents The related documents indicated in this publication may include preliminary versions. However, preliminary versions are not marked as such. • Related documents for this subseries Document nameDocument No. EnglishJapanese µPD78078, 78078Y Subseries User’s ManualThis manualU10641J µPD78076, 78078 Data SheetU10167EU10167J µPD78P078 Data SheetU10168EU10168J µPD78076Y, 78078Y Data SheetU10605EU10605J µPD78P078Y Data SheetU10606EU10606J 78K/0 Series User’s Manual—InstructionsU12326EU12326J 78K/0 Series Instruction Table—U10903J 78K/0 Series Instruction Set—U10904J µPD78078 Subseries Special Function Register Table—IEM-5607 µPD78078Y Subseries Special Function Register Table—IEM-5601 78K/0 Series Application Note Basics (III)U10182EU10182J

version when starting design.

Page 10 of the NEC PD78076Y user manual — INTRODUCTION
Page 10 · click to enlarge
Page 10
  • Development Tool Documents (User’s Manuals)
Document NameDocument No. EnglishJapanese RA78K Series Assembler PackageOperationEEU-1399EEU-809 LanguageEEU-1404EEU-815 RA78K Series Structured Assembler PreprocessorEEU-1402U12323J RA78K0 Assembler PackageOperationU11802EU11802J LanguageU11801EU11801J Structured Assembly LanguageU11789EU11789J CC78K Series C CompilerOperationEEU-1280EEU-656 LanguageEEU-1284EEU-655 CC78K0 C CompilerOperationU11517EU11517J LanguageU11518EU11518J CC78K0 C Compiler Application NoteProgramming Know-howEEA-1208U13034J CC78K Series Library Source File—U12322J PG-1500 PROM ProgrammerEEU-1335U11940J PG-1500 Controller PC-9800 Series (MS-DOSTM)-BasedEEU-1291EEU-704 PG-1500 Controller IBM PC Series (PC DOSTM)-BasedU10540EEEU-5008 IE-78K0-NSTo be preparedTo be prepared IE-78001-R-ATo be preparedTo be prepared IE-78K0-R-EX1To be preparedTo be prepared IE-78078-NS-EM1To be preparedTo be prepared IE-78078-R-EMU10775EU10775J EP-78064EEU-1469EEU-934 SM78K0 System Simulator WindowsTM-BasedReferenceU10181EU10181J SM78K Series System Simulator External Part User Open Interface SpecificationsU10092EU10092J ID78K0-NS Integrated DebuggerReferenceTo be preparedU12900J ID78K0 Integrated Debugger EWS BasedReference—U11151J ID78K0 Integrated Debugger PC BasedReferenceU11539EU11539J ID78K0 Integrated Debugger Windows BasedGuidesU11649EU11649J

version when starting design.

Page 11 of the NEC PD78076Y user manual — INTRODUCTION
Page 11 · click to enlarge
Page 11
  • Documents for Embedded Software (User’s Manuals)
Document NameDocument No. EnglishJapanese 78K/0 Series Real-time OSBasicsU11537EU11537J InstallationU11536EU11536J 78K/0 Series OS MX78K0BasicsU12257EU12257J
  • Other Documents
Document NameDocument No. EnglishJapanese IC Package ManualC10943X Semiconductor Device Mounting Technology ManualC10535EC10535J Quality Grades on NEC Semiconductor DevicesC11531EC11531J NEC Semiconductor Device Reliability/Quality Control SystemU10983EU10983J Guide to Prevent Damage for Semiconductor Devices by Electrostatic Discharge (ESD)C11892EC11892J Guide to Quality Assurance for Semiconductor DevicesMEI-1202— Microcomputer Product Series Guide—U11416J

version when starting design.

Page 12 of the NEC PD78076Y user manual — [MEMO]
Page 12 · click to enlarge
Page 12

[MEMO]

Page 13 of the NEC PD78076Y user manual — Table of contents
Page 13 · click to enlarge
Page 13

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 14 of the NEC PD78076Y user manual — CHAPTER 5 CPU ARCHITECTURE .................................................................................................... 101
Page 14 · click to enlarge
Page 14

3.2.17 AV SS 76

3.2.18 RESET ......................................................................................................................................... 76

3.2.19 X1 and X2 76

3.2.20 XT1 and XT2 76

3.2.21 V DD 77

3.2.22 V SS ................................................................................................................................................ 77

3.2.23 VPP (µPD78P078 only) 77

3.2.24 IC (Mask ROM version only) 77 3.3 Input/output Circuits and Recommended Connection of Unused Pins 78

CHAPTER 4 PIN FUNCTION ( µ PD78078Y SUBSERIES) 83

4.1 Pin Function List.................................................................................................................... 83

4.1.1 Normal operating mode pins 83

4.1.2 PROM programming mode pins (µPD78P078Y only) 87 4.2 Description of Pin Functions 88

4.2.1 P00 to P07 (Port 0) 88

4.2.2 P10 to P17 (Port 1) 88

4.2.3 P20 to P27 (Port 2) 89

4.2.4 P30 to P37 (Port 3) 90

4.2.5 P40 to P47 (Port 4) 90

4.2.6 P50 to P57 (Port 5) 91

4.2.7 P60 to P67 (Port 6) 91

4.2.8 P70 to P72 (Port 7) 92

4.2.9 P80 to P87 (Port 8) 92

4.2.10 P90 to P96 (Port 9) 93

4.2.11 P100 to P103 (Port 10) 93

4.2.12 P120 to P127 (Port 12) 93

4.2.13 P130 and P131 (Port 13) 94

4.2.14 AV REF0 94

4.2.15 AV REF1 .......................................................................................................................................... 94

4.2.16 AV DD ............................................................................................................................................. 94

4.2.17 AV SS ............................................................................................................................................. 94

4.2.18 RESET ......................................................................................................................................... 94

4.2.19 X1 and X2 94

4.2.20 XT1 and XT2 94

4.2.21 V DD 95

4.2.22 V SS ................................................................................................................................................ 95

4.2.23 VPP (µPD78P078Y only) 95

4.2.24 IC (Mask ROM version only) 95 4.3 Input/output Circuits and Recommended Connection of Unused Pins 96

CHAPTER 5 CPU ARCHITECTURE 101

5.1 Memory Spaces.................................................................................................................... 101

5.1.1 Internal program memory space 104

5.1.2 Internal data memory space 106

5.1.3 Special function register (SFR) area 106

5.1.4 External memory space 106

5.1.5 Data memory addressing 107

Page 15 of the NEC PD78076Y user manual — CHAPTER 6 PORT FUNCTIONS ......................................................................................................... 131
Page 15 · click to enlarge
Page 15

5.2 Processor Registers 110

5.2.1 Control registers 110

5.2.2 General registers 113

5.2.3 Special function register (SFR) 114 5.3 Instruction Address Addressing 118

5.3.1 Relative addressing 118

5.3.2 Immediate addressing 119

5.3.3 Table indirect addressing 120

5.3.4 Register addressing 121 5.4 Operand Address Addressing 122

5.4.1 Implied addressing 122

5.4.2 Register addressing 123

5.4.3 Direct addressing 124

5.4.4 Short direct addressing 125

5.4.5 Special function register (SFR) addressing 126

5.4.6 Register indirect addressing 127

5.4.7 Based addressing 128

5.4.8 Based indexed addressing 129

5.4.9 Stack addressing 129

CHAPTER 6 PORT FUNCTIONS 131

6.1 Port Functions...................................................................................................................... 131 6.2 Port Configuration ............................................................................................................... 136

6.2.1 Port 0 136

6.2.2 Port 1 138

6.2.3 Port 2 (µPD78078 Subseries) 139

6.2.4 Port 2 (µPD78078Y Subseries) 141

6.2.5 Port 3 143

6.2.6 Port 4 144

6.2.7 Port 5 145

6.2.8 Port 6 146

6.2.9 Port 7 148

6.2.10 Port 8 150

6.2.11 Port 9 151

6.2.12 Port 10 153

6.2.13 Port 12 155

6.2.14 Port 13 156 6.3 Port Function Control Registers 157 6.4 Port Function Operations 163

6.4.1 Writing to input/output port 163

6.4.2 Reading from input/output port 163

6.4.3 Operations on input/output port 163 6.5 Selection of Mask Option 164

Page 16 of the NEC PD78076Y user manual — CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2................................................................... 223
Page 16 · click to enlarge
Page 16

CHAPTER 7 CLOCK GENERATOR 165

7.1 Clock Generator Functions 165 7.2 Clock Generator Configuration 166 7.3 Clock Generator Control Register 167 7.4 System Clock Oscillator 171

7.4.1 Main system clock oscillator 171

7.4.2 Subsystem clock oscillator 172

7.4.3 Divider 174

7.4.4 When no subsystem clocks are used 174 7.5 Clock Generator Operations 175

7.5.1 Main system clock operations 176

7.5.2 Subsystem clock operations 177 7.6 Changing System Clock and CPU Clock Settings 178

7.6.1 Time required for switchover between system clock and CPU clock 178

7.6.2 System clock and CPU clock switching procedure 179

CHAPTER 8 16-BIT TIMER/EVENT COUNTER 181

8.1 Outline of Timers Incorporated into µPD78078, 78078Y Subseries 181 8.2 16-Bit Timer/Event Counter Functions 183 8.3 16-Bit Timer/Event Counter Configuration 185 8.4 16-Bit Timer/Event Counter Control Registers 190 8.5 16-Bit Timer/Event Counter Operations 198

8.5.1 Interval timer operations 198

8.5.2 PWM output operations 200

8.5.3 PPG output operations 203

8.5.4 Pulse width measurement operations 204

8.5.5 External event counter operation 211

8.5.6 Square-wave output operation 213

8.5.7 One-shot pulse output operation 215 8.6 16-Bit Timer/Event Counter Operating Precautions 219

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2 223

9.1 8-Bit Timer/Event Counters 1 and 2 Functions ............................................................... 223

9.1.1 8-bit timer/event counter mode 223

9.1.2 16-bit timer/event counter mode 226 9.2 8-Bit Timer/Event Counters 1 and 2 Configurations 228 9.3 8-Bit Timer/Event Counters 1 and 2 Control Registers 231 9.4 8-Bit Timer/Event Counters 1 and 2 Operations 236

9.4.1 8-bit timer/event counter mode 236

9.4.2 16-bit timer/event counter mode 242 9.5 8-Bit Timer/Event Counters 1 and 2 Precautions 246

Page 17 of the NEC PD78076Y user manual — Table of contents
Page 17 · click to enlarge
Page 17

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 18 of the NEC PD78076Y user manual — Table of contents
Page 18 · click to enlarge
Page 18

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 19 of the NEC PD78076Y user manual — Table of contents
Page 19 · click to enlarge
Page 19

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 20 of the NEC PD78076Y user manual — Table of contents
Page 20 · click to enlarge
Page 20

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 21 of the NEC PD78076Y user manual — LIST OF FIGURES (1/9)
Page 21 · click to enlarge
Page 21

LIST OF FIGURES (1/9)

Figure No. Title Page

3-1 List of Pin Input/Output Circuits 80

4-1 List of Pin Input/Output Circuits 98

5-1 Memory Map (µPD78076, 78076Y) 101

5-2 Memory Map (µPD78078, 78078Y) 102

5-3 Memory Map (µPD78P078, µPD78P078Y) 103

5-4 Data Memory Addressing (µPD78076, 78076Y) 107

5-5 Data Memory Addressing (µPD78078, 78078Y) 108

5-6 Data Memory Addressing (µPD78P078, 78P078Y) 109

5-7 Program Counter Configuration 110

5-8 Program Status Word Configuration 110

5-9 Stack Pointer Configuration 112

5-10 Data to be Saved to Stack Memory 112

5-11 Data to be Reset from Stack Memory 112

5-12 General Register Configuration 113

6-1 Port Types 131

6-2 Block Diagram of P00 and P07 137

6-3 Block Diagram of P01 to P06 137

6-4 Block Diagram of P10 to P17 138

6-5 Block Diagram of P20, P21, P23 to P26 139

6-6 Block Diagram of P22 and P27 140

6-7 Block Diagram of P20, P21, P23 to P26 141

6-8 Block Diagram of P22 and P27 142

6-9 Block Diagram of P30 to P37 143

6-10 Block Diagram of P40 to P47 144

6-11 Block Diagram of Falling Edge Detection Circuit 144

6-12 Block Diagram of P50 to P57 145

6-13 Block Diagram of P60 to P63 147

6-14 Block Diagram of P64 to P67 147

6-15 Block Diagram of P70 148

6-16 Block Diagram of P71 and P72 149

6-17 Block Diagram of P80 to P87 150

6-18 Block Diagram of P90 to P93 152

6-19 Block Diagram of P94 to P96 152

6-20 Block Diagram of P100 and P101 153

6-21 Block Diagram of P102 and P103 154

6-22 Block Diagram of P120 to P127 155

6-23 Block Diagram of P130 and P131 156

6-24 Port Mode Register Format 159

6-25 Pull-Up Resistor Option Register Format 160

6-26 Memory Expansion Mode Register Format 161

6-27 Key Return Mode Register Format 162

Page 22 of the NEC PD78076Y user manual — LIST OF FIGURES (2/9)
Page 22 · click to enlarge
Page 22

LIST OF FIGURES (2/9)

Figure No. Title Page

7-1 Block Diagram of Clock Generator 166

7-2 Subsystem Clock Feedback Resistor 167

7-3 Processor Clock Control Register Format 168

7-4 Oscillation Mode Selection Register Format 170

7-5 Main System Clock Waveform due to Writing to OSMS 170

7-6 External Circuit of Main System Clock Oscillator 171

7-7 External Circuit of Subsystem Clock Oscillator 172

7-8 Examples of Oscillator with Bad Connection 172

7-9 Main System Clock Stop Function 176

7-10 System Clock and CPU Clock Switching 179

8-1 16-Bit Timer/Event Counter Block Diagram 186

8-2 16-Bit Timer/Event Counter Output Control Circuit Block Diagram 187

8-3 Timer Clock Selection Register 0 Format 191

8-4 16-Bit Timer Mode Control Register Format 192

8-5 Capture/Compare Control Register 0 Format 193

8-6 16-Bit Timer Output Control Register Format 194

8-7 Port Mode Register 3 Format 195

8-8 External Interrupt Mode Register 0 Format 196

8-9 Sampling Clock Select Register Format 197

8-10 Control Register Settings for Interval Timer Operation 198

8-11 Interval Timer Configuration Diagram 199

8-12 Interval Timer Operation Timings 199

8-13 Control Register Settings for PWM Output Operation 201

8-14 Example of D/A Converter Configuration with PWM Output 202

8-15 TV Tuner Application Circuit Example 202

8-16 Control Register Settings for PPG Output Operation 203

8-17 Control Register Settings for Pulse Width Measurement with Free-Running Counter

and One Capture Register 204

8-18 Configuration Diagram for Pulse Width Measurement by Free-Running Counter 205

8-19 Timing of Pulse Width Measurement Operation by Free-Running Counter and

One Capture Register (with Both Edges Specified) 205

8-20 Control Register Settings for Two Pulse Width Measurements with

Free-Running Counter 206

8-21 Timing of Pulse Width Measurement Operation with Free-Running Counter

(with Both Edges Specified) 207

8-22 Control Register Settings for Pulse Width Measurement with Free-Running Counter and

Two Capture Registers 208

8-23 Timing of Pulse Width Measurement Operation by Free-Running Counter and

Two Capture Registers (with Rising Edge Specified) 209

8-24 Control Register Settings for Pulse Width Measurement by Means of Restart 210

8-25 Timing of Pulse Width Measurement Operation by Means of Restart

(with Rising Edge Specified) 210

Page 23 of the NEC PD78076Y user manual — LIST OF FIGURES (3/9)
Page 23 · click to enlarge
Page 23

LIST OF FIGURES (3/9)

Figure No. Title Page

8-26 Control Register Settings in External Event Counter Mode 211

8-27 External Event Counter Configuration Diagram 212

8-28 External Event Counter Operation Timings (with Rising Edge Specified) 212

8-29 Control Register Settings in Square-Wave Output Mode 213

8-30 Square-Wave Output Operation Timing 214

8-31 Control Register Settings for One-Shot Pulse Output Operation Using Software Trigger 215

8-32 Timing of One-Shot Pulse Output Operation Using Software Trigger 216

8-33 Control Register Settings for One-Shot Pulse Output Operation Using External Trigger 217

8-34 Timing of One-Shot Pulse Output Operation Using External Trigger

(With Rising Edge Specified) 218

8-35 16-Bit Timer Register Start Timing 219

8-36 Timings After Change of Compare Register During Timer Count Operation 219

8-37 Capture Register Data Retention Timing 220

8-38 Operation Timing of OVF0 Flag 221

9-1 8-Bit Timer/Event Counters 1 and 2 Block Diagram 228

9-2 Block Diagram of 8-Bit Timer/Event Counter Output Control Circuit 1 229

9-3 Block Diagram of 8-Bit Timer/Event Counter Output Control Circuit 2 229

9-4 Timer Clock Select Register 1 Format 232

9-5 8-Bit Timer Mode Control Register 1 Format 233

9-6 8-Bit Timer Output Control Register Format 234

9-7 Port Mode Register 3 Format 235

9-8 Interval Timer Operation Timing 236

9-9 External Event Counter Operation Timings (with Rising Edge Specified) 239

9-10 Timing of Square Wave Output Operation 241

9-11 Interval Timer Operation Timing 242

9-12 External Event Counter Operation Timings (with Rising Edge Specified) 244

9-13 8-Bit Timer Registers 1 and 2 Start Timing 246

9-14 External Event Counter Operation Timing 246

9-15 Timing after Compare Register Change during Timer Count Operation 247

10-1 8-Bit Timer/Event Counters 5 and 6 Block Diagram 252

10-2 Block Diagram of 8-Bit Timer/Event Counters 5 and 6 Output Control Circuit 253

10-3 Timer Clock Select Register 5 Format 254

10-4 Timer Clock Select Register 6 Format 255

10-5 8-Bit Timer Output Control Register Format 256

10-6 8-Bit Timer Output Control Register 6 Format 257

10-7 Port Mode Register 10 Format 258

10-8 8-Bit Timer Mode Control Register Settings for Interval Timer Operation 259

10-9 Interval Timer Operation Timings 259

10-10 8-Bit Timer Mode Control Register Setting for External Event Counter Operation 261

10-11 External Event Counter Operation Timings (with Rising Edge Specified) 261

10-12 8-Bit Timer Mode Control Register Settings for Square-Wave Output Operation 262

10-13 Timing of Square Wave Output Operation 262

Page 24 of the NEC PD78076Y user manual — LIST OF FIGURES (4/9)
Page 24 · click to enlarge
Page 24

LIST OF FIGURES (4/9)

Figure No. Title Page

10-14 8-Bit Timer Control Register Settings for PWM Output Operation 264

10-15 PWM Output Operation Timing (Active High Setting) 265

10-16 PWM Output Operation Timings (CRn0 = 00H, Active High Setting) 265

10-17 PWM Output Operation Timings (CRn0 = FFH, Active High Setting) 266

10-18 PWM Output Operation Timings (CRn0 Changing, Active High Setting) 266

10-19 8-bit Timer Registers 5 and 6 Start Timings 267

10-20 External Event Counter Operation Timings 267

10-21 Timings after Compare Register Change during Timer Count Operation 268

11-1 Watch Timer Block Diagram 271

11-2 Timer Clock Select Register 2 Format 272

11-3 Watch Timer Mode Control Register Format 273

12-1 Watchdog Timer Block Diagram 277

12-2 Timer Clock Select Register 2 Format 279

12-3 Watchdog Timer Mode Register Format 280

13-1 Remote Controlled Output Application Example 283

13-2 Clock Output Control Circuit Block Diagram 284

13-3 Timer Clock Select Register 0 Format 286

13-4 Port Mode Register 3 Format 287

14-1 Buzzer Output Control Circuit Block Diagram 289

14-2 Timer Clock Select Register 2 Format 291

14-3 Port Mode Register 3 Format 292

15-1 A/D Converter Block Diagram 294

15-2 A/D Converter Mode Register Format 297

15-3 A/D Converter Input Select Register Format 298

15-4 External Interrupt Mode Register 1 Format 299

15-5 A/D Converter Basic Operation 301

15-6 Relationships between Analog Input Voltage and A/D Conversion Result 302

15-7 A/D Conversion by Hardware Start 303

15-8 A/D Conversion by Software Start 304

15-9 Example of Method of Reducing Current Consumption in Standby Mode 305

15-10 Analog Input Pin Disposition 306

15-11 A/D Conversion End Interrupt Request Generation Timing 307

15-12 Handling of AVDD Pin 307

16-1 D/A Converter Block Diagram 310

16-2 D/A Converter Mode Register Format 312

16-3 Use Example of Buffer Amplifier 314

Page 25 of the NEC PD78076Y user manual — LIST OF FIGURES (5/9)
Page 25 · click to enlarge
Page 25

LIST OF FIGURES (5/9)

Figure No. Title Page

17-1 Serial Bus Interface (SBI) System Configuration Example 317

17-2 Serial Interface Channel 0 Block Diagram 318

17-3 Timer Clock Select Register 3 Format 322

17-4 Serial Operating Mode Register 0 Format 324

17-5 Serial Bus Interface Control Register Format 325

17-6 Interrupt Timing Specify Register Format 327

17-7 3-Wire Serial I/O Mode Timings 331

17-8 RELT and CMDT Operations 331

17-9 Circuit of Switching in Transfer Bit Order 332

17-10 Example of Serial Bus Configuration with SBI 333

17-11 SBI Transfer Timings 335

17-12 Bus Release Signal 336

17-13 Command Signal 336

17-14 Addresses 337

17-15 Slave Selection with Address 337

17-16 Commands 338

17-17 Data 338

17-18 Acknowledge Signal 339

17-19 BUSY and READY Signals 339

17-20 RELT, CMDT, RELD, and CMDD Operations (Master) 344

17-21 RELD and CMDD Operations (Slave) 344

17-22 ACKT Operation 345

17-23 ACKE Operations 346

17-24 ACKD Operations 347

17-25 BSYE Operation 347

17-26 Pin Configuration 350

17-27 Address Transmission from Master Device to Slave Device (WUP = 1) 352

17-28 Command Transmission from Master Device to Slave Device 353

17-29 Data Transmission from Master Device to Slave Device 354

17-30 Data Transmission from Slave Device to Master Device 355

17-31 Serial Bus Configuration Example Using 2-Wire Serial I/O Mode 357

17-32 2-Wire Serial I/O Mode Timings 361

17-33 RELT and CMDT Operations 361

17-34 SCK0/P27 Pin Configuration 363

18-1 Serial Bus Configuration Example Using I2C Bus 367

18-2 Serial Interface Channel 0 Block Diagram 369

18-3 Timer Clock Select Register 3 Format 373

18-4 Serial Operating Mode Register 0 Format 375

18-5 Serial Bus Interface Control Register Format 376

18-6 Interrupt Timing Specify Register Format 378

18-7 3-Wire Serial I/O Mode Timings 383

18-8 RELT and CMDT Operations 383

18-9 Circuit of Switching in Transfer Bit Order 384

Page 26 of the NEC PD78076Y user manual — LIST OF FIGURES (6/9)
Page 26 · click to enlarge
Page 26

LIST OF FIGURES (6/9)

Figure No. Title Page

18-10 Serial Bus Configuration Example Using 2-Wire Serial I/O Mode 385

18-11 2-Wire Serial I/O Mode Timings 388

18-12 RELT and CMDT Operations 389

18-13 Example of Serial Bus Configuration Using I2C Bus 390

18-14 I2C Bus Serial Data Transfer Timing 391

18-15 Start Condition 392

18-16 Address 392

18-17 Transfer Direction Specification 392

18-18 Acknowledge Signal 393

18-19 Stop Condition 393

18-20 Wait Signal 394

18-21 Pin Configuration 399

18-22 Example of Communication from Master to Slave

(with 9-Clock Wait Selected for Both Master and Slave) 401

18-23 Example of Communication from Slave to Master

(with 9-Clock Wait Selected for Both Master and Slave) 404

18-24 Start Condition Output 408

18-25 Slave Wait Release (Transmission) 409

18-26 Slave Wait Release (Reception) 410

18-27 SCK0/SCL/P27 Pin Configuration 413

18-28 SCK0/SCL/P27 Pin Configuration 414

18-29 Logic Circuit of SCL Signal 414

19-1 Serial Interface Channel 1 Block Diagram 416

19-2 Timer Clock Select Register 3 Format 418

19-3 Serial Operation Mode Register 1 Format 419

19-4 Automatic Data Transmit/Receive Control Register Format 420

19-5 Automatic Data Transmit/Receive Interval Specify Register Format 421

19-6 3-Wire Serial I/O Mode Timings 427

19-7 Circuit of Switching in Transfer Bit Order 428

19-8 Basic Transmission/Reception Mode Operation Timings 436

19-9 Basic Transmission/Reception Mode Flowchart 437

19-10 Buffer RAM Operation in 6-byte Transmission/Reception

(in Basic Transmit/Receive Mode) 438

19-11 Basic Transmission Mode Operation Timings 440

19-12 Basic Transmission Mode Flowchart 441

19-13 Buffer RAM Operation in 6-byte Transmission (in Basic Transmit Mode) 442

19-14 Repeat Transmission Mode Operation Timing 444

19-15 Repeat Transmission Mode Flowchart 445

19-16 Buffer RAM Operation in 6-byte Transmission (in Repeat Transmit mode) 446

19-17 Automatic Transmission/Reception Suspension and Restart 448

19-18 System Configuration when the Busy Control Option is Used 449

19-19 Operation Timings when Using Busy Control Option (BUSY0 = 0) 450

19-20 Busy Signal and Wait Cancel (BUSY0 = 0) 451

Page 27 of the NEC PD78076Y user manual — (BUSY0 = 1) ................................................................................................................................ 453
Page 27 · click to enlarge
Page 27

LIST OF FIGURES (7/9)

Figure No. Title Page

19-21 Operation Timings when Using Busy & Strobe Control Option (BUSY0 = 0) 452

19-22 Operation Timing of the Bit Slippage Detection Function through the Busy Signal

(BUSY0 = 1) 453

19-23 Automatic Data Transmit/Receive Interval 454

19-24 Operation Timing with Automatic Data Transmit/Receive Function Performed

by Internal Clock 455

20-1 Serial Interface Channel 2 Block Diagram 458

20-2 Baud Rate Generator Block Diagram 459

20-3 Serial Operating Mode Register 2 Format 461

20-4 Asynchronous Serial Interface Mode Register Format 462

20-5 Asynchronous Serial Interface Status Register Format 464

20-6 Baud Rate Generator Control Register Format 465

20-7 Asynchronous Serial Interface Transmit/Receive Data Format 478

20-8 Asynchronous Serial Interface Transmission Completion Interrupt Request Generation

Timing 480

20-9 Asynchronous Serial Interface Reception Completion Interrupt Request Generation

Timing 481

20-10 Receive Error Timing 482

20-11 State of Receive Buffer Register (RXB) When Receive Operation is Stopped and

Whether Interrupt Request (INTSR) is Generated or Not 483

20-12 3-Wire Serial I/O Mode Timing 489

20-13 Circuit of Switching in Transfer Bit Order 490

20-14 Receive Completion Interrupt Request Generation Timing (ISRM = 1) 491

20-15 Period that Reading Receive Buffer Register is Prohibited 492

21-1 Real-time Output Port Block Diagram 495

21-2 Real-time Output Buffer Register Configuration 496

21-3 Port Mode Register 12 Format 497

21-4 Real-time Output Port Mode Register Format 497

21-5 Real-time Output Port Control Register Format 498

22-1 Basic Configuration of Interrupt Function 502

22-2 Interrupt Request Flag Register Format 505

22-3 Interrupt Mask Flag Register Format 506

22-4 Priority Specify Flag Register Format 507

22-5 External Interrupt Mode Register 0 Format 508

22-6 External Interrupt Mode Register 1 Format 509

22-7 Sampling Clock Select Register Format 510

22-8 Noise Eliminator Input/Output Timing (during Rising Edge Detection) 511

22-9 Program Status Word Format 512

22-10 Flowchart from Non-Maskable Interrupt Generation to Acknowledge 514

22-11 Non-Maskable Interrupt Request Acknowledge Timing 514

22-12 Non-Maskable Interrupt Request Acknowledge Operation 515

Page 28 of the NEC PD78076Y user manual — LIST OF FIGURES (8/9)
Page 28 · click to enlarge
Page 28

LIST OF FIGURES (8/9)

Figure No. Title Page

22-13 Interrupt Request Acknowledge Processing Algorithm 517

22-14 Interrupt Request Acknowledge Timing (Minimum Time) 518

22-15 Interrupt Request Acknowledge Timing (Maximum Time) 518

22-16 Multiple Interrupt Example 520

22-17 Interrupt Request Hold 522

22-18 Basic Configuration of Test Function 523

22-19 Format of Interrupt Request Flag Register 1L 524

22-20 Format of Interrupt Mask Flag Register 1L 524

22-21 Key Return Mode Register Format 525

23-1 Memory Map when Using External Device Expansion Function 529

23-2 Memory Expansion Mode Register Format 531

23-3 Internal Memory Size Switching Register Format 532

23-4 External Bus Type Select Register Format 533

23-5 Instruction Fetch from External Memory in Multiplexed Bus Mode 535

23-6 External Memory Read Timing in Multiplexed Bus Mode 536

23-7 External Memory Write Timing in Multiplexed Bus Mode 537

23-8 External Memory Read Modify Write Timing in Multiplexed Bus Mode 538

23-9 Instruction Fetch from External Memory in Separate Bus Mode 540

23-10 External Memory Read Timing in Separate Bus Mode 541

23-11 External Memory Write Timing in Separate Bus Mode 542

23-12 External Memory Read Modify Write Timing in Separate Bus Mode 543

24-1 Oscillation Stabilization Time Select Register Format 546

24-2 HALT Mode Released by Interrupt Request Generation 548

24-3 HALT Mode Released by RESET Input 549

24-4 STOP Mode Released by Interrupt Request Generation 551

24-5 STOP Mode Released by RESET Input 552

25-1 Block Diagram of Reset Function 553

25-2 Timing of Reset by RESET Input 554

25-3 Timing of Reset due to Watchdog Timer Overflow 554

25-4 Timing of Reset by RESET Input in STOP Mode 554

26-1 Block Diagram of ROM Correction 559

26-2 Correction Address Registers 0 and 1 Format 560

26-3 Correction Control Register Format 561

26-4 Storing Example to EEPROM (when One Place is Corrected) 562

26-5 Connecting Example with EEPROM (Using 2-Wire Serial I/O Mode) 562

26-6 Initialization Routine 563

26-7 ROM Correction Operation 564

26-8 ROM Correction Example 565

26-9 Program Transition Diagram (when One Place is Corrected) 566

26-10 Program Transition Diagram (when Two Places are Corrected) 567

Page 29 of the NEC PD78076Y user manual — LIST OF FIGURES (9/9)
Page 29 · click to enlarge
Page 29

LIST OF FIGURES (9/9)

Figure No. Title Page

27-1 Internal Memory Size Switching Register Format 570

27-2 Internal Extension RAM Size Switching Register Format 571

27-3 Page Program Mode Flowchart 574

27-4 Page Program Mode Timing 575

27-5 Byte Program Mode Flowchart 576

27-6 Byte Program Mode Timing 577

27-7 PROM Read Timing 578

B-1 Development Tool Configuration 600

B-2 TGC-100SDW Drawing (For Reference Only) 610

B-3 EV-9200GF-100 Drawing (For Reference Only) 611

B-4 EV-9200GF-100 Recommended Footprints (For Reference Only) 612

Page 30 of the NEC PD78076Y user manual — LIST OF TABLES (1/3)
Page 30 · click to enlarge
Page 30

LIST OF TABLES (1/3)

Table No. Title Page

1-1 Mask Options of Mask ROM Versions 47

1-2 Differences between µPD78078 Subseries and µPD78054 Subseries 47

2-1 Mask Options of Mask ROM Versions 63

2-2 Differences between µPD78078Y Subseries and µPD78054Y Subseries 63

3-1 Pin Input/Output Circuit Types 78

4-1 Pin Input/Output Circuit Types 96

5-1 Internal ROM Capacities 104

5-2 Vector Table 105

5-3 Special Function Register List 115

6-1 Port Functions (µPD78078 Subseries) 132

6-2 Port Functions (µPD78078Y Subseries) 134

6-3 Port Configuration 136

6-4 Pull-up Resistor Options for Port 6 146

6-5 Pull-up Resistor Options for Port 9 151

6-6 Port Mode Register and Output Latch Settings when Using Alternate Function 158

6-7 Comparison between Mask ROM Version and the µPD78P078 and 78P078Y 164

7-1 Clock Generator Configuration 166

7-2 Relationship between CPU Clock and Minimum Instruction Execution Time 169

7-3 Maximum Time Required for CPU Clock Switchover 178

8-1 Timer/Event Counter Operations 182

8-2 16-Bit Timer/Event Counter Interval Times 183

8-3 16-Bit Timer/Event Counter Square-Wave Output Ranges 184

8-4 16-Bit Timer/Event Counter Configuration 185

8-5 INTP0/TI00 Pin Valid Edge and CR00 Capture Trigger Valid Edge 188

8-6 16-Bit Timer/Event Counter Interval Times 200

8-7 16-Bit Timer/Event Count Square-Wave Output Ranges 214

9-1 8-Bit Timer/Event Counters 1 and 2 Interval Times 224

9-2 8-Bit Timer/Event Counters 1 and 2 Square-Wave Output Ranges 225

9-3 Interval Times when 8-Bit Timer/Event Counters 1 and 2

are Used as 16-Bit Timer/Event Counters 226

9-4 Square-Wave Output Ranges when 8-Bit Timer/Event Counters 1 and 2 are

Used as 16-Bit Timer/Event Counters 227

9-5 8-Bit Timer/Event Counters 1 and 2 Configurations 228

9-6 8-Bit Timer/Event Counter 1 Interval Time 237

9-7 8-Bit Timer/Event Counter 2 Interval Time 238

9-8 8-Bit Timer/Event Counters 1 and 2 Square-Wave Output Ranges 240

Page 31 of the NEC PD78076Y user manual — LIST OF TABLES (2/3)
Page 31 · click to enlarge
Page 31

LIST OF TABLES (2/3)

Table No. Title Page

9-9 Interval Times when 2-Channel 8-Bit Timer/Event Counters (TM1 and TM2)

are Used as 16-Bit Timer/Event Counter 243

9-10 Square-Wave Output Ranges when 2-Channel 8-Bit Timer/Event Counters

(TM1 and TM2) are Used as 16-Bit Timer/Event Counter 245

10-1 8-Bit Timer/Event Counters 5 and 6 Interval Times 250

10-2 8-Bit Timer/Event Counters 5 and 6 Square-Wave Output Ranges 251

10-3 8-Bit Timer/Event Counters 5 and 6 Configurations 252

10-4 8-Bit Timer/Event Counters 5 and 6 Interval Times 260

10-5 8-Bit Timer/Event Counters 5 and 6 Square-Wave Output Ranges 263

11-1 Interval Timer Interval Time 269

11-2 Watch Timer Configuration 270

11-3 Interval Timer Interval Time 274

12-1 Watchdog Timer Runaway Detection Times 275

12-2 Interval Times 276

12-3 Watchdog Timer Configuration 277

12-4 Watchdog Timer Runaway Detection Time 281

12-5 Interval Timer Interval Time 282

13-1 Clock Output Control Circuit Configuration 284

14-1 Buzzer Output Control Circuit Configuration 289

15-1 A/D Converter Configuration 293

16-1 D/A Converter Configuration 310

17-1 Differences between Channels 0, 1, and 2 315

17-2 Serial Interface Channel 0 Configuration 318

17-3 Various Signals in SBI Mode 348

18-1 Differences between Channels 0, 1, and 2 365

18-2 Serial Interface Channel 0 Configuration 368

18-3 Serial Interface Channel 0 Interrupt Request Signal Generation 371

18-4 Signals in I2C Bus Mode 398

19-1 Serial Interface Channel 1 Configuration 416

19-2 Interval Timing through CPU Processing (when the Internal Clock is Operating) 455

19-3 Interval Timing through CPU Processing (when the External Clock is Operating) 456

20-1 Serial Interface Channel 2 Configuration 458

20-2 Serial Interface Channel 2 Operating Mode Settings 463

Page 32 of the NEC PD78076Y user manual — LIST OF TABLES (3/3)
Page 32 · click to enlarge
Page 32

LIST OF TABLES (3/3)

Table No. Title Page

20-3 Relationship between Main System Clock and Baud Rate 467

20-4 Relationship between ASCK Pin Input Frequency and Baud Rate

(When BRGC is set to 00H) 468

20-5 Relationship between Main System Clock and Baud Rate 476

20-6 Relationship between ASCK Pin Input Frequency and Baud Rate

(When BRGC is set to 00H) 477

20-7 Receive Error Causes 482

21-1 Real-time Output Port Configuration 495

21-2 Operation in Real-time Output Buffer Register Manipulation 496

21-3 Real-time Output Port Operating Mode and Output Trigger 498

22-1 Interrupt Source List 500

22-2 Various Flags Corresponding to Interrupt Request Sources 504

22-3 Times from Maskable Interrupt Request Generation to Interrupt Service 516

22-4 Interrupt Request Enabled for Multiple Interrupt during Interrupt Servicing 519

22-5 Test Input Factors 523

22-6 Flags Corresponding to Test Input Signals 523

23-1 Pin Functions in External Memory Expansion Mode 527

23-2 State of Port 4 to Port 6 Pins in External Memory Expansion Mode 527

23-3 Pin Functions in Separate Bus Mode 528

23-4 State of Port 4 to Port 6 and Port 8 Pins in Separate Bus Mode 528

23-5 Values when the Internal Memory Size Switching Register is Reset 532

24-1 HALT Mode Operating Status 547

24-2 Operation after HALT Mode Release 549

24-3 STOP Mode Operating Status 550

24-4 Operation after STOP Mode Release 552

25-1 Hardware Status after Reset 555

26-1 ROM Correction Configuration 559

27-1 Differences between PROM and Mask ROM Versions 569

27-2 Examples of Internal Memory Size Switching Register Settings 570

27-3 Examples of Internal Extension RAM Size Switching Register Settings 571

27-4 PROM Programming Operating Modes 572

A-1 Major Differences between µPD78078, 78075B Subseries, and µPD78070A 597

B-1 OS for IBM PC 609

B-2 System Upgrading from Former-type In-circuit Emulator for

78K/0 Series to IE-78001-R-A 609

Page 33 of the NEC PD78076Y user manual — (ROM)
Page 33 · click to enlarge
Page 33

CHAPTER 1 OUTLINE ( µ PD78078 SUBSERIES)

1.1 Features

Internal high-capacity ROM and RAM

(ROM)

Internal High-Speed RAM Internal Buffer RAM Internal Expansion RAM

1024 bytes 32 bytes 1024 bytes

60 KbytesNote 1 1024 bytesNote 2

register (IMS).

2. The capacity of internal high-speed RAM can be changed by means of the internal expansion RAM

size switching register (IXS).

External Memory Expansion Space64 Kbytes

Minimum instruction execution time changeable from high speed (0.4 µs: @ 5.0-MHz operation with main

system clock) to ultra-low speed (122 µs: @ 32.768-kHz operation with subsystem clock)

Instruction set suited to system control

  • Bit manipulation possible in all address spaces
  • Multiply and divide instructions incorporated
88 I/O port pins(including eight N-ch open-drain port pins)
8-bit resolution A/D converter8 channels
8-bit resolution D/A converter2 channels
Serial interfaceThree channels
  • 3-wire serial I/O/SBI/2-wire serial I/O mode: 1 channel
  • 3-wire serial I/O mode (automatic transmit/receive function): 1 channel
  • 3-wire serial I/O/UART mode: 1 channel
TimerSeven channels
  • 16-bit timer/event counter : 1 channel
  • 8-bit timer/event counter : 4 channels
  • Watch timer : 1 channel
  • Watchdog timer : 1 channel

24 vectored interrupt sources

Two types of on-chip clock oscillator circuits (main system clock and subsystem clock)

Power supply voltage1.8 to 5.5 V
Show 10 more labels / short text on this page
Type · Program Memory · Data Memory · Part Number · µPD78076 · 48 Kbytes · µPD78078 · 60 Kbytes · µPD78P078 · Two test inputs
Page 34 of the NEC PD78076Y user manual — 1.3 Ordering Information
Page 34 · click to enlarge
Page 34

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

1.2 Application Fields

Cellular phones, cordless telephones, printers, AV equipment, air conditioners, cameras, PPCs, fuzzy home

appliances, vending machines, etc.

1.3 Ordering Information

Part number Package Internal ROM

µPD78076GC-xxx-7EA 100-pin plastic QFP (Fine pitch) (14 x 14 mm, resin thickness 1.45 mm) Mask ROM

µPD78076GC-xxx-8EUNote 100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm) Mask ROM

µPD78076GF-xxx-3BA 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm) Mask ROM

µPD78078GC-xxx-7EA 100-pin plastic QFP (Fine pitch) (14 x 14 mm, resin thickness 1.45 mm) Mask ROM

µPD78078GC-xxx-8EUNote 100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm) Mask ROM

µPD78078GF-xxx-3BA 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm) Mask ROM

µPD78P078GC-7EA 100-pin plastic QFP (Fine pitch) (14 x 14 mm, resin thickness 1.45 mm) One-time PROM

µPD78P078GC-8EUNote 100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm) One-time PROM

µPD78P078GF-3BA 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm) One-time PROM

µPD78P078KL-T 100-pin ceramic WQFN (14 x 20 mm) EPROM

suppliable package, contact an NEC sales representative.

Remark xxx indicates ROM code suffix.

Page 35 of the NEC PD78076Y user manual — 1.4 Quality Grade
Page 35 · click to enlarge
Page 35

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

1.4 Quality Grade

Part number Package Quality grades

µPD78076GC-xxx-7EA 100-pin plastic QFP (Fine pitch) (14 x 14 mm, resin thickness 1.45 mm) Standard

µPD78076GC-xxx-8EUNote 100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm) Standard

µPD78076GF-xxx-3BA 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm) Standard

µPD78078GC-xxx-7EA 100-pin plastic QFP (Fine pitch) (14 x 14 mm, resin thickness 1.45 mm) Standard

µPD78078GC-xxx-8EUNote 100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm) Standard

µPD78078GF-xxx-3BA 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm) Standard

µPD78P078GC-7EA 100-pin plastic QFP (Fine pitch) (14 x 14 mm, resin thickness 1.45 mm) Standard

µPD78P078GC-8EUNote 100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm) Standard

µPD78P078GF-3BA 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm) Standard

µPD78P078KL-T 100-pin ceramic WQFN (14 x 20 mm) Not assured

(for function evaluation only)

experiment or function evaluation, because it is not intended for use in equipment that will be

mass-produced and require high reliability.

  • µ PD78P078KL-T

Remark xxx indicates ROM code suffix.

Please refer to “Quality Grades on NEC Semiconductor Devices”(C11531E) published by NEC Corporation to know the specification of quality grade on the devices and its recommended applications.

Page 36 of the NEC PD78076Y user manual — 1.5 Pin Configuration (Top View)
Page 36 · click to enlarge
Page 36

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

1.5 Pin Configuration (Top View)

(1) Normal operating mode

100-pin plastic QFP (Fine pitch) (14 x 14 mm, resin thickness 1.45 mm)

100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm)

µPD78076GC-xxx-8EUNote, 78078GC-xxx-8EUNote

µPD78076GC-xxx-7EA, 78078GC-xxx-7EA · µPD78P078GC-7EA · µPD78P078GC-8EUNote

Page 37 of the NEC PD78076Y user manual — P85/A5
Page 37 · click to enlarge
Page 37

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

P01/INTP1/TI01

P00/INTP0/TI00

NEC PD78076Y — P01/INTP1/TI01 diagram (page 37)
Fig. 1

99 98 97 96 95 94 93 92 90 89 8887 86 85 84 83 82 81 8079 78 77 76 91

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51

P122/RTP2 P121/RTP1 P120/RTP0 P96 P95 P94 P93 P92 P91 P90 P37 P36/BUZ P35/PCL P34/TI2 P33/TI1 P32/TO2 P31/TO1 P30/TO0 P103 P102 P101/TI6/TO6 P100/TI5/TO5 P67/ASTB P66/WAIT P65/WR

26 27 28 29 30 31 32 33 34 36 37 3839 40 41 42 43 44 45 4647 48 49 50 35

P85/A5

P86/A6

P87/A7

P40/AD0

P41/AD1

P42/AD2

P43/AD3

P44/AD4

P45/AD5

P46/AD6

P47/AD7

P50/A8

P51/A9

P52/A10

P53/A11

P54/A12

P55/A13

P56/A14

P57/A15

P64/RD

2. Connect AV DD pin to V DD .
3. Connect AV SS pin to V SS .

Remark Pin connection in parentheses is for the µPD78P078.

Page 38 of the NEC PD78076Y user manual — IC (V PP )
Page 38 · click to enlarge
Page 38

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

100-pin plastic QFP (14 x 20 mm)

100-pin ceramic WQFN (14 x 20 mm)

P101/TI6/TO6

P100/TI5/TO5

P36/BUZ

P35/PCL

P32/TO2

P31/TO1

P30/TO0

P67/ASTB

P34/TI2

P33/TI1

P96

P95

P94

P93

P92

P91

P90

P37

P103

P102

NEC PD78076Y — 100-pin plastic QFP (14 x 20 mm) diagram (page 38)
Fig. 2 · 100-pin plastic QFP (14 x 20 mm)

82 83 84 86 88 89 91 92 93 94 96 98 100 87 90 97 99 81 95 85 P120/RTP0 P121/RTP1 P122/RTP2

P66/WAIT P65/WR P64/RD

P123/RTP3 P124/RTP4

P125/RTP5 P126/RTP6 P127/RTP7

6 7 8 9 10 11 12 13 14 15 16

75 74 73 72 71 70 69 68 67 66 65

P61 P60 P57/A15 P56/A14 VSS P55/A13 P54/A12 P53/A11 P52/A10 P51/A9 P50/A8

IC (V PP )

X2 X1 V DD XT2 XT1/P07

RESET P00/INTP0/TI00

P01/INTP1/TI01

P02/INTP2 P03/INTP3 P04/INTP4 P05/INTP5 P06/INTP6

AV DD AV REF0 P10/ANI0

P11/ANI1 P12/ANI2 P13/ANI3 P14/ANI4 P15/ANI5

49 48 47 45 43 42 40 39 38 37 35 33 31 44 41 34 32

2. Connect AV DD pin to V DD .
3. Connect AV SS pin to V SS .

Remark Pin connection in parentheses is for the µPD78P078.

µPD78076GF-xxx-3BA, 78078GF-xxx-3BA · µPD78P078GF-3BA · µPD78P078KL-T

Page 39 of the NEC PD78076Y user manual — Pin Identifications
Page 39 · click to enlarge
Page 39

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

Pin Identifications

A0 to A15Address Bus
P120 to P127Port 12
AD0 to AD7Address/Data Bus
P130, P131Port 13
ANI0 to ANI7Analog Input
PCLProgrammable Clock
ANO0, ANO1Analog Output
RDRead Strobe
ASCKAsynchronous Serial Clock
RESETReset
ASTBAddress Strobe
RTP0 to RTP7Real-time Output Port
AV DDAnalog Power Supply
RxDReceive Data
AV REF0 , AV REF1Analog Reference Voltage
SB0, SB1Serial Bus
AV SSAnalog Ground
SCK0 to SCK2Serial Clock
BUSYBusy
SI0 to SI2Serial Input
BUZBuzzer Clock
SO0 to SO2Serial Output
ICInternally Connected
STBStrobe
INTP0 to INTP6Interrupt from Peripherals
TI00, TI01Timer Input
P00 to P07Port 0
TI1, TI2, TI5, TI6Timer Input
P10 to P17Port 1
TO0 to TO2, TO5, TO6Timer Output
P20 to P27Port 2
TxDTransmit Data
P30 to P37Port 3
V DDPower Supply
P40 to P47Port 4
V PPProgramming Power Supply
P50 to P57Port 5
V SSGround
P60 to P67Port 6
WAITWait
P70 to P72Port 7
WRWrite Strobe
P80 to P87Port 8
X1, X2Crystal (Main System Clock)
P90 to P96Port 9
XT1, XT2Crystal (Subsystem Clock)
P100 to P103Port 10
Page 40 of the NEC PD78076Y user manual — (L)
Page 40 · click to enlarge
Page 40

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

(2) PROM programming mode

100-pin plastic QFP (Fine pitch) (14 x 14 mm, resin thickness 1.45 mm)

100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm)

NEC PD78076Y — (2) PROM programming mode diagram (page 40)
Fig. 3 · (2) PROM programming mode

77 78 79 80 82 83 84 85 86 88 89 91 92 93 94 95 96 98 100 81 87 90 97 99

75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

(L)

V SS

(L)

V DD

(L)

V SS

(L)

50 49 48 47 46 44 43 42 41 40 38 37 35 34 33 32 31 30 28 26 45 39 36 29 27

2. V SS : Connect to the ground.
3. RESET : Set to the low level.
4. Open : Leave open.

µPD78P078GC-7EA · µPD78P078GC-8EUNote

Page 41 of the NEC PD78076Y user manual — V SS
Page 41 · click to enlarge
Page 41

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

100-pin plastic QFP (14 x 20 mm)

100-pin ceramic WQFN

(L)

(L)

D7

D6

D5

D4

D3

D2

D1

D0

NEC PD78076Y — 100-pin plastic QFP (14 x 20 mm) diagram (page 41)
Fig. 4 · 100-pin plastic QFP (14 x 20 mm)

82 83 84 86 88 89 91 92 93 94 96 98 100 87 90 97 99 81 95 85

6 7 8 9 10 11 12 13 14 15 16

75 74 73 72 71 70 69 68 67 66 65

A15 A14 VSS A13 A12 A11 A10 A16 A8

49 48 47 45 43 42 40 39 38 37 35 33 31 44 41 34 32

V SS

V DD

V SS

(L)

(L)

(L)

(L)

2. V SS : Connect to the ground.
NEC PD78076Y — V SS diagram (page 41)
Fig. 5
A0 to A16Address Bus RESET : Reset
CEChip Enable V DD : Power Supply
D0 to D7Data Bus V PP : Programming Power Supply
PGMProgram

µPD78P078GF-3BA · µPD78P078KL-T

Page 42 of the NEC PD78076Y user manual — 1.6 78K/0 Series Expansion
Page 42 · click to enlarge
Page 42

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

1.6 78K/0 Series Expansion

The products in the 78K/0 Series are listed below. The names in boxes are subseries names.

The subseries whose name ends with Y support the I2C bus specifications.

Reduced EMI noise version of µPD78078

100-pin Added timers to µPD78054 and enhanced external interface

µPD78078 µPD78078Y

µPD78070A µPD78070AY

ROM-less version of µPD78078

100-pin Enhanced serial I/O of µPD78078Y and functions are defined.

80-pin Enhanced serial I/O of µPD78054, reduced EMI noise version

µPD780058 µPD780058YNote

Reduced EMI noise version of µPD78054

Added UART and D/A to µPD78014 and enhanced I/Os

Enhanced A/D of µPD780024

Enhanced serial I/O of µPD78018F

Reduced EMI noise version of µPD78018F

Low-voltage (1.8 V) version of µPD78014 and enhanced ROM/RAM size options

Added A/D and 16-bit timer to µPD78002

Added A/D to µPD78002

Basic subseries for control applications

Equipped with UART and operates at low-voltage (1.8 V)

Enhanced inverter control, timer, and SIO of µPD780964, expanded ROM and RAM

Enhanced A/D of µPD780924

Equipped with inverter control circuit and UART, reduced EMI noise version

FIPTM driving 78K/0 Series

Enhanced I/O and FIP C/D of µPD78044F, 53 display outputs

Enhanced I/O and FIP C/D of µPD78044H, 48 display outputs

Added N-ch open-drain I/O to µPD78044F, 34 display outputs

µPD78044F 80-pin Basic subseries for driving FIPs, 34 display outputs

Enhanced SIO of µPD78064, expanded ROM and RAM

Reduced EMI noise version of µPD78064

Basic subseries for driving LCDs, equipped with UART

Reduced EMI noise version of µPD78098

µPD78098 80-pin Added IEBus controller to µPD78054

Equipped with controller/driver for driving automobile meters µPD780973 80-pin

Show 59 more labels / short text on this page
Mass-produced products · Products under development · Control · 100-pin · µPD78075B · 100-pin · µPD780018AY · 80-pin · µPD78058F · µPD78058FY · 80-pin · µPD78054 · µPD78054Y · 64-pin · µPD780034 · µPD780034Y · 64-pin · µPD780024 · µPD780024Y · 64-pin · µPD78014H · 64-pin · µPD78018F · µPD78018FY · 64-pin · µPD78014 · µPD78014Y · 64-pin · µPD780001 · 64-pin · µPD78002 · µPD78002Y · 42-/44-pin · µPD78083 · Inverter control · µPD780988 64-pin · 64-pin · µPD780964 · 64-pin · µPD780924 · 100-pin · µPD780208 · 100-pin · µPD780228 · 80-pin · µPD78044H · LCD driving · 100-pin · µPD780308 · µPD780308Y · 100-pin · µPD78064B · 100-pin · µPD78064 · µPD78064Y · IEBusTM supported · 80-pin · µPD78098B · Meter control
Page 43 of the NEC PD78076Y user manual — 1.6 78K/0 Series Expansion
Page 43 · click to enlarge
Page 43

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

The following shows the major differences between subseries products.

Function ROM Timer 8-bit 10-bit 8-bit Serial Interface I/O VDD External

Subseries Name Capacity 8-bit 16-bit Watch WDT A/D A/D D/A MIN. Value Expansion

Control µPD78075B 32 K to 40 K 4 ch 1 ch 1 ch 1 ch 8 ch – 2 ch 3 ch (UART: 1 ch) 88 1.8 V √

µPD78078 48 K to 60 K

µPD78070A – 61 2.7 V

µPD780058 24 K to 60 K 2 ch 3 ch (Time division 68 1.8 V UART: 1 ch)

µPD78058F 48 K to 60 K 3 ch (UART: 1 ch) 69 2.7 V

µPD78054 16 K to 60 K 2.0 V

µPD780034 8 K to 32 K – 8 ch – 3 ch (UART: 1 ch, Time 51 1.8 V

µPD780024 8 ch – division 3-wire: 1 ch)

µPD78014H 2 ch 53

µPD78018F 8 K to 60 K

µPD78014 8 K to 32 K 2.7 V

µPD780001 8 K – – 1 ch 39 –

µPD78002 8 K to 16 K 1 ch – 53 √

µPD78083 – 8 ch 1 ch (UART: 1 ch) 33 1.8 V –

Inverter µPD780988 32 K to 60 K 3 ch Note 1 – 1 ch – 8 ch – 3 ch (UART: 2 ch) 47 4.0 V √

control µPD780964 8 K to 32 K Note 2 2 ch (UART: 2 ch) 2.7 V

µPD780924 8 ch –

FIP µPD780208 32 K to 60 K 2 ch 1 ch 1 ch 1 ch 8 ch – – 2 ch 74 2.7 V –

driving µPD780228 48 K to 60 K 3 ch – – 1 ch 72 4.5 V

µPD78044H 32 K to 48 K 2 ch 1 ch 1 ch 68 2.7 V

µPD78044F 16 K to 40 K 2 ch

LCD µPD780308 48 K to 60 K 2 ch 1 ch 1 ch 1 ch 8 ch – – 3 ch (Time division 57 2.0 V – driving UART: 1 ch)

µPD78064B 32 K 2 ch (UART: 1 ch)

µPD78064 16 K to 32 K

IEBus µPD78098B 40 K to 60 K 2 ch 1 ch 1 ch 1 ch 8 ch – 2 ch 3 ch (UART: 1 ch) 69 2.7 V √

supported µPD78098 32 K to 60 K

Meter µPD780973 24 K to 32 K 3 ch 1 ch 1 ch 1 ch 5 ch – – 2 ch (UART: 1 ch) 56 4.5 V – control

10-bit timer1 channel
2. 10-bit timer: 1 channel
Page 44 of the NEC PD78076Y user manual — TO1/P31
Page 44 · click to enlarge
Page 44

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

1.7 Block Diagram

TO0/P30 TI00/INTP0/P00 TI01/INTP1/P01

NEC PD78076Y — 1.7 Block Diagram diagram (page 44)
Fig. 6 · 1.7 Block Diagram

TO1/P31

TI1/P33

TO2/P32

TI2/P34

TI5/TO5/P100

TI6/TO6/P101

SI0/SB0/P25 SO0/SB1/P26

SCK0/P27

SI1/P20 SO1/P21 SCK1/P22

STB/P23 BUSY/P24

ANI7/P17

AV DD

AV SS AV REF0

ANO0/P130,

ANO1/P131

AV SS AV REF1

INTP6/P06

BUZ/P36

PCL/P35

Remarks 1. The internal ROM and RAM capacities depend on the product.

2. Pin connection in parentheses is for the µ PD78P078.

SI2/RxD/P70 SO2/TxD/P71 SCK2/ASCK/P72 · ANI0/P10 to · INTP0/P00 to

Page 45 of the NEC PD78076Y user manual — 1.8 Outline of Function
Page 45 · click to enlarge
Page 45

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

1.8 Outline of Function

µPD78076 µPD78078 µPD78P078 Part Number

Internal ROM Mask ROM PROM

memory 48 Kbytes 60 Kbytes 60 KbytesNote 1

High-speed RAM 1024 bytes

Buffer RAM 32 bytes

Expansion RAM 1024 bytes 1024 bytesNote 2

Memory space 64 Kbytes

General register 8 bits x 8 x 4 banks

Minimum instruction execution time

With main system clock selected 0.4 µs/0.8 µs/1.6 µs/3.2 µs/6.4 µs/12.8 µs (@ 5.0-MHz operation)

With subsystem clock selected 122 µs (@ 32.768-kHz operation)

Instruction set • 16-bit operation

  • Multiply/divide (8-bit x 8-bit, 16-bit/8-bit)
  • Bit manipulate (set, reset, test, and Boolean operation)
  • BCD adjust, etc.
I/O port Total88
  • CMOS input : 2
  • CMOS input/output : 78
  • N-ch open drain I/O : 8

A/D converter 8-bit resolution x 8 channels

D/A converter 8-bit resolution x 2 channels

Serial interface • 3-wire serial I/O/SBI/2-wire serial I/O mode selection possible : 1 channel

  • 3-wire serial I/O mode (Maximum 32-byte on-chip
automatic transmit/receive function)1 channel
  • 3-wire serial I/O/UART mode selection possible : 1 channel
Timer • 16-bit timer/event counter1 channel
  • 8-bit timer/event counter : 4 channels
  • Watch timer : 1 channel
  • Watchdog timer : 1 channel
Timer output 5 outputs(14-bit PWM output enable: 1, 8-bit PWM output enable: 2)

Clock output 19.5 kHz, 39.1 kHz, 78.1 kHz, 156 kHz, 313 kHz, 625 kHz, 1.25 MHz,

2.5 MHz, 5.0 MHz (@ 5.0-MHz operation with main system clock)

32.768 kHz (@ 32.768-kHz operation with subsystem clock)

Buzzer output 1.2 kHz, 2.4 kHz, 4.9 kHz, 9.8 kHz (@ 5.0-MHz operation with main system clock)

(IMS).

2. The capacity of the internal expansion RAM can be changed using the internal expansion RAM size

switching register (IXS).

Item

Page 46 of the NEC PD78076Y user manual — 1.8 Outline of Function
Page 46 · click to enlarge
Page 46

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

µPD78076 µPD78078 µPD78P078 Part Number

Vectored Maskable Internal15
interrupt External7
source Non-maskable Internal1
Software Internal1
Test input Internal1
External1

Power supply voltage VDD = 1.8 to 5.5 V

Operating ambient temperature TA = –40 to +85°C

Package • 100-pin plastic QFP (Fine pitch) (14 x 14 mm, resin thickness 1.45 mm)

  • 100-pin plastic LQFP Note (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm)
  • 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm)
  • 100-pin ceramic WQFN (14 x 20 mm) ( µ PD78P078 only)

Item

Page 47 of the NEC PD78076Y user manual — Table 1-2. Differences between µ PD78078 Subseries and µ PD78054 Subseries
Page 47 · click to enlarge
Page 47

CHAPTER 1 OUTLINE (µPD78078 SUBSERIES)

1.9 Mask Options

The mask ROM versions (µPD78076, 78078) provide pull-up register mask options which allow users to specify

whether to connect a pull-up register to a specific port pin when the user places an order for the device production.

Using this mask option when pull-up resistors are required reduces the number of components to add to the device,

resulting in board space saving.

The mask options provided in the µPD78078 Subseries are shown in Table 1-1.

Table 1-1. Mask Options of Mask ROM Versions

Pin Names Mask Options

P60 to P63, P90 to P93 Pull-up resistor connection can be specified

in 1-bit units.

1.10 Differences with µ PD78054 Subseries

The µPD78078 Subseries is upward-compatible with the µPD78054 Subseries. The differences between the two

subseries are shown in the table below. The functions and specifications other than those shown in this table are

common to these two series.

Table 1-2. Differences between µ PD78078 Subseries and µ PD78054 Subseries

Subseries µPD78054 Subseries µPD78078 Subseries

No. of I/O ports 69 88

8-bit timer/event counter 2 channnels 4 channels

External device Address bus separate function Address bus separate function expansion function is not provided. is provided. (P80/A0 to P87/A7)

Power supply voltage VDD = 2.0 to 6.0 V VDD = 1.8 to 5.5 V

Package 80-pin plastic TQFP (12 x 12 mm) 100-pin plastic TQFP (14 x 14 mm) 80-pin plastic QFP (14 x 14 mm) 100-pin plastic LQFP (14 x 14 mm) 80-pin plastic WQFP (14 x 14 mm)* 100-pin plastic QFP (14 x 20 mm)

100-pin plastic WQFP (14 x 20 mm)*

*Only for PROM version * : Only for PROM version

Item

Page 48 of the NEC PD78076Y user manual — [MEMO]
Page 48 · click to enlarge
Page 48

[MEMO]

Page 49 of the NEC PD78076Y user manual — (ROM)
Page 49 · click to enlarge
Page 49

CHAPTER 2 OUTLINE ( µ PD78078Y SUBSERIES)

2.1 Features

Internal high-capacity ROM and RAM

(ROM)

Internal High-Speed RAM Internal Buffer RAM Internal Expansion RAM

1024 bytes 32 bytes

60 KbytesNote 1

1024 bytesNote 2

(IMS).

2. The capacity of internal high-speed RAM can be changed using the internal expansion RAM size

switching register (IXS).

External memory expansion space64 Kbytes

Minimum instruction execution time changeable from high speed (0.4 µs: @ 5.0-MHz operation with main

system clock) to ultra-low speed (122 µs: @ 32.768-kHz operation with subsystem clock)

Instruction set suited to system control

  • Bit manipulation possible in all address spaces
  • Multiply and divide instructions incorporated
88 I/O port pins(including eight N-ch open-drain port pins)
8-bit resolution A/D converter8 channels
8-bit resolution D/A converter2 channels
Serial interfaceThree channels
  • 3-wire serial I/O/2-wire serial I/O/I 2 C bus mode: 1 channel
  • 3-wire serial I/O mode (Automatic transmit/receive function): 1 channel
  • 3-wire serial I/O/UART mode: 1 channel
TimerSeven channels
  • 16-bit timer/event counter : 1 channel
  • 8-bit timer/event counter : 4 channels
  • Watch timer : 1 channel
  • Watchdog timer : 1 channel

24 vectored interrupt sources

Two types of on-chip clock oscillation circuits (main system clock and subsystem clock)

Power supply voltage1.8 to 5.5 V
Show 10 more labels / short text on this page
Type Program Memory · Data Memory · Part Number · µPD78076Y · 48 Kbytes · 1024 bytes · µPD78078Y · 60 Kbytes · µPD78P078Y · Two test inputs
Page 50 of the NEC PD78076Y user manual — 2.3 Ordering Information
Page 50 · click to enlarge
Page 50

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

2.2 Application Fields

Cellular phones, cordless telephones, printers, AV equipment, air conditioners, cameras, PPCs, fuzzy home

appliances, vending machines, etc.

2.3 Ordering Information

Part number Package Internal ROM

µPD78076YGC-xxx-8EUNote 100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm) Mask ROM

µPD78076YGF-xxx-3BA 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm) Mask ROM

µPD78078YGC-xxx-8EUNote 100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm) Mask ROM

µPD78078YGF-xxx-3BA 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm) Mask ROM

µPD78P078YGC-8EUNote 100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm) One-time PROM

µPD78P078YGF-3BA 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm) One-time PROM

µPD78P078YKL-T 100-pin ceramic WQFN (14 x 20 mm) EPROM

Remark xxx indicates ROM code suffix.

Page 51 of the NEC PD78076Y user manual — 2.4 Quality Grade
Page 51 · click to enlarge
Page 51

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

2.4 Quality Grade

Part number Package Quality grades

µPD78076YGC-xxx-8EUNote 100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm) Standard

µPD78076YGF-xxx-3BA 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm) Standard

µPD78078YGC-xxx-8EUNote 100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm) Standard

µPD78078YGF-xxx-3BA 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm) Standard

µPD78P078YGC-8EUNote 100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm) Standard

µPD78P078YGF-3BA 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm) Standard

µPD78P078YKL-T 100-pin ceramic WQFN (14 x 20 mm) Not assured

(for function evaluation only)

experiment or function evaluation, because it is not intended for use in equipment that will be

mass-produced and require high reliability.

  • µ PD78P078YKL-T

Remark xxx indicates ROM code suffix.

Please refer to “Quality Grades on NEC Semiconductor Devices”(C11531E) published by NEC Corporation to know the specification of quality grade on the devices and its recommended applications.

Page 52 of the NEC PD78076Y user manual — 2.5 Pin Configuration (Top View)
Page 52 · click to enlarge
Page 52

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

2.5 Pin Configuration (Top View)

(1) Normal operating mode

100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm)

µPD78076YGC-xxx-8EUNote, 78078YGC-xxx-8EUNote

µPD78P078YGC-8EUNote

Page 53 of the NEC PD78076Y user manual — P85/A5
Page 53 · click to enlarge
Page 53

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

P01/INTP1/TI01

P00/INTP0/TI00

NEC PD78076Y — P01/INTP1/TI01 diagram (page 53)
Fig. 7

99 98 97 96 95 94 93 92 90 89 8887 86 85 84 83 82 81 8079 78 77 76 91

P14/ANI4 P15/ANI5 P16/ANI6 P17/ANI7

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51

P122/RTP2 P121/RTP1 P120/RTP0 P96 P95 P94 P93 P92 P91 P90 P37 P36/BUZ P35/PCL P34/TI2 P33/TI1 P32/TO2 P31/TO1 P30/TO0 P103 P102 P101/TI6/TO6 P100/TI5/TO5 P67/ASTB P66/WAIT P65/WR

AV SS P130/ANO0 P131/ANO1

AVREF1 P70/SI2/RxD P71/SO2/TxD P72/SCK2/ASCK

V SS P20/SI1 P21/SO1 P22/SCK1

P23/STB P24/BUSY P25/SI0/SB0/SDA0 P26/SO0/SB1/SDA1

P27/SCK0/SCL

P80/A0 P81/A1 P82/A2 P83/A3 P84/A4

26 27 28 29 30 31 32 33 34 36 37 3839 40 41 42 43 44 45 4647 48 49 50 35

P85/A5

P86/A6

P87/A7

P40/AD0

P41/AD1

P42/AD2

P43/AD3

P44/AD4

P45/AD5

P46/AD6

P47/AD7

P50/A8

P51/A9

P52/A10

P53/A11

P54/A12

P55/A13

P56/A14

P57/A15

P64/RD

2. Connect AV DD pin to V DD .
3. Connect AV SS pin to V SS .

Remark Pin connection in parentheses is for the µPD78P078Y.

Page 54 of the NEC PD78076Y user manual — IC (V PP )
Page 54 · click to enlarge
Page 54

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

100-pin plastic QFP (14 x 20 mm)

100-pin ceramic WQFN (14 x 20 mm)

P101/TI6/TO6

P100/TI5/TO5

P67/ASTB

P36/BUZ

P35/PCL

P32/TO2

P31/TO1

P30/TO0

P34/TI2

P33/TI1

P103

P102

P96

P95

P94

P93

P92

P91

P90

P37

NEC PD78076Y — 100-pin plastic QFP (14 x 20 mm) diagram (page 54)
Fig. 8 · 100-pin plastic QFP (14 x 20 mm)

82 83 84 86 88 89 91 92 93 94 96 98 100 87 90 97 99 81 95 85 P120/RTP0 P121/RTP1 P122/RTP2

P66/WAIT P65/WR P64/RD

P123/RTP3 P124/RTP4

P125/RTP5 P126/RTP6 P127/RTP7

6 7 8 9 10 11 12 13 14 15 16

75 74 73 72 71 70 69 68 67 66 65

P61 P60 P57/A15 P56/A14 VSS P55/A13 P54/A12 P53/A11 P52/A10 P51/A9 P50/A8

IC (V PP )

X2 X1 V DD XT2 XT1/P07

RESET P00/INTP0/TI00

P01/INTP1/TI01

P02/INTP2 P03/INTP3 P04/INTP4 P05/INTP5 P06/INTP6

AV DD AV REF0 P10/ANI0

P11/ANI1 P12/ANI2 P13/ANI3 P14/ANI4 P15/ANI5

49 48 47 45 43 42 40 39 38 37 35 33 31 44 41 34 32

2. Connect AV DD pin to V DD .
3. Connect AV SS pin to V SS .

Remark Pin connection in parentheses is for the µPD78P078Y.

µPD78076YGF-xxx-3BA · µPD78078YGF-xxx-3BA, 78P078YGF-3BA · µPD78P078YKL-T

Page 55 of the NEC PD78076Y user manual — Pin Identifications
Page 55 · click to enlarge
Page 55

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

Pin Identifications

A0 to A15Address Bus
P130, P131Port 13
AD0 to AD7Address/Data Bus
PCLProgrammable Clock
ANI0 to ANI7Analog Input
RDRead Strobe
ANO0, ANO1Analog Output
RESETReset
ASCKAsynchronous Serial Clock
RTP0 to RTP7Real-time Output Port
ASTBAddress Strobe
RxDReceive Data
AV DDAnalog Power Supply
SB0, SB1Serial Bus
AV REF0 , AV REF1Analog Reference Voltage
SCK0 to SCK2Serial Clock
AV SSAnalog Ground
SCLSerial Clock
BUSYBusy
SDA0, SDA1Serial Data
BUZBuzzer Clock
SI0 to SI2Serial Input
ICInternally Connected
SO0 to SO2Serial Output
INTP0 to INTP6Interrupt from Peripherals
STBStrobe
P00 to P07Port 0
TI00, TI01Timer Input
P10 to P17Port 1
TI1, TI2, TI5, TI6Timer Input
P20 to P27Port 2
TO0 to TO2, TO5, TO6Timer Output
P30 to P37Port 3
TxDTransmit Data
P40 to P47Port 4
V DDPower Supply
P50 to P57Port 5
V PPProgramming Power Supply
P60 to P67Port 6
V SSGround
P70 to P72Port 7
WAITWait
P80 to P87Port 8
WRWrite Strobe
P90 to P96Port 9
X1, X2Crystal (Main System Clock)
P100 to P103Port 10
XT1, XT2Crystal (Subsystem Clock)
P120 to P127Port 12
Page 56 of the NEC PD78076Y user manual — (L)
Page 56 · click to enlarge
Page 56

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

(2) PROM programming mode

100-pin plastic QFP (Fine pitch) (14 x 14 mm, resin thickness 1.45 mm)

100-pin plastic LQFP (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm)

NEC PD78076Y — (2) PROM programming mode diagram (page 56)
Fig. 9 · (2) PROM programming mode

77 78 79 80 82 83 84 85 86 88 89 91 92 93 94 95 96 98 100 81 87 90 97 99

75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

(L)

V SS

(L)

V DD

(L)

V SS

(L)

50 49 48 47 46 44 43 42 41 40 38 37 35 34 33 32 31 30 28 26 45 39 36 29 27

2. V SS : Connect to the ground.
3. RESET : Set to the low level.
4. Open : Leave open.

µPD78P078YGC-7EA · µPD78P078YGC-8EUNote

Page 57 of the NEC PD78076Y user manual — V SS
Page 57 · click to enlarge
Page 57

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

100-pin plastic QFP (14 x 20 mm)

100-pin ceramic WQFN

(L)

(L)

D7

D6

D5

D4

D3

D2

D1

D0

NEC PD78076Y — 100-pin plastic QFP (14 x 20 mm) diagram (page 57)
Fig. 10 · 100-pin plastic QFP (14 x 20 mm)

82 83 84 86 88 89 91 92 93 94 96 98 100 87 90 97 99 81 95 85

6 7 8 9 10 11 12 13 14 15 16

75 74 73 72 71 70 69 68 67 66 65

A15 A14 VSS A13 A12 A11 A10 A16 A8

49 48 47 45 43 42 40 39 38 37 35 33 31 44 41 34 32

V SS

V DD

V SS

(L)

(L)

(L)

(L)

2. V SS : Connect to the ground.
NEC PD78076Y — V SS diagram (page 57)
Fig. 11
A0 to A16Address Bus RESET : Reset
CEChip Enable V DD : Power Supply
D0 to D7Data Bus V PP : Programming Power Supply
PGMProgram

µPD78P078YGF-3BA · µPD78P078YKL-T

Page 58 of the NEC PD78076Y user manual — 2.6 78K/0 Series Expansion
Page 58 · click to enlarge
Page 58

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

2.6 78K/0 Series Expansion

The products in the 78K/0 Series are listed below. The names in boxes are subseries names.

The subseries whose name ends with Y support the I2C bus specifications.

Reduced EMI noise version of µPD78078

100-pin Added timers to µPD78054 and enhanced external interface

µPD78078 µPD78078Y

µPD78070A µPD78070AY

ROM-less version of µPD78078

100-pin Enhanced serial I/O of µPD78078Y and functions are defined.

80-pin Enhanced serial I/O of µPD78054, reduced EMI noise version

µPD780058 µPD780058YNote

Reduced EMI noise version of µPD78054

Added UART and D/A to µPD78014 and enhanced I/Os

Enhanced A/D of µPD780024

Enhanced serial I/O of µPD78018F

Reduced EMI noise version of µPD78018F

Low-voltage (1.8 V) version of µPD78014 and enhanced ROM/RAM size options

Added A/D and 16-bit timer to µPD78002

Added A/D to µPD78002

Basic subseries for control applications

Equipped with UART and operates at low-voltage (1.8 V)

Enhanced inverter control, timer, and SIO of µPD780964, expanded ROM and RAM

Enhanced A/D of µPD780924

Equipped with inverter control circuit and UART, reduced EMI noise version

FIP driving 78K/0 Series

Enhanced I/O and FIP C/D of µPD78044F, 53 display outputs

Enhanced I/O and FIP C/D of µPD78044H, 48 display outputs

Added N-ch open-drain I/O to µPD78044F, 34 display outputs

µPD78044F 80-pin Basic subseries for driving FIPs, 34 display outputs

Enhanced SIO of µPD78064, expanded ROM and RAM

Reduced EMI noise version of µPD78064

Basic subseries for driving LCDs, equipped with UART

Reduced EMI noise version of µPD78098

µPD78098 80-pin Added IEBus controller to µPD78054

Equipped with controller/driver for driving automobile meters µPD780973 80-pin

Show 59 more labels / short text on this page
Mass-produced products · Products under development · Control · 100-pin · µPD78075B · 100-pin · µPD780018AY · 80-pin · µPD78058F · µPD78058FY · 80-pin · µPD78054 · µPD78054Y · 64-pin · µPD780034 · µPD780034Y · 64-pin · µPD780024 · µPD780024Y · 64-pin · µPD78014H · 64-pin · µPD78018F · µPD78018FY · 64-pin · µPD78014 · µPD78014Y · 64-pin · µPD780001 · 64-pin · µPD78002 · µPD78002Y · 42-/44-pin · µPD78083 · Inverter control · µPD780988 64-pin · 64-pin · µPD780964 · 64-pin · µPD780924 · 100-pin · µPD780208 · 100-pin · µPD780228 · 80-pin · µPD78044H · LCD driving · 100-pin · µPD780308 · µPD780308Y · 100-pin · µPD78064B · 100-pin · µPD78064 · µPD78064Y · IEBus supported · 80-pin · µPD78098B · Meter control
Page 59 of the NEC PD78076Y user manual — 2.6 78K/0 Series Expansion
Page 59 · click to enlarge
Page 59

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

Major differences among Y subseries are tabulated below.

Function ROM Configuration of Serial Interface I/O VDD Subseries Capacity MIN.

Control µPD78078Y 48K to 60K 3-wire/2-wire/I2C : 1 ch 88 1.8 V 3-wire with automatic transmit/receive function : 1 ch µPD78070AY — 3-wire/UART : 1 ch 61 2.7 V

µPD780018AY 48K to 60K 3-wire with automatic transmit/receive function : 1 ch 88 Time division 3-wire : 1 ch I2C bus (supports multi-master) : 1 ch

µPD780058Y 24K to 60K 3-wire/2-wire/I2C : 1 ch 68 1.8 V 3-wire with automatic transmit/receive function : 1 ch 3-wire/time division UART : 1 ch

µPD78058FY 48K to 60K 3-wire/2-wire/I2C : 1 ch 69 2.7 V

µPD78054Y 16K to 60K 3-wire with automatic transmit/receive function : 1 ch 2.0 V

3-wire/UART1 ch

µPD780034Y 8K to 32K UART : 1 ch 51 1.8 V 3-wire : 1 ch µPD780024Y I2C bus (supports multi-master) : 1 ch

µPD78018FY 8K to 60K 3-wire/2-wire/I2C : 1 ch 53 3-wire with automatic transmit/receive function : 1 ch

µPD78014Y 8K to 32K 3-wire/2-wire/I2C : 1 ch 2.7 V 3-wire with automatic transmit/receive function : 1 ch

µPD78002Y 8K to 16K 3-wire/2-wire/SBI/I2C : 1 ch

LCD µPD780308Y 48K to 60K 3-wire/2-wire/I2C : 1 ch 57 2.0 V drive 3-wire/time division UART : 1 ch

3-wire1 ch

µPD78064Y 16K to 32K 3-wire/2-wire/I2C : 1 ch 3-wire/UART : 1 ch

Remark The functions except serial interface are common with subseries without Y.

Page 60 of the NEC PD78076Y user manual — TO1/P31
Page 60 · click to enlarge
Page 60

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

2.7 Block Diagram

TO0/P30 TI00/INTP0/P00 TI01/INTP1/P01

NEC PD78076Y — 2.7 Block Diagram diagram (page 60)
Fig. 12 · 2.7 Block Diagram

TO1/P31

TI1/P33

TO2/P32

TI2/P34

P100/TI5/TO5

P101/TI6/TO6

SI0/SB0/SDA0/P25 SO0/SB1/SDA1/P26

SCK0/SCL/P27

SI1/P20 SO1/P21 SCK1/P22

STB/P23 BUSY/P24

ANI7/P17

AV DD

AV SS AV REF0

ANO0/P130,

ANO1/P131

AV SS AV REF1

INTP6/P06

BUZ/P36

PCL/P35

Remarks 1. The internal ROM and RAM capacities depend on the product.

2. Pin connection in parentheses is for the µ PD78P078Y.

SI2/RxD/P70 SO2/TxD/P71 SCK2/ASCK/P72 · ANI0/P10 to · INTP0/P00 to

Page 61 of the NEC PD78076Y user manual — ROM
Page 61 · click to enlarge
Page 61

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

2.8 Outline of Function

µPD78076Y µPD78078Y µPD78P078Y

ROM

48 Kbytes 60 Kbytes 60 KbytesNote 1

High-speed RAM 1024 bytes

Buffer RAM 32 bytes

Expansion RAM 1024 bytes 1024 bytes

Memory space 64 Kbytes

General register 8 bits x 8 x 4 banks

Minimum instruction execution time

With main system clock selected 0.4 µs/0.8 µs/1.6 µs/3.2 µs/6.4 µs/12.8 µs (@ 5.0-MHz operation)

With subsystem clock selected 122 µs (@ 32.768-kHz operation)

Instruction set • 16-bit operation

  • Multiply/divide (8-bit x 8-bit, 16-bit/8-bit)
  • Bit manipulate (set, reset, test, and Boolean operation)
  • BCD adjust, etc.
I/O port Total88
  • CMOS input : 2
  • CMOS input/output : 78
  • N-ch open drain I/O : 8

A/D converter 8-bit resolution x 8 channels

D/A converter 8-bit resolution x 2 channels

Serial interface • 3-wire serial I/O/2-wire serial I/O/I2C bus mode selection : 1 channel possible

  • 3-wire serial I/O mode (maximum 32-byte on-chip automatic transmit/receive function) : 1 channel
  • 3-wire serial I/O/UART mode selection possible : 1 channel
Timer • 16-bit timer/event counter1 channel
  • 8-bit timer/event counter : 4 channels
  • Watch timer : 1 channel
  • Watchdog timer : 1 channel
Timer output 5 outputs(14-bit PWM output enable: 1, 8-bit PWM output enable: 2)

Clock output 19.5 kHz, 39.1 kHz, 78.1 kHz, 156 kHz, 313 kHz, 625 kHz, 1.25 MHz,

2.5 MHz, 5.0 MHz (@ 5.0-MHz operation with main system clock)

32.768 kHz (@ 32.768-kHz operation with subsystem clock)

Buzzer output 1.2 kHz, 2.4 kHz, 4.9 kHz, 9.8 kHz

(@ 5.0-MHz operation with main system clock)

(IMS).

2. The capacity of the internal expansion RAM can be changed using the internal expansion RAM size

switching register (IXS).

Show 4 more labels / short text on this page
Part Number · Item · Mask ROM PROM · Internal memory
Page 62 of the NEC PD78076Y user manual — 2.8 Outline of Function
Page 62 · click to enlarge
Page 62

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

Part Number µPD78076Y µPD78078Y µPD78P078Y

Vectored Maskable Internal15
interrupt External7
source Non-maskable Internal1
Software Internal1
Test input Internal1
External1

Power supply voltage VDD = 1.8 to 5.5 V

Operating ambient temperature TA = –40 to +85°C

Package • 100-pin plastic LQFPNote (Fine pitch) (14 x 14 mm, resin thickness 1.4 mm)

  • 100-pin plastic QFP (14 x 20 mm, resin thickness 2.7 mm)
  • 100-pin ceramic WQFN (14 x 20 mm) ( µ PD78P078Y only)

Item

Page 63 of the NEC PD78076Y user manual — Table 2-2. Differences between µ PD78078Y Subseries and µ PD78054Y Subseries
Page 63 · click to enlarge
Page 63

CHAPTER 2 OUTLINE (µPD78078Y SUBSERIES)

2.9 Mask Options

The mask ROM versions (µPD78076Y, 78078Y) provide pull-up register mask options which allow users to specify

whether to connect a pull-up register to a specific port pin when the user places an order for the device production.

Using this mask option when pull-up resistors are required reduces the number of components to add to the device,

resulting in board space saving.

The mask options provided in the µPD78078Y Subseries are shown in Table 2-1.

Table 2-1. Mask Options of Mask ROM Versions

Pin Names Mask Options

P60 to P63, P90 to P93 Pull-up resistor connection can be specified

in 1-bit units.

2.10 Differences with µ PD78054Y Subseries

The µPD78078Y Subseries is upward-compatible with the µPD78054Y Subseries. The differences between the

two subseries are shown in the table below. The functions and specifications other than those shown in this table

are common to these two series.

Table 2-2. Differences between µ PD78078Y Subseries and µ PD78054Y Subseries

Subseries µPD78054Y Subseries µPD78078Y Subseries

No. of I/O ports 69 88

8-bit timer/event counter 2 channnels 4 channels

External device Address bus separate function Address bus separate function expansion function is not provided. is provided. (P80/A0 to P87/A7)

Power supply voltage VDD = 2.0 to 6.0 V VDD = 1.8 to 5.5 V

Package 80-pin plastic QFP (14 x 14 mm) 100-pin plastic QFP (14 x 20 mm)

80-pin plastic WQFP (14 x 14 mm)* 100-pin plastic LQFP (14 x 14 mm)

*Only for PROM version 100-pin plastic WQFP (14 x 20 mm) *
*Only for PROM version

Item

Page 64 of the NEC PD78076Y user manual — [MEMO]
Page 64 · click to enlarge
Page 64

[MEMO]

Page 65 of the NEC PD78076Y user manual — P27 SCK0
Page 65 · click to enlarge
Page 65

CHAPTER 3 PIN FUNCTION ( µ PD78078 SUBSERIES)

3.1 Pin Function List

3.1.1 Normal operating mode pins

(1) Port pins (1/3)

Pin Name Input/Output Function After Reset Alternate Function

P00 Input Input only Input INTP0/TI00

P01 Input/output mode can be specified INTP1/TI01

P02 bit-wise. INTP2

P03 Input/ Port 0. If used as an input port, an on-chip INTP3

P04 output 8-bit input/output port. pull-up resistor can be connected INTP4

P05 by software. INTP5

P06 INTP6

P07Note 1 Input Input only Input XT1

P10 to P17 Port 1.

8-bit input/output port.

Input/output mode can be specified bit-wise. Input ANI0 to ANI7

If used as input port, an on-chip pull-up resistor can be connected by

softwareNote 2.

P20 SI1

P21 SO1

P22 Port 2. SCK1

P23 Input/ 8-bit input/output port. STB

P24 output Input/output mode can be specified bit-wise. BUSY

P25 If used as an input port, an on-chip pull-up resistor can be connected by SI0/SB0

P26 software. SO0/SB1

P27 SCK0

register (PCC) to 1 (do not use the feedback resistor internal to the subsystem clock oscillator).

2. When pins P10/ANI0 to P17/ANI7 are used as an analog input of the A/D converter, set port 1 in

the input mode. The on-chip pull-up resistor becomes automatically disabled.

Show 4 more labels / short text on this page
Input · Input/ · output · Input
Page 66 of the NEC PD78076Y user manual — P72 SCK2/ASCK
Page 66 · click to enlarge
Page 66

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

(1) Port pins (2/3)

Pin Name Input/Output Function After Reset Alternate Function

P30 TO0

P31 TO1

P32 Port 3. TO2

P33 Input/ 8-bit input/output port. TI1

P34 output Input/output mode can be specified bit-wise. TI2

P35 If used as an input port, an on-chip pull-up resistor can be connected by PCL

P36 software. BUZ

P37 —

Port 4.

8-bit input/output port.

Input/ Input/output mode can be specified in 8-bit units.

P40 to P47 Input AD0 to AD7

output If used as an input port, an on-chip pull-up resistor can be connected by

software.

Test input flag (KRIF) is set to 1 by falling edge detection.

Port 5.

8-bit input/output port.

LEDs can be driven directly.

Input A8 to A15 Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected

by software.

P61

N-ch open drain input/output port. On-chip pull-up resistor can be specified by mask option. (Mask ROM version only). LEDs can be driven directly.

P62 Port 6. —

P63 Input/ 8-bit input/output port.

P64 output Input/output mode can be If used as an input port, an on-chip Input RD

P65 specified bit-wise. pull-up resistor can be connected WR

P66 by software. WAIT

P67 ASTB

Port 7.

3-bit input/output port.

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected

P72 SCK2/ASCK

by software.

Port 8.

8-bit input/output port.

P80 to P87 Input A0 to A7

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected

by software.

Show 10 more labels / short text on this page
Input · Input/ · P50 to P57 · output · P70 SI2/RxD · Input/ · P71 Input SO2/TxD · output · Input/ · output
Page 67 of the NEC PD78076Y user manual — P102, P103 —
Page 67 · click to enlarge
Page 67

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

(1) Port pins (3/3)

Pin Name Input/Output Function After Reset Alternate Function

P90

N-ch open-drain input/output port. On-chip pull-up resistor can be specified by mask option. (Mask ROM version only). LEDs can be driven directly.

P91 Port 9.

P92 7-bit input/output port.

P93 Input/output mode can be Input —

P94 specified bit-wise. If used as an input port, an on-chip

P95 pull-up resistor can be connected

P96 by software.

Port 10.

P100 TI5/TO5

4-bit input/output port.

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected

P102, P103 —

by software.

Port 12.

8-bit input/output port.

P120 to P127 Input RTP0 to RTP7

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected

by software.

Port 13.

2-bit input/output port.

P130, P131 Input ANO0, ANO1

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected

by software.

Show 9 more labels / short text on this page
Input/ · output · Input/ · P101 Input TI6/TO6 · output · Input/ · output · Input/ · output
Page 68 of the NEC PD78076Y user manual — SCK2 P72/ASCK
Page 68 · click to enlarge
Page 68

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

(2) Non-port pins (1/2)

Pin Name Input/Output Function After Reset Alternate Function

INTP0 P00/TI00

INTP1 P01/TI01

INTP2 External interrupt request inputs with specifiable valid edges (rising edge, P02

INTP3 Input falling edge, both rising and falling edges). Input P03

INTP4 P04

INTP5 P05

INTP6 P06

SI0 P25/SB0

SI1 Input Serial interface serial data input Input P20

SO0 P26/SB1

SO1 Output Serial interface serial data output Input P21

Serial interface serial data input/output Input

SCK0 P27

SCK1 Serial interface serial clock input/output Input P22

SCK2 P72/ASCK

STB Output Serial interface automatic transmit/receive strobe output Input P23

BUSY Input Serial interface automatic transmit/receive busy input Input P24

RxD Input Asynchronous serial interface serial data input Input P70/SI2

TxD Output Asynchronous serial interface serial data output Input P71/SO2

ASCK Input Asynchronous serial interface serial clock input Input P72/SCK2

TI00 External count clock input to 16-bit timer (TM0) P00/INTP0

TI01 Capture trigger signal input to capture register (CR00) P01/INTP1

TI1 External count clock input to 8-bit timer (TM1) P33

TI2 External count clock input to 8-bit timer (TM2) P34

TI5 External count clock input to 8-bit timer (TM5) P100/TO5

TI6 External count clock input to 8-bit timer (TM6) P101/TO6

TO0 16-bit timer (TM0) output (also used for 14-bit PWM output) P30

TO1 8-bit timer (TM1) output P31

TO2 Output 8-bit timer (TM2) output Input P32

TO5 8-bit timer (TM5) output (also used for 8-bit PWM output) P100/TI5

TO6 8-bit timer (TM6) output (also used for 8-bit PWM output) P101/TI6

PCL Output Clock output (for main system clock and subsystem clock trimming) Input P35

BUZ Output Buzzer output Input P36

RTP0 to RTP7 Output Real-time output port outputting data in synchronization with trigger Input P120 to P127

Show 7 more labels / short text on this page
SI2 P70/RxD · SO2 P71/TxD · SB0 Input/ P25/SI0 · SB1 output P26/SO0 · Input/ · output · Input Input
Page 69 of the NEC PD78076Y user manual — V PP — — —
Page 69 · click to enlarge
Page 69

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

(2) Non-port pins (2/2)

Pin Name Input/Output Function After Reset Alternate Function

AD0 to AD7 Input/Output Low-order address/data bus when expanding external memory Input P40 to P47

A0 to A7 Output Low-order address bus when expanding external memory Input P80 to P87

A8 to A15 Output High-order address bus when expanding external memory Input P50 to P57

RD Strobe signal output for read operation from external memory P64

WR Strobe signal output for write operation to external memory P65

WAIT Input Wait insertion when accessing external memory Input P66

ASTB Output Input P67

Strobe output externally latching address information output to ports 4,

5 to access external memory

ANI0 to ANI7 Input A/D converter analog input Input P10 to P17

ANO0, ANO1 Output D/A converter analog output Input P130, P131

AVREF0 Input A/D converter reference voltage input — —

AVREF1 Input D/A converter reference voltage input — —

AVDD — A/D converter analog power supply. Connect to VDD. — —

AVSS — A/D converter, D/A converter ground potential. Connect to VSS. — —

RESET Input System reset input — —

X1 Input — —

Crystal connection for main system clock oscillation

X2 — — —

XT1 Input Input P07

Crystal connection for subsystem clock oscillation

XT2 — — —

VDD — Positive power supply — —

High-voltage application for program write/verify. Connect directly to

V PP — — —

VSS in normal operating mode.

VSS — Ground potential — —

IC — Internally connected. Connect directly to VSS. — —

3.1.2 PROM programming mode pins (µPD78P078 only)

Pin Name Input/Output Function

PROM programming mode setting.

RESET Input When +5 V or +12.5 V is applied to the VPP pin or a low level voltage is applied to the RESET pin,

the PROM programming mode is set.

VPP Input High-voltage application for PROM programming mode setting and program write/verify.

A0 to A16 Input Address bus

D0 to D7 Input/output Data bus

CE Input PROM enable input/program pulse input

OE Input Read strobe input to PROM

PGM Input Program/program inhibit input in PROM programming mode

VDD — Positive power supply

VSS — Ground potential

Output Input

Page 70 of the NEC PD78076Y user manual — (2) Control mode
Page 70 · click to enlarge
Page 70

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

3.2 Description of Pin Functions

3.2.1 P00 to P07 (Port 0)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as an external interrupt

request input, an external count clock input to the timer, a capture trigger signal input, and crystal connection for

subsystem oscillation.

The following operating modes can be specified bit-wise.

(1) Port mode

P00 and P07 function as input-only ports and P01 to P06 function as input/output ports.

P01 to P06 can be specified for input or output ports bit-wise with a port mode register 0 (PM0). When they are

used as input ports, on-chip pull-up resistors can be connected to them by defining the pull-up resistor option

register L (PUOL).

(2) Control mode

In this mode, these ports function as an external interrupt request input, an external count clock input to

the timer, and crystal connection for subsystem clock oscillation.

(a) INTP0 to INTP6

INTP0 to INTP6 are external interrupt request input pins which can specify valid edges (rising edge,

falling edge, and both rising and falling edges). INTP0 or INTP1 becomes a 16-bit timer/event counter

capture trigger signal input pin with a valid edge input.

(b) TI00

Pin for external count clock input to 16-bit timer/event counter

(c) TI01

Pin for capture trigger signal to capture register (CR00) of 16-bit timer/event counter

(d) XT1

Crystal connect pin for subsystem clock oscillation

3.2.2 P10 to P17 (Port 1)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as an A/D converter analog

input.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports.

They can be specified bit-wise as input or output ports with a port mode register 1 (PM1). If used as input

ports, on-chip pull-up resistors can be connected to them by defining the pull-up resistor option register L

(PUOL).

(2) Control mode

These ports function as A/D converter analog input pins (ANI0 to ANI7). The pull-up resistor is automatically

disabled when the pins are specified for analog input.

Page 71 of the NEC PD78076Y user manual — Operation Mode Register 0 Format and Figure 19-3. Serial Operation Mode Register
Page 71 · click to enlarge
Page 71

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

3.2.3 P20 to P27 (Port 2)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as data input/output to/

from the serial interface, clock input/output, automatic transmit/receive busy input, and strobe output functions.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 2 (PM2). When they are used as input ports, on-chip pull-up resistors can be connected

to them by defining the pull-up resistor option register L (PUOL).

(2) Control mode

These ports function as serial interface data input/output, clock input/output, automatic transmit/receive busy

input, and strobe output functions.

(a) SI0, SI1, SO0, SO1

Serial interface serial data input/output pins

(b) SCK0 and SCK1

Serial interface serial clock input/output pins

(c) SB0 and SB1

NEC standard serial bus interface input/output pins

(d) BUSY

Serial interface automatic transmit/receive busy input pins

(e) STB

Serial interface automatic transmit/receive strobe output pins

according to the function the user requires. For the setting, refer to Figure 17-4. Serial

Operation Mode Register 0 Format and Figure 19-3. Serial Operation Mode Register

1 Format.

Page 72 of the NEC PD78076Y user manual — (2) Control mode
Page 72 · click to enlarge
Page 72

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

3.2.4 P30 to P37 (Port 3)

These are 8-bit input/output ports. Beside serving as input/output ports, they function as timer input/output, clock

output and buzzer output.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 3 (PM3). When they are used as input ports, on-chip pull-up resistors can be connected

by defining the pull-up resistor option register L (PUOL).

(2) Control mode

These ports function as timer input/output, clock output, and buzzer output.

(a) TI1 and TI2

Pin for external count clock input to the 8-bit timer/event counter.

(b) TO0 to TO2

Timer output pins.

(c) PCL

Clock output pin.

(d) BUZ

Buzzer output pin.

3.2.5 P40 to P47 (Port 4)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as an address/data bus.

The test input flag (KRIF) can be set to 1 by detecting a falling edge.

The following operating mode can be specified in 8-bit units.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified in 8-bit units for input or output ports

by using the memory expansion mode register (MM). When they are used as input ports, on-chip pull-up

resistors can be connected to them by defining the pull-up resistor option register L (PUOL).

(2) Control mode

These ports function as low-order address/data bus pins (AD0 to AD7) in external memory expansion mode.

When pins are used as an address/data bus, the on-chip pull-up resistor is automatically disabled.

Page 73 of the NEC PD78076Y user manual — (2) Control mode
Page 73 · click to enlarge
Page 73

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

3.2.6 P50 to P57 (Port 5)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as an address bus.

Port 5 can drive LEDs directly.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified bit-wise as input/output ports with

port mode register 5 (PM5). When they are used as input ports, on-chip pull-up resistors can be connected

by defining the pull-up resistor option register L (PUOL).

(2) Control mode

These ports function as high-order address bus pins (A8 to A15) in external memory expansion mode. When

pins are used as an address bus, the on-chip pull-up resistor is automatically disabled.

3.2.7 P60 to P67 (Port 6)

These are 8-bit input/output ports. Besides serving as input/output ports, they are used for control in external

memory expansion mode. P60 to P63 can drive LEDs directly.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 6 (PM6).

P60 to P63 are N-ch open-drain outputs. Mask ROM version can contain pull-up resistors with the mask

option.

When P64 to P67 are used as input ports, on-chip pull-up resistors can be connected by defining the pull-

up resistor option register L (PUOL).

(2) Control mode

These ports function as control signal output pins (RD, WR, WAIT, ASTB) in external memory expansion

mode. When a pin is used as a control signal output, the on-chip pull-up resistor is automatically disabled.

an input/output port.

Page 74 of the NEC PD78076Y user manual — (2) Control mode
Page 74 · click to enlarge
Page 74

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

3.2.8 P70 to P72 (Port 7)

This is a 3-bit input/output port. In addition to its use as an input/output port, it also has serial interface data input/

output and clock input/output functions.

The following operating modes can be specified bit-wise.

(1) Port mode

Port 7 functions as a 3-bit input/output port. Bit-wise specification as an input port or output port is possible

by means of port mode register 7 (PM7). When used as input ports, on-chip pull-up resistors can be

connected by defining the pull-up resistor option register L (PUOL).

(2) Control mode

Port 7 functions as serial interface data input/output and clock input/output.

(a) SI2, SO2

Serial interface serial data input/output pins

(b) SCK2

Serial interface serial clock input/output pin.

(c) RxD, TxD

Asynchronous serial interface serial data input/output pins.

(d) ASCK

Asynchronous serial interface serial clock input/output pin.

to the function the user requires.

For the setting, refer to the operation mode setting list in Table 20-2. Serial Interface

Channel 2.

3.2.9 P80 to P87 (Port 8)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as an address bus.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 8 (PM8). When they are used as input ports, on-chip pull-up resistors can be connected

by defining the pull-up resistor option register H (PUOH).

(2) Control mode

These ports function as lower address bus pins (A0 to A7) in external memory expansion mode. When a

pin is used as an address bus, the on-chip pull-up resistor is automatically not used.

Page 75 of the NEC PD78076Y user manual — (2) Control mode
Page 75 · click to enlarge
Page 75

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

3.2.10 P90 to P96 (Port 9)

These are 7-bit input/output ports.

P90 to P93 can drive LEDs directly.

They can be specified bit-wise as input or output ports with port mode register 9 (PM9).

P90 to P93 are N-ch open-drain pins. Mask ROM version product can contain pull-up resistors with the mask option.

When P94 to P96 are used as input ports, on-chip pull-up resistors can be connected by defining the pull-up resistor

option register H (PUOH).

3.2.11 P100 to P103 (Port 10)

These are 4-bit input/output ports. Besides serving as input/output ports, they function as a timer input/output.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 4-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 10 (PM10). When they are used as input ports, on-chip pull-up resistors can be connected

by defining the pull-up resistor option register H (PUOH).

(2) Control mode

These ports function as timer input/output.

(a) TI5 and TI6

Pins for external count clock input to 8-bit timer/event counter.

(b) TO5 to TO6

Pins for timer output.

3.2.12 P120 to P127 (Port 12)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as a real-time output port.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 12 (PM12). When they are used as input ports, on-chip pull-up resistors can be connected

by defining the pull-up resistor option register H (PUOH).

(2) Control mode

These ports function as real-time output ports (RTP0 to RTP7) outputting data in synchronization with a

trigger.

Page 76 of the NEC PD78076Y user manual — 3.2.20 XT1 and XT2
Page 76 · click to enlarge
Page 76

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

3.2.13 P130 and P131 (Port 13)

These are 2-bit input/output ports. Besides serving as input/output ports, they are used for D/A converter analog

output.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 2-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 13 (PM13). When they are used as input ports, on-chip pull-up resistors can be connected

by defining the pull-up resistor option register H (PUOH).

(2) Control mode

These ports allow D/A converter analog output (ANO0 and ANO1).

that are not used as analog outputs must be set as follows:

  • Set PM13x bit of the port mode register 13 (PM13) to 1 (input mode) and connect the pin

to VSS.

  • Set PM13x bit of the port mode register 13 (PM13) to 0 (output mode) and the output latch

to 0, to output low level from the pin.

3.2.14 AV REF0

A/D converter reference voltage input pin.

When A/D converter is not used, connect this pin to VSS.

3.2.15 AV REF1

D/A converter reference voltage input pin.

When D/A converter is not used, connect this pin to VDD.

3.2.16 AV DD

Analog power supply pin of A/D converter. Always use the same voltage as that of the V DD pin even when A/D

converter is not used.

3.2.17 AV SS

This is a ground voltage pin of A/D converter and D/A converter. Always use the same voltage as that of the VSS

pin even when A/D converter or D/A converter is not used.

3.2.18 RESET

This is a low-level active system reset input pin.

3.2.19 X1 and X2

Crystal resonator connect pins for main system clock oscillation. For external clock supply, input it to X1 and its

inverted signal to X2.

3.2.20 XT1 and XT2

Crystal resonator connect pins for subsystem clock oscillation.

For external clock supply, input it to XT1 and its inverted signal to XT2.

Page 77 of the NEC PD78076Y user manual — V SS IC
Page 77 · click to enlarge
Page 77

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

3.2.21 V DD

Positive power supply pin

3.2.22 V SS

3.2.23 V PP ( µ PD78P078 only)

High-voltage apply pin for PROM programming mode setting and program write/verify. Connect directly to VSS

in normal operating mode.

3.2.24 IC (Mask ROM version only)

The IC (Internally Connected) pin is provided to set the test mode to check the µPD78078 at delivery. Connect

it directly to the VSS with the shortest possible wire in the normal operating mode.

When a voltage difference is produced between the IC pin and VSS pin because the wiring between those two pins

is too long or an external noise is input to the IC pin, the user’s program may not run normally.

  • Connect IC pins to V SS pins directly .

V SS IC

As short as possible

Ground potential pin

Page 78 of the NEC PD78076Y user manual — P21/SO1 5-A
Page 78 · click to enlarge
Page 78

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

3.3 Input/output Circuits and Recommended Connection of Unused Pins

Table 2-1 shows the input/output circuit types of pins and the recommended conditions for unused pins.

Refer to Figure 3-1 for the configuration of the input/output circuit of each type.

Table 3-1. Pin Input/Output Circuit Types (1/2)

Pin Name Input/Output Input/Output Recommended Connection of Unused Pins Circuit Type

P00/INTP0/TI00 2 Input Connect to VSS.

P01/INTP1/TI01 8-A Input/Output Connect independently via a resistor

P02/INTP2 to VSS.

P03/INTP3

P04/INTP4

P05/INTP5

P06/INTP6

P07/XT1 16 Input Connect to VDD.

P10/ANI0 to P17/ANI7 11 Input/Output Connect independently via a

P20/SI1 8-A resistor to VDD or VSS.

P21/SO1 5-A

P22/SCK1 8-A

P23/STB 5-A

P24/BUSY 8-A

P25/SI0/SB0 10-A

P26/SO0/SB1

P27/SCK0

P30/TO0 5-A

P31/TO1

P32/TO2

P33/TI1 8-A

P34/TI2

P35/PCL 5-A

P36/BUZ

P37

P40/AD0 to P47/AD7 5-E Input/Output Connect independently via a resistor

to VDD.

Page 79 of the NEC PD78076Y user manual — AV DD
Page 79 · click to enlarge
Page 79

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

Table 3-1. Pin Input/Output Circuit Types (2/2)

Pin Name Input/Output Input/Output Recommended Connection of Unused Pins Circuit Type

P50/A8 to P57/A15 5-A Input/output Connect independently via a resistor to VDD or VSS.

P60 to P63 (Mask ROM version) 13-B Input/output Connect independently via a resistor

P60 to P63 (µPD78P078) 13-D to VDD.

P64/RD 5-A Input/output Connect independently via a resistor

P65/WR to VDD or VSS.

P66/WAIT

P67/ASTB

P72/SCK2/ASCK 8-A

P80/A0 to P87/A7 5-A

P90 to P93 (Mask ROM version) 13-B Input/output Connect independently via a resistor

P90 to P93 (µPD78P078) 13-D to VDD.

P94 to P96 5-A Input/output Connect independently via a resistor

P100/TI5/TO5 8-A to VDD or VSS.

P101/TI6/TO6

P102, P103 5-A

P120/RTP0 to P127/RTP7 5-A

P130/ANO0, P131/ANO1 12-A Input/output Connect independently via a resistor to VSS.

RESET 2 Input —

XT2 16 — Open

AVREF0 — Connect to VSS.

AVREF1 Connect to VDD.

AV DD

AVSS Connect to VSS.

IC (Mask ROM version) Connect directly to VSS.

VPP (µPD78P078)

P70/SI2/RxD 8-A · P71/SO2/TxD 5-A

Page 80 of the NEC PD78076Y user manual — Figure 3-1. List of Pin Input/Output Circuits (1/2)
Page 80 · click to enlarge
Page 80

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

Figure 3-1. List of Pin Input/Output Circuits (1/2)

NEC PD78076Y — Figure 3-1. List of Pin Input/Output Circuits (1/2) diagram (page 80)
Fig. 13 · Figure 3-1. List of Pin Input/Output Circuits (1/2)
Page 81 of the NEC PD78076Y user manual — Figure 3-1. List of Pin Input/Output Circuits (2/2)
Page 81 · click to enlarge
Page 81

CHAPTER 3 PIN FUNCTION (µPD78078 SUBSERIES)

Figure 3-1. List of Pin Input/Output Circuits (2/2)

NEC PD78076Y — Figure 3-1. List of Pin Input/Output Circuits (2/2) diagram (page 81)
Fig. 14 · Figure 3-1. List of Pin Input/Output Circuits (2/2)
Page 82 of the NEC PD78076Y user manual — [MEMO]
Page 82 · click to enlarge
Page 82

[MEMO]

Page 83 of the NEC PD78076Y user manual — P27 SCK0/SCL
Page 83 · click to enlarge
Page 83

CHAPTER 4 PIN FUNCTION ( µ PD78078Y SUBSERIES)

4.1 Pin Function List

4.1.1 Normal operating mode pins

(1) Port pins (1/3)

Pin Name Input/Output Function After Reset Alternate Function

P00 Input Input only Input INTP0/TI00

P01 Input/output mode can be specified INTP1/TI01

P02 bit-wise. INTP2

P03 Input/ Port 0. If used as an input port, an on-chip INTP3

P04 output 8-bit input/output port. pull-up resistor can be connected INTP4

P05 by software. INTP5

P06 INTP6

P07Note 1 Input Input only Input XT1

P10 to P17 Port 1.

8-bit input/output port.

Input/output mode can be specified bit-wise. Input ANI0 to ANI7

If used as input port, an on-chip pull-up resistor can be connected by

softwareNote 2.

P20 SI1

P21 SO1

P22 Port 2. SCK1

P23 Input/ 8-bit input/output port. STB

P24 output Input/output mode can be specified bit-wise. BUSY

P25 If used as an input port, an on-chip pull-up resistor can be connected by SI0/SB0/SDA0

P26 software. SO0/SB1/SDA1

P27 SCK0/SCL

register (PCC) to 1 (do not use the feedback resistor internal to the subsystem clock oscillator).

2. When pins P10/ANI0 to P17/ANI7 are used as an analog input of the A/D converter, set port 1 in

the input mode. The on-chip pull-up resistor becomes automatically disabled.

Show 4 more labels / short text on this page
Input · Input/ · output · Input
Page 84 of the NEC PD78076Y user manual — P72 SCK2/ASCK
Page 84 · click to enlarge
Page 84

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

(1) Port pins (2/3)

Pin Name Input/Output Function After Reset Alternate Function

P30 TO0

P31 TO1

P32 Port 3. TO2

P33 Input/ 8-bit input/output port. TI1

P34 output Input/output mode can be specified bit-wise. TI2

P35 If used as an input port, an on-chip pull-up resistor can be connected by PCL

P36 software. BUZ

P37 —

Port 4.

8-bit input/output port.

Input/ Input/output mode can be specified in 8-bit units.

P40 to P47 Input AD0 to AD7

output If used as an input port, an on-chip pull-up resistor can be connected by

software.

Test input flag (KRIF) is set to 1 by falling edge detection.

Port 5.

8-bit input/output port.

LEDs can be driven directly.

Input A8 to A15 Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected

by software.

N-ch open drain input/output port. On-chip pull-up resistor can be specified by mask option. (Mask ROM version only). LEDs can be driven directly.

P61

P62 Port 6. —

P63 Input/ 8-bit input/output port.

P64 output Input/output mode can be If used as an input port, an on-chip Input RD

P65 specified bit-wise. pull-up resistor can be connected WR

P66 by software. WAIT

P67 ASTB

Port 7.

3-bit input/output port.

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected

P72 SCK2/ASCK

by software.

Port 8.

8-bit input/output port.

P80 to P87 Input A0 to A7

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected

by software.

Show 10 more labels / short text on this page
Input · Input/ · P50 to P57 · output · P70 SI2/RxD · Input/ · P71 Input SO2/TxD · output · Input/ · output
Page 85 of the NEC PD78076Y user manual — P102, P103 —
Page 85 · click to enlarge
Page 85

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

(1) Port pins (3/3)

Pin Name Input/Output Function After Reset Alternate Function

P90

N-ch open-drain input/output port. On-chip pull-up resistor can be specified by mask option. (Mask ROM version only). LEDs can be driven directly.

P91 Port 9.

P92 7-bit input/output port.

P93 Input/output mode can be Input —

P94 specified bit-wise. If used as an input port, an on-chip

P95 pull-up resistor can be connected

P96 by software.

Port 10.

P100 TI5/TO5

4-bit input/output port.

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected

P102, P103 —

by software.

Port 12.

8-bit input/output port.

P120 to P127 Input RTP0 to RTP7

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected

by software.

Port 13.

2-bit input/output port.

P130 to P131 Input ANO0 to ANO1

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected

by software.

Show 9 more labels / short text on this page
Input/ · output · Input/ · P101 Input TI6/TO6 · output · Input/ · output · Input/ · output
Page 86 of the NEC PD78076Y user manual — SCK2 P72/ASCK
Page 86 · click to enlarge
Page 86

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

(2) Non-port pins (1/2)

Pin Name Input/Output Function After Reset Alternate Function

INTP0 P00/TI00

INTP1 P01/TI01

INTP2 External interrupt request inputs with specifiable valid edges (rising edge, P02

INTP3 Input falling edge, both rising and falling edges). Input P03

INTP4 P04

INTP5 P05

INTP6 P06

SI0 P25/SB0/SDA0

SI1 Input Serial interface serial data input Input P20

SO0 P26/SB1/SDA1

SO1 Output Serial interface serial data output Input P21

SB0 P25/SI0/SDA0

Serial interface serial data input/output Input

SDA1 P26/SO0/SB1

SCK0 P27/SCL

SCK1 P22

Serial interface serial clock input/output Input

SCK2 P72/ASCK

SCL P27/SCK0

STB Output Serial interface automatic transmit/receive strobe output Input P23

BUSY Input Serial interface automatic transmit/receive busy input Input P24

RxD Input Asynchronous serial interface serial data input Input P70/SI2

TxD Output Asynchronous serial interface serial data output Input P71/SO2

ASCK Input Asynchronous serial interface serial clock input Input P72/SCK2

TI00 External count clock input to 16-bit timer (TM0) P00/INTP0

TI01 Capture trigger signal input to capture register (CR00) P01/INTP1

TI1 External count clock input to 8-bit timer (TM1) P33

TI2 External count clock input to 8-bit timer (TM2) P34

TI5 External count clock input to 8-bit timer (TM5) P100/TO5

TI6 External count clock input to 8-bit timer (TM6) P101/TO6

TO0 16-bit timer (TM0) output (also used for 14-bit PWM output) P30

TO1 8-bit timer (TM1) output P31

TO2 Output 8-bit timer (TM2) output Input P32

TO5 8-bit timer (TM5) output (also used for 8-bit PWM output) P100/TI5

TO6 8-bit timer (TM6) output (also used for 8-bit PWM output) P101/TI6

PCL Output Clock output (for main system clock and subsystem clock trimming) Input P35

BUZ Output Buzzer output Input P36

RTP0 to RTP7 Output Real-time output port outputting data in synchronization with trigger Input P120 to P127

Show 7 more labels / short text on this page
SI2 P70/RxD · SO2 P71/TxD · SB1 Input/ P26/SO0/SDA1 · SDA0 output P25/SI0/SB0 · Input/ · output · Input Input
Page 87 of the NEC PD78076Y user manual — V PP — — —
Page 87 · click to enlarge
Page 87

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

(2) Non-port pins (2/2)

Pin Name Input/Output Function After Reset Alternate Function

AD0 to AD7 Input/Output Low-order address/data bus when expanding external memory Input P40 to P47

A0 to A7 Output Low-order address bus when expanding external memory Input P80 to P87

A8 to A15 Output High-order address bus when expanding external memory Input P50 to P57

RD Strobe signal output for read operation from external memory P64

WR Strobe signal output for write operation to external memory P65

WAIT Input Wait insertion when accessing external memory Input P66

ASTB Output Input P67

Strobe output externally latching address information output to ports 4,

5 to access external memory

ANI0 to ANI7 Input A/D converter analog input Input P10 to P17

ANO0, ANO1 Output D/A converter analog output Input P130, P131

AVREF0 Input A/D converter reference voltage input — —

AVREF1 Input D/A converter reference voltage input — —

AVDD — A/D converter analog power supply. Connect to VDD. — —

AVSS — A/D converter, D/A converter ground potential. Connect to VSS. — —

RESET Input System reset input — —

X1 Input — —

Crystal connection for main system clock oscillation

X2 — — —

XT1 Input Input P07

Crystal connection for subsystem clock oscillation

XT2 — — —

VDD — Positive power supply — —

High-voltage application for program write/verify. Connect directly to

V PP — — —

VSS in normal operating mode.

VSS — Ground potential — —

IC — Internally connected. Connect directly to VSS. — —

4.1.2 PROM programming mode pins (µPD78P078Y only)

Pin Name Input/Output Function

PROM programming mode setting.

RESET Input When +5 V or +12.5 V is applied to the VPP pin or a low level voltage is applied to the RESET pin,

the PROM programming mode is set.

VPP Input High-voltage application for PROM programming mode setting and program write/verify.

A0 to A16 Input Address bus

D0 to D7 Input/output Data bus

CE Input PROM enable input/program pulse input

OE Input Read strobe input to PROM

PGM Input Program/program inhibit input in PROM programming mode

VDD — Positive power supply

VSS — Ground potential

Output Input

Page 88 of the NEC PD78076Y user manual — (2) Control mode
Page 88 · click to enlarge
Page 88

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

4.2 Description of Pin Functions

4.2.1 P00 to P07 (Port 0)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as an external interrupt

request input, an external count clock input to the timer, a capture trigger signal input, and crystal connection for

subsystem oscillation.

The following operating modes can be specified bit-wise.

(1) Port mode

P00 and P07 function as input-only ports and P01 to P06 function as input/output ports.

P01 to P06 can be specified for input or output ports bit-wise with a port mode register 0 (PM0). When they are

used as input ports, on-chip pull-up resistors can be connected to them by defining the pull-up resistor option

register L (PUOL).

(2) Control mode

In this mode, these ports function as an external interrupt request input, an external count clock input to

the timer, and crystal connection for subsystem clock oscillation.

(a) INTP0 to INTP6

INTP0 to INTP6 are external interrupt request input pins which can specify valid edges (rising edge,

falling edge, and both rising and falling edges). INTP0 or INTP1 becomes a 16-bit timer/event counter

capture trigger signal input pin with a valid edge input.

(b) TI00

Pin for external count clock input to 16-bit timer/event counter

(c) TI01

Pin for capture trigger signal to capture register (CR00) of 16-bit timer/event counter

(d) XT1

Crystal connect pin for subsystem clock oscillation

4.2.2 P10 to P17 (Port 1)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as an A/D converter analog

input.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports.

They can be specified bit-wise as input or output ports with a port mode register 1 (PM1). If used as input

ports, on-chip pull-up resistors can be connected to these ports by defining the pull-up resistor option register

L (PUOL).

(2) Control mode

These ports function as A/D converter analog input pins (ANI0 to ANI7). The on-chip pull-up resistor is

automatically disabled when the pins specified for analog input.

Page 89 of the NEC PD78076Y user manual — (d) STB
Page 89 · click to enlarge
Page 89

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

4.2.3 P20 to P27 (Port 2)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as data input/output to/

from the serial interface, clock input/output, automatic transmit/receive busy input, and strobe output functions.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 2 (PM2). When they are used as input ports, on-chp pull-up resistors can be connected

to them by defining the pull-up resistor option register L (PUOL).

(2) Control mode

These ports function as serial interface data input/output, clock input/output, automatic transmit/receive busy

input, and strobe output functions.

(a) SI0, SI1, SO0, SO1, SB0, SB1, SDA0, SDA1

Serial interface serial data input/output pins

(b) SCK0, SCK1, SCL

Serial interface serial clock input/output pins

(c) BUSY

Serial interface automatic transmit/receive busy input pins

(d) STB

Serial interface automatic transmit/receive strobe output pins

according to the function the user requires. For the setting, refer to Figure 18-4. Serial

Operation Mode Register 0 Format and Figure 19-3. Serial Operation Mode Register 1

Format.

Page 90 of the NEC PD78076Y user manual — (2) Control mode
Page 90 · click to enlarge
Page 90

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

4.2.4 P30 to P37 (Port 3)

These are 8-bit input/output ports. Beside serving as input/output ports, they function as timer input/output, clock

output and buzzer output.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 3 (PM3). When they are used as input ports, on-chip pull-up resistors can be connected

by defining the pull-up resistor option register L (PUOL).

(2) Control mode

These ports function as timer input/output, clock output, and buzzer output.

(a) TI1 and TI2

Pin for external count clock input to the 8-bit timer/event counter.

(b) TO0 to TO2

Timer output pins.

(c) PCL

Clock output pin.

(d) BUZ

Buzzer output pin.

4.2.5 P40 to P47 (Port 4)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as an address/data bus.

The test input flag (KRIF) can be set to 1 by detecting a falling edge.

The following operating mode can be specified in 8-bit units.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified in 8-bit units for input or output ports

by using the memory expansion mode register (MM). When they are used as input ports, on-chip pull-up

resistors can be connected by defining the pull-up resistor option register L (PUOL).

(2) Control mode

These ports function as low-order address/data bus pins (AD0 to AD7) in external memory expansion mode.

When pins are used as an address/data bus, the on-chip pull-up resistor is automatically disabled.

Page 91 of the NEC PD78076Y user manual — (2) Control mode
Page 91 · click to enlarge
Page 91

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

4.2.6 P50 to P57 (Port 5)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as an address bus.

Port 5 can drive LEDs directly.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified bit-wise as input/output ports with

port mode register 5 (PM5). When they are used as input ports, on-chip pull-up resistors can be connected

by defining the pull-up resistor option register L (PUOL).

(2) Control mode

These ports function as high-order address bus pins (A8 to A15) in external memory expansion mode. When

pins are used as an address bus, the on-chip pull-up resistor is automatically disabled.

4.2.7 P60 to P67 (Port 6)

These are 8-bit input/output ports. Besides serving as input/output ports, they are used for control in external

memory expansion mode. P60 to P63 can drive LEDs directly.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 6 (PM6).

P60 to P63 are N-ch open-drain outputs. Mask ROM version can contain pull-up resistors with the mask

option.

When P64 to P67 are used as input ports, on-chip pull-up resistors can be connected by defining the pull-

up resistor option register L (PUOL).

(2) Control mode

These ports function as control signal output pins (RD, WR, WAIT, ASTB) in external memory expansion

mode. When a pin is used as a control signal output, the on-chip pull-up resistor is automatically disabled.

an input/output port.

Page 92 of the NEC PD78076Y user manual — (2) Control mode
Page 92 · click to enlarge
Page 92

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

4.2.8 P70 to P72 (Port 7)

This is a 3-bit input/output port. In addition to its use as an input/output port, it also has serial interface data input/

output and clock input/output functions.

The following operating modes can be specified bit-wise.

(1) Port mode

Port 7 functions as a 3-bit input/output port. Bit-wise specification as an input port or output port is possible

by means of port mode register 7 (PM7). When used as input ports, on-chip pull-up resistors can be

connected by defining the pull-up resistor option register L (PUOL).

(2) Control mode

Port 7 functions as serial interface data input/output and clock input/output.

(a) SI2, SO2

Serial interface serial data input/output pins

(b) SCK2

Serial interface serial clock input/output pin.

(c) RxD, TxD

Asynchronous serial interface serial data input/output pins.

(d) ASCK

Asynchronous serial interface serial clock input/output pin.

to the function the user requires.

For the setting, refer to the operation mode setting list in Table 20-2. Serial Interface

Channel 2.

4.2.9 P80 to P87 (Port 8)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as an address bus.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 8 (PM8). When they are used as input ports,on-chip pull-up resistors can be connected

by defining the pull-up resistor option register H (PUOH).

(2) Control mode

These ports function as lower address bus pins (A0 to A7) in external memory expansion mode. When a

pin is used as an address bus, the on-chip pull-up resistor is automatically not used.

Page 93 of the NEC PD78076Y user manual — (2) Control mode
Page 93 · click to enlarge
Page 93

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

4.2.10 P90 to P96 (Port 9)

These are 7-bit input/output ports.

P90 to P93 can drive LEDs directly.

They can be specified bit-wise as input or output ports with port mode register 9 (PM9).

P90 to P93 are N-ch open-drain pins. Mask ROM version product can contain pull-up resistors with the mask option.

When P94 to P96 are used as input ports, on-chip pull-up resistors can be connected by defining the pull-up resistor

option register H (PUOH).

4.2.11 P100 to P103 (Port 10)

These are 4-bit input/output ports. Besides serving as input/output ports, they function as a timer input/output.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 4-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 10 (PM10). When they are used as input ports, on-chip pull-up resistors can be connected

by defining the pull-up resistor option register H (PUOH).

(2) Control mode

These ports function as timer input/output.

(a) TI5 and TI6

Pins for external clock input to 8-bit timer/event counter.

(b) TO5 to TO6

Pins for timer output.

4.2.12 P120 to P127 (Port 12)

These are 8-bit input/output ports. Besides serving as input/output ports, they function as a real-time output port.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 12 (PM12). When they are used as input ports, on-chip pull-up resistors can be connected

by defining the pull-up resistor option register H (PUOH).

(2) Control mode

These ports function as real-time output ports (RTP0 to RTP7) outputting data in synchronization with a

trigger.

Page 94 of the NEC PD78076Y user manual — 4.2.20 XT1 and XT2
Page 94 · click to enlarge
Page 94

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

4.2.13 P130 and P131 (Port 13)

These are 2-bit input/output ports. Besides serving as input/output ports, they are used for D/A converter analog

output.

The following operating modes can be specified bit-wise.

(1) Port mode

These ports function as 2-bit input/output ports. They can be specified bit-wise as input or output ports with

port mode register 13 (PM13). When they are used as input ports, on-chip pull-up resistors can be connected

by defining the pull-up resistor option register H (PUOH).

(2) Control mode

These ports allow D/A converter analog output (ANO0 and ANO1).

that are not used as analog outputs must be set as follows:

  • Set PM13x bit of the port mode register 13 (PM13) to 1 (input mode) and connect the pin

to VSS.

  • Set PM13x bit of the port mode register 13 (PM13) to 0 (output mode) and the output latch

to 0, to output low level from the pin.

4.2.14 AV REF0

A/D converter reference voltage input pin.

When A/D converter is not used, connect this pin to VSS.

4.2.15 AV REF1

D/A converter reference voltage input pin.

When D/A converter is not used, connect this pin to VDD.

4.2.16 AV DD

Analog power supply pin of A/D converter. Always use the same voltage as that of the V DD pin even when A/D

converter is not used.

4.2.17 AV SS

This is a ground voltage pin of A/D converter and D/A converter. Always use the same voltage as that of the VSS

pin even when A/D converter or D/A converter is not used.

4.2.18 RESET

This is a low-level active system reset input pin.

4.2.19 X1 and X2

Crystal resonator connect pins for main system clock oscillation. For external clock supply, input it to X1 and its

inverted signal to X2.

4.2.20 XT1 and XT2

Crystal resonator connect pins for subsystem clock oscillation.

For external clock supply, input it to XT1 and its inverted signal to XT2.

Page 95 of the NEC PD78076Y user manual — V SS IC
Page 95 · click to enlarge
Page 95

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

4.2.21 V DD

Positive power supply pin

4.2.22 V SS

4.2.23 V PP ( µ PD78P078Y only)

High-voltage apply pin for PROM programming mode setting and program write/verify. Connect directly to VSS

in normal operating mode.

4.2.24 IC (Mask ROM version only)

The IC (Internally Connected) pin is provided to set the test mode to check the µPD78078Y at delivery. Connect

it directly to the VSS with the shortest possible wire in the normal operating mode.

When a voltage difference is produced between the IC pin and VSS pin because the wiring between those two pins

is too long or an external noise is input to the IC pin, the user’s program may not run normally.

  • Connect IC pins to V SS pins directly .

V SS IC

As short as possible

Ground potential pin

Page 96 of the NEC PD78076Y user manual — P21/SO1 5-A
Page 96 · click to enlarge
Page 96

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

4.3 Input/output Circuits and Recommended Connection of Unused Pins

Table 4-1 shows the input/output circuit types of pins and the recommended conditions for unused pins.

Refer to Figure 4-1 for the configuration of the input/output circuit of each type.

Table 4-1. Pin Input/Output Circuit Types (1/2)

Pin Name Input/Output Input/Output Recommended Connection of Unused Pins Circuit Type

P00/INTP0/TI00 2 Input Connect to VSS.

P01/INTP1/TI01 8-A Input/Output Connect independently via a resistor

P02/INTP2 to VSS.

P03/INTP3

P04/INTP4

P05/INTP5

P06/INTP6

P07/XT1 16 Input Connect to VDD.

P10/ANI0 to P17/ANI7 11 Input/Output Connect independently via a

P20/SI1 8-A resistor to VDD or VSS.

P21/SO1 5-A

P22/SCK1 8-A

P23/STB 5-A

P24/BUSY 8-A

P25/SI0/SB0/SDA0 10-A

P26/SO0/SB1/SDA1

P27/SCK0/SCL

P30/TO0 5-A

P31/TO1

P32/TO2

P33/TI1 8-A

P34/TI2

P35/PCL 5-A

P36/BUZ

P37

P40/AD0 to P47/AD7 5-E Input/Output Connect independently via a resistor

to VDD.

Page 97 of the NEC PD78076Y user manual — AV DD
Page 97 · click to enlarge
Page 97

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

Table 4-1. Pin Input/Output Circuit Types (2/2)

Pin Name Input/Output Input/Output Recommended Connection of Unused Pins Circuit Type

P50/A8 to P57/A15 5-A Input/output Connect independently via a resistor to VDD or VSS.

P60 to P63 (Mask ROM version) 13-B Input/output Connect independently via a resistor

P60 to P63 (µPD78P078Y) 13-D to VDD.

P64/RD 5-A Input/output Connect independently via a resistor

P65/WR to VDD or VSS.

P66/WAIT

P67/ASTB

P72/SCK2/ASCK 8-A

P80/A0 to P87/A7 5-A

P90 to P93 (Mask ROM version) 13-B Input/output Connect independently via a resistor

P90 to P93 (µPD78P078Y) 13-D to VDD.

P94 to P96 5-A Input/output Connect independently via a resistor

P100/TI5/TO5 8-A to VDD or VSS.

P101/TI6/TO6

P102, P103 5-A

P120/RTP0 to P127/RTP7 5-A

P130/ANO0, P131/ANO1 12-A Input/output Connect independently via a resistor to VSS.

RESET 2 Input —

XT2 16 — Open

AVREF0 — Connect to VSS.

AVREF1 Connect to VDD.

AV DD

AVSS Connect to VSS.

IC (Mask ROM version) Connect directly to VSS.

VPP (µPD78P078Y)

P70/SI2/RxD 8-A · P71/SO2/TxD 5-A

Page 98 of the NEC PD78076Y user manual — Figure 4-1. List of Pin Input/Output Circuits (1/2)
Page 98 · click to enlarge
Page 98

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

Figure 4-1. List of Pin Input/Output Circuits (1/2)

NEC PD78076Y — Figure 4-1. List of Pin Input/Output Circuits (1/2) diagram (page 98)
Fig. 15 · Figure 4-1. List of Pin Input/Output Circuits (1/2)
Page 99 of the NEC PD78076Y user manual — Figure 4-1. List of Pin Input/Output Circuits (2/2)
Page 99 · click to enlarge
Page 99

CHAPTER 4 PIN FUNCTION (µPD78078Y SUBSERIES)

Figure 4-1. List of Pin Input/Output Circuits (2/2)

NEC PD78076Y — Figure 4-1. List of Pin Input/Output Circuits (2/2) diagram (page 99)
Fig. 16 · Figure 4-1. List of Pin Input/Output Circuits (2/2)
Page 100 of the NEC PD78076Y user manual — [MEMO]
Page 100 · click to enlarge
Page 100

[MEMO]

Page 101 of the NEC PD78076Y user manual — 0000H
Page 101 · click to enlarge
Page 101

CHAPTER 5 CPU ARCHITECTURE

5.1 Memory Spaces

The µPD78078 and 78078Y Subseries allow access to a memory space of 64 Kbytes. Figures 5-1 to 5-3 shows

memory maps.

Figure 5-1. Memory Map (µPD78076, 78076Y)

FFFFH

Special Function Registers (SFRs)

256 x 8 bits

FF00H FEFFH

FEE0H FEDFH

32 x 8 bits

1024 x 8 bits

FB00H FAFFH

FAE0H FADFH

BFFFH

Program Area Internal Buffer RAM

32 x 8 bits

FAC0H FABFH

1000H 0FFFH

F800H F7FFH

1024 x 8 bits F400H F3FFH

0800H 07FFH

13312 x 8 bits

0080H 007FH

C000H BFFFH

0040H 003FH

Internal ROM 49152 x 8 bits

0000H

0000H

Show 12 more labels / short text on this page
General Registers · Internal High-speed RAM · Reserved · Data memory space · Reserved · Internal Expansion RAM · CALLF Entry Area · Program Area · External Memory · Program memory space · CALLT Table Area · Vector Table Area
Page 102 of the NEC PD78076Y user manual — 0000H
Page 102 · click to enlarge
Page 102

CHAPTER 5 CPU ARCHITECTURE

Figure 5-2. Memory Map (µPD78078, 78078Y)

FFFFH

Special Function Registers (SFRs)

256 x 8 bits

FF00H FEFFH

32 x 8 bits

FEE0H FEDFH

1024 x 8 bits

FB00H FAFFH

FAE0H FADFH

EFFFH

Program Area Internal Buffer RAM

32 x 8 bits

FAC0H FABFH

1000H 0FFFH

F800H F7FFH

1024 x 8 bits F400H F3FFH

0800H 07FFH

0080H 007FH

F000H EFFFH

0040H 003FH

Internal ROM 61440 x 8 bits

0000H

0000H

can be used as external memory by setting the internal ROM size to less than 56 Kbytes by the

internal memory size switching register.

Show 12 more labels / short text on this page
General Registers · Internal High-speed RAM · Reserved · Data memory space · Reserved · Internal Expansion RAM · CALLF Entry Area · Program Area · ReservedNote · CALLT Table Area · Program memory space · Vector Table Area
Page 103 of the NEC PD78076Y user manual — 0000H
Page 103 · click to enlarge
Page 103

CHAPTER 5 CPU ARCHITECTURE

Figure 5-3. Memory Map (µPD78P078, µPD78P078Y)

FFFFH

Special Function Registers (SFRs)

256 x 8 bits

FF00H FEFFH

32 x 8 bits

FEE0H FEDFH

1024 x 8 bits

FB00H FAFFH

FAE0H FADFH

EFFFH

Program Area Internal Buffer RAM

32 x 8 bits

FAC0H FABFH

1000H 0FFFH

F800H F7FFH

1024 x 8 bits F400H F3FFH

0800H 07FFH

0080H 007FH

F000H EFFFH

0040H 003FH

Internal PROM 61440 x 8 bits

0000H

0000H

F3FFH can be used as external memory by setting the internal ROM size to less than 56 Kbytes

by the internal memory size switching register.

Show 12 more labels / short text on this page
General Registers · Internal High-speed RAM · Reserved · Data memory space · Reserved · Internal Expansion RAM · CALLF Entry Area · Program Area · ReservedNote · CALLT Table Area · Program memory space · Vector Table Area
Page 104 of the NEC PD78076Y user manual — Table 5-1. Internal ROM Capacities
Page 104 · click to enlarge
Page 104

CHAPTER 5 CPU ARCHITECTURE

5.1.1 Internal program memory space

The internal program memory space stores programs and table data. This is generally accessed by the program

counter (PC). The µPD78078 and 78078Y Subseries have various size of internal ROMs or PROM as shown below.

Table 5-1. Internal ROM Capacities

Part number Internal ROM

µPD78076, 78076Y Mask ROM 49152 x 8 bits

µPD78078, 78078Y 61440 x 8 bits

µPD78P078, 78P078Y PROM

The internal program memory is divided into three areas: vector table area, CALLT instruction table area, and

CALLF instruction table area. These areas are described on the next page.

Type Capacity

Page 105 of the NEC PD78076Y user manual — (3) CALLF instruction entry area
Page 105 · click to enlarge
Page 105

CHAPTER 5 CPU ARCHITECTURE

(1) Vector table area

The 64-byte area 0000H to 003FH is reserved as a vector table area. The RESET input and program start

addresses for branch upon generation of each interrupt request are stored in the vector table area. Of the

16-bit address, low-order 8 bits are stored at even addresses and high-order 8 bits are stored at odd

addresses.

Table 5-2. Vector Table

Vector Table Address Interrupt Request

0004H INTWDT

0006H INTP0

0008H INTP1

000AH INTP2

000CH INTP3

000EH INTP4

0010H INTP5

0012H INTP6

0014H INTCSI0

0016H INTCSI1

0018H INTSER

001AH INTSR/INTCSI2

001CH INTST

001EH INTTM3

0020H INTTM00

0022H INTTM01

0024H INTTM1

0026H INTTM2

0028H INTAD

002AH INTTM5

002CH INTTM6

003EH BRK

(2) CALLT instruction table area

The 64-byte area 0040H to 007FH can store the subroutine entry address of a 1-byte call instruction (CALLT).

(3) CALLF instruction entry area

The area 0800H to 0FFFH can perform a direct subroutine call with a 2-byte call instruction (CALLF).

0000H RESET input

Page 106 of the NEC PD78076Y user manual — 5.1.4 External memory space
Page 106 · click to enlarge
Page 106

CHAPTER 5 CPU ARCHITECTURE

5.1.2 Internal data memory space

The µPD78078 and 78078Y Subseries units incorporate the following RAMs.

(1) Internal high-speed RAM

This is a 1024 x 8-bit configuration in the area FB00H to FEFFH 4 banks of general registers, each bank

consisting of eight 8-bit registers, are allocated in the 32-byte area FEE0H to FEFFH.

The internal high-speed RAM can also be used as a stack memory.

(2) Internal buffer RAM

Internal buffer RAM is allocated to the 32-byte area from FAC0H to FADFH. Internal buffer RAM is used

for storing transmit/receive data of serial interface channel 1 (3-wire serial I/O mode with automatic transmit/

receive function). When not used in the 3-wire serial I/O mode with automatic transmit/receive function,

internal buffer RAM can also be used as normal RAM.

(3) Internal expansion RAM

Internal expansion RAM is allocated to the 1024-byte area from F400H to F7FFH.

5.1.3 Special function register (SFR) area

An on-chip peripheral hardware special function register (SFR) is allocated in the area FF00H to FFFFH. (Refer

to Table 5-3. Special Function Register List of 5.2.3 Special function register (SFR)).

5.1.4 External memory space

The external memory space is accessible by setting the memory expansion mode register (MM). External memory

space can store program, table data, etc. and allocate peripheral devices.

Page 107 of the NEC PD78076Y user manual — 0000H
Page 107 · click to enlarge
Page 107

CHAPTER 5 CPU ARCHITECTURE

5.1.5 Data memory addressing

Addressing is a method to specify the instruction address to be executed next and the register and memory address

to be manipulated when instructions are executed. The instruction address to be executed next is addressed by the

program counter (PC) (for details, refer to 5.3 Instruction Address Addressing).

For the addressing of the memory to be manipulated when instructions are executed, the µPD78078 and 78078Y

Subseries are provided with various addressing modes for optimum addressing. Special addressing methods are

possible to meet the functions of the special function registers (SFRs) and general registers. The data memory space

is the entire 64-Kbyte space (0000H to FFFFH). Figures 5-4 to 5-6 show the data memory addressing modes.

For details of addressing, refer to 5.4 Operand Address Addressing.

Figure 5-4. Data Memory Addressing (µPD78076, 78076Y)

FFFFH

Special Function Registers (SFRs)

256 x 8 bits

FF20H FF1FH

FF00H FEFFH

32 x 8 bits

FEE0H FEDFH

1024 x 8 bits

FE20H FE1FH

FB00H FAFFH

FAE0H FADFH

32 x 8 bits

FAC0H FABFH

F800H F7FFH

1024 x 8 bits

F400H F3FFH

13312 x 8 bits

C000H BFFFH

Internal ROM 49152 x 8 bits

0000H

Show 14 more labels / short text on this page
SFR Addressing · General Registers · Register Addressing · Short Direct Addressing · Internal High-speed RAM · Reserved · Direct Addressing · Internal Buffer RAM · Register Indirect Addressing · Based Addressing · Reserved · Based Indexed Addressing · Internal Expansion RAM · External Memory
Page 108 of the NEC PD78076Y user manual — 0000H
Page 108 · click to enlarge
Page 108

CHAPTER 5 CPU ARCHITECTURE

Figure 5-5. Data Memory Addressing (µPD78078, 78078Y)

FFFFH

Special Function Registers (SFRs)

256 x 8 bits

FF20H FF1FH

FF00H FEFFH

32 x 8 bits

FEE0H FEDFH

1024 x 8 bits

FE20H FE1FH

FB00H FAFFH

FAE0H FADFH

32 x 8 bits

FAC0H FABFH

F800H F7FFH

1024 x 8 bits

F400H F3FFH

F000H EFFFH

Internal ROM 61440 x 8 bits

0000H

can be used as external memory by setting the internal ROM size to less than 56 Kbytes by the

internal memory size switching register (IMS).

Show 14 more labels / short text on this page
SFR Addressing · General Registers · Register Addressing · Short Direct Addressing · Internal High-speed RAM · Reserved · Direct Addressing · Internal Buffer RAM · Register Indirect Addressing · Based Addressing · Reserved · Based Indexed Addressing · Internal Expansion RAM · ReservedNote
Page 109 of the NEC PD78076Y user manual — 0000H
Page 109 · click to enlarge
Page 109

CHAPTER 5 CPU ARCHITECTURE

Figure 5-6. Data Memory Addressing (µPD78P078, 78P078Y)

FFFFH

Special Function Registers (SFRs)

256 x 8 bits

FF20H FF1FH

FF00H FEFFH

32 x 8 bits

FEE0H FEDFH

1024 x 8 bits

FE20H FE1FH

FB00H FAFFH

FAE0H FADFH

32 x 8 bits

FAC0H FABFH

F800H F7FFH

1024 x 8 bits

F400H F3FFH

F000H EFFFH

Internal ROM 61440 x 8 bits

0000H

F3FFH can be used as external memory by setting the internal ROM size to less than 56 Kbytes

by the internal memory size switching register (IMS).

Show 14 more labels / short text on this page
SFR Addressing · General Registers · Register Addressing · Short Direct Addressing · Internal High-speed RAM · Reserved · Direct Addressing · Internal Buffer RAM · Register Indirect Addressing · Based Addressing · Reserved · Based Indexed Addressing · Internal Expansion RAM · ReservedNote
Page 110 of the NEC PD78076Y user manual — Figure 5-8. Program Status Word Configuration
Page 110 · click to enlarge
Page 110

CHAPTER 5 CPU ARCHITECTURE

5.2 Processor Registers

The µPD78078 and 78078Y Subseries units incorporate the following processor registers.

5.2.1 Control registers

The control registers control the program sequence, statuses, and stack memory. The control registers consist

of a program counter (PC), a program status word (PSW), and a stack pointer (SP).

(1) Program counter (PC)

The program counter is a 16-bit register which holds the address information of the next program to be

executed.

In normal operation, the PC is automatically incremented according to the number of bytes of the instruction

to be fetched. When a branch instruction is executed, immediate data and register contents are set.

RESET input sets the reset vector table values at addresses 0000H and 0001H to the program counter.

Figure 5-7. Program Counter Configuration

PC15 PC14 PC13 PC12 PC11 PC10 PC9 PC8 PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0

PC

(2) Program status word (PSW)

The program status word is an 8-bit register consisting of various flags to be set/reset by instruction

execution.

Program status word contents are automatically stacked upon interrupt request generation or PUSH PSW

instruction execution and are automatically reset upon execution of the RETB, RETI and POP PSW instructions.

RESET input sets the PSW to 02H.

Figure 5-8. Program Status Word Configuration

IE PSW Z RBS1 AC RBS0 0 ISP CY

Page 111 of the NEC PD78076Y user manual — (f) Carry flag (CY)
Page 111 · click to enlarge
Page 111

CHAPTER 5 CPU ARCHITECTURE

(a) Interrupt enable flag (IE)

This flag controls the interrupt request acknowledge operations of the CPU.

When IE = 0, the IE is set to interrupt disabled (DI) status. All interrupts except non-maskable interrupt

are disabled.

When IE = 1, the IE is set to interrupt enabled (EI) status and interrupt request acknowledge is controlled

with an in-service priority flag (ISP), an interrupt mask flag for various interrupt sources, and a priority

specification flag.

The IE is reset to (0) upon DI instruction execution or interrupt request acknowledgement and is set

to (1) upon EI instruction execution.

(b) Zero flag (Z)

When the operation result is zero, this flag is set (1). It is reset (0) in all other cases.

(c) Register bank select flags (RBS0 and RBS1)

These are 2-bit flags to select one of the four register banks.

In these flags, the 2-bit information which indicates the register bank selected by SEL RBn instruction

execution is stored.

(d) Auxiliary carry flag (AC)

If the operation result has a carry from bit 3 or a borrow at bit 3, this flag is set (1). It is reset (0) in

all other cases.

(e) In-service priority flag (ISP)

This flag manages the priority of acknowledgeable maskable vectored interrupts. When ISP = 0,

acknowledgment of the vectored interrupt request specified to low-order priority with the priority specify

flag registers (PR0L, PR0H, and PR1L) (refer to 22.3 (3) Priority specify flag registers (PR0L, PR0H,

and PR1L)) is disabled. Whether an actual interrupt request is acknowledged or not is controlled with

the interrupt enable flag (IE).

(f) Carry flag (CY)

This flag stores overflow and underflow upon add/subtract instruction execution. It stores the shift-out

value upon rotate instruction execution and functions as a bit accumulator during bit manipulation

instruction execution.

Page 112 of the NEC PD78076Y user manual — SP + 1
Page 112 · click to enlarge
Page 112

CHAPTER 5 CPU ARCHITECTURE

(3) Stack pointer (SP)

This is a 16-bit register to hold the start address of the memory stack area. Only the internal high-speed RAM

area can be set as the stack area.

Figure 5-9. Stack Pointer Configuration

SP

SP15 SP14 SP13 SP12 SP11 SP10 SP9 SP8 SP7 SP6 SP5 SP4 SP3 SP2 SP1 SP0

The SP is decremented ahead of write (save) to the stack memory and is incremented after read (reset)

from the stack memory.

Each stack operation saves/resets data as shown in Figures 5-10 and 5-11.

instruction execution.

Figure 5-10. Data to be Saved to Stack Memory

Interrupt and BRK Instruction

CALL, CALLF, and CALLT Instruction PUSH rp Instruction

SP SP _ 3

SP SP _ 2

SP SP _ 2

PC7 to PC0 SP _ 3

SP _ 2

SP _ 2

SP _ 2

PC7 to PC0 Register Pair Lower

SP _ 1

SP _ 1

SP _ 1

PSW

SP

SP

SP

Figure 5-11. Data to be Reset from Stack Memory

RETI and RETB Instruction

RET Instruction POP rp Instruction

SP

PC7 to PC0 Register Pair Lower

SP

SP

SP + 1

SP + 1

PC15 to PC8 PC15 to PC8

SP + 1

SP SP + 2

SP SP + 2

SP + 2

PSW

SP SP + 3

Show 5 more labels / short text on this page
PC15 to PC8 · Register Pair Upper · PC15 to PC8 · PC7 to PC0 · Register Pair Upper
Page 113 of the NEC PD78076Y user manual — FEFFH
Page 113 · click to enlarge
Page 113

CHAPTER 5 CPU ARCHITECTURE

5.2.2 General registers

A general register is mapped at particular addresses (FEE0H to FEFFH) of the data memory. It consists of 4 banks,

each bank consisting of eight 8-bit registers (X, A, C, B, E, D, L, and H).

Each register can also be used as an 8-bit register. Two 8-bit registers can be used in pairs as a 16-bit register

(AX, BC, DE, and HL).

They can be described in terms of function names (X, A, C, B, E, D, L, H, AX, BC, DE, and HL) and absolute names

(R0 to R7 and RP0 to RP3).

Register banks to be used for instruction execution are set with the CPU control instruction (SEL RBn). Because

of the 4-register bank configuration, an efficient program can be created by switching between a register for normal

processing and a register for interruption for each bank.

Figure 5-12. General Register Configuration

(a) Absolute Name

16-Bit Processing 8-Bit Processing

FEFFH

R7

BANK0

RP3

R6

FEF8H

R5

BANK1

RP2

R4

FEE0H

R3

BANK2

RP1

R2

FEE8H

R1

BANK3

RP0

R0

FEE0H

15 0 7 0

(b) Function Name

16-Bit Processing 8-Bit Processing

FEFFH

H

BANK0

HL

FEF8H

D

BANK1

DE

E

FEF0H

B

BANK2

BC

FEE8H

A

BANK3

AX

FEE0H

15 0 7 0

Page 114 of the NEC PD78076Y user manual — CHAPTER 5 CPU ARCHITECTURE
Page 114 · click to enlarge
Page 114

CHAPTER 5 CPU ARCHITECTURE

5.2.3 Special function register (SFR)

Unlike a general register, each special function register has special functions.

It is allocated in the FF00H to FFFFH area.

The special function registers can be manipulated in a similar way as the general registers, by using operation,

transfer, or bit-manipulate instructions. The special function regsters are read from and written to in specified

manipulation bit units (1, 8, and/or 16) depending on the register type.

Each manipulation bit unit can be specified as follows.

  • 1-bit manipulation

Describe the symbol reserved with assembler for the 1-bit manipulation instruction operand (sfr.bit).

This manipulation can also be specified with an address.

  • 8-bit manipulation

Describe the symbol reserved with assembler for the 8-bit manipulation instruction operand (sfr).

This manipulation can also be specified with an address.

  • 16-bit manipulation

Describe the symbol reserved with assembler for the 16-bit manipulation instruction operand (sfrp).

When addressing an address, describe an even address.

Table 5-3 gives a list of special function registers. The meaning of items in the table is as follows.

  • Symbol

This column shows the addresses of the special function registers.

They have been defined as reserved words in the RA78K/0 and as the header file, sfrbit.h, in the CC78K/0.

They can be described as instruction operands when the RA78K/0, ID78K0-NS, ID78K0, and SM78K/0 are used.

  • R/W

This column shows whether the corresponding special function register can be read or written.

R/W : Both reading and writing are enabled.

R : The value in the register can read out. A write to this register is ignored.

W : A value can be written to the register. Reading values from the register is impossible.

  • Manipulation

The register can be manipulated in bit units marked with a check (√) mark.

The register cannot be manipulated in bit units marked with “—”.

  • After reset

The register is set to the value immediately after the RESET signal is input.

Page 115 of the NEC PD78076Y user manual — FF15H
Page 115 · click to enlarge
Page 115

CHAPTER 5 CPU ARCHITECTURE

Table 5-3. Special Function Register List (1/3)

Address Special Function Register (SFR) Name Symbol R/W After Reset

8 bits 1 bit 16 bits

FF00H Port0 P0 R/W √ √ — 00H

FF01H Port1 P1 √ √ —

FF02H Port2 P2 √ √ —

FF03H Port3 P3 √ √ —

FF04H Port4 P4 √ √ — Undefined

FF05H Port5 P5 √ √ —

FF06H Port6 P6 √ √ —

FF07H Port7 P7 √ √ — 00H

FF08H Port8 P8 √ √ —

FF09H Port9 P9 √ √ —

FF0AH Port10 P10 √ √ —

FF0CH Port12 P12 √ √ —

FF0DH Port13 P13 √ √ —

FF10H Capture/compare register 00 CR00 — — √ Undefined

FF11H

FF12H Capture/compare register 01 CR01 — — √

FF13H

FF14H 16-bit timer register TM0 R — — √ 0000H

FF15H

FF16H Compare register 10 CR10 R/W — √ — Undefined

FF17H Compare register 20 CR20 — √ —

FF18H 8-bit timer register 1 TMS TM1 R — √ √ 00H

FF19H 8-bit timer register 2 TM2 — √

FF1AH Serial I/O shift register 0 SIO0 R/W — √ — Undefined

FF1BH Serial I/O shift register 1 SIO1 — √ —

FF1FH A/D conversion result register ADCR R — √ —

FF20H Port mode register 0 PM0 R/W √ √ — FFH

FF21H Port mode register 1 PM1 √ √ —

FF22H Port mode register 2 PM2 √ √ —

FF23H Port mode register 3 PM3 √ √ —

FF25H Port mode register 5 PM5 √ √ —

FF26H Port mode register 6 PM6 √ √ —

FF27H Port mode register 7 PM7 √ √ —

FF28H Port mode register 8 PM8 √ √ —

FF29H Port mode register 9 PM9 √ √ —

FF2AH Port mode register 10 PM10 √ √ —

FF2CH Port mode register 12 PM12 √ √ —

FF2DH Port mode register 13 PM13 √ √ —

Manipulation

Page 116 of the NEC PD78076Y user manual — CHAPTER 5 CPU ARCHITECTURE
Page 116 · click to enlarge
Page 116

CHAPTER 5 CPU ARCHITECTURE

Table 5-3. Special Function Register List (2/3)

8 bits 1 bit 16 bits Address Special Function Register (SFR) Name Symbol R/W After Reset

FF30H Real-time output buffer register L RTBL R/W — √ — 00H

FF31H Real-time output buffer register H RTBH — √ —

FF34H Real-time output port mode register RTPM √ √ —

FF36H Real-time output port control register RTPC √ √ —

FF38H Correction address register 0 CORAD0 — — √ FF39H

FF3AH Correction address register 1 CORAD1 — — √ FF3BH

FF3FH External bus type selection register EBTS — √ —

FF40H Timer clock select register 0 TCL0 √ √ —

FF41H Timer clock select register 1 TCL1 — √ —

FF42H Timer clock select register 2 TCL2 — √ —

FF43H Timer clock select register 3 TCL3 — √ — 88H

FF47H Sampling clock select register SCS — √ — 00H

FF48H 16-bit timer mode control register TMC0 √ √ —

FF49H 8-bit timer mode control register 1 TMC1 √ √ —

FF4AH Watch timer mode control register TMC2 √ √ —

FF4CH Capture/compare control register 0 CRC0 √ √ — 04H

FF4EH 16-bit timer output control register TOC0 √ √ — 00H

FF4FH 8-bit timer output control register TOC1 √ √ —

FF50H Compare register 50 CR50 — √ —

FF51H 8-bit timer register 5 TM5 R — √ —

FF52H Timer clock selection register 5 TCL5 R/W — √ —

FF53H 8-bit timer mode control register 5 TMC5 √ √ —

FF54H Compare register 60 CR60 — √ —

FF55H 8-bit timer register 6 TM6 R — √ —

FF56H Timer clock selection register 6 TCL6 R/W — √ —

FF57H 8-bit timer mode control register 6 TMC6 √ √ —

FF60H Serial operating mode register 0 CSIM0 √ √ —

FF61H Serial bus interface control register SBIC √ √ —

FF62H Slave address register SVA — √ — Undefined

FF63H Interrupt timing specify register SINT √ √ — 00H

FF68H Serial operating mode register 1 CSIM1 √ √ —

FF69H Automatic data transmit/receive control register ADTC √ √ —

FF6AH Automatic data transmit/receive address pointer ADTP — √ —

FF6BH Automatic data transmit/receive interval specify register ADTI √ √ —

FF70H Asynchronous serial interface mode register ASIM √ √ —

FF71H Asynchronous serial interface status register ASIS R — √ —

FF72H Serial operating mode register 2 CSIM2 R/W √ √ —

FF73H Baud rate generator control register BRGC — √ —

Manipulation

Page 117 of the NEC PD78076Y user manual — CHAPTER 5 CPU ARCHITECTURE
Page 117 · click to enlarge
Page 117

CHAPTER 5 CPU ARCHITECTURE

Table 5-3. Special Function Register List (3/3)

Address Special Function Register (SFR) Name Symbol R/W After Reset

8 bits 1 bit 16 bits

FF74H Transmit shift register TXS SIO2 W — √ — FFH

Receive buffer register RXB R

FF80H A/D converter mode register ADM R/W √ √ — 01H

FF84H A/D converter input select register ADIS — √ — 00H

FF8AH Correction control register CORCN √ √ —

FF90H D/A conversion value set register 0 DACS0 — √ —

FF91H D/A conversion value set register 1 DACS1 — √ —

FF98H D/A converter mode registe DAM √ √ —

FFD0H to External access areaNote 1 √ √ — Undefined FFDFH

FFE0H Interrupt request flag register 0L IF0 IF0L √ √ √ 00H

FFE1H Interrupt request flag register 0H IF0H √ √

FFE2H Interrupt request flag register 1L IF1L √ √ —

FFE4H Interrupt mask flag register 0L MK0 MK0L √ √ √ FFH

FFE5H Interrupt mask flag register 0H MK0H √ √

FFE6H Interrupt mask flag register 1L MK1L √ √ —

FFE8H Priority order specify flag register 0L PR0 PR0L √ √ √

FFE9H Priority order specify flag register 0H PR0H √ √

FFEAH Priority order specify flag register 1L PR1L √ √ —

FFECH External interrupt mode register 0 INTM0 — √ — 00H

FFEDH External interrupt mode register 1 INTM1 — √ —

FFF0H Internal memory size switching register IMS — √ — Note 2

FFF2H Oscillation mode selection register OSMS W — √ — 00H

FFF3H Pull-up resistor option register H PUOH R/W √ √ —

FFF4H Internal expansion RAM size IXS W — √ — 0AHNote 3

FFF6H Key return mode register KRM R/W √ √ — 02H

FFF7H Pull-up resistor option register L PUOL √ √ — 00H

FFF8H Memory expansion mode register MM √ √ — 10H

FFF9H Watchdog timer mode register WDTM √ √ — 00H

FFFAH Oscillation stabilization time select register OSTS — √ — 04H

FFFBH Processor clock control register PCC √ √ —

addressing.

2. The value after reset depends on products.
µ PD78076,78076YCCH, µ PD78078, 78078Y: CFH, µ PD78P078, 78P078Y: CFH

When a mask ROM version is used, do not set to IMS any value other than that determined at reset,

unless external device expansion function is used with the µPD78078 or 78078Y.

3. When a mask ROM version is used, do not set to IXS any value other than that determined at reset.

Manipulation · switching register

Page 118 of the NEC PD78076Y user manual — S
Page 118 · click to enlarge
Page 118

CHAPTER 5 CPU ARCHITECTURE

5.3 Instruction Address Addressing

An instruction address is determined by program counter (PC) contents. The PC contents are normally incremented

(+1 for each byte) automatically according to the number of bytes of an instruction to be fetched each time another

instruction is executed. However, when a branch instruction is executed, the branch destination information is set

to the PC and branched by the following addressing. (For details of instructions, refer to 78K/0 USER’S MANUAL—

Instructions (U12326E).

5.3.1 Relative addressing

[Function]

The value obtained by adding 8-bit immediate data (displacement value: jdisp8) of an instruction code to the

start address of the following instruction is transferred to the program counter (PC) and branched. The

displacement value is treated as signed two’s complement data (–128 to +127) and bit 7 becomes a sign bit.

In other words, the range of branch in relative addressing is between –128 and +127 of the start address of the

following instruction. This function is carried out when the BR $addr16 instruction or a conditional branch

instruction is executed.

[Illustration]

PC indicates the start address of the instruction after the BR instruction.

PC

15 0 8 7 6

S

PC

When S = 0, all bits of α are 0. When S = 1, all bits of α are 1.

+ · α · jdisp8

Page 119 of the NEC PD78076Y user manual — CALLF
Page 119 · click to enlarge
Page 119

CHAPTER 5 CPU ARCHITECTURE

5.3.2 Immediate addressing

[Function]

Immediate data in the instruction word is transferred to the program counter (PC) and branched.

This function is carried out when the CALL !addr16 or BR !addr16 or CALLF !addr11 instruction is executed.

CALL !addr16 and BR !addr16 instructions can branch to all the memory space.

CALLF !addr11 instruction branches to the area from 0800H to 0FFFH.

[Illustration]

In the case of CALL !addr16 and BR !addr16 instructions

Low Addr.

High Addr.

PC

In the case of CALLF !addr11 instruction

CALLF

PC

0 1

CALL or BR · fa10–8 · fa7–0

Page 120 of the NEC PD78076Y user manual — PC
Page 120 · click to enlarge
Page 120

CHAPTER 5 CPU ARCHITECTURE

5.3.3 Table indirect addressing

[Function]

Table contents (branch destination address) of the particular location to be addressed by bits 1 to 5 of the

immediate data of an operation code are transferred to the program counter (PC) and branched.

Table indirect addressing is carried out when the CALLT [addr5] instruction is executed. This instruction can

refer to the address stored in the memory table 40H to 7FH and branch to all the memory space.

[Illustration]

7 6 5 1 0

ta4–0 Operation Code

Effective Address 0 1 0

Low Addr.

High Addr.

PC

Memory (Table) · Effective Address+1

Page 121 of the NEC PD78076Y user manual — [Illustration]
Page 121 · click to enlarge
Page 121

CHAPTER 5 CPU ARCHITECTURE

5.3.4 Register addressing

[Function]

Register pair (AX) contents to be specified with an instruction word are transferred to the program counter (PC)

and branched.

This function is carried out when the BR AX instruction is executed.

[Illustration]

A X

PC

rp

Page 122 of the NEC PD78076Y user manual — [Description example]
Page 122 · click to enlarge
Page 122

CHAPTER 5 CPU ARCHITECTURE

5.4 Operand Address Addressing

The following methods are available to specify the register and memory (addressing) which undergo manipulation

during instruction execution.

5.4.1 Implied addressing

[Function]

The register which functions as an accumulator (A and AX) in the general register is automatically (implicitly)

addressed.

Of the µPD78078 and 78078Y Subseries instruction words, the following instructions employ implied addressing.

Instruction Register to be Specified by Implied Addressing

MULU A register for multiplicand and AX register for product storage

DIVUW AX register for dividend and quotient storage

ADJBA/ADJBS A register for storage of numeric values which become decimal correction targets

ROR4/ROL4 A register for storage of digit data which undergoes digit rotation

[Operand format]

Because implied addressing can be automatically employed with an instruction, no particular operand format is

necessary.

[Description example]

In the case of MULU X

With an 8-bit x 8-bit multiply instruction, the product of A register and X register is stored in AX. In this example,

the A and AX registers are specified by implied addressing.

Page 123 of the NEC PD78076Y user manual — [Description example]
Page 123 · click to enlarge
Page 123

CHAPTER 5 CPU ARCHITECTURE

5.4.2 Register addressing

[Function]

The general register is accessed as an operand. The general register to be accessed is specified with register

bank select flags (RBS0 and RBS1) and register specify code (Rn, RPn) in the instruction code.

Register addressing is carried out when an instruction with the following operand format is executed. When an

8-bit register is specified, one of the eight registers is specified with 3 bits in the operation code.

[Operand format]

r X, A, C, B, E, D, L, H

rp AX, BC, DE, HL

‘r’ and ‘rp’ can be described with function names (X, A, C, B, E, D, L, H, AX, BC, DE and HL) as well as absolute

names (R0 to R7 and RP0 to RP3).

[Description example]

MOV A, C; when selecting C register as r

0 1 1 0 0 0 1 0

INCW DE; when selecting DE register pair as rp

1 0 1 0 0

Show 5 more labels / short text on this page
Identifier Description · Operation code · Register specify code · Operation code · Register specify code
Page 124 of the NEC PD78076Y user manual — [Illustration]
Page 124 · click to enlarge
Page 124

CHAPTER 5 CPU ARCHITECTURE

5.4.3 Direct addressing

[Function]

The memory indicated by immediate data in an instruction word is directly addressed.

[Operand format]

addr16 Label or 16-bit immediate data

[Description example]

MOV A, !0FE00H; when setting !addr16 to FE00H

Operation code 1 0 0 0 1 1 1 0 OP code

00H

1 0 FEH

[Illustration]

Show 5 more labels / short text on this page
Identifier Description · OP code · addr16 (lower) · addr16 (higher) · Memory
Page 125 of the NEC PD78076Y user manual — [Illustration]
Page 125 · click to enlarge
Page 125

CHAPTER 5 CPU ARCHITECTURE

5.4.4 Short direct addressing

[Function]

The memory to be manipulated in the fixed space is directly addressed with 8-bit data in an instruction word.

The fixed space to which this addressing is applied to is the 256-byte space, from FE20H to FF1FH. An internal

high-speed RAM and a special function register (SFR) are mapped at FE20H to FEFFH and FF00H to FF1FH,

respectively.

The SFR area where short direct addressing is applied (FF00H to FF1FH) is a part of the SFR area. In this area,

ports which are frequently accessed in a program, a compare register of the timer/event counter, and a capture

register of the timer/event counter are mapped and these SFRs can be manipulated with a small number of bytes

and clocks.

When 8-bit immediate data is at 20H to FFH, bit 8 of an effective address is set to 0. When it is at 00H to 1FH,

bit 8 is set to 1. Refer to [Illustration] below.

[Operand format]

saddr Label of FE20H to FF1FH immediate data

saddrp Label of FE20H to FF1FH immediate data (even address only)

[Description example]

MOV 0FE30H, #50H; when setting saddr to FE30H and immediate data to 50H

Operation code 0 0 0 1 0 0 0 1 OP code

0 0 1 1 0 30H (saddr-offset)

0 1 0 1 0 50H (immediate data)

[Illustration]

15 0 Short Direct Memory

Effective Address 1

When 8-bit immediate data is 20H to FFH, α = 0

When 8-bit immediate data is 00H to 1FH, α = 1

Show 4 more labels / short text on this page
Identifier Description · OP code · saddr-offset · α
Page 126 of the NEC PD78076Y user manual — [Illustration]
Page 126 · click to enlarge
Page 126

CHAPTER 5 CPU ARCHITECTURE

5.4.5 Special function register (SFR) addressing

[Function]

The memory-mapped special function register (SFR) is addressed with 8-bit immediate data in an instruction

word.

This addressing is applied to the 240-byte spaces FF00H to FFCFH and FFE0H to FFFFH. However, the SFR

mapped at FF00H to FF1FH can be accessed with short direct addressing.

[Operand format]

sfr Special function register name

sfrp 16-bit manipulatable special function register name (even address only)

[Description example]

MOV PM0, A; when selecting PM0 (FF20H) as sfr

Operation code 1 0 1 1 0 OP code

0 0 1 0 20H (sfr-offset)

[Illustration]

15 0 SFR

Effective Address 1

Identifier Description · OP code · sfr-offset

Page 127 of the NEC PD78076Y user manual — A
Page 127 · click to enlarge
Page 127

CHAPTER 5 CPU ARCHITECTURE

5.4.6 Register indirect addressing

[Function]

The memory is addressed with the contents of the register pair specified as an operand. The register pair to

be accessed is specified with the register bank select flag (RBS0 and RBS1) and the register pair specify code

in the instruction code. This addressing can be carried out for all the memory spaces.

[Operand format]

— [DE], [HL]

[Description example]

MOV A, [DE]; when selecting [DE] as register pair

Operation code 1 0 1 0 1

[Illustration]

DE

D

E

Memory address specified by register pair DE 0 7

Memory The contents of addressed memory are transferred

A

Identifier Description

Page 128 of the NEC PD78076Y user manual — [Description example]
Page 128 · click to enlarge
Page 128

CHAPTER 5 CPU ARCHITECTURE

5.4.7 Based addressing

[Function]

8-bit immediate data is added to the contents of the base register, that is, the HL register pair, and the sum is used

to address the memory. The HL register pair to be accessed is in the register bank specified with the register

bank select flags (RBS0 and RBS1). Addition is performed by expanding the offset data as a positive number

to 16 bits. A carry from the 16th bit is ignored. This addressing can be carried out for all the memory spaces.

[Operand format]

— [HL + byte]

[Description example]

MOV A, [HL + 10H]; when setting byte to 10H

Operation code 1 0 1 0 1 1 1 0

0 0 0 1 0

Identifier Description

Page 129 of the NEC PD78076Y user manual — [Description example]
Page 129 · click to enlarge
Page 129

CHAPTER 5 CPU ARCHITECTURE

5.4.8 Based indexed addressing

[Function]

The B or C register contents specified in an instruction are added to the contents of the base register, that is,

the HL register pair, and the sum is used to address the memory. The HL, B, and C registers to be accessed

are registers in the register bank specified with the register bank select flag (RBS0 and RBS1).

Addition is performed by expanding the contents of the B or C register as a positive number to 16 bits. A carry

from the 16th bit is ignored. This addressing can be carried out for all the memory spaces.

[Operand format]

— [HL + B], [HL + C]

[Description example]

In the case of MOV A, [HL + B]

Operation code 1 0 1 0 1 0 1 1

5.4.9 Stack addressing

[Function]

The stack area is indirectly addressed with the stack pointer (SP) contents.

This addressing method is automatically employed when the PUSH, POP, subroutine call and RETURN

instructions are executed or the register is saved/reset upon generation of an interrupt request.

Stack addressing enables to address the internal high-speed RAM area only.

[Description example]

In the case of PUSH DE

Operation code 1 0 1 1 0 1 0 1

Identifier Description

Page 130 of the NEC PD78076Y user manual — [MEMO]
Page 130 · click to enlarge
Page 130

[MEMO]

Page 131 of the NEC PD78076Y user manual — Figure 6-1. Port Types
Page 131 · click to enlarge
Page 131

CHAPTER 6 PORT FUNCTIONS

6.1 Port Functions

The µPD78078 and 78078Y Subseries units incorporate two input ports and eighty-six input/output ports. Figure

6-1 shows the port configuration. Every port is capable of 1-bit and 8-bit manipulations and can carry out considerably

varied control operations. Besides port functions, the ports can also serve as on-chip hardware input/output pins.

Figure 6-1. Port Types

NEC PD78076Y — Figure 6-1. Port Types diagram (page 131)
Fig. 17 · Figure 6-1. Port Types
Show 11 more labels / short text on this page
Port 7 · Port 1 · Port 8 · Port 2 · Port 9 · Port 3 · Port 10 · Port 4 · Port 12 · Port 5 · Port 13
Page 132 of the NEC PD78076Y user manual — P36 BUZ
Page 132 · click to enlarge
Page 132

CHAPTER 6 PORT FUNCTIONS

Table 6-1. Port Functions (µPD78078 Subseries) (1/2)

Pin Name Function Alternate Function

P00 Input only INTP0/TI00

P01 INTP1/TI01

P02 Input/output mode can be specified bit- INTP2

P03 Port 0. wise. INTP3

P04 8-bit input/output port. If used as an input port, an on-chip pull- INTP4

P05 up resistor can be connected by software. INTP5

P06 INTP6

P07 Input only XT1

Port 1.

8-bit input/output port.

P10 to P17 ANI0 to ANI7

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected by software.

P20 SI1

P21 SO1

P22 Port 2. SCK1

P23 8-bit input/output port. STB

P24 Input/output mode can be specified bit-wise. BUSY

P25 If used as an input port, an on-chip pull-up resistor can be connected by software. SI0/SB0

P26 SO0/SB1

P27 SCK0

P30 TO0

P31 TO1

P32 Port 3. TO2

P33 8-bit input/output port. TI1

P34 Input/output mode can be specified bit-wise. TI2

P35 If used as an input port, an on-chip pull-up resistor can be connected by software. PCL

P36 BUZ

P37 —

Port 4.

8-bit input/output port.

P40 to P47 Input/output mode can be specified bit-wise. AD0 to AD7

If used as an input port, an on-chip pull-up resistor can be connected by software.

Test input flag (KRIF) is set to 1 by falling edge detection.

Port 5.

8-bit input/output port.

P50 to P57 LEDs can be driven directly. A8 to A15

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected by software.

Page 133 of the NEC PD78076Y user manual — P130, P131 ANO0, ANO1
Page 133 · click to enlarge
Page 133

CHAPTER 6 PORT FUNCTIONS

Table 6-1. Port Functions (µPD78078 Subseries) (2/2)

Pin Name Function Alternate Function

P60 N-ch open drain input/output port.

P61 On-chip pull-up resistor can be specified by

P62 Port 6. mask option. (Mask ROM version only).

P63 8-bit input/output port. LEDs can be driven directly.

P64 Input/output mode can be specified If used as an input port, an on-chip pull- RD

P65 bit-wise. up resistor can be connected by software. WR

P66 WAIT

P67 ASTB

Port 7.

3-bit input/output port.

Input/output mode can be specified bit-wise.

P72 SCK2/ASCK

If used as an input port, an on-chip pull-up resistor can be connected by software.

Port 8.

8-bit input/output port.

P80 to P87 A0 to A7

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected by software.

P90 N-ch open-drain input/output port.

P91 On-chip pull-up resistor can be specified by

P92 Port 9. mask option. (Mask ROM version only).

P93 7-bit input/output port. LEDs can be driven directly. —

P94 Input/output mode can be specified bit-wise. If used as an input port, an on-chip pull-

P95 up resistor can be connected by software.

P96

P100 TI5/TO5

Port 10.

4-bit input/output port.

P101 TI6/TO6

Input/output mode can be specified bit-wise.

P102, 103 —

If used as an input port, an on-chip pull-up resistor can be connected by software.

Port 12.

8-bit input/output port.

P120 to P127 RTP0 to RTP7

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected by software.

Port 13.

2-bit input/output port.

P130, P131 ANO0, ANO1

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected by software.

P70 SI2/RxD · P71 SO2/TxD

Page 134 of the NEC PD78076Y user manual — P36 BUZ
Page 134 · click to enlarge
Page 134

CHAPTER 6 PORT FUNCTIONS

Table 6-2. Port Functions (µPD78078Y Subseries) (1/2)

Pin Name Function Alternate Function

P00 Input only INTP0/TI00

P01 INTP1/TI01

P02 Input/output mode can be specified bit- INTP2

P03 Port 0. wise. INTP3

P04 8-bit input/output port. If used as an input port, an on-chip pull- INTP4

P05 up resistor can be connected by software. INTP5

P06 INTP6

P07 Input only XT1

Port 1.

P10 to P17 8-bit input/output port. ANI0 to ANI7

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected by software.

P20 SI1

P21 SO1

P22 Port 2. SCK1

P23 8-bit input/output port. STB

P24 Input/output mode can be specified bit-wise. BUSY

P25 If used as an input port, an on-chip pull-up resistor can be connected by software. SI0/SB0/SDA0

P26 SO0/SB1/SDA1

P27 SCK0/SCL

P30 TO0

P31 TO1

P32 Port 3. TO2

P33 8-bit input/output port. TI1

P34 Input/output mode can be specified bit-wise. TI2

P35 If used as an input port, an on-chip pull-up resistor can be connected by software. PCL

P36 BUZ

P37 —

Port 4.

8-bit input/output port.

P40 to P47 Input/output mode can be specified 8-bit-wise. AD0 to AD7

If used as an input port, an on-chip pull-up resistor can be connected by software.

Test input flag (KRIF) is set to 1 by falling edge detection.

Port 5.

8-bit input/output port.

P50 to P57 LEDs can be driven directly. A8 to A15

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected by software.

Page 135 of the NEC PD78076Y user manual — P130, P131 ANO0, ANO1
Page 135 · click to enlarge
Page 135

CHAPTER 6 PORT FUNCTIONS

Table 6-2. Port Functions (µPD78078Y Subseries) (2/2)

Pin Name Function Alternate Function

P60 N-ch open drain input/output port.

P61 On-chip pull-up resistor can be specified by

P62 Port 6. mask option. (Mask ROM version only).

P63 8-bit input/output port. LEDs can be driven directly.

P64 Input/output mode can be specified If used as an input port, an on-chip pull- RD

P65 bit-wise. up resistor can be connected by software. WR

P66 WAIT

P67 ASTB

Port 7.

3-bit input/output port.

Input/output mode can be specified bit-wise.

P72 SCK2/ASCK

If used as an input port, an on-chip pull-up resistor can be connected by software.

Port 8.

8-bit input/output port.

P80 to P87 A0 to A7

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected by software.

P90 N-ch open drain input/output port.

P91 On-chip pull-up resistor can be specified by

P92 Port 9. mask option. (Mask ROM version only).

P93 7-bit input/output port. LEDs can be driven directly. —

P94 Input/output mode can be specified bit-wise. If used as an input port, an on-chip pull-

P95 up resistor can be connected by software.

P96

P100 TI5/TO5

Port 10.

4-bit input/output port.

P101 TI6/TO6

Input/output mode can be specified bit-wise.

P102, 103 —

If used as an input port, an on-chip pull-up resistor can be connected by software.

Port 12.

8-bit input/output port.

P120 to P127 RTP0 to RTP7

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected by software.

Port 13.

2-bit input/output port.

P130, P131 ANO0, ANO1

Input/output mode can be specified bit-wise.

If used as an input port, an on-chip pull-up resistor can be connected by software.

P70 SI2/RxD · P71 SO2/TxD

Page 136 of the NEC PD78076Y user manual — 6.2.1 Port 0
Page 136 · click to enlarge
Page 136

CHAPTER 6 PORT FUNCTIONS

6.2 Port Configuration

A port consists of the following hardware:

Table 6-3. Port Configuration

Control register Port mode register (PMm: m = 0 to 3, 5 to 10, 12, 13)

Pull-up resistor option register (PUOH, PUOL)

Memory expansion mode register (MM)Note

Key return mode register (KRM)

Port Total88 ports (2 inputs, 86 inputs/outputs)

Pull-up resistor • Mask ROM versions Total: 86 pins

(software-specifiable for 78 pins and mask option for 8 pins)

  • µ PD78P078 (or 78P078Y) ..... Total: 78 pins

6.2.1 Port 0

Port 0 is an 8-bit input/output port with output latch. P01 to P06 pins can specify the input mode/output mode in

1-bit units with the port mode register 0 (PM0). P00 and P07 pins are input-only ports. When P01 to P06 pins are

used as input ports, an on-chip pull-up resistor can be used in 6-bit units with a pull-up resistor option register L (PUOL).

Dual-functions include external interrupt request input, external count clock input to the timer and crystal connection

for subsystem clock oscillation.

RESET input sets port 0 to input mode.

Figures 6-2 and 6-3 show block diagrams of port 0.

mode is specified and the output level is changed, the interrupt request flag is set. Thus, when

the output mode is used, set the interrupt mask flag to 1.

Item Configuration

Page 137 of the NEC PD78076Y user manual — WR PM
Page 137 · click to enlarge
Page 137

CHAPTER 6 PORT FUNCTIONS

Figure 6-2. Block Diagram of P00 and P07

RD

P00/INTP0/TI00, P07/XT1

Figure 6-3. Block Diagram of P01 to P06

V DD

WR PUO

PUO0

RD

WR PORT

P01/INTP1/TI01, P02/INTP2 to P06/INTP6

Output Latch (P01 to P06)

WR PM

PUOPull-up resistor option register
PMPort mode register
RDPort 0 read signal
WRPort 0 write signal
Show 5 more labels / short text on this page
Internal bus · P-ch · Selector · Internal bus · PM01 to PM06
Page 138 of the NEC PD78076Y user manual — WR PM
Page 138 · click to enlarge
Page 138

CHAPTER 6 PORT FUNCTIONS

6.2.2 Port 1

Port 1 is an 8-bit input/output port with output latch. It can specify the input mode/output mode in 1-bit units with

a port mode register 1 (PM1). When P10 to P17 pins are used as input ports, an on-chip pull-up resistor can be

connected to them in 8-bit units with a pull-up resistor option register L (PUOL).

Dual-functions include an A/D converter analog input.

RESET input sets port 1 to input mode.

Figure 6-4 shows a block diagram of port 1.

Figure 6-4. Block Diagram of P10 to P17

V DD

WR PUO

PUO1

RD

WR PORT

Output Latch (P10 to P17)

WR PM

PUOPull-up resistor option register
PMPort mode register
RDPort 1 read signal
WRPort 1 write signal
Show 5 more labels / short text on this page
P-ch · Selector · Internal bus · P10/ANI0 to P17/ANI7 · PM10 to PM17
Page 139 of the NEC PD78076Y user manual — WR PM
Page 139 · click to enlarge
Page 139

CHAPTER 6 PORT FUNCTIONS

6.2.3 Port 2 (µPD78078 Subseries)

Port 2 is an 8-bit input/output port with output latch. P20 to P27 pins can specify the input mode/output mode in

1-bit units with the port mode register 2 (PM2). When P20 to P27 pins are used as input ports, an on-chip pull-up

resistor can be connected to them in 8-bit units with a pull-up resistor option register L (PUOL).

Dual-functions include serial interface data input/output, clock input/output, automatic transmit/receive busy input,

and strobe output.

RESET input sets port 2 to input mode.

Figures 6-5 and 6-6 show a block diagram of port 2.

functions. For the setting method, refer to Figure 17-4. Serial Operating Mode Register 0

Format and Figure 19-3. Serial Operating Mode Register 1 Format.

2. When reading the pin state in SBI mode, set PM2n bit of PM2 to 1 (n = 5, 6) (Refer to the

description of (11) SBI mode precautions (e) in 17.4.3 SBI mode operation).

Figure 6-5. Block Diagram of P20, P21, P23 to P26

V DD

WR PUO

PUO2

RD

WR PORT

P20/SI1, P21/SO1, P23/STB, P24/BUSY, P25/SI0/SB0, P26/SO0/SB1

Output Latch (P20, P21, P23 to P26)

WR PM

PM20, PM21 PM23 to PM26

PUOPull-up resistor option register
PMPort mode register
RDPort 2 read signal
WRPort 2 write signal
Show 4 more labels / short text on this page
P-ch · Selector · Internal bus · Dual Function
Page 140 of the NEC PD78076Y user manual — WR PM
Page 140 · click to enlarge
Page 140

CHAPTER 6 PORT FUNCTIONS

Figure 6-6. Block Diagram of P22 and P27

V DD

WR PUO

PUO2

RD

WR PORT

P20/SI1, P21/SO1, P23/STB, P24/BUSY, P25/SI0/SB0/SDA0, P26/SO0/SB1/SDA1

Output Latch (P20, P21, P23 to P26)

WR PM

PM20, PM21 PM23 to PM26

PUOPull-up resistor option register
PMPort mode register
RDPort 2 read signal
WRPort 2 write signal
Show 4 more labels / short text on this page
P-ch · Selector · Internal bus · Dual Function
Page 141 of the NEC PD78076Y user manual — WR PM
Page 141 · click to enlarge
Page 141

CHAPTER 6 PORT FUNCTIONS

6.2.4 Port 2 (µPD78078Y Subseries)

Port 2 is an 8-bit input/output port with output latch. P20 to P27 pins can specify the input mode/output mode in

1-bit units with the port mode register 2 (PM2). When P20 to P27 pins are used as input ports, an on-chip pull-up

resistor can be connected to them in 8-bit units with a pull-up resistor option register L (PUOL).

Dual-functions include serial interface data input/output, clock input/output, automatic transmit/receive busy input,

and strobe output.

RESET input sets port 2 to input mode.

Figures 6-7 and 6-8 show a block diagram of port 2.

For the setting method, refer to Figure 18-4. Serial Operating Mode Register 0 Format and Figure

19-3. Serial Operating Mode Register 1 Format.

Figure 6-7. Block Diagram of P20, P21, P23 to P26

V DD

WR PUO

PUO2

RD

WR PORT

P20/SI1, P21/SO1, P23/STB, P24/BUSY, P25/SI0/SB0/SDA0, P26/SO0/SB1/SDA1

Output Latch (P20, P21, P23 to P26)

WR PM

PM20, PM21 PM23 to PM26

PUOPull-up resistor option register
PMPort mode register
RDPort 2 read signal
WRPort 2 write signal
Show 4 more labels / short text on this page
P-ch · Selector · Internal bus · Dual Function
Page 142 of the NEC PD78076Y user manual — P22/SCK1, P27/SCK0/SCL
Page 142 · click to enlarge
Page 142

CHAPTER 6 PORT FUNCTIONS

Figure 6-8. Block Diagram of P22 and P27

V DD

WR PUO

PUO2

RD

WR PORT

Output Latch (P22, P27)

P22/SCK1, P27/SCK0/SCL

WR PM

PM22, PM27

PUOPull-up resistor option register
PMPort mode register
RDPort 2 read signal
WRPort 2 write signal
Show 4 more labels / short text on this page
P-ch · Selector · Internal bus · Dual Function
Page 143 of the NEC PD78076Y user manual — WR PM
Page 143 · click to enlarge
Page 143

CHAPTER 6 PORT FUNCTIONS

6.2.5 Port 3

Port 3 is an 8-bit input/output port with output latch. P30 to P37 pins can specify the input mode/output mode in

1-bit units with the port mode register 3 (PM3). When P30 to P37 pins are used as input ports, an on-chip pull-up

resistor can be connected to them in 8-bit units with a pull-up resistor option register L (PUOL).

Dual-functions include timer input/output, clock output and buzzer output.

RESET input sets port 3 to input mode.

Figure 6-9 shows a block diagram of port 3.

Figure 6-9. Block Diagram of P30 to P37

V DD

WR PUO

PUO3

RD

WR PORT

P30/TO0 to P32/TO2, P33/TI1, P34/TI2, P35/PCL, P36/BUZ, P37

Output Latch (P30 to P37)

WR PM

PUOPull-up resistor option register
PMPort mode register
RDPort 3 read signal
WRPort 3 write signal
Show 5 more labels / short text on this page
P-ch · Selector · Internal bus · PM30 to PM37 · Dual Function
Page 144 of the NEC PD78076Y user manual — P44
Page 144 · click to enlarge
Page 144

CHAPTER 6 PORT FUNCTIONS

6.2.6 Port 4

Port 4 is an 8-bit input/output port with output latch. P40 to P47 pins can specify the input mode/output mode in

8-bit units with the memory expansion mode register (MM). When P40 to P47 pins are used as input ports, an on-

chip pull-up resistor can be connected to them in 8-bit units with a pull-up resistor option register L (PUOL).

The test input flag (KRIF) can be set to 1 by detecting falling edges.

Dual-functions include address/data bus function in external memory expansion mode.

RESET input sets port 4 to input mode.

Figures 6-10 and 6-11 show a block diagram of port 4 and block diagram of falling edge detection circuit,

respectively.

Figure 6-10. Block Diagram of P40 to P47

V DD

WR PUO

PUO4

RD

WR PORT

Output Latch (P40 to P47)

WR MM

MM

PUOPull-up resistor option register
MMMemory expansion mode register
RDPort 4 read signal
WRPort 4 write signal

Figure 6-11. Block Diagram of Falling Edge Detection Circuit

P40

P41

P42

P43

Falling Edge Detection Circuit

P44

P45

P46

KRMK

P47

Show 6 more labels / short text on this page
P-ch · Selector · Internal bus · P40/AD0 to P47/AD7 · KRIF Set Signal · Standby Release Signal
Page 145 of the NEC PD78076Y user manual — WR PM
Page 145 · click to enlarge
Page 145

CHAPTER 6 PORT FUNCTIONS

6.2.7 Port 5

Port 5 is an 8-bit input/output port with output latch. P50 to P57 pins can specify the input mode/output mode in

1-bit units with the port mode register 5 (PM5). When P50 to P57 pins are used as input ports, an on-chip pull-up

resistor can be connected to them in 8-bit units with a pull-up resistor option register L (PUOL).

Port 5 can drive LEDs directly.

Dual-functions include address bus function in external memory expansion mode.

RESET input sets port 5 to input mode.

Figure 6-12 shows a block diagram of port 5.

Figure 6-12. Block Diagram of P50 to P57

V DD

WR PUO

PUO5

RD

WR PORT

Output Latch (P50 to P57)

WR PM

PUOPull-up resistor option register
PMPort mode register
RDPort 5 read signal
WRPort 5 write signal
Show 5 more labels / short text on this page
P-ch · Selector · Internal bus · P50/A8 to P57/A15 · PM50 to PM57
Page 146 of the NEC PD78076Y user manual — cycles are inserted.)
Page 146 · click to enlarge
Page 146

CHAPTER 6 PORT FUNCTIONS

6.2.8 Port 6

Port 6 is an 8-bit input/output port with output latch. P60 to P67 pins can specify the input mode/output mode in

1-bit units with the port mode register 6 (PM6).

This port has pull-up resistor options as shown below. However, the option specification method differs depending

on the port pin and the device version.

Table 6-4. Pull-up Resistor Options for Port 6

Higher 4 bits (P64 to P67) Lower 4 bits (P60 to P63)

Mask ROM version Internal pull-up resistors can be specified Internal mask-option pull-up resistors can be by setting PUO6 in 4-bit units. specified bitwise.

PROM version No pull-up resistor options

PUO6Bit 6 of the pull-up resistor option register L (PUOL)

Pins P60 to P63 can drive LEDs directly.

Dual-functions include the control signal output function in external memory expansion mode.

RESET input sets port 6 to input mode.

Figures 6-13 and 6-14 show block diagrams of port 6.

an input/output port.

2. When the low level is input to the P60 to P63 pins, the leakage current that flows through

each of these pins depends on the following conditions:

[Mask ROM version]

  • When a pull-up resistor is connected,

–3 µA (max.)

  • When a pull-up resistor is not connected,

–200 µA (max.) for 1.5 clock cycles during which a read instruction is executed to

port 6 (P6) or port mode register 6 (PM6) (It is assumed that no wait

cycles are inserted.)

–3 µA (max.) during periods other than the above

[PROM version]

  • When a pull-up resistor is not connected,

–200 µA (max.) for 1.5 clock cycles during which a read instruction is executed to

port 6 (P6) or port mode register 6 (PM6) (It is assumed that no wait

cycles are inserted.)

–3 µA (max.) during periods other than the above

Page 147 of the NEC PD78076Y user manual — WR PM
Page 147 · click to enlarge
Page 147

CHAPTER 6 PORT FUNCTIONS

Figure 6-13. Block Diagram of P60 to P63

V DD

RD

Mask ROM versions only. PD78P078 and 78P078Y have no pull-up resistor.

WR PORT

Output Latch (P60 to P63)

WR PM

PMPort mode register
RDPort 6 read signal
WRPort 6 write signal

Figure 6-14. Block Diagram of P64 to P67

V DD

WR PUO

PUO6

RD

WR PORT

P64/RD, P65/WR, P66/WAIT, P67/ASTB

Output Latch (P64 to P67)

WR PM

PUOPull-up resistor option register
PMPort mode register
RDPort 6 read signal
WRPort 6 write signal
Show 10 more labels / short text on this page
Mask Option Resistor · µ · Selector · Internal bus · P60 to P63 · PM60 to PM63 · P-ch · Selector · Internal bus · PM64 to PM67
Page 148 of the NEC PD78076Y user manual — Figure 6-15. Block Diagram of P70
Page 148 · click to enlarge
Page 148

CHAPTER 6 PORT FUNCTIONS

6.2.9 Port 7

This is a 3-bit input/output port with output latches. Input mode/output mode can be specified in 1-bit units with

a port mode register 7 (PM7). When pins P70 to P72 are used as input port pins, an on-chip pull-up resistor can

be connected in 3-bit units with a pull-up resistor option register L (PUOL).

Dual-functions include serial interface channel 2 data input/output and clock input/output.

RESET input sets the input mode.

Port 7 block diagrams are shown in Figures 6-15 and 6-16.

For the setting method, refer to Table 20-2. Serial Interface Channel 2 Operating Mode Setting.

Figure 6-15. Block Diagram of P70

V DD

WR PUO

PUO7

RD

WR PORT

(P70)

WR PM

PM70

PUOPull-up resistor option register
PMPort mode register
RDPort 7 read signal
WRPort 7 write signal
Show 5 more labels / short text on this page
P-ch · Selector · Internal bus · Output Latch · P70/SI2/RxD
Page 149 of the NEC PD78076Y user manual — WR PM
Page 149 · click to enlarge
Page 149

CHAPTER 6 PORT FUNCTIONS

Figure 6-16. Block Diagram of P71 and P72

V DD

WR PUO

PUO7

RD

WR PORT

Output Latch (P71, P72)

WR PM

PM71, PM72

PUOPull-up resistor option register
PMPort mode register
RDPort 7 read signal
WRPort 7 write signal
Show 5 more labels / short text on this page
P-ch · Selector · Internal bus · P71/SO2/TxD, P72/SCK2/ASCK · Dual Function
Page 150 of the NEC PD78076Y user manual — WR PM
Page 150 · click to enlarge
Page 150

CHAPTER 6 PORT FUNCTIONS

6.2.10 Port 8

Port 8 is an 8-bit input/output port with output latch. P80 to P87 pins can specify the input mode/output mode in

1-bit units with the port mode register 8 (PM8). When pins P80 to P87 are used as input ports, an on-chip pull-up

resistor can be connected to them in 8-bit units with a pull-up resistor option register H (PUOH).

Dual-functions include the address bus function in external memory expansion mode.

RESET input sets port 8 to input mode.

Figure 6-17 shows block diagram of port 8.

Figure 6-17. Block Diagram of P80 to P87

V DD

WR PUO

PUO8

RD

WR PORT

Output Latch (P80 to P87)

WR PM

PUOPull-up resistor option register
PMPort mode register
RDPort 8 read signal
WRPort 8 write signal
Show 5 more labels / short text on this page
P-ch · Selector · Internal bus · P80/A0 to P87/A7 · PM80 to PM87
Page 151 of the NEC PD78076Y user manual — cycles are inserted.)
Page 151 · click to enlarge
Page 151

CHAPTER 6 PORT FUNCTIONS

6.2.11 Port 9

Port 9 is an 7-bit input/output port with output latch. P90 to P96 pins can specify the input mode/output mode in

1-bit units with the port mode register 9 (PM9).

This port has pull-up resistor options as shown below. However, the option specification method differs depending

on the port pin and the device version.

Table 6-5. Pull-up Resistor Options for Port 9

Higher 3 bits (P94 to P97) Lower 4 bits (P90 to P93)

Mask ROM version Internal pull-up resistors can be specified Internal mask-option pull-up resistors can be by setting PUO6 in 3-bit units. specified bitwise.

PROM version No pull-up resistor options

PUO9Bit 1 of the pull-up resistor option register H (PUOH)

Pins P90 to P93 can drive LEDs directly.

Dual-functions include the control signal output function in external memory expansion mode.

RESET input sets port 6 to input mode.

Figures 6-18 and 6-19 show block diagrams of port 9.

of these pins depends on the following conditions:

[Mask ROM version]

  • When a pull-up resistor is connected,

–3 µA (max.)

  • When a pull-up resistor is not connected,

–200 µA (max.) for 1.5 clock cycles during which a read instruction is executed to

port 9 (P9) or port mode register 9 (PM9) (It is assumed that no wait

cycles are inserted.)

–3 µA (max.) during periods other than the above

[PROM version]

  • When a pull-up resistor is not connected,

–200 µA (max.) for 1.5 clock cycles during which a read instruction is executed to

port 9 (P9) or port mode register 9 (PM9) (It is assumed that no wait

cycles are inserted.)

–3 µA (max.) during periods other than the above

Page 152 of the NEC PD78076Y user manual — WR PM
Page 152 · click to enlarge
Page 152

CHAPTER 6 PORT FUNCTIONS

Figure 6-18. Block Diagram of P90 to P93

V DD

RD

Mask ROM versions only. PD78P078 and 78P078Y have no pull-up resistor. µ

WR PORT

Output Latch (P90 to P93)

WR PM

PMPort mode register
RDPort 9 read signal
WRPort 9 write signal

Figure 6-19. Block Diagram of P94 to P96

V DD

WR PUO

PUO9

RD

WR PORT

Output Latch (P94 to P96)

WR PM

PUOPull-up resistor option register
PMPort mode register
RDPort 9 read signal
WRPort 9 write signal
Show 10 more labels / short text on this page
Mask Option Resistor · Selector · Internal bus · P90 to P93 · PM90 to PM93 · P-ch · Selector · Internal bus · P94 to P96 · PM94 to PM96
Page 153 of the NEC PD78076Y user manual — P100/TI5/TO5, P101/TI6/TO6
Page 153 · click to enlarge
Page 153

CHAPTER 6 PORT FUNCTIONS

6.2.12 Port 10

Port 10 is a 4-bit input/output port with output latch. P100 to P103 pins can specify the input mode/output mode

in 1-bit units with the port mode register 10 (PM10). When pins P100 to P103 are used as input ports, an on-chip

pull-up resistor can be connected to them in 4-bit units with a pull-up resistor option register H (PUOH).

Dual-functions include the timer input/output.

RESET input sets port 10 to input mode.

Figures 6-20 and 6-21 show block diagrams of port 10.

Figure 6-20. Block Diagram of P100 and P101

V DD

WR PUO

PUO10

RD

WR PORT

Output Latch (P100, P101)

P100/TI5/TO5, P101/TI6/TO6

WR PM

PM100, PM101

PUOPull-up resistor option register
PMPort mode register
RDPort 10 read signal
WRPort 10 write signal
Show 4 more labels / short text on this page
P-ch · Selector · Internal bus · Dual-functions
Page 154 of the NEC PD78076Y user manual — P102, P103
Page 154 · click to enlarge
Page 154

CHAPTER 6 PORT FUNCTIONS

Figure 6-21. Block Diagram of P102 and P103

V DD

WR PUO

PUO10

RD

WR PORT

Output Latch (P102, P103)

P102, P103

WR PM

PM102, PM103

PUOPull-up resistor option register
PMPort mode register
RDPort 6 read signal
WRPort 6 write signal

P-ch · Selector · Internal bus

Page 155 of the NEC PD78076Y user manual — WR PM
Page 155 · click to enlarge
Page 155

CHAPTER 6 PORT FUNCTIONS

6.2.13 Port 12

This is an 8-bit input/output port with output latches. Input mode/output mode can be specified in 1-bit units with

the port mode register 12 (PM12). When pins P120 to P127 are used as input port pins, an on-chip pull-up resistor

can be connected in 8-bit units with a pull-up resistor option register H (PUOH).

These pins are dual function pin and serve as real-time outputs.

RESET input sets the input mode.

The port 12 block diagram is shown in Figure 6-22.

Figure 6-22. Block Diagram of P120 to P127

V DD

WR PUO

PUO12

RD

WR PORT

Output Latch (P120 to P127)

WR PM

PUOPull-up resistor option register
PMPort mode register
RDPort 12 read signal
WRPort 12 write signal
Show 5 more labels / short text on this page
P-ch · Selector · Internal bus · P120/RTP0 to P127/RTP7 · PM120 to PM127
Page 156 of the NEC PD78076Y user manual — P130/ANO0, P131/ANO1
Page 156 · click to enlarge
Page 156

CHAPTER 6 PORT FUNCTIONS

6.2.14 Port 13

This is a 2-bit input/output port with output latches. Input mode/output mode can be specified in 1-bit units with

the port mode register 13 (PM13). When pins P130 and P131 are used as input port pins, an on-chip pull-up resistor

can be connected in 2-bit units with a pull-up resistor option register H (PUOH).

These pins are dual function pin and serve as D/A converter analog outputs.

RESET input sets the input mode.

The port 13 block diagram is shown in Figure 6-23.

pins that are not used as analog outputs must be set as follows:

  • Set PM13x bit of the port mode register 13 (PM13) to 1 (input mode) and connect the pin

to VSS.

  • Set PM13x bit of the port mode register 13 (PM13) to 0 (output mode) and the output latch

to 0, to output low level from the pin.

Figure 6-23. Block Diagram of P130 and P131

V DD

WR PUO

PUO13

RD

WR PORT

Output Latch (P130, P131)

P130/ANO0, P131/ANO1

WR PM

PM130, PM131

PUOPull-up resistor option register
PMPort mode register
RDPort 13 read signal
WRPort 13 write signal

P-ch · Selector · Internal bus

Page 157 of the NEC PD78076Y user manual — (1) Port mode registers (PM0 to PM3, PM5 to PM10, PM12, PM13)
Page 157 · click to enlarge
Page 157

CHAPTER 6 PORT FUNCTIONS

6.3 Port Function Control Registers

The following four types of registers control the ports.

  • Port mode registers (PM0 to PM3, PM5 to PM10, PM12, PM13)
  • Pull-up resistor option register (PUOH, PUOL)
  • Memory expansion mode register (MM)
  • Key return mode register (KRM)

(1) Port mode registers (PM0 to PM3, PM5 to PM10, PM12, PM13)

These registers are used to set port input/output in 1-bit units.

PM0 to PM3, PM5 to PM10, PM12, and PM13 are independently set with a 1-bit or 8-bit memory manipulation

RESET input sets registers to FFH.

When port pins are used as alternate-function pins, set the port mode register and output latch according

to Table 6-6.

2. As port 0 has an alternate function as external interrupt request input, when the port

function output mode is specified and the output level is changed, the interrupt request

flag is set. When the output mode is used, therefore, the interrupt mask flag should

be set to 1 beforehand.

3. The memory expansion mode register specifies P40 to P47 as input/output pins.

instruction

Page 158 of the NEC PD78076Y user manual — CHAPTER 6 PORT FUNCTIONS
Page 158 · click to enlarge
Page 158

CHAPTER 6 PORT FUNCTIONS

Table 6-6. Port Mode Register and Output Latch Settings when Using Alternate Function

Pxx PMxx Input/Output Pin Name

P00 INTP0 Input 1 (Fixed) None P50 to P57 A8 to A15 Output xNote 2

TI00 Input 1 (Fixed) None P64 RD Output xNote 2

P01 INTP1 Input 1 x P65 WR Output xNote 2

TI01 Input 1 x P66 WAIT Input xNote 2

P02 to P06 INTP2 to INTP6 Input 1 x P67 ASTB Output xNote 2

P07Note 1 XT1 Input 1 (Fixed) None P80 to P87 A0 to A7 Output xNote 3

P10 to P17Note 1 ANI0 to ANI7 Input 1 x P100 TI5 Input 1 x

P30 to P32 TO0 to TO2 Output 0 0 TO5 Output 0 0

P33, P34 TI1, TI2 Input 1 x P101 TI6 Input 1 x

P35 PCL Output 0 0 TO6 Output 0 0

P36 BUZ Output 0 0 P120 to P127 RTP0 to RTP7 Output 0 Desired

P40 to P47 AD0 to AD7 Input/Output xNote 2 P130,P131Note 1 ANO0, ANO1 Output 1 x

values are read.

2. When the P40 to P47 pins P50 to P57 pins, and P64 to P67 pins are used for alternate functions,

set the function with the memory extension mode register (MM).

3. When the P80 to P87 pins are used for alternate functions, set the function with the external bus

type selection register (EBTS).

used as an I/O port.

2. When port 2 and port 7 are used for serial interface, the I/O latch or output latch must be

set according to its function. For the setting methods, see Figure 17-4. Serial Operation

Mode Register 0 Format, Figure 18-4. Serial Operation Mode Register 0 Format, Figure 19-3.

Serial Operation Mode Register 1 Format, and Table 20-2. Operating Mode Setting for Serial

Interface Channel 2.

Remarks xDon’t care
PMxxPort mode register
PxxPort output latch
Show 7 more labels / short text on this page
Alternate Function · Alternate Function · Input/Output Pin Name · Pxx PMxx · Name · Name · value
Page 159 of the NEC PD78076Y user manual — PM10
Page 159 · click to enlarge
Page 159

CHAPTER 6 PORT FUNCTIONS

Figure 6-24. Port Mode Register Format

7 6 5 4 3 2 1 0 Symbol

PM0

1 PM06 PM03 PM02 PM01 1

PM05 PM04

FF20H

FFH

R/W

PM1

PM17 PM16 PM15 PM14 PM13 PM12 PM11 PM10

FF21H

FFH

R/W

PM2

PM27 PM26 PM25 PM24 PM23 PM22 PM21 PM20

FF22H

FFH

R/W

PM3

PM37 PM36 PM35 PM34 PM33 PM32 PM31 PM30

FF23H

FFH

R/W

PM5

PM57 PM56 PM55 PM54 PM53 PM52 PM51 PM50

FF25H

FFH

R/W

PM6

PM67 PM66 PM65 PM64 PM63 PM62 PM61 PM60

FF26H

FFH

R/W

PM7

1 1 1 1 1 PM72 PM71 PM70

FF27H

FFH

R/W

PM8

PM87 PM86 PM85 PM84 PM83 PM82 PM81 PM80

FF28H

FFH

R/W

PM9 FF29H FFH R/W 1 PM96 PM95 PM94 PM93 PM92 PM91 PM90

PM10

1 1 1 1 PM103 PM102 PM101PM100

FF2AH

FFH

R/W

PM12

PM125 PM124 PM123 PM127 PM126

PM122 PM121PM120

FF2CH

FFH

R/W

PM13

1 1 1 1 1 1 PM131 PM130

FF2DH

FFH

R/W

PMmn Pmn Pin Input/Output Mode Selection (m = 0 to 3, 5 to 10, 12, 13 : n = 0 to 7)

Output mode (output buffer ON)

Input mode (output buffer OFF)

After Reset R/W · Address

Page 160 of the NEC PD78076Y user manual — PUO7 PUO6 PUO5 PUO4 PUO2 PUO1 PUO0 PUOL
Page 160 · click to enlarge
Page 160

CHAPTER 6 PORT FUNCTIONS

(2) Pull-up resistor option register (PUOH, PUOL)

This register is used to set whether to use an internal pull-up resistor at each port or not. A pull-up resistor

is internally used at bits which are set to the input mode at a port where on-chip pull-up resistor use has

been specified with PUOH, PUOL. No on-chip pull-up resistors can be used to the bits set to the output

mode or to the bits used as an analog input pin, irrespective of PUOH or PUOL setting.

PUOH and PUOL are set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets this register to 00H.

2. When ports 1, 4, 5, and P64 to P67 pins, or port 8 pins are used as dual-function pins,

an on-chip pull-up resistor cannot be used even if 1 is set in PUOm bit of PUOH and

PUOL (m = 1, 4 to 6, or 8).

3. Pins P60 to P63 and P90 to P93 can be incorporated with pull-up resistor by mask option

only for mask ROM version.

Figure 6-25. Pull-Up Resistor Option Register Format

7 6 Symbol Address

6 3

0 0 PUO13PUO12 PUO10 PUO9 PUO8 PUOH FFF3H 00H R/W

6

PUO7 PUO6 PUO5 PUO4 PUO2 PUO1 PUO0 PUOL

FFF7H 00H R/W PUO3

PUOm Pm Internal Pull-up Resistor Selection

(m = 0 to 10, 12, 13)

Internal pull-up resistor not used

Internal pull-up resistor used

After Reset R/W

Page 161 of the NEC PD78076Y user manual — PW1 PW0
Page 161 · click to enlarge
Page 161

CHAPTER 6 PORT FUNCTIONS

(3) Memory expansion mode register (MM)

This register is used to set input/output of port 4.

MM is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets this register to 10H.

Figure 6-26. Memory Expansion Mode Register Format

After Reset R/W 1

7 6 5 4 3 2 Symbol Address

0 0 PW1 0 MM FFF8H 10H R/W

PW0 MM2 MM1 MM0

Single-chip/Memory Expansion Mode Selection

P40 to P47, P50 to P57, P64 to P67, P80 to P87 Pin State

MM2 MM1 MM0

P40 to P47 P80 to P87 P56, P57 P64 to P67

P50 to P53 P54, P55

P64 = RD

P65 = WR

A0 to A7Note 1

P66 = WAIT

P67 = ASTB

A12, A13

A14, A15

Other than above Setting prohibited

PW1 PW0

Wait (one wait state insertion)

Wait control by external wait pin

device is switched to the multiplexed bus mode.

2. The full address mode allows external expansion for all areas of the 64-Kbyte address space,

except the internal ROM, RAM, SFR, and use-prohibited areas.

Remarks 1. P60 to P63 pins enter the port mode in both the single-chip and memory expansion mode.

2. Besides setting port 4 input/output, MM also sets the wait count and external expansion area.
Show 19 more labels / short text on this page
Input · Port mode · Single-chip mode · Port mode · Out- put · 256-byte mode · Port mode · 4-Kbyte mode · Port mode · Memory expansion mode · AD0 to AD7 · 16-Kbyte mode · A8 to A11 · Port mode · FullNote 2 · address mode · Wait Control · No wait · Setting prohibited
Page 162 of the NEC PD78076Y user manual — 0 0 0 0 KRM FFF6H
Page 162 · click to enlarge
Page 162

CHAPTER 6 PORT FUNCTIONS

(4) Key return mode register (KRM)

This register sets enabling/disabling of standby function release by a key return signal (falling edge detection

of port 4).

KRM is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets KRM to 02H.

Figure 6-27. Key Return Mode Register Format

7 6 5 4 3 2 Symbol

0 KRM FFF6H

0 KRMK KRIF

02H R/W

KRIF Key Return Signal Detection Flag

Detected (Falling edge detection of port 4)

KRMK Standby Mode Control by Key Return Signal

Standby mode release enabled

Standby mode release disabled

0 automatically).

Show 4 more labels / short text on this page
After Reset R/W · <0> · Address · Not Detected
Page 163 of the NEC PD78076Y user manual — (2) Input mode
Page 163 · click to enlarge
Page 163

CHAPTER 6 PORT FUNCTIONS

6.4 Port Function Operations

Port operations differ depending on whether the input or output mode is set, as shown below.

6.4.1 Writing to input/output port

(1) Output mode

A value is written to the output latch by a transfer instruction, and the output latch contents are output from

the pin.

Once data is written to the output latch, it is retained until data is written to the output latch again.

(2) Input mode

A value is written to the output latch by a transfer instruction, but since the output buffer is OFF, the pin status

does not change.

Once data is written to the output latch, it is retained until data is written to the output latch again.

the port is accessed as an 8-bit unit. Therefore, on a port with a mixture of input and output

pins, the output latch contents for pins specified as input are undefined except for the

manipulated bit.

6.4.2 Reading from input/output port

(1) Output mode

The output latch contents are read by a transfer instruction. The output latch contents do not change.

(2) Input mode

The pin status is read by a transfer instruction. The output latch contents do not change.

6.4.3 Operations on input/output port

(1) Output mode

An operation is performed on the output latch contents, and the result is written to the output latch. The

output latch contents are output from the pins.

Once data is written to the output latch, it is retained until data is written to the output latch again.

(2) Input mode

The output latch contents are undefined, but since the output buffer is OFF, the pin status does not change.

the port is accessed as an 8-bit unit. Therefore, on a port with a mixture of input and output

pins, the output latch contents for pins specified as input are undefined, even for bits other

than the manipulated bit.

Page 164 of the NEC PD78076Y user manual — CHAPTER 6 PORT FUNCTIONS
Page 164 · click to enlarge
Page 164

CHAPTER 6 PORT FUNCTIONS

6.5 Selection of Mask Option

The following mask option is provided in mask ROM version. The µPD78P078 and 78P078Y have no mask option.

Table 6-7. Comparison between Mask ROM Version and the µPD78P078 and 78P078Y

Pin Name Mask ROM Version µPD78P078 and 78P078Y

Mask option for pins P60 to P63 and Bitwise-selectable on-chip pull-up No on-chip pull-up resistor P90 to P93 resistors

Page 165 of the NEC PD78076Y user manual — (2) Subsystem clock oscillator
Page 165 · click to enlarge
Page 165

CHAPTER 7 CLOCK GENERATOR

7.1 Clock Generator Functions

The clock generator generates the clock to be supplied to the CPU and peripheral hardware. The following two

types of system clock oscillators are available.

(1) Main system clock oscillator

This circuit oscillates at frequencies of 1 to 5.0 MHz. Oscillation can be stopped by executing the STOP

instruction or setting the processor clock control register (PCC).

(2) Subsystem clock oscillator

The circuit oscillates at a frequency of 32.768 kHz. Oscillation cannot be stopped. If the subsystem clock

oscillator is not used, not using the internal feedback resistance can be set by the processor clock control

register (PCC). This enables to decrease power consumption in the STOP mode.

Page 166 of the NEC PD78076Y user manual — STOP
Page 166 · click to enlarge
Page 166

CHAPTER 7 CLOCK GENERATOR

7.2 Clock Generator Configuration

The clock generator consists of the following hardware.

Table 7-1. Clock Generator Configuration

Control register Processor clock control register (PCC)

Oscillation mode selection register (OSMS)

Oscillator Main system clock oscillator

Figure 7-1. Block Diagram of Clock Generator

FRC

XT1/P07

Watch Timer, Clock Output Function

XT2

Clock to Peripheral Hardware

Main System Clock Oscillator X2

22 fXX

23 fXX

24 fXX

CPU Clock (fCPU)

To INTP0 Sampling Clock

STOP

MCS

MCC FRC CLS CSS PCC2 PCC1

PCC0

Oscillation Mode Selection Register

Processor Clock Control Register

Show 18 more labels / short text on this page
Item Configuration · Subsystem clock oscillator · Subsystem Clock Oscillator · fXT · Prescaler · 1/2 · fX · Selector · Prescaler · 2 fXT · fXX · Divider · 2 fX · 2 fXX · Selector · Standby Control Circuit · Wait Control Circuit · Internal Bus
Page 167 of the NEC PD78076Y user manual — Figure 7-2. Subsystem Clock Feedback Resistor
Page 167 · click to enlarge
Page 167

CHAPTER 7 CLOCK GENERATOR

7.3 Clock Generator Control Register

The clock generator is controlled by the following two registers:

  • Processor clock control register (PCC)
  • Oscillation mode selection register (OSMS)

(1) Processor clock control register (PCC)

The PCC selects a CPU clock and the division ratio, determines whether to make the main system clock

oscillator operate or stop, and enables or desables the subsystem clock oscillator internal feedback resistor.

The PCC is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets the PCC to 04H.

Figure 7-2. Subsystem Clock Feedback Resistor

FRC

XT1 XT2

P-ch · Feedback resistor

Page 168 of the NEC PD78076Y user manual — R/W
Page 168 · click to enlarge
Page 168

CHAPTER 7 CLOCK GENERATOR

Figure 7-3. Processor Clock Control Register Format

Symbol Address

3 2 0 1

MCC FRC CLS CSS PCC2 PCC1 PCC0 PCC

R/WNote 1 0

FFFBH 04H

CPU CIock (fCPU) Selection PCC1 PCC0

R/W

CSS

PCC2

MCS = 1 MCS = 0

2 fX/2

0 fXX/2

Setting prohibited Other than above

R

CLS

R/W

FRC

Subsystem Clock Feedback Resistor Selection

Internal feedback resistor used

Internal feedback resistor not used

R/W

MCC

Main System Clock Oscillation ControlNote 2

2. When the CPU is operating on the subsystem clock, MCC should be used to stop the main

system clock oscillation. A STOP instruction should not be used.

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. f XT : Subsystem clock oscillation frequency
4. MCS : Bit 0 of oscillation mode selection register (OSMS)
Show 20 more labels / short text on this page
After Reset R/W · fXX · fX · fX/2 · fX/2 · fXX/2 · fX/2 · fX/2 · fXX/2 · fX/2 · fX/2 · fXX/2 · fX/2 · fX/2 · fXT/2 · CPU Clock Status · Main system clock · Subsystem clock · Oscillation possible · Oscillation stopped
Page 169 of the NEC PD78076Y user manual — Table 7-2. Relationship between CPU Clock and Minimum Instruction Execution Time
Page 169 · click to enlarge
Page 169

CHAPTER 7 CLOCK GENERATOR

The fastest instruction of the µPD78078 and 78078Y Subseries can be executed in two clocks of the CPU clock.

The relationship between the CPU clock (fCPU) and the minimum instruction execution time is shown in Table 7-2.

Table 7-2. Relationship between CPU Clock and Minimum Instruction Execution Time

CPU Clock (fCPU) Minimum Instruction Execution Time: 2/fCPU

fX 0.4 µs

fX/2 0.8 µs

fX/22 1.6 µs

fX/23 3.2 µs

fX/24 6.4 µs

fX/25 12.8 µs

fXT/2 122 µs

fX = 5.0 MHz, fXT = 32.768 kHz

f XMain system clock oscillation frequency
f XTSubsystem clock oscillation frequency
Page 170 of the NEC PD78076Y user manual — Figure 7-5. Main System Clock Waveform due to Writing to OSMS
Page 170 · click to enlarge
Page 170

CHAPTER 7 CLOCK GENERATOR

(2) Oscillation mode selection register (OSMS)

This register specifies whether the clock output from the main system clock oscillator without passing through

the scaler is used as the main system clock, or the clock output via the scaler is used as the main system

clock.

OSMS is set with 8-bit memory manipulation instruction.

RESET input sets OSMS to 00H.

Figure 7-4. Oscillation Mode Selection Register Format

7 6 5 4 3 2 Symbol 1

0 OSMS FFF2H

0 MCS

00H W 0

MCS Main System Clock Scaler Control

cause delay of main system clock cycle up to 2/fx during the write operation. Therefore,

if this register is written during the operation, in peripheral hardware which operates with

the main system clock, a temporary error occurs in the count clock cycle of timer, etc.

In addition, because the oscillation mode is changed by this register, the clocks for

peripheral hardware as well as that for the CPU are switched.

Therefore, writing to OSMS should be performed only immediately after reset signal

release and before peripheral hardware operation starts.

2. When writing “1” to MCS, V DD must be 2.7 V or higher before the write execution.

Figure 7-5. Main System Clock Waveform due to Writing to OSMS

(MCS 0)

Max. 2/fX

Operating at fXX = fX/2 (MCS = 0) Operating at fXX = fX/2 (MCS = 0)

Remarks fxxMain system clock frequency (fx or fx/2)
fxMain system clock oscillation frequency
Show 6 more labels / short text on this page
After Reset R/W · Address · Scaler used · Scaler not used · Write to OSMS · fXX
Page 171 of the NEC PD78076Y user manual — Figure 7-6. External Circuit of Main System Clock Oscillator
Page 171 · click to enlarge
Page 171

CHAPTER 7 CLOCK GENERATOR

7.4 System Clock Oscillator

7.4.1 Main system clock oscillator

The main system clock oscillator oscillates with a crystal resonator or a ceramic resonator (standard: 5.0 MHz)

connected to the X1 and X2 pins.

External clocks can be input to the main system clock oscillator. In this case, input a clock signal to the X1 pin

and an antiphase clock signal to the X2 pin.

Figure 7-6 shows an external circuit of the main system clock oscillator.

Figure 7-6. External Circuit of Main System Clock Oscillator

(a) Crystal and ceramic oscillation (b) External clock

Crystal or Ceramic Resonator

(PCC)) to 1 while an external clock is input. This is because the operation of main system clock

is stopped and X2 pin is pulled-up to VDD when a STOP instruction is executed and MCC is set

to 1.

External Clock · X1 PD74HCU04 µ

Page 172 of the NEC PD78076Y user manual — IC X2 X1 X2 X1
Page 172 · click to enlarge
Page 172

CHAPTER 7 CLOCK GENERATOR

7.4.2 Subsystem clock oscillator

The subsystem clock oscillator oscillates with a crystal resonator (standard: 32.768 kHz) connected to the XT1

and XT2 pins.

External clocks can be input to the subsystem clock oscillator. In this case, input a clock signal to the XT1 pin

and an antiphase clock signal to the XT2 pin.

Figure 7-7 shows an external circuit of the subsystem clock oscillator.

Figure 7-7. External Circuit of Subsystem Clock Oscillator

(a) Crystal oscillation (b) External clock

XT2

XT2

32.768 kHz

XT1

XT1

wiring in the broken-line area in Figures 7-6 and 7-7 as follows to prevent any effects from

wiring capacities.

  • Minimize the wiring length.
  • Do not allow wiring to intersect with other signal conductors. Do not allow wiring to come

near abruptly changing high current.

  • Set the potential of the grounding position of the oscillator capacitor to that of V SS . Do

not ground to any ground pattern where high current is present.

  • Do not fetch signals from the oscillator.

Take special note of the fact that the subsystem clock oscillator is a circuit with low-level

amplification so that current consumption is maintained at low levels.

Figure 7-8 shows examples of oscillator having bad connection.

Figure 7-8. Examples of Oscillator with Bad Connection (1/2)

(a) Wiring of connection (b) A signal line crosses over

circuits is too long oscillation circuit lines

PORTn (n = 0 to 10, 12, 13)

IC X2 X1 X2 X1

Remark When using a subsystem clock, replace X1 and X2 with XT1 and XT2, respectively. Further, insert

resistors in series on the side of XT2.

External Clock · PD74HCU04 µ

Page 173 of the NEC PD78076Y user manual — signal conductor of the oscillator (potential at points A, B,
Page 173 · click to enlarge
Page 173

CHAPTER 7 CLOCK GENERATOR

Figure 7-8. Examples of Oscillator with Bad Connection (2/2)

(c) Changing high current is too near a (d) Current flows through the grounding line

signal conductor of the oscillator (potential at points A, B,

and C fluctuate)

V DD

IC X2 X1

A B C

(e) Signals are fetched (f) Signal conductors of the main and sub-

system clock are parallel and near

each other

IC X2 X1

IC X2 X1 XT1 XT2

XT1 and XT2 are wiring in parallel

Remark When using a subsystem clock, replace X1 and X2 with XT1 and XT2, respectively. Also, insert

resistors in series on the XT2 side.

increase with XT2, resulting in malfunctioning. To prevent that from occurring, it is

recommended to wire XT2 and X1 so that they are not in parallel, and to connect the IC

pin between XT1 and X1 directly to VSS.

Pnm · High Current · High Current

Page 174 of the NEC PD78076Y user manual — 7.4.4 When no subsystem clocks are used
Page 174 · click to enlarge
Page 174

CHAPTER 7 CLOCK GENERATOR

7.4.3 Divider

The divider generates various clocks by dividing the main system clock oscillator output (fXX).

7.4.4 When no subsystem clocks are used

If it is not necessary to use subsystem clocks for low power consumption operations and clock operations,

connect the XT1 and XT2 pins as follows.

XT1Connect to V DD
XT2Open

In this state, however, some current may leak via the internal feedback resistor of the subsystem clock oscillator

when the main system clock stops. To minimize leakage current, set bit 6 (FRC) of the processor clock control register

(PCC) so that the above internal feedback resistor is not used. In this case also, connect the XT1 and XT2 pins as

described above.

Page 175 of the NEC PD78076Y user manual — CHAPTER 7 CLOCK GENERATOR
Page 175 · click to enlarge
Page 175

CHAPTER 7 CLOCK GENERATOR

7.5 Clock Generator Operations

The clock generator generates the following various types of clocks and controls the CPU operating mode

including the standby mode.

  • Main system clock f XX
  • Subsystem clock f XT
  • CPU clock f CPU
  • Clock to peripheral hardware

The following clock generator functions and operations are determined with the processor clock control register

(PCC) and the oscillation mode selection register (OSMS).

(a) Upon generation of RESET signal, the lowest speed mode of the main system clock (12.8 µs when operated

at 5.0 MHz) is selected (PCC = 04H, OSMS = 00H). Main system clock oscillation stops while the low level

is applied to RESET pin.

(b) With the main system clock selected, one of the five CPU clock stages (fXX, fXX/2, fXX/22, fXX/23 or fXX/24) can

be selected by setting the PCC and OSMS.

(c) With the main system clock selected, two standby modes, the STOP and HALT modes, are available. In a

system which is not using the subsystem clock, the current consumption in the STOP mode can be reduced

further by setting bit 6 (FRC) of the PCC so as not to use the on-chip feedback resistor.

(d) The PCC can be used to select the subsystem clock and to operate the system with low current consumption

(122 µs when operated at 32.768 kHz).

(e) With the subsystem clock selected, main system clock oscillation can be stopped with the PCC. The HALT

mode can be used. However, the STOP mode cannot be used. (Subsystem clock oscillation cannot be

stopped.)

(f) The main system clock is divided and supplied to the peripheral hardware. The subsystem clock is supplied

to 16-bit timer/event counter, the watch timer, and clock output functions only. Thus, 16-bit timer/event counter

(when selecting watch timer output for count clock operating with subsystem clock), the watch function, and

the clock output function can also be continued in the standby state. However, since all other peripheral

hardware operate with the main system clock, the peripheral hardware also stops if the main system clock

is stopped. (Except external input clock operation)

Page 176 of the NEC PD78076Y user manual — MCC
Page 176 · click to enlarge
Page 176

CHAPTER 7 CLOCK GENERATOR

7.5.1 Main system clock operations

When operated with the main system clock (with bit 5 (CLS) of the processor clock control register (PCC) set to

0), the following operations are carried out by PCC setting.

(a) Because the operation guarantee instruction execution speed depends on the power supply voltage, the

minimum instruction execution time can be changed by bits 0 to 2 (PCC0 to PCC2) of the PCC.

(b) If bit 7 (MCC) of the PCC is set to 1 when operated with the main system clock, the main system clock oscillation

does not stop. When bit 4 (CSS) of the PCC is set to 1 and the operation is switched to subsystem clock

operation (CLS = 1) after that, the main system clock oscillation stops (see Figure 7-9).

Figure 7-9. Main System Clock Stop Function (1/2)

(a) Operation when MCC is set after setting CSS with main system clock operation

MCC

CSS

CLS

Main System Clock Oscillation

(b) Operation when MCC is set in case of main system clock operation

MCC

CSS

CLS

Oscillation does not stop.

Main System Clock Oscillation

Show 4 more labels / short text on this page
Subsystem Clock Oscillation · CPU Clock · Subsystem Clock Oscillation · CPU Clock
Page 177 of the NEC PD78076Y user manual — 7.5.2 Subsystem clock operations
Page 177 · click to enlarge
Page 177

CHAPTER 7 CLOCK GENERATOR

Figure 7-9. Main System Clock Stop Function (2/2)

(c) Operation when CSS is set after setting MCC with main system clock operation

MCC

CSS

CLS

Main System Clock Oscillation

7.5.2 Subsystem clock operations

When operated with the subsystem clock (with bit 5 (CLS) of the processor clock control register (PCC) set to 1),

the following operations are carried out.

(a) The minimum instruction execution time remains constant (122 µs when operated at 32.768 kHz) irrespective

of bits 0 to 2 (PCC0 to PCC2) of the PCC.

(b) Watchdog timer counting stops.

Subsystem Clock Oscillation · CPU Clock

Page 178 of the NEC PD78076Y user manual — simultaneously. Simultaneous setting is possible, however, for selection of the CPU clock
Page 178 · click to enlarge
Page 178

CHAPTER 7 CLOCK GENERATOR

7.6 Changing System Clock and CPU Clock Settings

7.6.1 Time required for switchover between system clock and CPU clock

The system clock and CPU clock can be switched over by means of bit 0 to bit 2 (PCC0 to PCC2) and bit 4 (CSS)

of the processor clock control register (PCC).

The actual switchover operation is not performed directly after writing to the PCC, but operation continues on the

pre-switchover clock for several instructions (see Table 7-3).

Determination as to whether the system is operating on the main system clock or the subsystem clock is performed

by bit 5 (CLS) of the PCC register.

Table 7-3. Maximum Time Required for CPU Clock Switchover

Set Values after Switchover Set Values before Switchover

MCS CSS PCC2 PCC1 PCC0 CSS PCC2PCC1PCC0 CSS PCC2PCC1PCC0 CSS PCC2PCC1PCC0 CSS PCC2PCC1PCC0 CSS PCC2PCC1PCC0 CSS PCC2 PCC1PCC0

0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 X X X

X 0 8 instructions 4 instructions 2 instructions 1 instruction 1 instruction

0 0 1 16 instructions 4 instructions 2 instructions 1 instruction 1 instruction

0 1 0 16 instructions 8 instructions 2 instructions 1 instruction 1 instruction

0 1 1 16 instructions 8 instructions 4 instructions 1 instruction 1 instruction

1 0 0 16 instructions 8 instructions 4 instructions 2 instructions 1 instruction

1 1 X X X fX/2fXT instruction fX/4fXT instruction fX/8fXT instruction fX/16fXT instruction fX/32fXT instruction

(77 instructions) (39 instructions) (20 instructions) (10 instructions) (5 instructions)

0 fX/4fXT instruction fX/8fXT instruction fX/16fXT instruction fX/32fXT instruction fX/64fXT instruction

(39 instructions) (20 instructions) (10 instructions) (5 instructions) (3 instructions)

system clock to the subsystem clock (changing CSS from 0 to 1) should not be performed

simultaneously. Simultaneous setting is possible, however, for selection of the CPU clock

cycle scaling factor (PCC0 to PCC2) and switchover from the subsystem clock to the main

system clock (changing CSS from 1 to 0).

Remarks 1. One instruction is the minimum instruction execution time with the pre-switchover CPU clock.

2. Figures in parentheses apply to operation with f X = 5.0 MHz and f XT = 32.768 kHz.
Page 179 of the NEC PD78076Y user manual — Figure 7-10. System Clock and CPU Clock Switching
Page 179 · click to enlarge
Page 179

CHAPTER 7 CLOCK GENERATOR

7.6.2 System clock and CPU clock switching procedure

This section describes switching procedure between system clock and CPU clock.

Figure 7-10. System Clock and CPU Clock Switching

V DD

RESET

fXX fXX fXT fXX

Wait (26.2 ms5.0 MHz)

(1) The CPU is reset by setting the RESET signal to low level after power-on. After that, when reset is released

by setting the RESET signal to high level, main system clock starts oscillation. At this time, oscillation

stabilization time (217/fX) is secured automatically.

After that, the CPU starts executing the instruction at the minimum speed of the main system clock (12.8 µs when

operated at 5.0 MHz).

(2) After the lapse of a sufficient time for the VDD voltage to increase to enable operation at maximum speeds,

the processor clock control register (PCC) and oscillation mode selection register (OSMS) are rewritten and

the maximum-speed operation is carried out.

(3) Upon detection of a decrease of the VDD voltage due to an interrupt request signal, the main system clock

is switched to the subsystem clock (which must be in an oscillation stable state).

(4) Upon detection of VDD voltage reset due to an interrupt request signal, 0 is set to bit 7 (MCC) of PCC and

oscillation of the main system clock is started. After the lapse of time required for stabilization of oscillation,

the PCC and OSMS are rewritten and the maximum-speed operation is resumed.

to the main system clock is made again, be sure to switch after securing oscillation stable time

by software.

Show 8 more labels / short text on this page
Interrupt Request Signal · System Clock · CPU Clock · Minimum Speed Operation · Maximum Speed Operation · Subsystem Clock Operation · High-Speed Operation · Internal Reset Operation
Page 180 of the NEC PD78076Y user manual — [MEMO]
Page 180 · click to enlarge
Page 180

[MEMO]

Page 181 of the NEC PD78076Y user manual — (7) Buzzer output control circuit
Page 181 · click to enlarge
Page 181

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

8.1 Outline of Timers Incorporated into µ PD78078, 78078Y Subseries

This chapter explains the 16-bit timer/event counter. First of all, the timers incorporated into the µPD78078, 78078Y

Subseries and the related circuits are outlined below.

(1) 16-bit timer/event counter (TM0)

The TM0 can be used for an interval timer, PWM output, pulse widths measurement (infrared ray remote

control receive function), external event counter, square wave output of any frequency or one-shot pulse

output.

(2) 8-bit timers/event counters 1 and 2 (TM1 and TM2)

TM1 and TM2 can be used to serve as an interval timer and an external event counter and to output square

waves with any selected frequency. Two 8-bit timer/event counters can be used as one 16-bit timer/event

counter (See CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2).

(3) 8-bit timer/event counters 5 and 6 (TM5 and TM6)

TM5 and TM6 can be used to serve as an interval timer and external event counter and to output any

frecuency square waves. These cannot be used as 16-bit timer/event counters (See CHAPTER 10 8-

BIT TIMER/EVENT COUNTER 5 AND 6).

(4) Watch timer (TM3)

This timer can set a flag every 0.5 sec. and simultaneously generates interrupt requests at the preset time

intervals (See CHAPTER 11 WATCH TIMER).

(5) Watchdog timer (WDTM)

WDTM can perform the watchdog timer function or generate non-maskable interrupt requests, maskable

interrupt requests and RESET at the preset time intervals (See CHAPTER 12 WATCHDOG TIMER).

(6) Clock output control circuit

This circuit supplies other devices with the divided main system clock and the subsystem clock (See CHAPTER

13 CLOCK OUTPUT CONTROL CIRCUIT).

(7) Buzzer output control circuit

This circuit outputs the buzzer frequency obtained by dividing the main system clock (See CHAPTER

14 BUZZER OUTPUT CONTROL CIRCUIT).

Page 182 of the NEC PD78076Y user manual — CHAPTER 8 16-BIT TIMER/EVENT COUNTER
Page 182 · click to enlarge
Page 182

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Table 8-1. Timer/Event Counter Operations

16-bit timer/ 8-bit timer/event 8-bit timer/event Watch timer Watchdog timer

event counter counters 1 and 2 counters 5 and 6

Operation Interval timer 2 channelsNote 3 2 channels 2 channels 1 channelNote 1 1 channelNote 2

mode External event counter √ √ √ — —

Function Timer output √ √ √ — —

PWM output √ — √ — —

Pulse width measurement √ —

Square-wave output √ √ √ — —

One-shot pulse output √ —

Interrupt request √

Test input — — — √ —

2. The watchdog timer can perform either the watchdog timer function or the interval timer function.
3. When capture/compare registers (CR00, CR01) are specified as compare registers.
Page 183 of the NEC PD78076Y user manual — (4) External event counter
Page 183 · click to enlarge
Page 183

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

8.2 16-Bit Timer/Event Counter Functions

The 16-bit timer/event counter (TM0) has the following functions.

  • Interval timer
  • PWM output
  • Pulse width measurement
  • External event counter
  • Square-wave output
  • One-shot pulse output

TM0 can perform both PWM output and pulse width measurement at the same time.

(1) Interval timer

TM0 generates interrupt requests at the preset time interval.

Table 8-2. 16-Bit Timer/Event Counter Interval Times

Minimum Interval Time Maximum Interval Time Resolution

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

2 x TI00 input cycle 216 x TI00 input cycle TI00 input edge cycle

2 x 1/fX 216 x 1/fX 1/fX

(400 ns) (13.1 ms) (200 ns)

2 x 1/fX 22 x 1/fX 216 x 1/fX 217 x 1/fX 1/fX 2 x 1/fX

(400 ns) (800 ns) (13.1 ms) (26.2 ms) (200 ns) (400 ns)

22 x 1/fX 23 x 1/fX 217 x 1/fX 218 x 1/fX 2 x 1/fX 22 x 1/fX

(800 ns) (1.6 µs) (26.2 ms) (52.4 ms) (400 ns) (800 ns)

23 x 1/fX 24 x 1/fX 218 x 1/fX 219 x 1/fX 22 x 1/fX 23 x 1/fX

(1.6 µs) (3.2 µs) (52.4 ms) (104.9 ms) (800 ns) (1.6 µs)

2 x watch timer output cycle 216 x watch timer output cycle Watch timer output edge cycle

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. Figures in parentheses apply to operation with f X = 5.0 MHz.

(2) PWM output

TM0 can generate 14-bit resolution PWM output.

(3) Pulse width measurement

TM0 can measure the pulse width of an externally input signal.

(4) External event counter

TM0 can measure the number of pulses of an externally input signal.

Page 184 of the NEC PD78076Y user manual — (6) One-shot pulse output
Page 184 · click to enlarge
Page 184

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(5) Square-wave output

TM0 can output a square wave with any selected frequency.

Table 8-3. 16-Bit Timer/Event Counter Square-Wave Output Ranges

Minimum Pulse Width Maximum Pulse Width Resolution

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

2 x TI00 input cycle 216 x TI00 input cycle TI00 input edge cycle

2 x 1/fX 216 x 1/fX 1/fX

(400 ns) (13.1 ms) (200 ns)

2 x 1/fX 22 x 1/fX 216 x 1/fX 217 x 1/fX 1/fX 2 x 1/fX

(400 ns) (800 ns) (13.1 ms) (26.2 ms) (200 ns) (400 ns)

22 x 1/fX 23 x 1/fX 217 x 1/fX 218 x 1/fX 2 x 1/fX 22 x 1/fX

(800 ns) (1.6 µs) (26.2 ms) (52.4 ms) (400 ns) (800 ns)

23 x 1/fX 24 x 1/fX 218 x 1/fX 219 x 1/fX 22 x 1/fX 23 x 1/fX

(1.6 µs) (3.2 µs) (52.4 ms) (104.9 ms) (800 ns) (1.6 µs)

2 x watch timer output cycle 216 x watch timer output cycle Watch timer output edge cycle

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. Figures in parentheses operation with f X = 5.0 MHz.

(6) One-shot pulse output

TM0 is able to output one-shot pulse which can set any width of output pulse.

Page 185 of the NEC PD78076Y user manual — Table 8-4. 16-Bit Timer/Event Counter Configuration
Page 185 · click to enlarge
Page 185

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

8.3 16-Bit Timer/Event Counter Configuration

The 16-bit timer/event counter consists of the following hardware.

Table 8-4. 16-Bit Timer/Event Counter Configuration

Timer register 16 bits x 1 (TM0)

Register Capture/compare register16 bits x 2 (CR00, CR01)

Timer output 1 (TO0)

Timer clock select register 0 (TCL0)

16-bit timer mode control register (TMC0)

Capture/compare control register 0 (CRC0)

Control register 16-bit timer output control register (TOC0)

Port mode register 3 (PM3)

External interrupt mode register 0 (INTM0)

Sampling clock select register (SCS)Note

Item Configuration

Page 186 of the NEC PD78076Y user manual — INTP0 INTTM01
Page 186 · click to enlarge
Page 186

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Figure 8-1. 16-Bit Timer/Event Counter Block Diagram

Capture/Compare Control Register 0

CRC02 CRC01 CRC00

INTP1

TI01 /

P01 / INTP1

16-Bit Capture/Compare Control Register (CR00)

INTTM00

PWM Pulse Output Control

INTTM3

2fXX fXX fXX/2 fXX/22

16-Bit Timer/Event Counter Output Control Circuit

TO0/P30

16-Bit Timer Register (TM0)

TI00 /

P00 / INTP0

INTP0 INTTM01

TCL06 TCL05 TCL04

16-Bit Capture/Compare Control Register (CR01)

TMC03 TMC02 TMC01 OVF0 OSPT OSPE TOC04 LVS0 LVR0 TOC01 TOE0

16-Bit Timer Output Control Register

16-Bit Timer Mode Control Register

Selection Register 0 CRC02

2. The configuration of the 16-bit timer/event counter output control circuit is shown in Figure 8-2.
Show 11 more labels / short text on this page
Internal bus · Selector · Match · Selector · TMC01 to TMC03 · Clear Circuit · Clear · TMC01 to TMC03 · Match · Timer Clock · Internal Bus
Page 187 of the NEC PD78076Y user manual — S
Page 187 · click to enlarge
Page 187

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Figure 8-2. 16-Bit Timer/Event Counter Output Control Circuit Block Diagram

PWM Pulse Output Control Circuit

CRC02 INTTM01

CRC00 INTTM00

INV

Q

TO0/P30

TI00 /

P00 / INTP0

One-Shot Pulse Output Control Circuit

S

R

ES11 ES10

OSPT

OSPE TOC04 LVS0 LVR0 TOC01 TOE0

TMC03 TMC02 TMC01 P30 Output Latch PM30

External Interrupt Mode Register 0

16-Bit Timer Output Control Register

16-Bit Timer Mode Control

Port Mode Register 3

Remark The circuitry enclosed by the dotted line is the output control circuit.

Show 6 more labels / short text on this page
Level Inversion · Selector · Selector · Edge Detection Circuit · Register · Internal Bus
Page 188 of the NEC PD78076Y user manual — (2) Capture/compare register 01 (CR01)
Page 188 · click to enlarge
Page 188

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(1) Capture/compare register 00 (CR00)

CR00 is a 16-bit register which has the functions of both a capture register and a compare register. Whether

it is used as a capture register or as a compare register is set by bit 0 (CRC00) of capture/compare control

register 0 (CRC0).

When CR00 is used as a compare register, the value set in the CR00 is constantly compared with the 16-

bit timer register (TM0) count value, and an interrupt request (INTTM00) is generated if they match. CR00

is used as a register to hold the interval time when TM0 is set to interval timer operation, and it is used as

a register to set the pulse width when TM0 is set to the PWM output operation.

When CR00 is used as a capture register, it is possible to select the valid edge of the INTP0/TI00 pin or

the INTP1/TI01 pin as the capture trigger. The INTP0/TI00 or INTP1/TI01 valid edge is set by means of

external interrupt mode register 0 (INTM0).

If CR00 is specified as a capture register and capture trigger is specified to be the valid edge of the INTP0/

TI00 pin, the situation is as shown in the following table.

Table 8-5. INTP0/TI00 Pin Valid Edge and CR00 Capture Trigger Valid Edge

ES11 ES10 INTP0/TI00 Pin Valid Edge CR00 Capture Trigger Valid Edge

0 0 Falling edge Rising edge

0 1 Rising edge Falling edge

1 0 Setting prohibited

1 1 Both rising and falling edges No capture operation

CR00 is set by a 16-bit memory manipulation instruction.

After RESET input, the value of CR00 is undefined.

2. Set values other than 0000H to CR00. Therefore, when used as an event counter, 1-pulse

count operation cannot be executed.

3. When the value after CR00 is changed is smaller than the 16-bit timer register (TM0)

value, TM0 continues to count, overflows, and resumes counting from zero. Therefore,

when the value after CR00 is changed (M) is smaller than the value before CR00 is

changed (N), it is necessary to restart the timer after changing CR00.

(2) Capture/compare register 01 (CR01)

CR01 is a 16-bit register which has the functions of both a capture register and a compare register. Whether

it is used as a capture register or a compare register is set by bit 2 (CRC02) of capture/compare control

register 0.

When CR01 is used as a compare register, the value set in the CR01 is constantly compared with the 16-

bit timer register (TM0) count value, and an interrupt request (INTTM01) is generated if they match.

When CR01 is used as a capture register, it is possible to select the valid edge of the INTP0/TI00 pin as

the capture trigger. Setting of the INTP0/TI00 valid edge is set by means of external interrupt mode register

0 (INTM0).

CR01 is set with a 16-bit memory manipulation instruction.

After RESET input, the value of CR01 is undefined.

capture operation and retains the data. However, the interrupt request flag (PIF0) is set

by the detection of a valid edge.

Page 189 of the NEC PD78076Y user manual — CHAPTER 8 16-BIT TIMER/EVENT COUNTER
Page 189 · click to enlarge
Page 189

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(3) 16-bit timer register (TM0)

TM0 is a 16-bit register which counts the count pulses.

TM0 is read by a 16-bit memory manipulation instruction. When TM0 is read, capture/compare register

(CR01) should first be set as a capture register.

RESET input sets TM0 to 0000H.

Page 190 of the NEC PD78076Y user manual — (1) Timer clock select register 0 (TCL0)
Page 190 · click to enlarge
Page 190

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

8.4 16-Bit Timer/Event Counter Control Registers

The following seven types of registers are used to control the 16-bit timer/event counter.

  • Timer clock select register 0 (TCL0)
  • 16-bit timer mode control register (TMC0)
  • Capture/compare control register 0 (CRC0)
  • 16-bit timer output control register (TOC0)
  • Port mode register 3 (PM3)
  • External interrupt mode register 0 (INTM0)
  • Sampling clock select register (SCS)

(1) Timer clock select register 0 (TCL0)

This register is used to set the count clock of the 16-bit timer register.

TCL0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets TCL0 value to 00H.

Remark TCL0 has the function of setting the PCL output clock in addition to that of setting the count clock

of the 16-bit timer register.

Page 191 of the NEC PD78076Y user manual — CLOE
Page 191 · click to enlarge
Page 191

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Figure 8-3. Timer Clock Selection Register 0 Format

6 5 4 3 2 1 0 Symbol

Address After Reset R/W

TCL0

CLOE TCL06 TCL05 TCL04 TCL03 TCL02 TCL01 TCL00

FF40H 00H R/W

PCL Output Clock Selection

TCL03 TCL02 TCL01 TCL00

MCS = 1

MCS = 0

0 fXT (32.768 kHz)

0 1 0 1 fXX fX (5.0 MHz) fX/2 (2.5 MHz)

0 1 1 0 fXX/2 fX/2 (2.5 MHz) fX/2

2 (1.25 MHz)

0 1 1 1 fXX/2

2 fX/2

2 (1.25 MHz) fX/2

1 0 0 0 fXX/2

3 fX/2

3 (625 kHz) fX/2

4 fX/2

4 (313 kHz) fX/2

1 0 0 1 fXX/2

1 0 1 0 fXX/2

5 fX/2

5 (156 kHz) fX/2

6 (78.1 kHz)

1 0 1 1 fXX/2

6 fX/2

6 (78.1 kHz) fX/2

7 (39.1 kHz)

1 1 0 0 fXX/2

7 fX/2

7 (39.1 kHz) fX/2

8 (19.5 kHz)

Other than above Setting prohibited

16-Bit Timer Register Count Clock Selection

TCL06 TCL05 TCL04

MCS = 1

MCS = 0

0 0 0 TI00 (Valid edge specifiable)

0 0 1 2fXX Setting prohibited fX (5.0 MHz)

0 1 0 fXX fX (5.0 MHz) fX/2 (2.5 MHz)

0 1 1 fXX/2 fX/2 (2.5 MHz) fX/2

2 (1.25 MHz)

2 fX/2

2 (1.25 MHz) fX/2

1 0 0 fXX/2

1 1 1 Watch timer output (INTTM3)

Other than above Setting prohibited

CLOE

the sampling clock selection register (SCS) selects the sampling clock.

2. When enabling PCL output, set TCL00 to TCL03, then set 1 in CLOE with a 1-bit

memory manipulation instruction.

3. To read the count value when TI00 has been specified as the TM0 count clock, the

value should be read from TM0, not from capture/compare register 01 (CR01).

4. When rewriting TCL0 to other data, stop the timer operation beforehand.
Show 7 more labels / short text on this page
3 (625 kHz) · 4 (313 kHz) · 5 (156 kHz) · 3 (625 kHz) · PCL Output Control · 0 Output disabled · 1 Output enabled
Page 192 of the NEC PD78076Y user manual — TMC0 FF48H 00H R/W
Page 192 · click to enlarge
Page 192

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. f XT : Subsystem clock oscillation frequency
4. TI00 : 16-bit timer/event counter input pin
5. TM0 : 16-bit timer register
6. MCS : Bit 0 of oscillation mode selection register (OSMS)
7. Figures in parentheses apply to operation with f X = 5.0 MHz or f XT = 32.768 kHz.

(2) 16-bit timer mode control register (TMC0)

This register sets the 16-bit timer operating mode, the 16-bit timer register clear mode and output timing,

and detects an overflow.

TMC0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets TMC0 value to 00H.

is set in TMC01 to TMC03, respectively. Set 0, 0, 0 in TMC01 to TMC03 to stop the operation.

Figure 8-4. 16-Bit Timer Mode Control Register Format

7 6 5 4 3 2 1 Symbol

Address After Reset R/W

TMC0 FF48H 00H R/W

0 0 0 0 TMC03 TMC02 TMC01 OVF0

OVF0 16-Bit Timer Register Overflow Detection

0 Overflow not detected

TMC03 TMC02 TMC01 Operating Mode and Clear Mode TO0 Output Timing Interrupt Generation

0 0 0 Operation stop (TM0 cleared to 0) No change Not Generated

0 0 1 PWM mode (free running) PWM pulse output

Generated when TM0 and CR00 match, or TM0 and CR01 match.

Free running mode TM0 and CR00 match, or TM0 and CR01 match. TM0 and CR00 match, TM0 and CR01 match, or on TI00 valid edge.

Clear & start on TI00 valid edge

TM0 and CR00 match, or TM0 and CR01 match.

TM0 and CR00 match, TM0 and CR01 match, or on TI00 valid edge

TM0 and CR00 match, or TM0 and CR01 match.

Clear & start when TM0 and CR00 match

TM0 and CR00 match, TM0 and CR01 match, or on TI00 valid edge

1 Overflow detected

Page 193 of the NEC PD78076Y user manual — CRC0 FF4CH 04H R/W
Page 193 · click to enlarge
Page 193

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

setting TMC01 to TMC03 to 0, 0, 0).

2. Set the valid edge of the TI00/INTP0 pin with an external interrupt mode register 0

(INTM0) and select the sampling clock frequency with a sampling clock select register

(SCS).

3. When using the PWM mode, set the PWM and then set data to CR00.
4. If the mode is set so that the timer is cleared and starts when TM0 and CR00 match,

the OVF0 flag is set to 1 when the TM0 value changes from 0FFFFH to 0000H with CR00

set to FFFFH.

Remark TO016-bit timer/event counter output pin
TI0016-bit timer/event counter input pin
TM016-bit timer register
CR00Compare register 00
CR01Compare register 01

(3) Capture/compare control register 0 (CRC0)

This register controls the operation of the capture/compare registers (CR00, CR01).

CRC0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CRC0 value to 04H.

Figure 8-5. Capture/Compare Control Register 0 Format

7 6 5 4 3 2 1 0 Symbol

Address After Reset R/W

CRC0 FF4CH 04H R/W

0 0 0 0 0 CRC02 CRC01 CRC00

CRC00 CR00 Operating Mode Selection

0 Operates as compare register

1 Operates as capture register

CRC01 CR00 Capture Trigger Selection

Captures on valid edge of TI01

Captures on valid edge of TI00

CRC02 CR01 Operating Mode Selection

Operates as compare register

Operates as capture register

2. When clear & start mode on a match between TM0 and CR00 is selected with the

16-bit timer mode control register, CR00 should not be specified as a capture

register.

Page 194 of the NEC PD78076Y user manual — TOC01
Page 194 · click to enlarge
Page 194

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(4) 16-bit timer output control register (TOC0)

This register controls the operation of the 16-bit timer/event counter output control circuit. It sets R-S type

flip-flop (LV0) setting/resetting, the active level in PWM mode, inversion enabling/disabling in modes other

than PWM mode, 16-bit timer/event counter timer output enabling/disabling, one-shot pulse output operation

enabling/disabling, and output trigger for a one-shop pulse by software.

TOC0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets TOC0 value to 00H.

Figure 8-6. 16-Bit Timer Output Control Register Format

7 4 1 Symbol

Address After Reset R/W

TOC0 FF4EH 00H R/W

0 OSPT OSPE TOC04 LVS0 LVR0 TOC01 TOE0

TOE0 16-Bit Timer/Event Counter Output Control

0 Output disabled (Port mode)

In PWM Mode In Other Modes

TOC01

Active level selection Timer output F/F control by match of CR00 and TM0

LVS0 LVR0 16-Bit Timer/Event Counter Timer Output F/F Status Setting

0 0 No change

0 1 Timer output F/F reset (0)

1 0 Timer output F/F set (1)

1 1 Setting prohibited

TOC04 Timer output F/F control by match of CR01 and TM0

0 Inversion operation disabled

1 Inversion operation enabled

OSPE One-Shot Pulse Output Control

0 Continuous pulse output

1 One-shot pulse output

OSPT Control of One-Shot Pulse Output Trigger by Software

0 No one-shot pulse trigger

1 One-shot pulse trigger used

2. If LVS0 and LVR0 are read after data is set, they will be 0.
3. OSPT is cleared automatically after data setting, and will therefore be 0 if read.
Show 5 more labels / short text on this page
1 Output enabled · Active high · Inversion operation disabled · Active low · Inversion operation enabled
Page 195 of the NEC PD78076Y user manual — PM3 FF23H FFH R/W
Page 195 · click to enlarge
Page 195

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(5) Port mode register 3 (PM3)

This register sets port 3 input/output in 1-bit units.

When using the P30/TO0 pin for timer output, set PM30 and output latch of P30 to 0.

PM3 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets PM3 value to FFH.

Figure 8-7. Port Mode Register 3 Format

7 6 5 4 3 2 1 0 Symbol

Address After Reset R/W

PM3 FF23H FFH R/W

PM37 PM36 PM35 PM34 PM33 PM32 PM31 PM30

PM3n P3n Pin Input/Output Mode Selection (n = 0 to 7)

0 Output mode (output buffer ON)

1 Input mode (output buffer OFF)

Page 196 of the NEC PD78076Y user manual — INTM0 FFECH 00H R/W
Page 196 · click to enlarge
Page 196

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(6) External interrupt mode register 0 (INTM0)

This register is used to set INTP0 to INTP2 valid edges.

INTM0 is set with an 8-bit memory manipulation instruction.

RESET input sets INTM0 value to 00H.

Figure 8-8. External Interrupt Mode Register 0 Format

7 6 5 4 3 2 1 0 Symbol

Address After Reset R/W

INTM0 FFECH 00H R/W

ES31 ES30 ES21 ES20 ES11 ES10 0 0

ES11 INTP0 Valid Edge Selection ES10

0 Falling edge 0

0 Rising edge 1

1 Setting prohibited 0

1 Both falling and rising edges 1

ES21 INTP1 Valid Edge Selection ES20

0 Falling edge 0

0 Rising edge 1

1 Setting prohibited 0

1 Both falling and rising edges 1

ES31 INTP2 Valid Edge Selection ES30

0 Falling edge 0

0 Rising edge 1

1 Setting prohibited 0

1 Both falling and rising edges 1

register (TMC0) and stop the timer operation before setting the valid edges of INTP0/TI00/

P00 pins.

Page 197 of the NEC PD78076Y user manual — SCS1 SCS0
Page 197 · click to enlarge
Page 197

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(7) Sampling clock select registers (SCS)

This register sets clocks which undergo clock sampling of valid edges to be input to INTP0. When remote

controlled reception is carried out using INTP0, digital noise is removed with sampling clock.

SCS is set with an 8-bit memory manipulation instruction.

RESET input sets SCS value to 00H.

Figure 8-9. Sampling Clock Select Register Format

Address After Reset R/W

7 6 5 4 3 2 1 0 Symbol

SCS FF47H 00H R/W

0 0 0 0 0 0 SCS1 SCS0

INTP0 Sampling Clock Selection

SCS1 SCS0

MCS = 1 MCS = 0

N

7 (39.1 kHz) fXX/2

8 (19.5 kHz)

7 fX/2

5 (156.3 kHz) fXX/2

6 (78.1 kHz)

5 fX/2

6 (78.1 kHz) fXX/2

6 fX/2

7 (39.1 kHz)

peripheral hardware. fXX/2N is stopped in HALT mode.

Remarks 1. N : Value set in bits 0 to 2 (PCC0 to PCC2) of the processor clock control register (PCC)

(N = 0 to 4)

2. f XX : Main system clock frequency (f X or f X /2)
3. f X : Main system clock oscillation frequency
4. MCS : Bit 0 of oscillation mode selection register (OSMS)
5. Figures in parentheses apply to operation with f X = 5.0 MHz.
Show 4 more labels / short text on this page
fXX/2 · fX/2 · fX/2 · fX/2
Page 198 of the NEC PD78076Y user manual — (b) Capture/compare control register 0 (CRC0)
Page 198 · click to enlarge
Page 198

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

8.5 16-Bit Timer/Event Counter Operations

8.5.1 Interval timer operations

Setting the 16-bit timer mode control register (TMC0) and capture/compare control register 0 (CRC0) as shown

in Figure 8-10 allows operation as an interval timer. Interrupt requests are generated repeatedly using the count value

set in 16-bit capture/compare register 00 (CR00) beforehand is used as the interval.

When the count value of the 16-bit timer register (TM0) matches the value set to CR00, counting continues with

the TM0 value cleared to 0 and the interrupt request signal (INTTM00) is generated.

Count clock of the 16-bit timer/event counter can be selected with bits 4 to 6 (TCL04 to TCL06) of the timer clock

select register 0 (TCL0).

For the operation in the case the value of the compare register is changed during the timer count operation, refer

to 8.6 16-Bit Timer/Event Counter Precautions (3).

Figure 8-10. Control Register Settings for Interval Timer Operation

(a) 16-bit timer mode control register (TMC0)

TMC03 TMC02 TMC01 OVF0

TMC0

0 1 1 0/1 0

Clear & start on match TM0 and CR00

(b) Capture/compare control register 0 (CRC0)

CRC02 CRC01 CRC00

CRC0

0/1 0/1 0

CR00 set as compare register

Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with the interval timer. See

the description of the respective control registers for details.

Page 199 of the NEC PD78076Y user manual — CR00
Page 199 · click to enlarge
Page 199

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Figure 8-11. Interval Timer Configuration Diagram

16-Bit Capture/Compare Register 00 (CR00)

INTTM00

INTTM3

fXX 2fXX

16-Bit Timer Register (TM0) Selector

OVF0

2 fXX/2

TI00/P00/INTP0

Figure 8-12. Interval Timer Operation Timings

0000 0001 N 0000 0001 N 0000 0001 N

Count Start Clear Clear

CR00

N N N N

INTTM00

TO0

Interval Time Interval Time Interval Time

Remark Interval time = (N + 1) x t : N = 0001H to FFFFH.

Show 7 more labels / short text on this page
fXX/2 · Clear Circuit · t · Count Clock · TM0 Count Value · Interrupt Request Acknowledge · Interrupt Request Acknowledge
Page 200 of the NEC PD78076Y user manual — 8.5.2 PWM output operations
Page 200 · click to enlarge
Page 200

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Table 8-6. 16-Bit Timer/Event Counter Interval Times

Minimum Interval Time Maximum Interval Time Resolution

TCL06 TCL05 TCL4

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

0 0 0 2 x TI00 input cycle 216 x TI00 input cycle TI00 input edge cycle

0 0 1 Setting 2 x 1/fX Setting 216 x 1/fX Setting 1/fX prohibited (400 ns) prohibited (13.1 ms) prohibited (200 ns)

0 1 0 2 x 1/fX 22 x 1/fX 216 x 1/fX 217 x 1/fX 1/fX 2 x 1/fX (400 ns) (800 ns) (13.1 ms) (26.2 ms) (200 ns) (400 ns)

0 1 1 22 x 1/fX 23 x 1/fX 217 x 1/fX 218 x 1/fX 2 x 1/fX 22 x 1/fX (800 ns) (1.6 µs) (26.2 ms) (52.4 ms) (400 ns) (800 ns)

1 0 0 23 x 1/fX 24 x 1/fX 218 x 1/fX 219 x 1/fX 22 x 1/fX 23 x 1/fX (1.6 µs) (3.2 µs) (52.4 ms) (104.9 ms) (800 ns) (1.6 µs)

1 1 1 2 x watch timer output cycle 216 x watch timer output cycle Watch timer output edge cycle

Other than above Setting prohibited

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. TCL04 to TCL06 : Bits 4 to 6 of timer clock select register 0 (TCL0)
4. Figures in parentheses apply to operation with f X = 5.0 MHz.

8.5.2 PWM output operations

Setting the 16-bit timer mode control register (TMC0), capture/compare control register 0 (CRC0), and the 16-bit

timer output control register (TOC0) as shown in Figure 8-13 allows operation as PWM output. Pulses with the duty

rate determined by the value set in 16-bit capture/compare register 00 (CR00) beforehand are output from the TO0/

P30 pin.

Set the active level width of the PWM pulse to the high-order 14 bits of CR00. Select the active level with bit 1

(TOC01) of the 16- bit timer output control register (TOC0).

This PWM pulse has a 14-bit resolution. The pulse can be converted to an analog voltage by integrating it with

an external low-pass filter (LPF). The PWM pulse has a combination of the basic cycle determined by 28/Φ and the

sub-cycle determined by 214/Φ so that the time constant of the external LPF can be shortened. Count clock Φ can

be selected with bits 4 to 6 (TCL04 to TCL06) of the timer clock select register (TCL0).

PWM output enable/disable can be selected with bit 0 (TOE0) of TOC0.

2. Write 0 to bits 0 and 1 of CR00.
3. Do not select PWM operation mode for external clock input from the TI00/P00/INTP0 pin.
Page 201 of the NEC PD78076Y user manual — (c) 16-bit timer output control register (TOC0)
Page 201 · click to enlarge
Page 201

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Figure 8-13. Control Register Settings for PWM Output Operation

(a) 16-bit timer mode control register (TMC0)

OVF0 TMC01 TMC02 TMC03

TMC0 0 1 0

(b) Capture/compare control register 0 (CRC0)

CRC00 CRC01 CRC02

CRC0 0 0/1 0/1 0

CR00 set as compare register

(c) 16-bit timer output control register (TOC0)

TOE0 TOC01 LVR0 LVS0 TOC04 OSPE OSPT

TOC0 1 0/1 x 0

TO0 Output Enabled Specifies Active Level

Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with PWM output.

See the description of the respective control registers for details.

xDon’t care

PWM mode

Page 202 of the NEC PD78076Y user manual — V SS
Page 202 · click to enlarge
Page 202

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

By integrating 14-bit resolution PWM pulses with an external low-pass filter, they can be converted to an analog

voltage and used for electronic tuning and D/A converter applications, etc.

The analog output voltage (VAN) used for D/A conversion with the configuration shown in Figure 8-14 is as follows.

capture/compare register 00 (CR00) value

VAN = VREF x

V REFExternal switching circuit reference voltage

Figure 8-14. Example of D/A Converter Configuration with PWM Output

V REF

Low-Pass Filter Analog Output (VAN)

Figure 8-15 shows an example in which PWM output is converted to an analog voltage and used in a voltage

synthesizer type TV tuner.

Figure 8-15. TV Tuner Application Circuit Example

+110 V

47 kΩ 47 kΩ 47 kΩ

0.22 F µ 0.22 F µ 0.22 F µ Electronic

2SC 2352

TO0/P30

8.2 kΩ

8.2 kΩ

V SS

GND

Show 8 more labels / short text on this page
PD78078, 78078Y µ · PWM signal · Switching Circuit TO0/P30 · PD78078, 78078Y µ · 22 kΩ · 100 pF · Tuner · PC574J µ
Page 203 of the NEC PD78076Y user manual — 0000H ≤ CR01 < CR00 ≤ FFFFH
Page 203 · click to enlarge
Page 203

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

8.5.3 PPG output operations

Setting the 16-bit timer mode control register (TMC0) and capture/compare control register 0 (CRC0) as shown

in Figure 8-16 allows operation as PPG (Programmable Pulse Generator) output.

In the PPG output operation, square waves are output from the TO0/P30 pin with the pulse width and the cycle

that correspond to the count values set beforehand in 16-bit capture/compare register 01 (CR01) and in 16-bit capture/

compare register 00 (CR00), respectively.

Figure 8-16. Control Register Settings for PPG Output Operation

(a) 16-bit timer mode control register (TMC0)

OVF0 TMC01 TMC02 TMC03

TMC0 0 0 1 1 0

Clear & start on match of TM0 and CR00

(b) Capture/compare control register 0 (CRC0)

CRC00 CRC01 CRC02

CRC0 0 x 0

CR00 set as compare register

CR01 set as compare register

(c) 16-bit timer output control register (TOC0)

TOC04 OSPE OSPT

TOE0 TOC01 LVR0 LVS0

TOC0 1 1 0/1 0/1 1 0 0 0

Inversion of output on match of TM0 and CR00

Specified TO0 output F/F initial value

Inversion of output on match of TM0 and CR01 One-shot pulse output disabled

0000H ≤ CR01 < CR00 ≤ FFFFH

Remark xDon’t care

TO0 Output Enabled

Page 204 of the NEC PD78076Y user manual — (b) Capture/compare control register 0 (CRC0)
Page 204 · click to enlarge
Page 204

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

8.5.4 Pulse width measurement operations

It is possible to measure the pulse width of the signals input to the TI00/P00 pin and TI01/P01 pin using the bit

timer register (TM0).

There are two measurement methodsmeasuring with TM0 used in free-running mode, and measuring by restarting

the timer in synchronization with the edge of the signal input to the TI00/P00 pin.

(1) Pulse width measurement with free-running counter and one capture register

When the 16-bit timer register (TM0) is operated in free-running mode (see register settings in Figure 8-

17), and the edge specified by external interrupt mode register 0 (INTM0) is input to the TI00/P00 pin, the

value of TM0 is taken into 16-bit capture/compare register 01 (CR01) and an external interrupt request signal

(INTP0) is set.

Any of three edge specifications can be selected-rising, falling, or both edges-by means of bits 2 and 3 (EX10

and ES11) of INTM0.

For valid edge detection, sampling is performed at the interval selected by means of the sampling clock

selection register (SCS), and a capture operation is only performed when a valid level is detected twice,

thus eliminating noise with a short pulse width.

Figure 8-17. Control Register Settings for Pulse Width Measurement with

Free-Running Counter and One Capture Register

(a) 16-bit timer mode control register (TMC0)

OVF0 TMC01 TMC02 TMC03

TMC0 0 0/1 1 0

(b) Capture/compare control register 0 (CRC0)

CRC00 CRC01 CRC02

CRC0 0 0/1 1 0

CR00 set as compare register

CR01 set as capture register

Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with pulse width measurement.

See the description of the respective control registers for details.

Free-Running Mode

Page 205 of the NEC PD78076Y user manual — TI00/P00/INTP00
Page 205 · click to enlarge
Page 205

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Figure 8-18. Configuration Diagram for Pulse Width Measurement by Free-Running Counter

INTTM3

16-Bit Timer Register (TM0)

OVF0

16-Bit Capture/Compare Register 01 (CR01)

TI00/P00/INTP00

INTP0

Figure 8-19. Timing of Pulse Width Measurement Operation by Free-Running Counter

and One Capture Register (with Both Edges Specified)

0000 0001 D0 D1 FFFF 0000 D2 D3

D0 D1 D2 D3

INTP0

OVF0

(D1 – D0) x t (10000H – D1 + D2) x t (D3 – D2) x t

Show 11 more labels / short text on this page
2fXX · Selector · fXX · fXX/2 · fXX/2 · Internal Bus · t · Count Clock · TM0 Count Value · TI00 Pin Input · CR01 Captured Value
Page 206 of the NEC PD78076Y user manual — (b) Capture/compare control register 0 (CRC0)
Page 206 · click to enlarge
Page 206

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(2) Two pulse width measurements with free-running counter

When the 16-bit timer register (TM0) is operated in free-running mode (see register settings in Figure 8-

20), it is possible to simultaneously measure the pulse widths of the two signals input to the TI00/P00 pin

and the TI01/P01 pin.

When the edge specified by bits 2 and 3 (ES10 and ES11) of external interrupt mode register 0 (INTM0)

is input to the TI00/P00 pin, the value of TM0 is taken into 16-bit capture/compare register 01 (CR01) and

an external interrupt request signal (INTP0) is set.

Also, when the edge specified by bits 4 and 5 (ES20 and ES21) of INTM0 is input to the TI01/P01 pin, the

value of TM0 is taken into 16-bit capture/compare register 00 (CR00) and an external interrupt request signal

(INTP1) is set.

Any of three edge specifications can be selected-rising, falling, or both edges-as the valid edges for the TI00/

P00 pin and the TI01/P01 pin by means of bits 2 and 3 (ES10 and ES11) and bits 4 and 5 (ES20 and ES21)

of INTM0, respectively.

For TI00/P00 pin valid edge detection, sampling is performed at the interval selected by means of the

sampling clock selection register (SCS), and a capture operation is only performed when a valid level is

detected twice, thus eliminating noise with a short pulse width.

Figure 8-20. Control Register Settings for Two Pulse Width Measurements with Free-Running Counter

(a) 16-bit timer mode control register (TMC0)

OVF0 TMC01 TMC02 TMC03

TMC0 0 0/1 1 0

(b) Capture/compare control register 0 (CRC0)

CRC00 CRC01 CRC02

CRC0 1 0 1 0

CR00 set as capture register

Captured in CR00 on valid edge of TI01/P01 Pin

CR01 set as capture register

Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with pulse width measurement.

See the description of the respective control registers for details.

Free-Running Mode

Page 207 of the NEC PD78076Y user manual — CHAPTER 8 16-BIT TIMER/EVENT COUNTER
Page 207 · click to enlarge
Page 207

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Figure 8-21. Timing of Pulse Width Measurement Operation with

Free-Running Counter (with Both Edges Specified)

0000 0001 D0 D1 0000 D3 D2 FFFF

D0 D1 D3 D2

INTP0

D1

INTP1

OVF0

(D1 – D0) x t (10000H – D1 + D2) x t

(D3 – D2) x t

(10000H – D1 + (D2 + 1)) x t

Show 7 more labels / short text on this page
t · Count Clock · TM0 Count Value · TI00 Pin Input · CR01 Captured Value · TI01 Pin Input · CR00 Captured Value
Page 208 of the NEC PD78076Y user manual — (b) Capture/compare control register 0 (CRC0)
Page 208 · click to enlarge
Page 208

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(3) Pulse width measurement with free-running counter and two capture registers

When the 16-bit timer register (TM0) is operated in free-running mode (see register settings in Figure 8-22),

it is possible to measure the pulse width of the signal input to the TI00/P00 pin.

When the edge specified by bits 2 and 3 (ES10 and ES11) of external interrupt mode register 0 (INTM0)

is input to the TI00/P00 pin, the value of TM0 is taken into 16-bit capture/compare register 01 (CR01) and

an external interrupt request signal (INTP0) is set.

Also, on the inverse edge input of that of the capture operation into CR01, the value of TM0 is taken into

16-bit capture/compare register 00 (CR00).

Either of two edge specifications can be selected—rising or falling—as the valid edges for the TI00/P00 pin

by means of bits 2 and 3 (ES10 and ES11) of INTM0.

For TI00/P00 pin valid edge detection, sampling is performed at the interval selected by means of the

sampling clock selection register (SCS), and a capture operation is only performed when a valid level is

detected twice, thus eliminating noise with a short pulse width.

register 00 (CR00) cannot perform the capture operation.

Figure 8-22. Control Register Settings for Pulse Width Measurement with

Free-Running Counter and Two Capture Registers

(a) 16-bit timer mode control register (TMC0)

OVF0 TMC01 TMC02 TMC03

TMC0 0 0/1 1 0

(b) Capture/compare control register 0 (CRC0)

CRC00 CRC01 CRC02

CRC0 1 1 1 0

CR00 set as capture register

Captured in CR00 on invalid edge of TI00/P00 Pin

CR01 set as capture register

Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with pulse width measurement.

See the description of the respective control registers for details.

Free-Running Mode

Page 209 of the NEC PD78076Y user manual — CHAPTER 8 16-BIT TIMER/EVENT COUNTER
Page 209 · click to enlarge
Page 209

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Figure 8-23. Timing of Pulse Width Measurement Operation by Free-Running

Counter and Two Capture Registers (with Rising Edge Specified)

D3 D2 0000 FFFF D1 D0 0000 0001

D0 D2

D1 D3

INTP0

OVF0

(D1 – D0) x t (10000H – D1 + D2) x t (D3 – D2) x t

Show 6 more labels / short text on this page
t · Count Clock · TM0 Count Value · TI00 Pin Input · CR01 Captured Value · CR00 Captured Value
Page 210 of the NEC PD78076Y user manual — D0 D2
Page 210 · click to enlarge
Page 210

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(4) Pulse width measurement by means of restart

When input of a valid edge to the TI00/P00 pin is detected, the count value of the 16-bit timer register (TM0)

is taken into 16-bit capture/compare register 01 (CR01), and then the pulse width of the signal input to the

TI00/P00 pin is measured by clearing TM0 and restarting the count (see register settings in Figure 8-24).

The edge specification can be selected from two types, rising and falling edges, by bits 2 and 3 (ES10 and

ES11) of the external interrupt mode register 0 (INTM0).

In a valid edge detection, the sampling is performed by a cycle selected by the sampling clock selection

register (SCS), and a capture operation is not performed before detecting valid levels twice allowing short

pulse width noise to be eliminated.

register 00 (CR00) cannot perform the capture operation.

Figure 8-24. Control Register Settings for Pulse Width Measurement by Means of Restart

(a) 16-bit timer mode control register (TMC0)

OVF0 TMC01 TMC02 TMC03

TMC0 0 0/1 0 1 0

Clear & start with valid edge of TI00/P00 pin

(b) Capture/compare control register 0 (CRC0)

CRC00 CRC01 CRC02

CRC0 1 1 1 0

CR00 set as capture register

Captured in CR00 on invalid edge of TI00/P00 Pin

CR01 set as capture register

Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with pulse width measurement.

See the description of the respective control registers for details.

Figure 8-25. Timing of Pulse Width Measurement Operation by

Means of Restart (with Rising Edge Specified)

0000 0001 D0 0000 0001 D1 0001 0000 D2

D0 D2

D1

INTP0

Show 12 more labels / short text on this page
t · Count · Clock · TM0 Count · Value · TI00 Pin Input · CR01 Capture · Value · CR00 Capture · Value · D1 x t · D2 x t
Page 211 of the NEC PD78076Y user manual — (b) Capture/compare control register 0 (CRC0)
Page 211 · click to enlarge
Page 211

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

8.5.5 External event counter operation

The external event counter counts the number of external clock pulses to be input to the TI00/P00 pin with the

16-bit timer register (TM0).

TM0 is incremented each time the valid edge specified with the external interrupt mode register 0 (INTM0) is input.

When the TM0 counted value matches the 16-bit capture/compare register 00 (CR00) value, TM0 is cleared to

0 and the interrupt request signal (INTTM00) is generated.

Set a value other than 0000H to CR00 (1-pulse count operation cannot be performed).

The rising edge, the falling edge or both edges can be selected with bits 2 and 3 (ES10 and ES11) of INTM0.

Because operation is carried out only after the valid edge is detected twice by sampling at the cycle selected with

the sampling clock select register (SCS), noise with short pulse widths can be removed.

Figure 8-26. Control Register Settings in External Event Counter Mode

(a) 16-bit timer mode control register (TMC0)

OVF0 TMC01 TMC02 TMC03

TMC0 0 0/1 1 1 0

Clear & start with match of TM0 and CR00

(b) Capture/compare control register 0 (CRC0)

CRC00 CRC01 CRC02

CRC0 0 0/1 0/1 0

CR00 set as compare register

Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with the external event

counter. See the description of the respective control registers for details.

Page 212 of the NEC PD78076Y user manual — CR00
Page 212 · click to enlarge
Page 212

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Figure 8-27. External Event Counter Configuration Diagram

16-Bit Capture/Compare Register 00 (CR00)

TI00 Valid Edge OVF0

16-Bit Timer Register (TM0)

INTP0

16-Bit Capture/Compare Register 01 (CR01)

Figure 8-28. External Event Counter Operation Timings (with Rising Edge Specified)

0000 0001 0002 0003 0004 0005 N – 1 N 0000 0001 0002 0003

CR00

N

INTTM0

Show 4 more labels / short text on this page
Clear INTTM00 · Internal Bus · TI00 Pin Input · TM0 Count Value
Page 213 of the NEC PD78076Y user manual — (c) 16-bit timer output control register (TOC0)
Page 213 · click to enlarge
Page 213

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

8.5.6 Square-wave output operation

16-bit timer/event counter operates as a square wave output with any selected frequency at intervals of the count

value preset to the 16-bit capture/compare register 00 (CR00).

The TO0/P30 pin output status is reversed at intervals of the count value preset to CR00 by setting bit 0 (TOE0)

and bit 1 (TOC01) of the 16-bit timer output control register (TOC0) to 1. This enables a square wave with any selected

frequency to be output.

Figure 8-29. Control Register Settings in Square-Wave Output Mode

(a) 16-bit timer mode control register (TMC0)

OVF0 TMC01 TMC02 TMC03

TMC0 0 0/1 1 1 0

Clear & start on match of TM0 and CR00

(b) Capture/compare control register 0 (CRC0)

CRC00 CRC01 CRC02

CRC0 0 0/1 0/1 0

CR00 set as compare register

(c) 16-bit timer output control register (TOC0)

TOE0 TOC01 LVR0 OSPT OSPE TOC04 LVS0

TOC0 1 1 0/1 0/1 0

TO0 Output Enabled Inversion of output on match of TM0 and CR00 Specified TO0 output F/F initial value No inversion of output on match of TM0 and CR01 One-shot pulse output disabled

Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with square-wave output.

See the description of the respective control registers for details.

Page 214 of the NEC PD78076Y user manual — CR00
Page 214 · click to enlarge
Page 214

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Figure 8-30. Square-Wave Output Operation Timing

0000 0001 0002 N – 1 N 0000 0001 0002 N – 1 N 0000

CR00

N

INTTM0

Table 8-7. 16-Bit Timer/Event Count Square-Wave Output Ranges

Minimum Pulse Width Maximum Pulse Width Resolution

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

2 x TI00 input cycle 216 x TI00 input cycle TI00 input edge cycle

— 2 x 1/fX — 216 x 1/fX — 1/fX

(400 ns) (13.1 ms) (200 ns)

2 x 1/fX 22 x 1/fX 216 x 1/fX 217 x 1/fX 1/fX 2 x 1/fX

(400 ns) (800 ns) (13.1 ms) (26.2 ms) (200 ns) (400 ns)

22 x 1/fX 23 x 1/fX 217 x 1/fX 218 x 1/fX 2 x 1/fX 22 x 1/fX

(800 ns) (1.6 µs) (26.2 ms) (52.4 ms) (400 ns) (800 ns)

23 x 1/fX 24 x 1/fX 218 x 1/fX 219 x 1/fX 22 x 1/fX 23 x 1/fX

(1.6 µs) (3.2 µs) (52.4 ms) (104.9 ms) (800 ns) (1.6 µs)

2 x watch timer output cycle 216 x watch timer output cycle Watch timer output edge cycle

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. Figures in parentheses apply to operation with f X = 5.0 MHz.
Show 6 more labels / short text on this page
TI00 Pin · Input · TM0 Count · Value · TO0 Pin · Output
Page 215 of the NEC PD78076Y user manual — 0000H ≤ CR01 < CR00 ≤ FFFFH
Page 215 · click to enlarge
Page 215

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

8.5.7 One-shot pulse output operation

It is possible to output one-shot pulses synchronized with a software trigger or an external trigger (TI00/P00 pin

input).

(1) One-shot pulse output using software trigger

If the 16-bit timer mode control register (TMC0), capture/compare control register 0 (CRC0), and the 16-

bit timer output control register (TOC0) are set as shown in Figure 8-31, and 1 is set in bit 6 (OSPT) of TOC0

by software, a one-shot pulse is output from the TO0/P30 pin.

By setting 1 in OSPT, the 16-bit timer/event counter is cleared and started, and output is activated by the

count value set beforehand in 16-bit capture/compare register 01 (CR01). Thereafter, output is inactivated

by the count value set beforehand in 16-bit capture/compare register 00 (CR00).

TM0 continues to operate after one-shot pulse is output. To stop TM0, 00H must be set to TMC0.

again, execute after the INTTM00, or interrupt match signal with CR00, is generated.

Figure 8-31. Control Register Settings for One-Shot Pulse Output Operation Using Software Trigger

(a) 16-bit timer mode control register (TMC0)

OVF0 TMC01 TMC02 TMC03

TMC0 0 0 1 1 0

Clear & start with match of TM0 and CR00

(b) Capture/compare control register 0 (CRC0)

CRC00 CRC01 CRC02

CRC0 0 0/1 0

CR00 set as compare register

CR01 set as compare register

(c) 16-bit timer output control register (TOC0)

TOE0 TOC01 LVR0 OSPT OSPE TOC04 LVS0

TOC0 1 1 0/1 0/1 1 1 0 0

TO0 Output Enabled Inversion of output on match of TM0 and CR00 Specified TO0 output F/F initial value Inversion of output on match of TM0 and CR01

One-shot pulse output mode

Set 1 in case of output

0000H ≤ CR01 < CR00 ≤ FFFFH

Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with one-shot pulse output.

See the description of the respective control registers for details.

Page 216 of the NEC PD78076Y user manual — N
Page 216 · click to enlarge
Page 216

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Figure 8-32. Timing of One-Shot Pulse Output Operation Using Software Trigger

Set 0CH to TMC0 (TM0 count start)

0000 0001 N N + 1 0000 N – 1 N M – 1 M 0000 0001 0002

N

N

N

N

M

M

M

M

OSPT

INTTM01

INTTM00

stop mode) is set to TMC01 to TMC03, respectively.

Show 5 more labels / short text on this page
Count Clock · TM0 Count Value · CR01 Set Value · CR00 Set Value · TO0 Pin Output
Page 217 of the NEC PD78076Y user manual — 0000H ≤ CR01 < CR00 ≤ FFFFH
Page 217 · click to enlarge
Page 217

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(2) One-shot pulse output using external trigger

If the 16-bit timer mode control register (TMC0), capture/compare control register 0 (CRC0), and the 16-

bit timer output control register (TOC0) are set as shown in Figure 8-33, a one-shot pulse is output from

the TO0/P30 pin with a TI00/P00 valid edge as an external trigger.

Any of three edge specifications can be selected-rising, falling, or both edges - as the valid edges for the

TI00/P00 pin by means of bits 2 and 3 (ES10 and ES11) of external interrupt mode register 0 (INTM0).

When a valid edge is input to the TI00/P00 pin, the 16-bit timer/event counter is cleared and started, and

output is activated by the count values set beforehand in 16-bit capture/compare register 01 (CR01).

Thereafter, output is inactivated by the count value set beforehand in 16-bit capture/compare register 00

(CR00).

Figure 8-33. Control Register Settings for One-Shot Pulse Output Operation Using External Trigger

(a) 16-bit timer mode control register (TMC0)

OVF0 TMC01 TMC02 TMC03

TMC0 1 0

Clear & start with valid edge of TI00/P00 pin

(b) Capture/compare control register 0 (CRC0)

CRC00 CRC01 CRC02

CRC0 0 0/1 0

CR00 set as compare register

CR01 set as compare register

(c) 16-bit timer output control register (TOC0)

TOE0 TOC01 LVR0 LVS0 OSPT OSPE TOC04

TOC0 1 1 0/1 0/1 1 1 0 0

Inversion of output on match of TM0 and CR00

Specified TO0 output F/F initial value

Inversion of output on match of TM0 and CR01

One-shot pulse output mode

0000H ≤ CR01 < CR00 ≤ FFFFH

Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with one-shot pulse output.

See the description of the respective control registers for details.

TO0 Output Enabled

Page 218 of the NEC PD78076Y user manual — N
Page 218 · click to enlarge
Page 218

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

Figure 8-34. Timing of One-Shot Pulse Output Operation Using

External Trigger (With Rising Edge Specified)

Set 08H to TMC0 (TM0 count start)

0000 0001 0000 N N + 1 N + 2 M – 2 M – 1 M M + 1 M + 2 M + 3

N

N

N

N

M

M

M

M

INTTM01

INTTM00

stop mode) is set to TMC01 to TMC03, respectively.

Show 6 more labels / short text on this page
Count Clock · TM0 Count Value · CR01 Set Value · CR00 Set Value · TI00 Pin Input · TO0 Pin Output
Page 219 of the NEC PD78076Y user manual — Figure 8-36. Timings After Change of Compare Register During Timer Count Operation
Page 219 · click to enlarge
Page 219

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

8.6 16-Bit Timer/Event Counter Operating Precautions

(1) Timer start errors

An error with a maximum of one clock may occur concerning the time required for a match signal to be

generated after timer start. This is because the 16-bit timer register (TM0) is started asynchronously with

the count pulse.

Figure 8-35. 16-Bit Timer Register Start Timing

TM0 Count Value 0000H 0001H 0002H 0003H 0004H

(2) 16-bit compare register setting

Set a value other than 0000H to the 16-bit capture/compare register 00 (CR00).

Thus, when using the 16-bit capture/compare register as event counter, one-pulse count operation cannot

be carried out.

(3) Operation after compare register change during timer count operation

If the value after the 16-bit capture/compare register (CR00) is changed is smaller than that of the 16-bit

timer register (TM0), TM0 continues counting, overflows and then restarts counting from 0. Thus, if the value

(M) after CR00 change is smaller than that (N) before change, it is necessary to restart the timer after

changing CR00.

Figure 8-36. Timings After Change of Compare Register During Timer Count Operation

M N

TM0 Count Value X – 1 X FFFFH 0000H 0001H 0002H

Remark N > X > M

Show 4 more labels / short text on this page
Count Pulse · Timer Start · Count Pulse · CR00 Captured Value
Page 220 of the NEC PD78076Y user manual — (b) One-shot pulse output using external trigger
Page 220 · click to enlarge
Page 220

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(4) Capture register data retention timings

If the valid edge of the TI00/P00 pin is input during 16-bit capture/compare register 01 (CR01) read, CR01

holds data without carrying out capture operation. However, the interrupt request flag (PIF0) is set upon

detection of the valid edge.

Figure 8-37. Capture Register Data Retention Timing

N N + 1 N + 2 M M + 1 M + 2

X N + 1

(5) Valid edge setting

Set the valid edge of the TI00/P00/INTP0 pin after setting bits 1 to 3 (TMC01 to TMC03) of the 16-bit timer

mode control register (TMC0) to 0, 0 and 0, respectively, and then stopping timer operation. Valid edge

setting is carried out with bits 2 and 3 (ES10 and ES11) of the external interrupt mode register 0 (INTM0).

(6) Re-trigger of one-shot pulse

(a) One-shot pulse output using software

When outputting one-shot pulse, do not set 1 in OSPT. When outputting one-shot pulse again, execute

it after the INTTM00, which is the match interrupt request with CR00, is generated.

(b) One-shot pulse output using external trigger

When outputting one-shot pulses, external trigger is ignored if generated again.

Show 7 more labels / short text on this page
Count Pulse · TM0 Count Value · Edge Input · Interrupt Request Flag · Capture Read Signal · CR01 Captured Value · Capture Operation Ignored
Page 221 of the NEC PD78076Y user manual — Figure 8-38. Operation Timing of OVF0 Flag
Page 221 · click to enlarge
Page 221

CHAPTER 8 16-BIT TIMER/EVENT COUNTER

(7) Operation of OVF0 flag

OFV0 flag is set to 1 in the following case.

The clear & start mode on match between TM0 and CR00 is selected.

↓

CR00 is set to FFFFH.

↓

When TM0 is counted up from FFFFH to 0000H.

Figure 8-38. Operation Timing of OVF0 Flag

CR00

FFFFH

TM0

FFFEH FFFFH 0000H 0001H

OVF0

INTTM00

Count Pulse

Page 222 of the NEC PD78076Y user manual — [MEMO]
Page 222 · click to enlarge
Page 222

[MEMO]

Page 223 of the NEC PD78076Y user manual — 9.1.1 8-bit timer/event counter mode
Page 223 · click to enlarge
Page 223

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

9.1 8-Bit Timer/Event Counters 1 and 2 Functions

For the 8-bit timer/event counters 1 and 2, two modes are available. One is a mode for two-channel 8-bit timer/

event counters to be used separately (the 8-bit timer/event counter mode) and the other is a mode for the 8-bit timer/

event counter to be used as 16-bit timer/event counter (the 16-bit timer/event counter mode).

9.1.1 8-bit timer/event counter mode

The 8-bit timer/event counters 1 and 2 (TM1 and TM2) have the following functions.

  • Interval timer
  • External event counter
  • Square-wave output
Page 224 of the NEC PD78076Y user manual — Table 9-1. 8-Bit Timer/Event Counters 1 and 2 Interval Times
Page 224 · click to enlarge
Page 224

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

(1) 8-bit interval timer

Interrupt requests are generated at the preset time intervals.

Table 9-1. 8-Bit Timer/Event Counters 1 and 2 Interval Times

Minimum Interval Time Maximum Interval Time Resolution

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

2 x 1/fX 22 x 1/fX 29 x 1/fX 210 x 1/fX 2 x 1/fX 22 x 1/fX

(400 ns) (800 ns) (102.4 µs) (204.8 µs) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 210 x 1/fX 211 x 1/fX 22 x 1/fX 23 x 1/fX

(800 ns) (1.6 µs) (204.8 µs) (409.6 µs) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 211 x 1/fX 212 x 1/fX 23 x 1/fX 24 x 1/fX

(1.6 µs) (3.2 µs) (409.6 µs) (819.2 µs) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 212 x 1/fX 213 x 1/fX 24 x 1/fX 25 x 1/fX

(3.2 µs) (6.4 µs) (819.2 µs) (1.64 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 213 x 1/fX 214 x 1/fX 25 x 1/fX 26 x 1/fX

(6.4 µs) (12.8 µs) (1.64 ms) (3.28 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 214 x 1/fX 215 x 1/fX 26 x 1/fX 27 x 1/fX

(12.8 µs) (25.6 µs) (3.28 ms) (6.55 ms) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 215 x 1/fX 216 x 1/fX 27 x 1/fX 28 x 1/fX

(25.6 µs) (51.2 µs) (6.55 ms) (13.1 ms) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 216 x 1/fX 217 x 1/fX 28 x 1/fX 29 x 1/fX

(51.2 µs) (102.4 µs) (13.1 ms) (26.2 ms) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 217 x 1/fX 218 x 1/fX 29 x 1/fX 210 x 1/fX

(102.4 µs) (204.8 µs) (26.2 ms) (52.4 ms) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 219 x 1/fX 220 x 1/fX 211 x 1/fX 212 x 1/fX

(409.6 µs) (819.2 µs) (104.9 ms) (209.7 ms) (409.6 µs) (819.2 µs)

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 225 of the NEC PD78076Y user manual — Table 9-2. 8-Bit Timer/Event Counters 1 and 2 Square-Wave Output Ranges
Page 225 · click to enlarge
Page 225

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

(2) External event counter

The number of pulses of an externally input signal can be measured.

(3) Square-wave output

A square wave with any selected frequency can be output.

Table 9-2. 8-Bit Timer/Event Counters 1 and 2 Square-Wave Output Ranges

Minimum Pulse Width Maximum Pulse Width Resolution

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

2 x 1/fX 22 x 1/fX 29 x 1/fX 210 x 1/fX 2 x 1/fX 22 x 1/fX

(400 ns) (800 ns) (102.4 µs) (204.8 µs) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 210 x 1/fX 211 x 1/fX 22 x 1/fX 23 x 1/fX

(800 ns) (1.6 µs) (204.8 µs) (409.6 µs) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 211 x 1/fX 212 x 1/fX 23 x 1/fX 24 x 1/fX

(1.6 µs) (3.2 µs) (409.6 µs) (819.2 µs) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 212 x 1/fX 213 x 1/fX 24 x 1/fX 25 x 1/fX

(3.2 µs) (6.4 µs) (819.2 µs) (1.64 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 213 x 1/fX 214 x 1/fX 25 x 1/fX 26 x 1/fX

(6.4 µs) (12.8 µs) (1.64 ms) (3.28 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 214 x 1/fX 215 x 1/fX 26 x 1/fX 27 x 1/fX

(12.8 µs) (25.6 µs) (3.28 ms) (6.55 ms) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 215 x 1/fX 216 x 1/fX 27 x 1/fX 28 x 1/fX

(25.6 µs) (51.2 µs) (6.55 ms) (13.1 ms) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 216 x 1/fX 217 x 1/fX 28 x 1/fX 29 x 1/fX

(51.2 µs) (102.4 µs) (13.1 ms) (26.2 ms) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 217 x 1/fX 218 x 1/fX 29 x 1/fX 210 x 1/fX

(102.4 µs) (204.8 µs) (26.2 ms) (52.4 ms) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 219 x 1/fX 220 x 1/fX 211 x 1/fX 212 x 1/fX

(409.6 µs) (819.2 µs) (104.9 ms) (209.7 ms) (409.6 µs) (819.2 µs)

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 226 of the NEC PD78076Y user manual — Table 9-3. Interval Times when 8-Bit Timer/Event Counters 1 and 2
Page 226 · click to enlarge
Page 226

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

9.1.2 16-bit timer/event counter mode

(1) 16-bit interval timer

Interrupt requests can be generated at the preset time intervals.

Table 9-3. Interval Times when 8-Bit Timer/Event Counters 1 and 2

are Used as 16-Bit Timer/Event Counters

Minimum Interval Time Maximum Interval Time Resolution

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

2 x 1/fX 22 x 1/fX 217 x 1/fX 218 x 1/fX 2 x 1/fX 22 x 1/fX

(400 ns) (800 ns) (26.2 ms) (52.4 ms) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 218 x 1/fX 219 x 1/fX 22 x 1/fX 23 x 1/fX

(800 ns) (1.6 µs) (52.4 ms) (104.9 ms) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 219 x 1/fX 220 x 1/fX 23 x 1/fX 24 x 1/fX

(1.6 µs) (3.2 µs) (104.9 ms) (209.7 ms) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 220 x 1/fX 221 x 1/fX 24 x 1/fX 25 x 1/fX

(3.2 µs) (6.4 µs) (209.7 ms) (419.4 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 221 x 1/fX 222 x 1/fX 25 x 1/fX 26 x 1/fX

(6.4 µs) (12.8 µs) (419.4 ms) (838.9 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 222 x 1/fX 223 x 1/fX 26 x 1/fX 27 x 1/fX

(12.8 µs) (25.6 µs) (838.9 ms) (1.7 s) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 223 x 1/fX 224 x 1/fX 27 x 1/fX 28 x 1/fX

(25.6 µs) (51.2 µs) (1.7 s) (3.4 s) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 224 x 1/fX 225 x 1/fX 28 x 1/fX 29 x 1/fX

(51.2 µs) (102.4 µs) (3.4 s) (6.7 s) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 225 x 1/fX 226 x 1/fX 29 x 1/fX 210 x 1/fX

(102.4 µs) (204.8 µs) (6.7 s) (13.4 s) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 227 x 1/fX 228 x 1/fX 211 x 1/fX 212 x 1/fX

(409.6 µs) (819.2 µs) (26.8 s) (53.7 s) (409.6 µs) (819.2 µs)

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 227 of the NEC PD78076Y user manual — Table 9-4. Square-Wave Output Ranges when 8-Bit Timer/Event Counters 1 and 2
Page 227 · click to enlarge
Page 227

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

(2) External event counter

The number of pulses of an externally input signal can be measured.

(3) Square-wave output

A square wave with any selected frequency can be output.

Table 9-4. Square-Wave Output Ranges when 8-Bit Timer/Event Counters 1 and 2

are Used as 16-Bit Timer/Event Counters

Minimum Pulse Width Maximum Pulse Width Resolution

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

2 x 1/fX 22 x 1/fX 217 x 1/fX 218 x 1/fX 2 x 1/fX 22 x 1/fX

(400 ns) (800 ns) (26.2 ms) (52.4 ms) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 218 x 1/fX 219 x 1/fX 22 x 1/fX 23 x 1/fX

(800 ns) (1.6 µs) (52.4 ms) (104.9 ms) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 219 x 1/fX 220 x 1/fX 23 x 1/fX 24 x 1/fX

(1.6 µs) (3.2 µs) (104.9 ms) (209.7 ms) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 220 x 1/fX 221 x 1/fX 24 x 1/fX 25 x 1/fX

(3.2 µs) (6.4 µs) (209.7 ms) (419.4 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 221 x 1/fX 222 x 1/fX 25 x 1/fX 26 x 1/fX

(6.4 µs) (12.8 µs) (419.4 ms) (838.9 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 222 x 1/fX 223 x 1/fX 26 x 1/fX 27 x 1/fX

(12.8 µs) (25.6 µs) (838.9 ms) (1.7 s) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 223 x 1/fX 224 x 1/fX 27 x 1/fX 28 x 1/fX

(25.6 µs) (51.2 µs) (1.7 s) (3.4 s) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 224 x 1/fX 225 x 1/fX 28 x 1/fX 29 x 1/fX

(51.2 µs) (102.4 µs) (3.4 s) (6.7 s) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 225 x 1/fX 226 x 1/fX 29 x 1/fX 210 x 1/fX

(102.4 µs) (204.8 µs) (6.7 s) (13.4 s) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 227 x 1/fX 228 x 1/fX 211 x 1/fX 212 x 1/fX

(409.6 µs) (819.2 µs) (26.8 s) (53.7 s) (409.6 µs) (819.2 µs)

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. Figures in parentheses apply to operation with at f X = 5.0 MHz.
Page 228 of the NEC PD78076Y user manual — TO1/P31
Page 228 · click to enlarge
Page 228

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

9.2 8-Bit Timer/Event Counters 1 and 2 Configurations

The 8-bit timer/event counters 1 and 2 consist of the following hardware.

Table 9-5. 8-Bit Timer/Event Counters 1 and 2 Configurations

Timer register 8 bits x 2 (TM1, TM2)

Register Compare register8 bits x 2 (CR10, CR20)

Timer output 2 (TO1, TO2)

Timer clock select register 1 (TCL1)

8-bit timer mode control register 1 (TMC1)

8-bit timer output control register (TOC1)

Port mode register 3 (PM3)Note

Figure 9-1. 8-Bit Timer/Event Counters 1 and 2 Block Diagram

INTTM1

8-Bit Compare Register (CR10)

8-Bit Compare Register (CR20)

TO2/P32

fXX/2 to fXX/29

8-Bit Timer Register 1 (TM1)

fXX/211

TI1/P33

8-Bit Timer Register 2 (TM2)

INTTM2

fXX/2 to fXX/29

fXX/211

TI2/P34

8-Bit Timer/ Event Counter Output Control

TO1/P31

TCL

17 TCL

16 TCL

15 TCL

14 TCL

13 TCL

12 TCL

11 TCL

TMC12 TCE2 TCE1

LVS2 LVR2 TOC

15 TOE2LVS1 LVR1 TOC

11 TOE1

Timer Clock Select Register 1

8-Bit Timer Mode Control

8-Bit Timer Output Control

respectively.

Show 19 more labels / short text on this page
Item Configuration · Control register · Internal Bus · 8-Bit Timer/Event · Match · Selector · Counter · Match · Output Control · Selector · Selector · Clear · Clear · Selector · Selector · Circuit · Register · Register · Internal Bus
Page 229 of the NEC PD78076Y user manual — Figure 9-3. Block Diagram of 8-Bit Timer/Event Counter Output Control Circuit 2
Page 229 · click to enlarge
Page 229

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

Figure 9-2. Block Diagram of 8-Bit Timer/Event Counter Output Control Circuit 1

(LV1)

LVR1

R

Q

TO1/P31

LVS1

S

TOC11

PM31

INV

INTTM1

TOE1

Remark The section in the broken line is an output control circuit.

Figure 9-3. Block Diagram of 8-Bit Timer/Event Counter Output Control Circuit 2

(LV2)

LVR2

R

TO2/P32 Q

LVS2

S

PM32

TOC15

INV

INTTM2

TOE2

Remarks 1. The section in the broken line is an output control circuit.

2. f SCK : Serial clock frequency
Show 5 more labels / short text on this page
Level F/F · P31 Output Latch · Level F/F · fSCK · P32 Output Latch
Page 230 of the NEC PD78076Y user manual — (2) 8-bit timer registers 1, 2 (TM1, TM2)
Page 230 · click to enlarge
Page 230

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

(1) Compare registers 10 and 20 (CR10, CR20)

These are 8-bit registers to compare the value set to CR10 to the 8-bit timer register 1 (TM1) count value,

and the value set to CR20 to the 8-bit timer register 2 (TM2) count value, and, if they match, generate an

interrupt request (INTTM1 and INTTM2, respectively).

CR10 and CR20 are set with an 8-bit memory manipulation instruction. They cannot be set with a 16-bit

memory manipulation instruction. When the compare register is used as 8-bit timer/event counter, the 00H

to FFH values can be set. When the compare register is used as 16-bit timer/event counter, the 0000H to

FFFFH values can be set.

RESET input makes CR10 and CR20 undefined.

stopping timer operation.

(2) 8-bit timer registers 1, 2 (TM1, TM2)

These are 8-bit registers to count count pulses.

When TM1 and TM2 are used in the 8-bit timer x 2-channel mode, they are read with an 8-bit memory

manipulation instruction. When TM1 and TM2 are used as 16-bit timer x 1-channel mode, 16-bit timer register

(TMS) is read with a 16-bit memory manipulation instruction.

RESET input sets TM1 and TM2 to 00H.

Page 231 of the NEC PD78076Y user manual — (1) Timer clock select register 1 (TCL1)
Page 231 · click to enlarge
Page 231

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

9.3 8-Bit Timer/Event Counters 1 and 2 Control Registers

The following four types of registers are used to control the 8-bit timer/event counter.

  • Timer clock select register 1 (TCL1)
  • 8-bit timer mode control register 1 (TMC1)
  • 8-bit timer output control register (TOC1)
  • Port mode register 3 (PM3)

(1) Timer clock select register 1 (TCL1)

This register sets count clocks of 8-bit timer registers 1 and 2.

TCL1 is set with an 8-bit memory manipulation instruction.

RESET input sets TCL1 to 00H.

Page 232 of the NEC PD78076Y user manual — TCL17 TCL16 TCL15 TCL14
Page 232 · click to enlarge
Page 232

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

Figure 9-4. Timer Clock Select Register 1 Format

7 6 5 4 3 2 1 0 Symbol

Address After Reset R/W

TCL1 FF41H 00H R/W

TCL17 TCL16 TCL15 TCL14 TCL13 TCL12 TCL11 TCL10

8-Bit Timer Register 1 Count Clock Selection

TCL13 TCL12 TCL11 TCL10

MCS = 1

MCS = 0

0 TI1 falling edge

0 0 0 1 TI1 rising edge

0 1 1 0

fXX/2 fX/2 (2.5 MHz) fX/2

2 (1.25 MHz)

0 1 1 1

2 fX/2

2 (1.25 MHz) fX/2

1 0 0 0

3 fX/2

3 (625 kHz) fX/2

1 0 0 1

4 fX/2

4 (313 kHz) fX/2

1 0 1 0

5 fX/2

5 (156 kHz) fX/2

6 (78.1 kHz)

6 fX/2

6 (78.1 kHz) fX/2

7 (39.1 kHz)

1 0 1 1

1 1 0 0

7 fX/2

7 (39.1 kHz) fX/2

8 (19.5 kHz)

1 1 0 1

8 fX/2

8 (19.5 kHz) fX/2

9 (9.8 kHz)

1 1 1 0

9 fX/2

9 (9.8 kHz) fX/2

10 (4.9 kHz)

11 fX/2

11 (2.4 kHz) fX/2

12 (1.2 kHz)

1

Other than above Setting prohibited

8-Bit Timer Register 2 Count Clock Selection

TCL17 TCL16 TCL15 TCL14

MCS = 1

MCS = 0

0 TI2 falling edge

0 0 0 1 TI2 rising edge

0 1 1 0

fXX/2 fX/2 (2.5 MHz) fX/2

2 (1.25 MHz)

0 1 1 1

2 fX/2

2 (1.25 MHz) fX/2

1 0 0 0

3 fX/2

3 (625 kHz) fX/2

1 0 0 1

4 fX/2

4 (313 kHz) fX/2

1 0 1 0

5 fX/2

5 (156 kHz) fX/2

6 (78.1 kHz)

6 fX/2

6 (78.1 kHz) fX/2

7 (39.1 kHz)

1 0 1 1

1 1 0 0

7 fX/2

7 (39.1 kHz) fX/2

8 (19.5 kHz)

1 1 0 1

8 fX/2

8 (19.5 kHz) fX/2

9 (9.8 kHz)

1 1 1 0

9 fX/2

9 (9.8 kHz) fX/2

10 (4.9 kHz)

11 fX/2

11 (2.4 kHz) fX/2

12 (1.2 kHz)

1

Other than above Setting prohibited

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. TI1 : 8-bit timer register 1 input pin
4. TI2 : 8-bit timer register 2 input pin
5. MCS : Bit 0 of oscillation mode selection register (OSMS)
6. Figures in parentheses apply to operation with f X = 5.0 MHz.
Show 24 more labels / short text on this page
fXX/2 · 3 (625 kHz) · fXX/2 · 4 (313 kHz) · fXX/2 · 5 (156 kHz) · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2 · 3 (625 kHz) · fXX/2 · 4 (313 kHz) · fXX/2 · 5 (156 kHz) · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2
Page 233 of the NEC PD78076Y user manual — TCE2 TMC12 0 0 0 0 0 TMC1
Page 233 · click to enlarge
Page 233

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

(2) 8-bit timer mode control register 1 (TMC1)

This register enables/stops operation of 8-bit timer registers 1 and 2 and sets the operating mode of 8-bit

timer register 2.

TMC1 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets TMC1 to 00H.

Figure 9-5. 8-Bit Timer Mode Control Register 1 Format

2 3 4 5 6 7 Symbol

Address After Reset R/W

TCE2 TMC12 0 TMC1

TCE1 FF49H 00H R/W

TCE1 8-Bit Timer Register 1 Operation Control

0 Operation stop (TM1 clear to 0)

TCE2 8-Bit Timer Register 2 Operation Control

Operation stop (TM2 clear to 0)

TMC12 Operating Mode Selection

8-Bit timer register x 2 channel mode (TM1, TM2)

16-Bit timer register x 1 channel mode (TMS)

2. When used as 16-bit timer register, TCE1 should be used for operation enable/stop.

1 Operation enable · Operation enable

Page 234 of the NEC PD78076Y user manual — Figure 9-6. 8-Bit Timer Output Control Register Format
Page 234 · click to enlarge
Page 234

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

(3) 8-bit timer output control register (TOC1)

This register controls operation of 8-bit timer/event counter output control circuits 1 and 2.

It sets/resets the R-S flip-flops (LV1 and LV2) and enables/disables inversion and 8-bit timer output of 8-

bit timer registers 1 and 2.

TOC1 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets TOC1 to 00H.

Figure 9-6. 8-Bit Timer Output Control Register Format

1 5 Symbol

Address After Reset R/W

TOE1 TOC11 LVR1 LVS1 TOE2 TOC15 LVR2 LVS2 TOC1 FF4FH 00H R/W

TOE1 8-Bit Timer/Event Counter 1 Outptut Control

0 Output disable (port mode)

TOC11 8-Bit Timer/Event Counter 1 Timer Output F/F Control

0 Inverted operation disable

1 Inverted operation enable

LVS1 LVR1 8-Bit Timer/Event Counter 1 Timer Output F/F Status Set

0 1 Timer output F/F reset (0)

1 0 Timer output F/F set (1)

1 1 Setting prohibited

TOE2 8-Bit Timer/Event Counter 2 Output Control

0 Output disable (port mode)

TOC15 8-Bit Timer/Event Counter 2 Timer Output F/F Control

0 Inverted operation disable

1 Inverted operation enable

LVS2 LVR2 8-Bit Timer/Event Counter 2 Timer Output F/F Status Set

0 1 Timer output F/F reset (0)

1 0 Timer output F/F set (1)

1 1 Setting prohibited

2. After data setting, 0 can be read from LVS1, LVS2, LVR1, and LVR2.
Show 4 more labels / short text on this page
1 Output enable · 0 0 Unchanged · 1 Output enable · 0 0 Unchanged
Page 235 of the NEC PD78076Y user manual — PM31 PM32 PM33 PM34 PM35 PM36 PM37 PM3
Page 235 · click to enlarge
Page 235

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

(4) Port mode register 3 (PM3)

This register sets port 3 input/output in 1-bit units.

When using the P31/TO1 and P32/TO2 pins for timer output, set PM31, PM32, and output latches of P31

and P32 to 0.

PM3 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets PM3 to FFH.

Figure 9-7. Port Mode Register 3 Format

0 1 2 3 4 5 6 7 Symbol

Address After Reset R/W

PM31 PM32 PM33 PM34 PM35 PM36 PM37 PM3

PM30 FF23H FFH R/W

PM3n P3n Pin Input/Output Mode Selection (n = 0 to 7)

0 Output mode (output buffer ON)

1 Input mode (output buffer OFF)

Page 236 of the NEC PD78076Y user manual — TO1
Page 236 · click to enlarge
Page 236

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

9.4 8-Bit Timer/Event Counters 1 and 2 Operations

9.4.1 8-bit timer/event counter mode

(1) Interval timer operations

The 8-bit timer/event counters 1 and 2 operate as interval timers which generate interrupt requests

repeatedly at intervals of the count value preset to 8-bit compare registers 10 and 20 (CR10 and CR20).

When the count values of the 8-bit timer registers 1 and 2 (TM1 and TM2) match the values set to CR10

and CR20, counting continues with the TM1 and TM2 values cleared to 0 and the interrupt request signals

(INTTM1 and INTTM2) are generated.

Count clock of the TM1 can be selected with bits 0 to 3 (TCL10 to TCL13) of the timer clock select register

1 (TCL1). Count clock of the TM2 can be selected with bits 4 to 7 (TCL14 to TCL17) of the timer clock select

register 1 (TCL1).

For the operation in the case the value of the compare register is changed during the timer count operation,

refer to 9.5 8-Bit Timer/Event Counters 1 and 2 Precautions (3).

Figure 9-8. Interval Timer Operation Timing

00 01 N 00 01 N 00 01 N

Count Start Clear Clear

CR10

N N N N

INTTM1

Interrupt Request Acknowledge Interrupt Request Acknowledge

TO1

Interval Time Interval Time Interval Time

Remark Interval time = (N + 1) x t : N = 00H to FFH

t · Count Clock · TM1 Count Value

Page 237 of the NEC PD78076Y user manual — TCL13 TCL12 TCL11 TCL10
Page 237 · click to enlarge
Page 237

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

Table 9-6. 8-Bit Timer/Event Counter 1 Interval Time

Minimum Interval Time Maximum Interval Time Resolution

TCL13 TCL12 TCL11 TCL10

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

0 TI1 input cycle 28 x TI1 input cycle TI1 input edge cycle

0 0 0 1 TI1 input cycle 28 x TI1 input cycle TI1 input edge cycle

2 x 1/fX 22 x 1/fX 29 x 1/fX 210 x 1/fX 2 x 1/fX 22 x 1/fX

0 1 1 0

(400 ns) (800 ns) (102.4 µs) (204.8 µs) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 210 x 1/fX 211 x 1/fX 22 x 1/fX 23 x 1/fX

0 1 1 1

(800 ns) (1.6 µs) (204.8 µs) (409.6 µs) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 211 x 1/fX 212 x 1/fX 23 x 1/fX 24 x 1/fX

1 0 0 0

(1.6 µs) (3.2 µs) (409.6 µs) (819.2 µs) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 212 x 1/fX 213 x 1/fX 24 x 1/fX 25 x 1/fX

1 0 0 1

(3.2 µs) (6.4 µs) (819.2 µs) (1.64 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 213 x 1/fX 214 x 1/fX 25 x 1/fX 26 x 1/fX

1 0 1 0

(6.4 µs) (12.8 µs) (1.64 ms) (3.28 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 214 x 1/fX 215 x 1/fX 26 x 1/fX 27 x 1/fX

1 0 1 1

(12.8 µs) (25.6 µs) (3.28 ms) (6.55 ms) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 215 x 1/fX 216 x 1/fX 27 x 1/fX 28 x 1/fX

1 1 0 0

(25.6 µs) (51.2 µs) (6.55 ms) (13.1 ms) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 216 x 1/fX 217 x 1/fX 28 x 1/fX 29 x 1/fX

1 1 0 1

(51.2 µs) (102.4 µs) (13.1 ms) (26.2 ms) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 217 x 1/fX 218 x 1/fX 29 x 1/fX 210 x 1/fX

1 1 1 0

(102.4 µs) (204.8 µs) (26.2 ms) (52.4 ms) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 219 x 1/fX 220 x 1/fX 211 x 1/fX 212 x 1/fX

1

(409.6 µs) (819.2 µs) (104.9 ms) (209.7 ms) (409.6 µs) (819.2 µs)

Other than above Setting prohibited

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. TCL10 to TCL13 : Bits 0 to 3 of timer clock select register 1 (TCL1)
4. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 238 of the NEC PD78076Y user manual — TCL17 TCL16 TCL15 TCL14
Page 238 · click to enlarge
Page 238

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

Table 9-7. 8-Bit Timer/Event Counter 2 Interval Time

Minimum Interval Time Maximum Interval Time Resolution

TCL17 TCL16 TCL15 TCL14

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

0 TI2 input cycle 28 x TI2 input cycle TI2 input edge cycle

0 0 0 1 TI2 input cycle 28 x TI2 input cycle TI2 input edge cycle

2 x 1/fX 22 x 1/fX 29 x 1/fX 210 x 1/fX 2 x 1/fX 22 x 1/fX

0 1 1 0

(400 ns) (800 ns) (102.4 µs) (204.8 µs) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 210 x 1/fX 211 x 1/fX 22 x 1/fX 23 x 1/fX

0 1 1 1

(800 ns) (1.6 µs) (204.8 µs) (409.6 µs) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 211 x 1/fX 212 x 1/fX 23 x 1/fX 24 x 1/fX

1 0 0 0

(1.6 µs) (3.2 µs) (409.6 µs) (819.2 µs) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 212 x 1/fX 213 x 1/fX 24 x 1/fX 25 x 1/fX

1 0 0 1

(3.2 µs) (6.4 µs) (819.2 µs) (1.64 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 213 x 1/fX 214 x 1/fX 25 x 1/fX 26 x 1/fX

1 0 1 0

(6.4 µs) (12.8 µs) (1.64 ms) (3.28 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 214 x 1/fX 215 x 1/fX 26 x 1/fX 27 x 1/fX

1 0 1 1

(12.8 µs) (25.6 µs) (3.28 ms) (6.55 ms) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 215 x 1/fX 216 x 1/fX 27 x 1/fX 28 x 1/fX

1 1 0 0

(25.6 µs) (51.2 µs) (6.55 ms) (13.1 ms) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 216 x 1/fX 217 x 1/fX 28 x 1/fX 29 x 1/fX

1 1 0 1

(51.2 µs) (102.4 µs) (13.1 ms) (26.2 ms) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 217 x 1/fX 218 x 1/fX 29 x 1/fX 210 x 1/fX

1 1 1 0

(102.4 µs) (204.8 µs) (26.2 ms) (52.4 ms) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 219 x 1/fX 220 x 1/fX 211 x 1/fX 212 x 1/fX

1

(409.6 µs) (819.2 µs) (104.9 ms) (209.7 ms) (409.6 µs) (819.2 µs)

Other than above Setting prohibited

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. TCL14 to TCL17 : Bits 4 to 7 timer clock select register 1 (TCL1)
4. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 239 of the NEC PD78076Y user manual — CR10
Page 239 · click to enlarge
Page 239

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

(2) External event counter operation

The external event counter counts the number of external clock pulses to be input to the TI1/P33 and TI2/

P34 pins with 8-bit timer registers 1 and 2 (TM1 and TM2).

TM1 and TM2 are incremented each time the valid edge specified with the timer clock select register (TCL1)

is input. Either the rising or falling edge can be selected.

When the TM1 and TM2 counted values match the values of 8-bit compare registers (CR10 and CR20), TM1

and TM2 are cleared to 0 and the interrupt request signals (INTTM1 and INTTM2) are generated.

Figure 9-9. External Event Counter Operation Timings (with Rising Edge Specified)

00 01 02 03 04 05 N – 1 N 00 01 02 03

CR10

N

INTTM1

Remark N = 00H to FFH

TI1 Pin Input · TM1 Count Value

Page 240 of the NEC PD78076Y user manual — Table 9-8. 8-Bit Timer/Event Counters 1 and 2 Square-Wave Output Ranges
Page 240 · click to enlarge
Page 240

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

(3) Square-wave output Operation

8-bit timer/event counters 1 and 2 operate as a square wave outputs with any selected frequency at intervals

of the value preset to 8-bit compare registers 10 and 20 (CR10 and CR20).

The TO1/P31 or TO2/P32 pin output status is reversed at intervals of the count value preset to CR10 or CR20

by setting bit 0 (TOE1) or bit 4 (TOE2) of the 8-bit timer output control register (TOC1) to 1. This enables

a square wave with any selected frequency to be output.

Table 9-8. 8-Bit Timer/Event Counters 1 and 2 Square-Wave Output Ranges

Minimum Pulse Width Maximum Pulse Width Resolution

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

2 x 1/fX 22 x 1/fX 29 x 1/fX 210 x 1/fX 2 x 1/fX 22 x 1/fX

(400 ns) (800 ns) (102.4 µs) (204.8 µs) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 210 x 1/fX 211 x 1/fX 22 x 1/fX 23 x 1/fX

(800 ns) (1.6 µs) (204.8 µs) (409.6 µs) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 211 x 1/fX 212 x 1/fX 23 x 1/fX 24 x 1/fX

(1.6 µs) (3.2 µs) (409.6 µs) (819.2 µs) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 212 x 1/fX 213 x 1/fX 24 x 1/fX 25 x 1/fX

(3.2 µs) (6.4 µs) (819.2 µs) (1.64 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 213 x 1/fX 214 x 1/fX 25 x 1/fX 26 x 1/fX

(6.4 µs) (12.8 µs) (1.64 ms) (3.28 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 214 x 1/fX 215 x 1/fX 26 x 1/fX 27 x 1/fX

(12.8 µs) (25.6 µs) (3.28 ms) (6.55 ms) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 215 x 1/fX 216 x 1/fX 27 x 1/fX 28 x 1/fX

(25.6 µs) (51.2 µs) (6.55 ms) (13.1 ms) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 216 x 1/fX 217 x 1/fX 28 x 1/fX 29 x 1/fX

(51.2 µs) (102.4 µs) (13.1 ms) (26.2 ms) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 217 x 1/fX 218 x 1/fX 29 x 1/fX 210 x 1/fX

(102.4 µs) (204.8 µs) (26.2 ms) (52.4 ms) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 219 x 1/fX 220 x 1/fX 211 x 1/fX 212 x 1/fX

(409.6 µs) (819.2 µs) (104.9 ms) (209.7 ms) (409.6 µs) (819.2 µs)

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 241 of the NEC PD78076Y user manual — CR10 N N
Page 241 · click to enlarge
Page 241

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

Figure 9-10. Timing of Square Wave Output Operation

TM1 Count Value 01 02 00 N–1 N 00 01 02 N–1 N 00

CR10 N N

control register (TOC1).

Count Clock · Count Start · TO1Note

Page 242 of the NEC PD78076Y user manual — CR10, CR20
Page 242 · click to enlarge
Page 242

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

9.4.2 16-bit timer/event counter mode

When bit 2 (TMC12) of the 8-bit timer mode control register (TMC1) is set to 1, the 16-bit timer/event counter

mode is set.

In this mode, the count clock is selected by using bits 0 through 3 (TCL10 through TCL13) of the timer clock

select register (TCL1), and the overflow signal of the 8-bit timer/event counter 1 (TM1) is used as the count clock

for the 8-bit timer/event counter 2 (TM2).

The counting operation is enabled or disabled in this mode by using bit 0 (TCE1) of TMC1.

(1) Operation as interval timer

The 16-bit timer/event counter operates as an interval timer that repeatedly generates an interrupt request

at intervals of the count values set in advance to the 2 channels of the 8-bit compare registers (CR10 and

CR20). When setting a count value, assign the value of the high-order 8 bits to CR20 and the value of the

low-order 8 bits to CR10. For the count values that can be set (interval time), refer to Table 9-9.

When the value of 8-bit timer register 1 (TM1) coincides with the value of CR10 and the value of 8-bit timer

register 2 (TM1) coincides with the value of CR20, the values of TM1 and TM2 are cleared to 0, and at the

same time, an interrupt request signal (INTTM2) is generated. For the operation timing of the interval timer,

refer to Figure 9-11.

Select the count clock by using bits 0 through 3 (TCL10 through TCL13) of the timer clock select register

1 (TCL1). The overflow signal of TM1 is used as the count clock for TM2.

Figure 9-11. Interval Timer Operation Timing

TMS (TM1, TM2) Count Value

0000 0001 N 0000 0001 N 0000 0001 N

Count Start Clear Clear

CR10, CR20

N N N N

INTTM2

TO2

Interval Time Interval Time Interval Time

Remark Interval time = (N + 1) x t : N = 0000H to FFFFH

the CR10 value, interrupt request (INTTM1) is generated and the F/F of 8-bit timer/event

counter output control circuit 1 is inverted. Thus, when using 8-bit timer/event counter as

16-bit interval timer, set the INTTM1 mask flag TMMK1 to 1 to disable INTTM1 acknowledgment.

When reading the 16-bit timer (TMS) count value, use the 16-bit memory manipulation

instruction.

Show 4 more labels / short text on this page
t · Count Clock · Interrupt Request Acknowledge · Interrupt Request Acknowledge
Page 243 of the NEC PD78076Y user manual — TCL13 TCL12 TCL11 TCL10
Page 243 · click to enlarge
Page 243

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

Table 9-9. Interval Times when 2-Channel 8-Bit Timer/Event Counters (TM1 and TM2)

are Used as 16-Bit Timer/Event Counter

Minimum Interval Time Maximum Interval Time Resolution

TCL13 TCL12 TCL11 TCL10

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

0 TI1 input cycle 28 x TI1 input cycle TI1 input edge cycle

0 0 0 1 TI1 input cycle 28 x TI1 input cycle TI1 input edge cycle

2 x 1/fX 22 x 1/fX 217 x 1/fX 218 x 1/fX 2 x 1/fX 22 x 1/fX

0 1 1 0

(400 ns) (800 ns) (26.2 ms) (52.4 ms) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 218 x 1/fX 219 x 1/fX 22 x 1/fX 23 x 1/fX

0 1 1 1

(800 ns) (1.6 µs) (52.4 ms) (104.9 ms) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 219 x 1/fX 220 x 1/fX 23 x 1/fX 24 x 1/fX

1 0 0 0

(1.6 µs) (3.2 µs) (104.9 ms) (209.7 ms) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 220 x 1/fX 221 x 1/fX 24 x 1/fX 25 x 1/fX

1 0 0 1

(3.2 µs) (6.4 µs) (209.7 ms) (419.4 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 221 x 1/fX 222 x 1/fX 25 x 1/fX 26 x 1/fX

1 0 1 0

(6.4 µs) (12.8 µs) (419.4 ms) (838.9 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 222 x 1/fX 223 x 1/fX 26 x 1/fX 27 x 1/fX

1 0 1 1

(12.8 µs) (25.6 µs) (838.9 ms) (1.7 s) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 223 x 1/fX 224 x 1/fX 27 x 1/fX 28 x 1/fX

1 1 0 0

(25.6 µs) (51.2 µs) (1.7 s) (3.4 s) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 224 x 1/fX 225 x 1/fX 28 x 1/fX 29 x 1/fX

1 1 0 1

(51.2 µs) (102.4 µs) (3.4 s) (6.7 s) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 225 x 1/fX 226 x 1/fX 29 x 1/fX 210 x 1/fX

1 1 1 0

(102.4 µs) (204.8 µs) (6.7 s) (13.4 s) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 227 x 1/fX 228 x 1/fX 211 x 1/fX 212 x 1/fX

1

(409.6 µs) (819.2 µs) (26.8 s) (53.7 s) (409.6 µs) (819.2 µs)

Other than above Setting prohibited

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. TCL10 to TCL13 : Bits 0 to 3 of timer clock select register 1 (TCL1)
4. Figures in parentheses apply to operation with at f X = 5.0 MHz.
Page 244 of the NEC PD78076Y user manual — CR10, CR20
Page 244 · click to enlarge
Page 244

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

(2) External event counter operations

The external event counter counts the number of external clock pulses to be input to the TI1/P33 pin with

2-channel 8-bit timer registers 1 and 2 (TM1 and TM2).

TM1 and TM2 are incremented each time the valid edge specified with the timer clock select register 1 (TCL1)

is input. Either the rising or falling edge can be selected.

When the TM1 and TM2 counted values match the values of 8-bit compare registers 10 and 20 (CR10 and

CR20), TM1 and TM2 are cleared to 0 and the interrupt request signal (INTTM2) is generated.

Figure 9-12. External Event Counter Operation Timings (with Rising Edge Specified)

TM1, TM2 Count Value

0000 0001 0002 0003 0004 0005 N – 1 N 0000 0001 0002 0003

CR10, CR20

N

INTTM2

the CR10 value, interrupt request (INTTM1) is generated and the F/F of 8-bit timer/event

counter output control circuit 1 is inverted. Thus, when using 8-bit timer/event counter as

16-bit interval timer, set the INTTM1 mask flag TMMK1 to 1 to disable INTTM1 acknowledgment.

When reading the 16-bit timer register (TMS) count value, use the 16-bit memory manipulation

instruction.

TI1 Pin Input

Page 245 of the NEC PD78076Y user manual — Table 9-10. Square-Wave Output Ranges when 2-Channel 8-Bit Timer/Event Counters
Page 245 · click to enlarge
Page 245

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

(3) Square-wave output operation

The 8-bit timer/event counters 1 and 2 operate as square wave outputs with any selected frequency at

intervals of the value preset to 8-bit compare registers (CR10 and CR20). To set the count value, set the

values of the higher 8 bits to CR20 and set the values of the lower 8 bits to CR10.

The TO2/P32 pin output status is reversed at intervals of the count value preset to CR10 and CR20 by setting

bit 4 (TOE2) of the 8-bit timer output control register (TOC1) to 1. This enables a square wave with any

selected frequency to be output.

Table 9-10. Square-Wave Output Ranges when 2-Channel 8-Bit Timer/Event Counters

(TM1 and TM2) are Used as 16-Bit Timer/Event Counter

Minimum Pulse Width Maximum Pulse Width Resolution

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

2 x 1/fX 22 x 1/fX 217 x 1/fX 218 x 1/fX 2 x 1/fX 22 x 1/fX

(400 ns) (800 ns) (26.2 ms) (52.4 ms) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 218 x 1/fX 219 x 1/fX 22 x 1/fX 23 x 1/fX

(800 ns) (1.6 µs) (52.4 ms) (104.9 ms) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 219 x 1/fX 220 x 1/fX 23 x 1/fX 24 x 1/fX

(1.6 µs) (3.2 µs) (104.9 ms) (209.7 ms) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 220 x 1/fX 221 x 1/fX 24 x 1/fX 25 x 1/fX

(3.2 µs) (6.4 µs) (209.7 ms) (419.4 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 221 x 1/fX 222 x 1/fX 25 x 1/fX 26 x 1/fX

(6.4 µs) (12.8 µs) (419.4 ms) (838.9 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 222 x 1/fX 223 x 1/fX 26 x 1/fX 27 x 1/fX

(12.8 µs) (25.6 µs) (838.9 ms) (1.7 s) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 223 x 1/fX 224 x 1/fX 27 x 1/fX 28 x 1/fX

(25.6 µs) (51.2 µs) (1.7 s) (3.4 s) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 224 x 1/fX 225 x 1/fX 28 x 1/fX 29 x 1/fX

(51.2 µs) (102.4 µs) (3.4 s) (6.7 s) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 225 x 1/fX 226 x 1/fX 29 x 1/fX 210 x 1/fX

(102.4 µs) (204.8 µs) (6.7 s) (13.4 s) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 227 x 1/fX 228 x 1/fX 211 x 1/fX 212 x 1/fX

(409.6 µs) (819.2 µs) (26.8 s) (53.7 s) (409.6 µs) (819.2 µs)

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 246 of the NEC PD78076Y user manual — 00H 00H 00H 00H
Page 246 · click to enlarge
Page 246

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

9.5 8-Bit Timer/Event Counters 1 and 2 Precautions

(1) Timer start errors

An error with a maximum of one clock may occur concerning the time required for a match signal to be gener-

ated after timer start. This is because 8-bit timer registers 1 and 2 (TM1 and TM2) are started asynchronously

with the count pulse.

Figure 9-13. 8-Bit Timer Registers 1 and 2 Start Timing

TM1, TM2 Count Value 00H 01H 02H 03H 04H

(2) 8-bit compare register 10 and 20 setting

The 8-bit compare registers 10 and 20 (CR10 and CR20) can be set to 00H.

Thus, when these 8-bit compare registers are used as event counters, one-pulse count operation can be

carried out.

When the 8-bit compare register is used as 16-bit timer/event counter, write data to CR10 and CR20 after

setting bit 0 (TCE1) of the 8-bit timer mode control register 1 to 0 and stopping timer operation.

Figure 9-14. External Event Counter Operation Timing

CR10, CR20

00H

TM1, TM2 Count Value

00H

TO1, TO2

Show 4 more labels / short text on this page
Count Pulse · Timer Start · TI1, TI2, Input · Interrupt Request Flag
Page 247 of the NEC PD78076Y user manual — Figure 9-15. Timing after Compare Register Change during Timer Count Operation
Page 247 · click to enlarge
Page 247

CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2

(3) Operation after compare register change during timer count operation

If the values after the 8-bit compare registers 10 and 20 (CR10 and CR20) are changed are smaller than

those of 8-bit timer registers (TM1 and TM2), TM1 and TM2 continue counting, overflow and then restart

counting from 0. Thus, if the value (M) after CR10 and CR20 change is smaller than value (N) before the

change, it is necessary to restart the timer after changing CR10 and CR20.

Figure 9-15. Timing after Compare Register Change during Timer Count Operation

CR10, CR20

M N

TM1, TM2 Count Value X – 1 X FFH 00H 01H 02H

Remark N > X > M

Count Pulse

Page 248 of the NEC PD78076Y user manual — [MEMO]
Page 248 · click to enlarge
Page 248

[MEMO]

Page 249 of the NEC PD78076Y user manual — CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6
Page 249 · click to enlarge
Page 249

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

10.1 8-Bit Timer/Event Counters 5 and 6 Functions

The 8-bit timer event counters 5 and 6 (TM5, TM6) have the following functions.

  • Interval timer
  • External event counter
  • Square-wave output
  • PWM output
Page 250 of the NEC PD78076Y user manual — Table 10-1. 8-Bit Timer/Event Counters 5 and 6 Interval Times
Page 250 · click to enlarge
Page 250

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

(1) 8-bit interval timer

Interrupt requests are generated at the preset time intervals.

Table 10-1. 8-Bit Timer/Event Counters 5 and 6 Interval Times

Minimum Interval Width Maximum Interval Width Resolution

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

— 1/fX — 28 x 1/fX — 1/fX

(200 ns) (51.2 µs) (200 ns)

1/fX 2 x 1/fX 28 x 1/fX 29 x 1/fX 1/fX 2 x 1/fX

(200 ns) (400 ns) (51.2 µs) (102.4 µs) (200 ns) (400 ns)

2 x 1/fX 22 x 1/fX 29 x 1/fX 210 x 1/fX 2 x 1/fX 22 x 1/fX

(400 ns) (800 ns) (102.4 µs) (204.8 µs) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 210 x 1/fX 211 x 1/fX 22 x 1/fX 23 x 1/fX

(800 ns) (1.6 µs) (204.8 µs) (409.6 µs) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 211 x 1/fX 212 x 1/fX 23 x 1/fX 24 x 1/fX

(1.6 µs) (3.2 µs) (409.6 µs) (819.2 µs) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 212 x 1/fX 213 x 1/fX 24 x 1/fX 25 x 1/fX

(3.2 µs) (6.4 µs) (819.2 µs) (1.64 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 213 x 1/fX 214 x 1/fX 25 x 1/fX 26 x 1/fX

(6.4 µs) (12.8 µs) (1.64 ms) (3.28 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 214 x 1/fX 215 x 1/fX 26 x 1/fX 27 x 1/fX

(12.8 µs) (25.6 µs) (3.28 ms) (6.55 ms) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 215 x 1/fX 216 x 1/fX 27 x 1/fX 28 x 1/fX

(25.6 µs) (51.2 µs) (6.55 ms) (13.1 ms) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 216 x 1/fX 217 x 1/fX 28 x 1/fX 29 x 1/fX

(51.2 µs) (102.4 µs) (13.1 ms) (26.2 ms) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 217 x 1/fX 218 x 1/fX 29 x 1/fX 210 x 1/fX

(102.4 µs) (204.8 µs) (26.2 ms) (52.4 ms) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 219 x 1/fX 220 x 1/fX 211 x 1/fX 212 x 1/fX

(409.6 µs) (819.2 µs) (104.9 ms) (209.7 ms) (409.6 µs) (819.2 µs)

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 251 of the NEC PD78076Y user manual — (4) PWM output
Page 251 · click to enlarge
Page 251

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

(2) External event counter

The number of pulses of an externally input signal can be measured.

(3) Square-wave output

A square wave with any selected frequency can be output.

Table 10-2. 8-Bit Timer/Event Counters 5 and 6 Square-Wave Output Ranges

Minimum Pulse Width Maximum Pulse Width Resolution

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

— 1/fX — 28 x 1/fX — 1/fX

(200 ns) (51.2 µs) (200 ns)

1/fX 2 x 1/fX 28 x 1/fX 29 x 1/fX 1/fX 2 x 1/fX

(200 ns) (400 ns) (51.2 µs) (102.4 µs) (200 ns) (400 ns)

2 x 1/fX 22 x 1/fX 29 x 1/fX 210 x 1/fX 2 x 1/fX 22 x 1/fX

(400 ns) (800 ns) (102.4 µs) (204.8 µs) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 210 x 1/fX 211 x 1/fX 22 x 1/fX 23 x 1/fX

(800 ns) (1.6 µs) (204.8 µs) (409.6 µs) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 211 x 1/fX 212 x 1/fX 23 x 1/fX 24 x 1/fX

(1.6 µs) (3.2 µs) (409.6 µs) (819.2 µs) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 212 x 1/fX 213 x 1/fX 24 x 1/fX 25 x 1/fX

(3.2 µs) (6.4 µs) (819.2 µs) (1.64 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 213 x 1/fX 214 x 1/fX 25 x 1/fX 26 x 1/fX

(6.4 µs) (12.8 µs) (1.64 ms) (3.28 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 214 x 1/fX 215 x 1/fX 26 x 1/fX 27 x 1/fX

(12.8 µs) (25.6 µs) (3.28 ms) (6.55 ms) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 215 x 1/fX 216 x 1/fX 27 x 1/fX 28 x 1/fX

(25.6 µs) (51.2 µs) (6.55 ms) (13.1 ms) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 216 x 1/fX 217 x 1/fX 28 x 1/fX 29 x 1/fX

(51.2 µs) (102.4 µs) (13.1 ms) (26.2 ms) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 217 x 1/fX 218 x 1/fX 29 x 1/fX 210 x 1/fX

(102.4 µs) (204.8 µs) (26.2 ms) (52.4 ms) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 219 x 1/fX 220 x 1/fX 211 x 1/fX 212 x 1/fX

(409.6 µs) (819.2 µs) (104.9 ms) (209.7 ms) (409.6 µs) (819.2 µs)

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. Figures in parentheses apply to operation with f X = 5.0 MHz.

(4) PWM output

TM5 and TM6 can generate 8-bit resolution PWM output.

Page 252 of the NEC PD78076Y user manual — TI5/P100/TO5 TI6/P101/TO6
Page 252 · click to enlarge
Page 252

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

10.2 8-Bit Timer/Event Counters 5 and 6 Configurations

The 8-bit timer/event counters 5 and 6 consist of the following hardware.

Table 10-3. 8-Bit Timer/Event Counters 5 and 6 Configurations

Timer register 8 bits x 2 (TM5, TM6)

Register Compare register8 bits x 2 (CR50, CR60)

Timer output 2 (TO5, TO6)

Timer clock select register 5 and 6 (TCL5, TCL6)

Control register 8-bit timer mode control registers 5 and 6 (TMC5, TMC6)

Port mode register 10 (PM10)Note

Figure 10-1. 8-Bit Timer/Event Counters 5 and 6 Block Diagram

8-Bit Compare Register (CRn0)

fXX-fXX/210

8-Bit Timer Register n (TMn)

OVF

TO5/P100/TI5, TO6/P101/TI6

fXX/212

TI5/P100/TO5 TI6/P101/TO6

TCL

TCL

TCL

TCL

TMC

LVS

LVR

TMC

TOE

8-Bit Timer Mode Control Register n

circuits.

Remark n = 5, 6

Show 21 more labels / short text on this page
Item Configuration · Internal Bus · Match · INTTMn · Output Control · Selector · Clear · Selector · n TCE · n3 · n2 · n1 · n0 · n6 · n · n · n · n1 · Timer Clock Select · Register n · Internal Bus
Page 253 of the NEC PD78076Y user manual — (2) 8-bit timer registers 5 and 6 (TM5, TM6)
Page 253 · click to enlarge
Page 253

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

Figure 10-2. Block Diagram of 8-Bit Timer/Event Counters 5 and 6 Output Control Circuit

RESET

R

Q

S

TO5/P100/TI5, TO6/P101/TI6

INV

PM100, PM101

P100, P101 Output Latch

R

Q

F/F

S

Remarks 1. The section in the broken line is an output control circuit.

2. n = 5, 6

(1) Compare register 50 and 60 (CR50, 60)

These 8-bit registers compare the value set to CR50 to 8-bit timer register 5 (TM5) count value, and the

value set to CR60 to the 8-bit timer register 6 (TM6) count value, and, if they match, generate interrupts

request (INTTM5 and INTTM6, respectively).

CR50 and CR60 are set with an 8-bit memory manipulation instruction. They cannot be set with a 16-bit

memory manipulation instruction. The 00H to FFH values can be set.

RESET input sets CR50 and CR60 values to 00H.

(2) 8-bit timer registers 5 and 6 (TM5, TM6)

These 8-bit registers count count pulses.

TM5 and TM6 are read with an 8-bit memory manipulation instruction.

RESET input sets TM5 and TM6 to 00H.

Show 14 more labels / short text on this page
TMCn1 TMCn6 · LVRn · Selector · LVSn · TMCn1 · TMCn6 · INTTMn · PWM Output Circuit · Timer Output F/F2 · TCEn · INTTMn · Level · OVFn · TOEn
Page 254 of the NEC PD78076Y user manual — TCL53 TCL52 TCL51 TCL50
Page 254 · click to enlarge
Page 254

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

10.3 8-Bit Timer/Event Counters 5 and 6 Control Registers

The following three types of registers are used to control the 8-bit timer/event counters 5 and 6.

  • Timer clock select register 5 and 6 (TCL5, TCL6)
  • 8-bit timer mode control registers 5 and 6 (TMC5, TMC6)
  • Port mode register 10 (PM10)

(1) Timer clock select register 5 (TCL5)

This register sets count clocks of 8-bit timer register 5.

TCL5 is set with an 8-bit memory manipulation instruction.

RESET input sets TCL5 to 00H.

Figure 10-3. Timer Clock Select Register 5 Format

7 6 5 4 3 2 1 0 Symbol

Address After Reset R/W

TCL5

0 0 0 0 TCL53 TCL52 TCL51 TCL50

FF52H 00H R/W

8-bit Timer Register 5 Count Clock Selection

TCL53 TCL52 TCL51 TCL50

MCS = 1

MCS = 0

0 TI5 falling edgeNote

0 0 0 1 TI5 rising edgeNote

0 1 0 0

fX (5.0 MHz)

fX/2 (2.5 MHz) 0 1 0 1

fXX fX

(5.0 MHz)

2 (1.25 MHz) 0 1 1 0

fXX/2 fX/2 (2.5 MHz) fX/2

3 (625 kHz) 0 1 1 1

2 fX/2

2 (1.25 MHz) fX/2

3 (625 kHz) fX/2

4 (313 kHz) 1 0 0 0

3 fX/2

5 (156 kHz) 1 0 0 1

4 fX/2

4 (313 kHz) fX/2

6 (78.1 kHz) 1 0 1 0

5 fX/2

5 (156 kHz) fX/2

7 (39.1 kHz) 1 0 1 1

6 fX/2

6 (78.1 kHz) fX/2

8 (19.5 kHz) 1 1 0 0

7 fX/2

7 (39.1 kHz) fX/2

9 (9.8 kHz) 1 1 0 1

8 fX/2

8 (19.5 kHz) fX/2

10 (4.9 kHz) 1 1 1 0

9 fX/2

9 (9.8 kHz) fX/2

11 (2.4 kHz) (1.2 kHz)

11 fXX/2

11 fX/2

Other than above Setting prohibited

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. TI5 : 8-bit timer register 5 input pin
4. MCS : Bit 0 of oscillation mode selection register (OSMS)
5. Figures in parentheses apply to operation with f X = 5.0 MHz.
Show 11 more labels / short text on this page
2fXX · (Setting prohibited) · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fX/2
Page 255 of the NEC PD78076Y user manual — TCL63 TCL62 TCL61 TCL60
Page 255 · click to enlarge
Page 255

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

(2) Timer clock select register 6 (TCL6)

This register sets count clocks of 8-bit timer register 6.

TCL6 is set with an 8-bit memory manipulation instruction.

RESET input sets TCL6 to 00H.

Figure 10-4. Timer Clock Select Register 6 Format

7 6 5 4 3 2 1 0 Symbol

Address After Reset R/W

TCL6

0 0 0 0 TCL63 TCL62 TCL61 TCL60

FF56H 00H R/W

8-bit Timer Register 5 Count Clock Selection

TCL63 TCL62 TCL61 TCL60

MCS = 1

MCS = 0

0 TI6 falling edgeNote

0 0 0 1 TI6 rising edgeNote

0 1 0 0

fX (5.0 MHz)

fX/2 (2.5 MHz) 0 1 0 1

fXX fX

(5.0 MHz)

2 (1.25 MHz) 0 1 1 0

fXX/2 fX/2 (2.5 MHz) fX/2

3 (625 kHz) 0 1 1 1

2 fX/2

2 (1.25 MHz) fX/2

4 (313 kHz) 1 0 0 0

3 fX/2

3 (625 kHz) fX/2

5 (156 kHz) 1 0 0 1

4 fX/2

4 (313 kHz) fX/2

6 (78.1 kHz) 1 0 1 0

5 fX/2

5 (156 kHz) fX/2

7 (39.1 kHz) 1 0 1 1

6 fX/2

6 (78.1 kHz) fX/2

8 (19.5 kHz) 1 1 0 0

7 fX/2

7 (39.1 kHz) fX/2

9 (9.8 kHz) 1 1 0 1

8 fX/2

8 (19.5 kHz) fX/2

10 (4.9 kHz) 1 1 1 0

9 fX/2

9 (9.8 kHz) fX/2

11 (2.4 kHz) (1.2 kHz)

11 fXX/2

11 fX/2

Other than above Setting prohibited

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. TI6 : 8-bit timer register 6 input pin
4. MCS : Bit 0 of oscillation mode selection register (OSMS)
5. Figures in parentheses apply to operation with f X = 5.0 MHz.
Show 11 more labels / short text on this page
2fXX · (Setting prohibited) · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fXX/2 · fX/2
Page 256 of the NEC PD78076Y user manual — LVS5 LVR5
Page 256 · click to enlarge
Page 256

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

(3) 8-bit timer mode control register 5 (TMC5)

This register enables/stops operation of 8-bit timer register 5, sets the operating mode of 8-bit timer register

5 and controls operation of 8-bit timer/event counter 5 output control circuit.

It sets R-S flip-flop (timer output F/F 1,2) setting/resetting, the active level in PWM mode, inversion enabling/

disabling in modes other than PWM mode and 8-bit timer/event counter 5 timer output enabling/disabling.

TMC5 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets TMC5 to 00H.

Figure 10-5. 8-Bit Timer Output Control Register Format

Address After Reset R/W

6 5 4 1 Symbol

TMC5 FF53H 00H R/W

TCE5 TMC56 0 0 LVS5 LVR5 TMC51 TOE5

TOE5 8-Bit Timer/Event Counter 5 Output Control

0 Output disabled (Port mode)

In PWM Mode In Other Mode

TMC51

Active level selection Timer output F/F1 control

8-Bit Timer/Event Counter 5 Timer Output F/F1 Status Setting

LVS5 LVR5

Timer output F/F1 reset (0)

Timer output F/F1 set (1)

TMC56 8-Bit Timer/Event Counter 5 Operating Mode Selection

0 Clear & start mode on match of TM5 and CR50

1 PWM mode (free-running)

TCE5 8-Bit Timer Register 5 Operation Control

0 Operation Stop (TM5 clear to 0)

2. If LVS5 and LVR5 are read after data are set, they will be 0.
3. Set bits 4 and 5 to 0.
Show 8 more labels / short text on this page
1 Output enabled · 0 Active high · Inversion operation disabled · 1 Active low · Inversion operation enabled · No change · Setting prohibited · 1 Operation Enable
Page 257 of the NEC PD78076Y user manual — LVS6 LVR6
Page 257 · click to enlarge
Page 257

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

(4) 8-bit timer mode control register 6 (TMC6)

This register enables/stops operation of 8-bit timer register 6, sets the operating mode of 8-bit timer register

6 and controls operation of 8-bit timer/event counter 6 output control circuit.

It sets R-S flip-flop (timer output F/F 1,2) setting/resetting, active level in PWM mode, inversion enabling/

disabling in modes other than PWM mode and 8-bit timer/event counter 6 timer output enabling/disabling.

TMC6 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets TMC6 to 00H.

Figure 10-6. 8-Bit Timer Output Control Register 6 Format

Address After Reset R/W

6 5 4 1 Symbol

TMC6 FF57H 00H R/W

TCE6 TMC66 0 0 LVS6 LVR6 TMC61 TOE6

TOE6 8-Bit Timer/Event Counter 6 Output Control

0 Output disabled (Port mode)

In PWM Mode In Other Mode

TMC61

Active level selection Timer output F/F1 control

8-Bit Timer/Event Counter 6 Timer Output F/F1 Status Setting

LVS6 LVR6

Timer output F/F1 reset (0)

Timer output F/F1 set (1)

TMC66 8-Bit Timer/Event Counter 6 Operating Mode Selection

0 Clear & start mode on match of TM6 and CR60

1 PWM mode (free-running)

TCE6 8-Bit Timer Register 6 Operation Control

0 Operation Stop (TM6 clear to 0)

2. If LVS6 and LVR6 are read after data are set, they will be 0.
3. Set bits 4 and 5 to 0.
Show 8 more labels / short text on this page
6 Output enabled · 0 Active high · Inversion operation disabled · 1 Active low · Inversion operation enabled · No change · Setting prohibited · 1 Operation Enable
Page 258 of the NEC PD78076Y user manual — R/W
Page 258 · click to enlarge
Page 258

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

(5) Port mode register 10 (PM10)

This register sets port 10 input/output in 1-bit units.

When using the P100/TI5/TO5 and P101/TI6/TO6 pins for timer output, set PM100, PM101 and output

latches of P100 and P101 to 0.

PM10 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets PM10 to FFH.

Figure 10-7. Port Mode Register 10 Format

3 2 1 0

R/W

PM10

PM103

PM102 PM101 PM100

FF2AH

FFH

R/W

P10n Pin Input/Output Mode Selection (n = 0 to 3)

Output mode (output buffer ON)

Input mode (output buffer OFF)

Show 4 more labels / short text on this page
After Reset · Symbol · Address · PM10n
Page 259 of the NEC PD78076Y user manual — N N N N
Page 259 · click to enlarge
Page 259

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

10.4 8-Bit Timer/Event Counters 5 and 6 Operations

10.4.1 Interval timer operations

Setting the 8-bit timer mode control registers (TMC5 and TMC6) as shown in Figure 10-8 allows operation as

an interval timer. Interrupt requests are generated repeatedly using the count value preset in 8-bit compare registers

(CR50 and CR60) as the interval.

When the count value of the 8-bit timer register 5 or 6 (TM5, TM6) matches the value set to CR50 or CR60,

counting continues with the TM5 or TM6 value cleared to 0 and the interrupt request signal (INTTM5, INTTM6) is

generated.

Count clock of the 8-bit timer register 5 (TM5) can be selected with the timer clock select register 5 (TCL5) and

count clock of the 8 bit timer register 6 (TM6) can be selected with the timer clock select register 6 (TCL6).

For the operation in the case the value of the compare register is changed during the timer count operation, refer

to 10.5 8-Bit Timer/Event Counters 5 and 6 Precautions (3).

Figure 10-8. 8-Bit Timer Mode Control Register Settings for Interval Timer Operation

LVSn LVRn TMCn1 TOEn

TMCn 0/1 0/1 0/1

Clear and start on match of TMn and CRn0

Remarks 1. 0/1 : Setting 0 or 1 allows another function to be used simultaneously with the interval timer.

See 10.3 (3), (4) for details.

2. n = 5, 6

Figure 10-9. Interval Timer Operation Timings

00 01 N 00 01 N 00 01 N

N

Interrupt Request Acknowledge Interrupt Request Acknowledge

Interval Time Interval Time Interval Time

Remarks 1. Interval time = (N + 1) x t : N = 00H to FFH

2. n = 5, 6
Show 13 more labels / short text on this page
TCEn · TMCn6 · 0 0 0/1 · TMn operation enable · t · Count Clock · TMn Count Value · Clear Clear · CRn0 · TCEn · Count Start · INTTMn · TOn
Page 260 of the NEC PD78076Y user manual — CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6
Page 260 · click to enlarge
Page 260

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

Table 10-4. 8-Bit Timer/Event Counters 5 and 6 Interval Times

Minimum Interval Time Maximum Interval Time Resolution

TCLn3 TCLn2 TCLn1 TCLn0

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

0 TIn input cycle 28 x TIn input cycle TIn input edge input cycle

0 0 0 1 TIn input cycle 28 x TIn input cycle TIn input edge input cycle

(Setting prohibited) 1/fX (Setting prohibited) 28 x 1/fX (Setting prohibited) 2 x 1/fX

0 1 0 0

(200 ns) (51.2 µs) (200 ns)

1/fX 2 x 1/fX 28 x 1/fX 29 x 1/fX 1/fX 2 x 1/fX

0 1 0 1

(200 ns) (400 ns) (51.2 µs) (102.4 µs) (200 ns) (400 ns)

2 x 1/fX 22 x 1/fX 29 x 1/fX 210 x 1/fX 2 x 1/fX 22 x 1/fX

0 1 1 0

(400 ns) (800 ns) (102.4 µs) (204.8 µs) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 210 x 1/fX 211 x 1/fX 22 x 1/fX 23 x 1/fX

0 1 1 1

(800 ns) (1.6 µs) (204.8 µs) (409.6 µs) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 211 x 1/fX 212 x 1/fX 23 x 1/fX 24 x 1/fX

1 0 0 0

(1.6 µs) (3.2 µs) (409.6 µs) (819.2 µs) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 212 x 1/fX 213 x 1/fX 24 x 1/fX 25 x 1/fX

1 0 0 1

(3.2 µs) (6.4 µs) (819.2 µs) (1.64 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 213 x 1/fX 214 x 1/fX 25 x 1/fX 26 x 1/fX

1 0 1 0

(6.4 µs) (12.8 µs) (1.64 ms) (3.28 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 214 x 1/fX 215 x 1/fX 26 x 1/fX 27 x 1/fX

1 0 1 1

(12.8 µs) (25.6 µs) (3.28 ms) (6.55 ms) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 215 x 1/fX 216 x 1/fX 27 x 1/fX 28 x 1/fX

1 1 0 0

(25.6 µs) (51.2 µs) (6.55 ms) (13.1 ms) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 216 x 1/fX 217 x 1/fX 28 x 1/fX 29 x 1/fX

1 1 0 1

(51.2 µs) (102.4 µs) (13.1 ms) (26.2 ms) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 217 x 1/fX 218 x 1/fX 29 x 1/fX 210 x 1/fX

1 1 1 0

(102.4 µs) (204.8 µs) (26.2 ms) (52.4 ms) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 219 x 1/fX 220 x 1/fX 211 x 1/fX 212 x 1/fX

1

(409.6 µs) (819.2 µs) (104.9 ms) (209.7 ms) (409.6 µs) (819.2 µs)

Other than above Setting prohibited

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. TCLn0 to TCLn3 : Bits 0 to 3 of timer clock select register n (TCLn)
4. Figures in parentheses apply to operation with f X = 5.0 MHz.
5. n = 5, 6
Page 261 of the NEC PD78076Y user manual — N
Page 261 · click to enlarge
Page 261

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

10.4.2 External event counter operation

The external event counter counts the number of external clock pulses to be input to the TI5/P100/TO5 and TI6/

P101/TO6 pins with 8-bit timer registers 5 and 6 (TM5 and TM6).

TM5 and TM6 are incremented each time the valid edge specified with timer clock select registers 5 and 6 (TCL5

and TCL6) is input. Either rising or falling edge can be selected.

When the TM5 and TM6 counted values match the values of 8-bit compare registers (CR50 and CR60), TM5

and TM6 are cleared to 0 and the interrupt request signals (INTTM5 and INTTM6) are generated.

Figure 10-10. 8-Bit Timer Mode Control Register Setting for External Event Counter Operation

LVSn LVRn TMCn1 TOEn

TMCn x x 0

Clear & start mode on match of TMn and CRn0

Remarks 1. n = 5, 6

2. x : Don’t care

Figure 10-11. External Event Counter Operation Timings (with Rising Edge Specified)

05 N – 1 00 02 03 01 02 04 N

N

Remarks 1. N = 00H to FFH

2. n = 5, 6
Show 10 more labels / short text on this page
TCEn · TMCn6 · TOn output disable · TMn operation enable · Count Clock · TMn Count Value · 00 01 13 · CRn0 · TCEn · INTTMn
Page 262 of the NEC PD78076Y user manual — Figure 10-13. Timing of Square Wave Output Operation
Page 262 · click to enlarge
Page 262

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

10.4.3 Square-wave output

A square wave with any selected frequency is output at intervals of the value preset to 8-bit compare registers

(CR50 and CR60).

The TO5/P100/TI5 or TO6/P101/TI6 pin output status is reversed at intervals of the count value preset to CR50

or CR60 by setting bit 1 (TMC51) and bit 0 (TOE5) of the 8-bit timer output control register 5 (TMC5), or bit 1 (TMC61)

and bit 0 (TOE1) of the 8-bit timer mode control register 6 (TMC6) to 1.

This enables a square wave of any selected frequency to be output.

Figure 10-12. 8-Bit Timer Mode Control Register Settings for Square-Wave Output Operation

LVSn LVRn TMCn1 TOEn

TMCn 0/1 1 1

Inversion of output on match of TMn and CRn0

Specifies TO0 output F/F1 initial value

Clear and start mode on match of TMn and CRn0

(PM100 or PM101) and output latch (P100 or P101) to 0.

Remark n = 5, 6

Figure 10-13. Timing of Square Wave Output Operation

TMn Count Value 01 02 00 N–1 N 00 01 02 N–1 N 00

control register n (TOCn).

Remark n = 5, 6

Show 9 more labels / short text on this page
TCEn · TMCn6 · 0 0 0/1 · TOn output enable · TMn operation enable · Count Clock · Count Start · CRn0 N N · TOnNote
Page 263 of the NEC PD78076Y user manual — CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6
Page 263 · click to enlarge
Page 263

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

Table 10-5. 8-Bit Timer/Event Counters 5 and 6 Square-Wave Output Ranges

Minimum Pulse Time Maximum Pulse Time Resolution

MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0

— 1/fX — 28 x 1/fX — 1/fX

(200 ns) (51.2 µs) (200 ns)

1/fX 2 x 1/fX 28 x 1/fX 29 x 1/fX 1/fX 2 x 1/fX

(200 ns) (400 ns) (51.2 µs) (102.4 µs) (200 ns) (400 ns)

2 x 1/fX 22 x 1/fX 29 x 1/fX 210 x 1/fX 2 x 1/fX 22 x 1/fX

(400 ns) (800 ns) (102.4 µs) (204.8 µs) (400 ns) (800 ns)

22 x 1/fX 23 x 1/fX 210 x 1/fX 211 x 1/fX 22 x 1/fX 23 x 1/fX

(800 ns) (1.6 µs) (204.8 µs) (409.6 µs) (800 ns) (1.6 µs)

23 x 1/fX 24 x 1/fX 211 x 1/fX 212 x 1/fX 23 x 1/fX 24 x 1/fX

(1.6 µs) (3.2 µs) (409.6 µs) (819.2 µs) (1.6 µs) (3.2 µs)

24 x 1/fX 25 x 1/fX 212 x 1/fX 213 x 1/fX 24 x 1/fX 25 x 1/fX

(3.2 µs) (6.4 µs) (819.2 µs) (1.64 ms) (3.2 µs) (6.4 µs)

25 x 1/fX 26 x 1/fX 213 x 1/fX 214 x 1/fX 25 x 1/fX 26 x 1/fX

(6.4 µs) (12.8 µs) (1.64 ms) (3.28 ms) (6.4 µs) (12.8 µs)

26 x 1/fX 27 x 1/fX 214 x 1/fX 215 x 1/fX 26 x 1/fX 27 x 1/fX

(12.8 µs) (25.6 µs) (3.28 ms) (6.55 ms) (12.8 µs) (25.6 µs)

27 x 1/fX 28 x 1/fX 215 x 1/fX 216 x 1/fX 27 x 1/fX 28 x 1/fX

(25.6 µs) (51.2 µs) (6.55 ms) (13.1 ms) (25.6 µs) (51.2 µs)

28 x 1/fX 29 x 1/fX 216 x 1/fX 217 x 1/fX 28 x 1/fX 29 x 1/fX

(51.2 µs) (102.4 µs) (13.1 ms) (26.2 ms) (51.2 µs) (102.4 µs)

29 x 1/fX 210 x 1/fX 217 x 1/fX 218 x 1/fX 29 x 1/fX 210 x 1/fX

(102.4 µs) (204.8 µs) (26.2 ms) (52.4 ms) (102.4 µs) (204.8 µs)

211 x 1/fX 212 x 1/fX 219 x 1/fX 220x 1/fX 211 x 1/fX 212 x 1/fX

(409.6 µs) (819.2 µs) (104.9 ms) (209.7 ms) (409.6 µs) (819.2 µs)

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
3. Figures in parentheses apply to operation with f X = 5.0 MHz.
4. n = 5, 6
Page 264 of the NEC PD78076Y user manual — Figure 10-14. 8-Bit Timer Control Register Settings for PWM Output Operation
Page 264 · click to enlarge
Page 264

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

10.4.4 PWM output operations

Setting the 8-bit timer mode control registers (TMC5 and TMC6) as shown in Figure 10-14 allows operation as

PWM output. Pulses with the duty rate determined by the values preset in 8-bit compare registers (CR50 and CR60)

output from the TO5/P100/TI5 or TO6/P101/TI6 pin.

Select the active level of PWM pulse with bit 1 of the 8-bit timer mode control register 5 (TMC5) or bit 1 of the

8-bit timer mode control register 6 (TMC6).

This PWM pulse has an 8-bit resolution. The pulse can be converted into an analog voltage by integrating it

with an external low-pass filter (LPF). Count clock of the 8-bit timer register 5 (TM5) can be selected with the timer

clock select register 5 (TCL5) and count clock of the 8-bit timer register 6 (TM6) can be selected with the timer clock

select register 6 (TCL6).

PWM output enable/disable can be selected with bit 0 (TOE5) of TMC5 or bit 0 (TOE6) of TMC6.

Figure 10-14. 8-Bit Timer Control Register Settings for PWM Output Operation

LVSn LVRn TMCn1 TOEn

TMCn x 0/1 1

Remarks 1. n = 5, 6

2. x : Don’t care
Show 6 more labels / short text on this page
TCEn · TMCn6 · TOn output enable · Sets active level · PWM mode · TMn operation enable
Page 265 of the NEC PD78076Y user manual — M 00 00
Page 265 · click to enlarge
Page 265

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

Figure 10-15. PWM Output Operation Timing (Active High Setting)

(M N)

01 02 FF 00 01 02 N N + 1 N + 2 N + 3 00

M N N

Remark n = 5, 6

Figure 10-16. PWM Output Operation Timings (CRn0 = 00H, Active High Setting)

(M 00)

01 02 FF 00 01 02 FF 00 01 02 00

M 00 00

Remark n = 5, 6

Show 22 more labels / short text on this page
CRn0 Changing · Count Clock · TMn Count Value · CRn0 · TCEn · INTTMn · OVFn · TOn · Inactive Level · Inactive Level · Active Level · Inactive Level · CRn0 Changing · Count Clock · TMn Count Value · CRn0 · TCEn · INTTMn · OVFn · TOn · Inactive Level · Inactive Level
Page 266 of the NEC PD78076Y user manual — N N M M
Page 266 · click to enlarge
Page 266

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

Figure 10-17. PWM Output Operation Timings (CRn0 = FFH, Active High Setting)

01 02 FF 00 01 02 FF 00 01 02 00

FF FF FF

Inactive Level Inactive Level Active Level

Remark n = 5, 6

Figure 10-18. PWM Output Operation Timings (CRn0 Changing, Active High Setting)

(N M)

00 FF N + 2 N + 1 N 02 01 00 FF 01 02 M + 2 M + 1 M M + 3 00

N N M M

Active Level Inactive Level

Active Level Inactive Level

Remark n = 5, 6

overflows.

Show 19 more labels / short text on this page
Count Clock · TMn Count Value · CRn0 · TCEn · INTTMn · OVFn · TOn · Inactive Level · Active Level · CRn0 Changing · Count · Clock · TMn Count · Value · CRn0 · TCEn · INTTMn · OVFn · TOn
Page 267 of the NEC PD78076Y user manual — TO5, TO6
Page 267 · click to enlarge
Page 267

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

10.5 8-Bit Timer/Event Counters 5 and 6 Precautions

(1) Timer start errors

An error with a maximum of one clock might occur concerning the time required for a match signal to be

generated after the timer starts. This is because 8-bit timer registers 5 and 6 are started asynchronously

with the count pulse.

Figure 10-19. 8-bit Timer Registers 5 and 6 Start Timings

TM5, TM6 Count Value 00H

01H 02H 03H 04H

(2) Compare registers 50 and 60 sets

The 8-bit compare registers (CR50 and CR60) can be set to 00H.

Thus, when an 8-bit compare register is used as an event counter, one-pulse count operation can be carried

out.

Figure 10-20. External Event Counter Operation Timings

CR50, CR60 00H

TM5, TM6 Count Value 00H

TO5, TO6

Show 4 more labels / short text on this page
Count Pulse · Timer Start · TI5, TI6 Input · Interrupt Request Flag
Page 268 of the NEC PD78076Y user manual — X X – 1 FFH 00H 01H
Page 268 · click to enlarge
Page 268

CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6

(3) Operation after compare register change during timer count operation

If the values after the 8-bit compare registers (CR50 and CR60) are changed are smaller than those of 8-

bit timer registers (TM5 and TM6), TM5 and TM6 continue counting, overflow and then restarts counting from

0. Thus, if the value (M) after CR50 and CR60 change is smaller than that (N) before change it is necessary

to restart the timer after changing CR50 and CR60.

Figure 10-21. Timings after Compare Register Change during Timer Count Operation

CR50, CR60 N

M

02H TM5, TM6 Count Value

X X – 1 FFH 00H 01H

Remark N > X > M

Count Pulse

Page 269 of the NEC PD78076Y user manual — Table 11-1. Interval Timer Interval Time
Page 269 · click to enlarge
Page 269

CHAPTER 11 WATCH TIMER

11.1 Watch Timer Functions

The watch timer has the following functions.

  • Watch timer
  • Interval timer

The watch timer and the interval timer can be used simultaneously.

(1) Watch timer

When the 32.768-kHz subsystem clock is used, a flag (WTIF) is set at 0.5-second or 0.25-second intervals.

When the 4.19-MHz (standard4.194304 MHz) main system clock is used, a flag (WTIF) is set at 0.5-second

or 0.25-second intervals.

switch to the 32.768 kHz subsystem clock to generate 0.5-second intervals.

(2) Interval timer

Interrupt requests (INTTM3) are generated at the preset time interval.

Table 11-1. Interval Timer Interval Time

When operated at When operated at When operated at fXX = 5.0 MHz fXX = 4.19 MHz fXT = 32.768 kHz

24 x 1/fW 410 µs 488 µs 488 µs

25 x 1/fW 819 µs 977 µs 977 µs

26 x 1/fW 1.64 ms 1.95 ms 1.95 ms

27 x 1/fW 3.28 ms 3.91 ms 3.91 ms

28 x 1/fW 6.55 ms 7.81 ms 7.81 ms

29 x 1/fW 13.1 ms 15.6 ms 15.6 ms

f XXMain system clock frequency (f X or f X /2)
f XMain system clock oscillation frequency
f XTSubsystem clock oscillation frequency
f WWatch timer clock frequency (f XX /2 7 or f XT )

Interval Time

Page 270 of the NEC PD78076Y user manual — Table 11-2. Watch Timer Configuration
Page 270 · click to enlarge
Page 270

CHAPTER 11 WATCH TIMER

11.2 Watch Timer Configuration

The watch timer consists of the following hardware.

Table 11-2. Watch Timer Configuration

Counter 5 bits x 1

Timer clock select register 2 (TCL2)

Watch timer mode control register (TMC2) Control register

Item Configuration

Page 271 of the NEC PD78076Y user manual — TCL24
Page 271 · click to enlarge
Page 271

CHAPTER 11 WATCH TIMER

11.3 Watch Timer Control Registers

The following two types of registers are used to control the watch timer.

  • Timer clock select register 2 (TCL2)
  • Watch timer mode control register (TMC2)

(1) Timer clock select register 2 (TCL2)

This register sets the watch timer count clock.

TCL2 is set with an 8-bit memory manipulation instruction.

RESET input sets TCL2 to 00H.

Remark Besides setting the watch timer count clock, TCL2 sets the watchdog timer count clock and buzzer

output frequency.

Figure 11-1. Watch Timer Block Diagram

TMC21

fW 214

fW fXX/27

INTWT

fW 213

fW 24 fW 25 fW 26 fW 27 fW 28 fW 29

INTTM3

To 16-Bit Timer/Event Counter

TCL24

TMC26 TMC25 TMC24 TMC23 TMC22 TMC21 TMC20

Timer Clock Select Register 2

Watch Timer Mode Control Register

Show 10 more labels / short text on this page
Selector · Clear · 5-Bit Counter · Selector · Selector · Prescaler · Clear · fXT · Selector · Internal Bus
Page 272 of the NEC PD78076Y user manual — TCL27 TCL26 TCL25
Page 272 · click to enlarge
Page 272

CHAPTER 11 WATCH TIMER

Figure 11-2. Timer Clock Select Register 2 Format

3 2 1 0

R/W

TCL2

TCL27

TCL26

TCL25 TCL24

TCL22 TCL21 TCL20

FF42H

00H

R/W

Watchdog Timer Count Clock Selection

TCL22 TCL21 TCL20

MCS = 1

MCS = 0

fXX/23

fX/23 (625 kHz)

fX/24 (313 kHz)

fXX/24

fX/24 (313 kHz)

fX/25 (156 kHz)

fXX/25

fX/25 (156 kHz)

fX/26 (78.1 kHz)

fXX/26

fX/26 (78.1 kHz)

fX/27 (39.1 kHz)

fXX/27

fX/27 (39.1 kHz)

fX/28 (19.5 kHz)

fXX/28

fX/28 (19.5 kHz)

fX/29 (9.8 kHz)

fXX/29

fX/29 (9.8 kHz)

fX/210 (4.9 kHz)

fXX/211

fX/211 (2.4 kHz)

fX/212 (1.2 kHz)

Watch Timer Count Clock Selection

TCL24

MCS = 1

MCS = 0

fXX/27

fX/27 (39.1 kHz)

fX/28 (19.5 kHz)

fXT (32.768 kHz)

Buzzer Output Frequency Selection

TCL27 TCL26 TCL25

MCS = 1

MCS = 0

fXX/29

fX/29 (9.8 kHz)

fX/210 (4.9 kHz)

fXX/210

fX/210 (4.9 kHz)

fX/211 (2.4 kHz)

fXX/211

fX/211 (2.4 kHz)

fX/212 (1.2 kHz)

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. f XT : Subsystem clock oscillation frequency
4. x : Don’t care
5. MCS : Bit 0 of oscillation mode selection register (OSMS)
6. Figures in parentheses apply to operation with f X = 5.0 MHz or f XT = 32.768 kHz.
Show 5 more labels / short text on this page
Address · After Reset · Symbol · Buzzer output disable · Setting prohibited
Page 273 of the NEC PD78076Y user manual — TMC26 TMC25 TMC24
Page 273 · click to enlarge
Page 273

CHAPTER 11 WATCH TIMER

(2) Watch timer mode control register (TMC2)

This register sets the watch timer operating mode, watch flag set time and prescaler interval time and

enables/disables prescaler and 5-bit counter operations. TMC2 is set with a 1-bit or 8-bit memory

manipulation instruction.

RESET input sets TMC2 to 00H.

Figure 11-3. Watch Timer Mode Control Register Format

3 2 1 0

R/W

TMC2

TMC26

TMC25 TMC24

TMC23

TMC22 TMC21 TMC20

FF4AH

00H

R/W

TMC20

Watch Operating Mode Selection

Normal operating mode (flag set at fW/214)

Fast feed operating mode (flag set at fW/25)

TMC21

Clear after operation stop

TMC22

5-Bit Counter Operation Control

Clear after operation stop

Watch Flag Set Time Selection

TMC23

fXX = 5.0 MHz Operation

fXX = 4.19 MHz Operation

fXT = 32.768 kHz Operation

214/fW (0.4 sec)

214/fW (0.5 sec)

214/fW (0.5 sec)

213/fW (0.2 sec)

213/fW (0.25 sec)

213/fW (0.25 sec)

Prescaler Interval Time Selection

TMC26 TMC25 TMC24

fXX = 5.0 MHz Operation

fXX = 4.19 MHz Operation

fXT = 32.768 kHz Operation

24/fW (410 s)

24/fW (488 s)

24/fW (488 s)

25/fW (819 s)

25/fW (977 s)

25/fW (977 s)

26/fW (1.64 ms)

26/fW (1.95 ms)

26/fW (1.95 ms)

27/fW (3.28 ms)

27/fW (3.91 ms)

27/fW (3.91 ms)

28/fW (6.55 ms)

28/fW (7.81 ms)

28/fW (7.81 ms)

29/fW (13.1 ms)

29/fW (15.6 ms)

29/fW (15.6 ms)

Remarks 1. f WWatch timer clock frequency (f XX /2 7 or f XT )
2. f XX : Main system clock frequency (f X or f X /2)
3. f X : Main system clock oscillation frequency
4. f XT : Subsystem clock oscillation frequency
Show 14 more labels / short text on this page
After Reset · Symbol · Address · Prescaler Operation Control · Operation enable · Operation enable · µ · µ · µ · µ · µ · µ · Other than above · Setting prohibited
Page 274 of the NEC PD78076Y user manual — Table 11-3. Interval Timer Interval Time
Page 274 · click to enlarge
Page 274

CHAPTER 11 WATCH TIMER

11.4 Watch Timer Operations

11.4.1 Watch timer operation

When the 32.768-kHz subsystem clock or 4.19-MHz main system clock is used, the timer operates as a watch

timer with a 0.5-second or 0.25-second interval.

The watch timer sets the test input flag (WTIF) to 1 at the constant time interval. The standby state (STOP mode/

HALT mode) can be cleared by setting WTIF to 1.

When bit 2 (TMC22) of the watch timer mode control register (TMC2) is set to 0, the 5-bit counter is cleared and

the count operation stops.

For simultaneous operation of the interval timer, zero-second start can be achieved by setting TMC22 to 0

(maximum error: 26.2 ms when operated at fXX = 5.0 MHz).

11.4.2 Interval timer operation

The watch timer operates as interval timer which generates interrupt requests repeatedly at an interval of the

preset count value.

The interval time can be selected with bits 4 to 6 (TMC24 to TMC26) of the watch timer mode control register

(TMC2).

Table 11-3. Interval Timer Interval Time

TMC26 TMC25 TMC24 Interval Time When operated at When operated at When operated at fXX = 5.0 MHz fXX = 4.19 MHz fXT = 32.768 kHz

0 0 0 24 x 1/fW 410 µs 488 µs 488 µs

0 0 1 25 x 1/fW 819 µs 977 µs 977 µs

0 1 0 26 x 1/fW 1.64 ms 1.95 ms 1.95 ms

0 1 1 27 x 1/fW 3.28 ms 3.91 ms 3.91 ms

1 0 0 28 x 1/fW 6.55 ms 7.81 ms 7.81 ms

1 0 1 29 x 1/fW 13.1 ms 15.6 ms 15.6 ms

Other than above Setting prohibited

fxxMain system clock frequency (fx or fx/2)
fxMain system clock oscillation frequency
f XTSubsystem clock oscillation frequency
f WWatch timer clock frequency (fxx/2 7 or f XT )
Page 275 of the NEC PD78076Y user manual — Table 12-1. Watchdog Timer Runaway Times
Page 275 · click to enlarge
Page 275

CHAPTER 12 WATCHDOG TIMER

12.1 Watchdog Timer Functions

The watchdog timer has the following functions.

  • Watchdog timer
  • Interval timer

register (WDTM) (the watchdog timer and the interval timer cannot be used simultaneously).

(1) Watchdog timer mode

An inadvertent program loop (runaway) is detected. Upon detection of the runaway, a non-maskable

interrupt request or RESET can be generated.

Table 12-1. Watchdog Timer Runaway Times

Runaway Detection Time MCS = 1 MCS = 0

211 x 1/fXX 211 x 1/fX (410 µs) 212 x 1/fX (819 µs)

212 x 1/fXX 212 x 1/fX (819 µs) 213 x 1/fX (1.64 ms)

213 x 1/fXX 213 x 1/fX (1.64 ms) 214 x 1/fX (3.28 ms)

214 x 1/fXX 214 x 1/fX (3.28 ms) 215 x 1/fX (6.55 ms)

215 x 1/fXX 215 x 1/fX (6.55 ms) 216 x 1/fX (13.1 ms)

216 x 1/fXX 216 x 1/fX (13.1 ms) 217 x 1/fX (26.2 ms)

217 x 1/fXX 217 x 1/fX (26.2 ms) 218 x 1/fX (52.4 ms)

219 x 1/fXX 219 x 1/fX (104.9 ms) 220 x 1/fX (209.7 ms)

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. MCS : Bit 0 of oscillation mode selection register (OSMS)
4. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 276 of the NEC PD78076Y user manual — Table 12-2. Interval Times
Page 276 · click to enlarge
Page 276

CHAPTER 12 WATCHDOG TIMER

(2) Interval timer mode

Interrupt requests are generated at the preset time intervals.

Table 12-2. Interval Times

Interval Time MCS = 1 MCS = 0

211 x 1/fXX 211 x 1/fX (410 µs) 212 x 1/fX (819 µs)

212 x 1/fXX 212 x 1/fX (819 µs) 213 x 1/fX (1.64 ms)

213 x 1/fXX 213 x 1/fX (1.64 ms) 214 x 1/fX (3.28 ms)

214 x 1/fXX 214 x 1/fX (3.28 ms) 215 x 1/fX (6.55 ms)

215 x 1/fXX 215 x 1/fX (6.55 ms) 216 x 1/fX (13.1 ms)

216 x 1/fXX 216 x 1/fX (13.1 ms) 217 x 1/fX (26.2 ms)

217 x 1/fXX 217 x 1/fX (26.2 ms) 218 x 1/fX (52.4 ms)

219 x 1/fXX 219 x 1/fX (104.9 ms) 220 x 1/fX (209.7 ms)

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. MCS : Bit 0 of oscillation mode selection register (OSMS)
4. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 277 of the NEC PD78076Y user manual — TCL22 TCL21 TCL20
Page 277 · click to enlarge
Page 277

CHAPTER 12 WATCHDOG TIMER

12.2 Watchdog Timer Configuration

The watchdog timer consists of the following hardware.

Table 12-3. Watchdog Timer Configuration

Timer clock select register 2 (TCL2)

Watchdog timer mode register (WDTM)

Figure 12-1. Watchdog Timer Block Diagram

fXX/23

TMMK4

fXX 24 fXX 25 fXX 26 fXX 27 fXX 28 fXX 29

fXX 211

RUN

INTWDT Maskable Interrupt Request

TMIF4

RESET

INTWDT Non-Maskable Interrupt Request

TCL22 TCL21 TCL20

WDTM4 RUN WDTM3

Timer Clock Select Register 2

Watchdog Timer Mode Register

Show 8 more labels / short text on this page
Item Configuration · Control register · Internal Bus · Prescaler · Selector · 8-Bit Counter · Control Circuit · Internal Bus
Page 278 of the NEC PD78076Y user manual — (1) Timer clock select register 2 (TCL2)
Page 278 · click to enlarge
Page 278

CHAPTER 12 WATCHDOG TIMER

12.3 Watchdog Timer Control Registers

The following two types of registers are used to control the watchdog timer.

  • Timer clock select register 2 (TCL2)
  • Watchdog timer mode register (WDTM)

(1) Timer clock select register 2 (TCL2)

This register sets the watchdog timer count clock.

TCL2 is set with 8-bit memory manipulation instruction.

RESET input sets TCL2 to 00H.

Remark Besides setting the watchdog timer count clock, TCL2 sets the watch timer count clock and buzzer

output frequency.

Page 279 of the NEC PD78076Y user manual — TCL27 TCL26 TCL25
Page 279 · click to enlarge
Page 279

CHAPTER 12 WATCHDOG TIMER

Figure 12-2. Timer Clock Select Register 2 Format

3 2 1 0

R/W

TCL2

TCL27

TCL26

TCL25 TCL24

TCL22 TCL21 TCL20

FF42H

00H

R/W

Watchdog Timer Count Clock Selection

TCL22 TCL21 TCL20

MCS = 1

MCS = 0

fXX/23

fX/23

fX/24

fXX/24

fX/24

fX/25

fXX/25

fX/25

fX/26

(78.1 kHz)

fXX/26

fX/26

(78.1 kHz)

fX/27

(39.1 kHz)

fXX/27

fX/27

(39.1 kHz)

fX/28

(19.5 kHz)

fXX/28

fX/28

(19.5 kHz)

fX/29

(9.8 kHz)

fXX/29

fX/29

(9.8 kHz)

fX/210

(4.9 kHz)

fXX/211

fX/211

(2.4 kHz)

fX/212

(1.2 kHz)

Watch Timer Count Clock Selection

TCL24

MCS = 1

MCS = 0

fXX/27

fX/27 (39.1 kHz)

fX/28 (19.5 kHz)

fXT (32.768 kHz)

Buzzer Output Frequency Selection

TCL27 TCL26 TCL25

MCS = 1

MCS = 0

fXX/29

fX/29 (9.8 kHz)

fX/210 (4.9 kHz)

fX/210 (4.9 kHz)

fXX/210

fX/211 (2.4 kHz)

fX/211 (2.4 kHz)

fXX/211

fX/212 (1.2 kHz)

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. f XT : Subsystem clock oscillation frequency
4. x : Don’t care
5. MCS : Bit 0 of oscillation mode selection register (OSMS)
6. Figures in parentheses apply to operation with f X = 5.0 MHz or f XT = 32.768 kHz.
Show 10 more labels / short text on this page
Address · After Reset · Symbol · (625 kHz) · (313 kHz) · (313 kHz) · (156 kHz) · (156 kHz) · Buzzer output disable · Setting prohibited
Page 280 of the NEC PD78076Y user manual — RUN
Page 280 · click to enlarge
Page 280

CHAPTER 12 WATCHDOG TIMER

(2) Watchdog timer mode register (WDTM)

This register sets the watchdog timer operating mode and enables/disables counting.

WDTM is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets WDTM to 00H.

Figure 12-3. Watchdog Timer Mode Register Format

3 2 1 0

R/W

WDTM

RUM

0 WDTM4

WDTM3

FFF9H

00H

R/W

Watchdog Timer Operation Mode SelectionNote 1

WDTM4

WDTM3

Interval timer modeNote 2

(Maskable interrupt occurs upon generation of an overflow.)

Watchdog timer mode 1 (Non-maskable interrupt occurs upon generation of an overflow.)

Watchdog timer mode 2 (Reset operation is activated upon generation of an overflow.)

RUN

Watchdog Timer Operation Mode SelectionNote 3

Counter is cleared and counting starts.

2. Operation as an interval timer is started as soon as is set to 1.
3. Once set to 1, RUN cannot be cleared to 0 by software.

Thus, once counting starts, it can only be stopped by RESET input.

is up to 0.5 % shorter than the time set by timer clock select register 2 (TCL2).

2. When using the watchdog timer modes 1 and 2, be sure that the interrupt request flag

(TMIF4) is 0 before setting WDTM4 to 1. If WDTM4 is set to 1 while TMIF4 is 1, a non-

maskable interrupt requests generated regardless of the contents of WDTM3.

Remark xDon’t care
Show 5 more labels / short text on this page
After Reset · Symbol · <7> · Address · Count stop
Page 281 of the NEC PD78076Y user manual — Table 12-4. Watchdog Timer Runaway Detection Time
Page 281 · click to enlarge
Page 281

CHAPTER 12 WATCHDOG TIMER

12.4 Watchdog Timer Operations

12.4.1 Watchdog timer operation

When bit 4 (WDTM4) of the watchdog timer mode register (WDTM) is set to 1, the watchdog timer is operated

to detect any runaway.

The watchdog timer count clock (runaway detection time interval) can be selected with bits 0 to 2 (TCL20 to

TCL22) of the timer clock select register 2 (TCL2).

Watchdog timer starts by setting bit 7 (RUN) of WDTM to 1. After the watchdog timer is started, set RUN to 1

within the set runaway detection time interval. The watchdog timer can be cleared and counting is started by setting

RUN to 1. If RUN is not set to 1 and the runaway detection time is past, system reset or a non-maskable interrupt

request is generated according to the WDTM bit 3 (WDTM3) value.

The watchdog timer can be cleared when RUN is set to 1.

The watchdog timer continues operating in the HALT mode but it stops in the STOP mode. Thus, set RUN to

1 before the STOP mode is set, clear the watchdog timer and then execute the STOP instruction.

0.5 %.

2. When the subsystem clock is selected for CPU clock, watchdog timer count operation is

stopped.

Table 12-4. Watchdog Timer Runaway Detection Time

TCL22 TCL21 TCL20 Runaway Detection Time MCS = 1 MCS = 0

0 0 0 211 x 1/fXX 211 x 1/fX (410 µs) 212 x 1/fX (819 µs)

0 0 1 212 x 1/fXX 212 x 1/fX (819 µs) 213 x 1/fX (1.64 ms)

0 1 0 213 x 1/fXX 213 x 1/fX (1.64 ms) 214 x 1/fX (3.28 ms)

0 1 1 214 x 1/fXX 214 x 1/fX (3.28 ms) 215 x 1/fX (6.55 ms)

1 0 0 215 x 1/fXX 215 x 1/fX (6.55 ms) 216 x 1/fX (13.1 ms)

1 0 1 216 x 1/fXX 216 x 1/fX (13.1 ms) 217 x 1/fX (26.2 ms)

1 1 0 217 x 1/fXX 217 x 1/fX (26.2 ms) 218 x 1/fX (52.4 ms)

1 1 1 219 x 1/fXX 219 x 1/fX (104.9 ms) 220 x 1/fX (209.7 ms)

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. MCS : Bit 0 of oscillation mode selection register (OSMS)
4. TCL20 to TCL22 : Bits 0 to 2 of timer clock select register 2 (TCL2)
5. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 282 of the NEC PD78076Y user manual — Table 12-5. Interval Timer Interval Time
Page 282 · click to enlarge
Page 282

CHAPTER 12 WATCHDOG TIMER

12.4.2 Interval timer operation

The watchdog timer operates as an interval timer which generates interrupt requests repeatedly at an interval

of the preset count value when bit 4 (WDTM4) of the watchdog timer mode register (WDTM) is set to 0, respectively.

The count clock (interval time) can be selected with bits 0 to 2 (TCL20 to TCL22) of the timer clock select register

2 (TCL2). The watchdog timer starts operation as an interval timer when bit 7 (RUN) of WDTM is set to 1.

When the watchdog timer operated as interval timer, the interrupt mask flag (TMMK4) and priority specify flag

(TMPR4) are validated and the maskable interrupt request (INTWDT) can be generated. Among maskable interrupt

requests, the INTWDT default has the highest priority.

The interval timer continues operating in the HALT mode but it stops in STOP mode. Thus, set bit 7 (RUN) of

WDTM to 1 before the STOP mode is set, clear the interval timer and then execute the STOP instruction.

timer mode is not set unless RESET input is applied.

2. The interval time just after setting with WDTM may be shorter than the set time by a maximum

of 0.5 %.

3. When the subsystem clock is selected for CPU clock, watchdog timer count operation is

stopped.

Table 12-5. Interval Timer Interval Time

TCL22 TCL21 TCL20 Interval Time MCS = 1 MCS = 0

0 0 0 211 x 1/fXX 211 x 1/fX (410 µs) 212 x 1/fX (819 µs)

0 0 1 212 x 1/fXX 212 x 1/fX (819 µs) 213 x 1/fX (1.64 ms)

0 1 0 213 x 1/fXX 213 x 1/fX (1.64 ms) 214 x 1/fX (3.28 ms)

0 1 1 214 x 1/fXX 214 x 1/fX (3.28 ms) 215 x 1/fX (6.55 ms)

1 0 0 215 x 1/fXX 215 x 1/fX (6.55 ms) 216 x 1/fX (13.1 ms)

1 0 1 216 x 1/fXX 216 x 1/fX (13.1 ms) 217 x 1/fX (26.2 ms)

1 1 0 217 x 1/fXX 217 x 1/fX (26.2 ms) 218 x 1/fX (52.4 ms)

1 1 1 219 x 1/fXX 219 x 1/fX (104.9 ms) 220 x 1/fX (209.7 ms)

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. MCS : Bit 0 of oscillation mode selection register (OSMS)
4. TCL20 to TCL22 : Bits 0 to 2 of timer clock select register 2 (TCL2)
5. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 283 of the NEC PD78076Y user manual — Figure 13-1. Remote Controlled Output Application Example
Page 283 · click to enlarge
Page 283

CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUIT

13.1 Clock Output Control Circuit Functions

The clock output control circuit is intended for carrier output during remote controlled transmission and clock

output for supply to peripheral LSI. Clocks selected with the timer clock select register 0 (TCL0) are output from

the PCL/P35 pin.

Follow the procedure below to output clock pulses.

(1) Select the clock pulse output frequency (with clock pulse output disabled) with bits 0 to 3 (TCL00 to TCL03)

of TCL0.

(2) Set the P35 output latch to 0.

(3) Set bit 5 (PM35) of port mode register 3 (PM3) to 0 (set to output mode).

(4) Set bit 7 (CLOE) of timer clock select register 0 (TCL0) to 1.

Remark When clock output enable/disable is switched, the clock output control circuit does not output pulses

with small widths (See the portions marked with * in Figure 13-1).

Figure 13-1. Remote Controlled Output Application Example

CLOE

PCL/P35 Pin Output * *

Page 284 of the NEC PD78076Y user manual — PM35
Page 284 · click to enlarge
Page 284

CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUIT

13.2 Clock Output Control Circuit Configuration

The clock output control circuit consists of the following hardware.

Table 13-1. Clock Output Control Circuit Configuration

Timer clock select register 0 (TCL0)

Port mode register 3 (PM3)

Figure 13-2. Clock Output Control Circuit Block Diagram

fXX/22

fXX/23

fXX/24

fXX/25

PCL/P35

fXX/26

fXX/27

CLOE TCL03 TCL02 TCL01 TCL00 P35 Output Latch

PM35

Timer Clock Select Register 0 Port Mode Register 3

Show 9 more labels / short text on this page
Item Configuration · Control register · fXX · fXX/2 · Selector · Synchronizing · Circuit · fXT · Internal Bus
Page 285 of the NEC PD78076Y user manual — (1) Timer clock select register 0 (TCL0)
Page 285 · click to enlarge
Page 285

CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUIT

13.3 Clock Output Function Control Registers

The following two types of registers are used to control the clock output function.

  • Timer clock select register 0 (TCL0)
  • Port mode register 3 (PM3)

(1) Timer clock select register 0 (TCL0)

This register sets PCL output clock.

TCL0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets TCL0 to 00H.

Remark Besides setting PCL output clock, TCL0 sets the 16-bit timer register count clock.

Page 286 of the NEC PD78076Y user manual — CLOE
Page 286 · click to enlarge
Page 286

CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUIT

Figure 13-3. Timer Clock Select Register 0 Format

3 2 1 0

R/W

TCL0

CLOE

TCL06

TCL05 TCL04

TCL03

TCL02 TCL01 TCL00

FF40H

00H

R/W

PCL Output Clock Selection

TCL03 TCL02 TCL01

TCL00

MCS = 1

MCS = 0

fXT (32.768 kHz)

fX (5.0 MHz)

fX/2 (2.5 MHz)

fX/22 (1.25 MHz)

fX/2 (2.5 MHz)

fXX/22

fX/22 (1.25 MHz)

fX/23 (625 kHz)

fXX/23

fX/23 (625 kHz)

fX/24 (313 kHz)

fXX/24

fX/24 (313 kHz)

fX/25 (156 kHz)

fXX/25

fX/25 (156 kHz)

fX/26 (78.1 kHz)

fXX/26

fX/26 (78.1 kHz)

fX/27 (39.1 kHz)

fXX/27

fX/27 (39.1 kHz)

fX/28 (19.5 kHz)

16-Bit Timer Register Count Clock Selection

TCL06 TCL05 TCL04

MCS = 1

MCS = 0

TI00 (Valid edge specifiable)

fX (5.0 MHz)

fX (5.0 MHz)

fX/2 (2.5 MHz)

fX/22 (1.25 MHz)

fX/2 (2.5 MHz)

fXX/22

fX/22 (1.25 MHz)

fX/23 (625 kHz)

Watch Timer Output (INTTM3)

CLOE

and the sampling clock frequency is selected by the sampling clock selection register

(SCS).

2. When enabling PCL output, set TCL00 to TCL03, then set 1 in CLOE with a 1-bit memory

manipulation instruction.

3. To read the count value when TI00 has been specified as the TM0 count clock, the value

should be read from TM0, not from capture/compare register 01 (CR01).

4. When rewriting TCL0 to other data, stop the clock operation beforehand.
Show 17 more labels / short text on this page
After Reset · Symbol · <7> · Address · fXX · fXX/2 · Other than above · Setting prohibited · 2fXX · Setting prohibited · fXX · fXX/2 · Other than above · Setting prohibited · PCL Output Control · Output disable · Output enable
Page 287 of the NEC PD78076Y user manual — R/W
Page 287 · click to enlarge
Page 287

CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUIT

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. f XT : Subsystem clock oscillation frequency
4. TI00 : 16-bit timer/event counter input pin
5. TM0 : 16-bit timer register
6. MCS : Bit 0 of oscillation mode selection register (OSMS)
7. Figures in parentheses apply to operation with f X = 5.0 MHz or f XT = 32.768 kHz.

(2) Port mode register 3 (PM3)

This register set port 3 input/output in 1-bit units.

When using the P35/PCL pin for clock output function, set PM35 and output latch of P35 to 0.

PM3 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets PM3 to FFH.

Figure 13-4. Port Mode Register 3 Format

3 2 1 0

R/W

PM3

PM37

PM36

PM35 PM34

PM33

PM32 PM31 PM30

FF23H

FFH

R/W

P3n Pin Input/Output Mode Selection (n = 0 to 7)

Output mode (output buffer ON)

Input mode (output buffer OFF)

Show 4 more labels / short text on this page
After Reset · Symbol · Address · PM3n
Page 288 of the NEC PD78076Y user manual — [MEMO]
Page 288 · click to enlarge
Page 288

[MEMO]

Page 289 of the NEC PD78076Y user manual — TCL27 TCL26 TCL25
Page 289 · click to enlarge
Page 289

CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUIT

14.1 Buzzer Output Control Circuit Functions

The buzzer output control circuit outputs 1.2-kHz, 2.4-kHz, 4.9-kHz, or 9.8-kHz frequency square waves. The

buzzer frequency selected with timer clock select register 2 (TCL2) is output from the BUZ/P36 pin.

Follow the procedure below to output the buzzer frequency.

(1) Select the buzzer output frequency with bits 5 to 7 (TCL25 to TCL27) of TCL2.

(2) Set the P36 output latch to 0.

(3) Set bit 6 (PM36) of port mode register 3 (PM3) to 0 (Set to output mode).

14.2 Buzzer Output Control Circuit Configuration

The buzzer output control circuit consists of the following hardware.

Table 14-1. Buzzer Output Control Circuit Configuration

Timer clock select register 2 (TCL2)

Port mode register 3 (PM3)

Figure 14-1. Buzzer Output Control Circuit Block Diagram

fXX/29

fXX/210

BUZ/P36

fXX/211

TCL27 TCL26 TCL25

PM36

Timer Clock Select Register 2 Port Mode Register 3

Show 5 more labels / short text on this page
Item Configuration · Control register · Selector · P36 Output Latch · Internal Bus
Page 290 of the NEC PD78076Y user manual — (1) Timer clock select register 2 (TCL2)
Page 290 · click to enlarge
Page 290

CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUIT

14.3 Buzzer Output Function Control Registers

The following two types of registers are used to control the buzzer output function.

  • Timer clock select register 2 (TCL2)
  • Port mode register 3 (PM3)

(1) Timer clock select register 2 (TCL2)

This register sets the buzzer output frequency.

TCL2 is set with an 8-bit memory manipulation instruction.

RESET input sets TCL2 to 00H.

Remark Besides setting the buzzer output frequency, TCL2 sets the watch timer count clock and the

watchdog timer count clock.

Page 291 of the NEC PD78076Y user manual — TCL27 TCL26 TCL25
Page 291 · click to enlarge
Page 291

CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUIT

Figure 14-2. Timer Clock Select Register 2 Format

3 2 1 0

R/W

TCL2

TCL27

TCL26

TCL25 TCL24

TCL22 TCL21 TCL20

FF42H

00H

R/W

Watchdog Timer Count Clock Selection

TCL22 TCL21 TCL20

MCS = 1

MCS = 0

fXX/23

fX/23

fX/24

fXX/24

fX/24

fX/25

fXX/25

fX/25

fX/26

(78.1 kHz)

fXX/26

fX/26

(78.1 kHz)

fX/27

(39.1 kHz)

fXX/27

fX/27

(39.1 kHz)

fX/28

(19.5 kHz)

fXX/28

fX/28

(19.5 kHz)

fX/29

(9.8 kHz)

fXX/29

fX/29

fX/210

(9.8 kHz)

(4.9 kHz)

fXX/211

fX/211

(2.4 kHz)

fX/212

(1.2 kHz)

Watch Timer Count Clock Selection

TCL24

MCS = 1

MCS = 0

fXX/27

fX/27 (39.1 kHz)

fX/28 (19.5 kHz)

fXT (32.768 kHz)

Buzzer Output Frequency Selection

TCL27 TCL26 TCL25

MCS = 1

MCS = 0

fXX/29

fX/29 (9.8 kHz)

fX/210 (4.9 kHz)

fX/210 (4.9 kHz)

fXX/210

fX/211 (2.4 kHz)

fX/211 (2.4 kHz)

fXX/211

fX/212 (1.2 kHz)

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. f XT : Subsystem clock oscillation frequency
4. x : Don’t care
5. MCS : Bit 0 of oscillation mode selection register (OSMS)
6. Figures in parentheses apply to operation with f X = 5.0 MHz or f XT = 32.768 kHz.
Show 10 more labels / short text on this page
After Reset · Symbol · Address · (625 kHz) · (313 kHz) · (313 kHz) · (156 kHz) · (156 kHz) · Buzzer output disable · Setting prohibited
Page 292 of the NEC PD78076Y user manual — R/W
Page 292 · click to enlarge
Page 292

CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUIT

(2) Port mode register 3 (PM3)

This register sets port 3 input/output in 1-bit units.

When using the P36/BUZ pin for buzzer output function, set PM36 and output latch of P36 to 0.

PM3 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets PM3 to FFH.

Figure 14-3. Port Mode Register 3 Format

3 2 1 0

R/W

PM3

PM37

PM36

PM35 PM34

PM33

PM32 PM31 PM30

FF23H

FFH

R/W

P3n Pin Input/Output Mode Selection (n = 0 to 7)

Output mode (output buffer ON)

Input mode (output buffer OFF)

Show 4 more labels / short text on this page
After Reset · Symbol · Address · PM3n
Page 293 of the NEC PD78076Y user manual — Table 15-1. A/D Converter Configuration
Page 293 · click to enlarge
Page 293

CHAPTER 15 A/D CONVERTER

15.1 A/D Converter Functions

The A/D converter converts an analog input into a digital value. It consists of 8 channels (ANI0 to ANI7) with

an 8-bit resolution.

The conversion method is based on successive approximation and the conversion result is held in the 8-bit A/

D conversion result register (ADCR).

The following two ways are available to start A/D conversion.

(1) Hardware start

Conversion is started by trigger input (INTP3).

(2) Software start

Conversion is started by setting the A/D converter mode register (ADM).

One channel of analog input is selected from ANI0 to ANI7 and A/D conversion is carried out. In the case of

hardware start, A/D conversion operation stops and an interrupt request (INTAD) is generated when an A/D

conversion operation ends. In the case of software start, the A/D conversion operation is repeated. Each time an

A/D conversion operation ends, an interrupt request (INTAD) is generated.

15.2 A/D Converter Configuration

The A/D converter consists of the following hardware.

Table 15-1. A/D Converter Configuration

Analog input 8 channels (ANI0 to ANI7)

Control register A/D converter mode register (ADM)

A/D converter input select register (ADIS)

External interrupt mode register 1 (INTM1)

Register Successive approximation register (SAR)

A/D conversion result register (ADCR)

Item Configuration

Page 294 of the NEC PD78076Y user manual — CS
Page 294 · click to enlarge
Page 294

CHAPTER 15 A/D CONVERTER

Figure 15-1. A/D Converter Block Diagram

A/D Converter Input Select Register

ADIS3

ADIS2 ADIS1 ADIS0

ANI0/P10

ANI1/P11

AV DD

Sample & Hold Circuit

ANI2/P12

AV REF0

ANI3/P13

ANI4/P14

ANI5/P15

ANI6/P16

Successive Approximation Register (SAR)

AV SS

ANI7/P17

Edge Detector Control Circuit

INTP3/P03

INTAD

ES40, ES41

INTP3

A/D Conversion Result Register (ADCR)

CS

TRG FR1 FR0 ADM3 ADM2 ADM1

A/D Converter Mode Register

2. Selector to select the channel for A/D conversion.
3. Bits 0, 1 of external interrupt mode register 1 (INTM1)
Show 8 more labels / short text on this page
Internal Bus · Series Resistor String · Voltage Comparator · Tap Selector · Selector · Selector · Trigger Enable · Internal Bus
Page 295 of the NEC PD78076Y user manual — (7) AV REF0 pin
Page 295 · click to enlarge
Page 295

CHAPTER 15 A/D CONVERTER

(1) Successive approximation register (SAR)

This register compares the analog input voltage value to the voltage tap (compare voltage) value applied

from the series resistor string and holds the result from the most significant bit (MSB).

When the result of comparison is held to the least significant bit (LSB) (termination of A/D conversion), the

SAR contents are transferred to the A/D conversion result register (ADCR).

(2) A/D conversion result register (ADCR)

This register holds the A/D conversion result. Each time A/D conversion terminates, the conversion result

is loaded from the successive approximation register.

ADCR is read with an 8-bit memory manipulation instruction.

RESET input makes ADCR undefined.

(3) Sample & hold circuit

The sample & hold circuit samples each analog input signal sequentially applied from the input circuit and

sends it to the voltage comparator. This circuit holds the sampled analog input voltage value during A/D

conversion.

(4) Voltage comparator

The voltage comparator compares the analog input to the series resistor string output voltage.

(5) Series resistor string

The series resistor string is connected between AVREF0 to AVSS and generates a voltage to be compared

to the analog input.

(6) ANI0 to ANI7 pins

These are 8-channel analog input pins to input analog signals to undergo A/D conversion to the A/D

converter.

Pins other than those selected as analog input by the A/D converter input select register (ADIS) can be used

as input/output ports.

AVREF0 or lower than AVSS is applied (even if within the absolute maximum ratings), the

converted value of the corresponding channel becomes indeterminate and may adversely

affect the converted values of other channels.

2. Analog input (ANI0 to ANI7) pins are alternate function pins corresponding to input/

output port (port 1) pin. When A/D conversion is performed with any one of ANI0 to ANI7

pins selected, do not execute input instruction to port 1 during conversion operation,

otherwise, the conversion resolution may be deteriorated.

If digital pulse is applied to a pin adjacent to the pin performing A/D conversion, desired

A/D conversion value may not be achieved due to the coupling noise. Do not apply pulse

to a pin adjacent to the pin performing A/D conversion.

(7) AV REF0 pin

This pin inputs the A/D converter reference voltage.

It converts signals input to ANI0 to ANI7 into digital signals according to the voltage applied between AVREF0

and AVSS.

The current flowing in the series resistor string can be reduced by setting the voltage to be input to the AVREF0

pin to AVSS level in standby mode.

Page 296 of the NEC PD78076Y user manual — (1) A/D converter mode register (ADM)
Page 296 · click to enlarge
Page 296

CHAPTER 15 A/D CONVERTER

pin. Therefore, if the output impedance of the reference voltage source is high, AVREF0 pin

is connected in parallel with the series resistor string between AVREF0 pin and AVSS pin. As

a result, the reference voltage error will increase.

(8) AV SS pin

This is a GND potential pin of the A/D converter. Keep it at the same potential as the VSS pin when not using

the A/D converter.

(9) AV DD pin

This is an A/D converter analog power supply pin. Keep it at the same potential as the VSS pin when not

using the A/D converter.

15.3 A/D Converter Control Registers

The following three types of registers are used to control the A/D converter.

  • A/D converter mode register (ADM)
  • A/D converter input select register (ADIS)
  • External interrupt mode register 1 (INTM1)

(1) A/D converter mode register (ADM)

This register sets the analog input channel for A/D conversion, conversion time, conversion start/stop and

external trigger.

ADM is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets ADM to 01H.

Page 297 of the NEC PD78076Y user manual — 2. When restarting the stopped A/D conversion operation, start the A/D conversion
Page 297 · click to enlarge
Page 297

CHAPTER 15 A/D CONVERTER

Figure 15-2. A/D Converter Mode Register Format

3 2 1 0

R/W

ADM

CS

TRG

FR1 FR0

ADM3

ADM2 ADM1 HSC

FF80H

01H

R/W

ADM3

ADM2

ADM1

Analog Input Channel Selection

ANI0

ANI1

ANI2

ANI3

ANI4

ANI5

ANI6

ANI7

A/D Conversion Time SelectionNote 1

FR1

FR0

HSC

fX = 5.0-MHz Operation

fX = 4.19-MHz Operation

MCS = 1

MCS = 0

MCS = 1

MCS = 0

80/fX (Setting prohibitedNote 2)

160/fX (32.0 s)

80/fX (19.1 s)

160/fX (38.1 s)

40/fX (Setting prohibitedNote 2)

80/fX (Setting prohibitedNote 2)

40/fX (Setting prohibitedNote 2)

80/fX (19.1 s)

50/fX (Setting prohibitedNote 2)

100/fX (20.0 s)

50/fX (Setting prohibitedNote 2)

100/fX (23.8 s)

100/fX (20.0 s)

200/fX (40.0 s)

200/fX (47.7 s) µ

100/fX (23.8 s)

TRG

No external trigger (software starts)

Conversion started by external trigger (hardware starts)

CS

A/D Conversion Operation Control

2. Setting prohibited because A/D conversion time is less than 19.1 µ s.

converter when the standby function is used: Clear bit 7 (CS) to 0 first to stop the A/

D conversion operation, and then execute the HALT or STOP instruction.

2. When restarting the stopped A/D conversion operation, start the A/D conversion

operation after clearing the interrupt request flag (ADIF) to 0.

Remarks 1. f XMain system clock oscillation frequency
2. MCS : Bit 0 of oscillation mode selection register (OSMS)
Show 17 more labels / short text on this page
After Reset · Symbol · <7> · <6> · Address · µ · µ µ · µ · µ µ · µ · µ · µ · Other combinations · Setting prohibited · External Trigger Selection · Operation stop · Operation start
Page 298 of the NEC PD78076Y user manual — R/W
Page 298 · click to enlarge
Page 298

CHAPTER 15 A/D CONVERTER

(2) A/D converter input select register (ADIS)

This register determines whether the ANI0/P10 to ANI7/P17 pins should be used for analog input channels

or ports. Pins other than those selected as analog input can be used as input/output ports.

ADIS is set with an 8-bit memory manipulation instruction.

RESET input sets ADIS to 00H.

(1) Set the number of analog input channels with ADIS.

(2) Using the A/D converter mode register (ADM), select one channel to undergo A/D

conversion from among the channels set for analog input with ADIS.

2. No on-chip pull-up resistor can be used for the channels set for analog input with ADIS,

irrespective of the value of bit 1 (PUO1) of the pull-up resistor option register L (PUOL).

Figure 15-3. A/D Converter Input Select Register Format

3 2 1 0

R/W

ADIS

ADIS3

ADIS2 ADIS1 ADIS0

FF84H

00H

R/W

ADIS3

ADIS2

ADIS1

ADIS0

Number of Analog Input Channel Selection

No analog input channel (P10 to P17)

1 channel (ANI0, P11 to P17)

2 channel (ANI0, ANI1, P12 to P17)

3 channel (ANI0 to ANI2, P13 to P17)

4 channel (ANI0 to ANI3, P14 to P17)

5 channel (ANI0 to ANI4, P15 to P17)

6 channel (ANI0 to ANI5, P16, P17)

7 channel (ANI0 to ANI6, P17)

8 channel (ANI0 to ANI7)

Show 5 more labels / short text on this page
Address · After Reset · Symbol · Other than above · Setting prohibited
Page 299 of the NEC PD78076Y user manual — ES71
Page 299 · click to enlarge
Page 299

CHAPTER 15 A/D CONVERTER

(3) External interrupt mode register 1 (INTM1)

This register sets the valid edge for INTP3 to INTP6.

INTM1 is set with an 8-bit memory manipulation instruction.

RESET input sets INTM1 to 00H.

Figure 15-4. External Interrupt Mode Register 1 Format

3 2 1 0

R/W

INTM1

ES71

ES70

ES61 ES60

ES51

ES50 ES41 ES40

FFEDH

00H

R/W

ES41

ES40

INTP3 Valid Edge Selection

Both falling and rising edges

ES51

ES50

INTP4 Valid Edge Selection

Both falling and rising edges

ES61

ES60

INTP5 Valid Edge Selection

Both falling and rising edges

ES71

ES70

INTP6 Valid Edge Selection

Both falling and rising edges

Show 15 more labels / short text on this page
After Reset · Symbol · Address · Falling edge · Rising edge · Setting prohibited · Falling edge · Rising edge · Setting prohibited · Falling edge · Rising edge · Setting prohibited · Falling edge · Rising edge · Setting prohibited
Page 300 of the NEC PD78076Y user manual — CHAPTER 15 A/D CONVERTER
Page 300 · click to enlarge
Page 300

CHAPTER 15 A/D CONVERTER

15.4 A/D Converter Operations

15.4.1 Basic operations of A/D converter

(1) Set the number of analog input channels with A/D converter input select register (ADIS).

(2) From among the analog input channels set with ADIS, select one channel for A/D conversion with A/D

converter mode register (ADM).

(3) Sample the voltage input to the selected analog input channel with the sample & hold circuit.

(4) Sampling for the specified period of time sets the sample & hold circuit to the hold state so that the circuit

holds the input analog voltage until termination of A/D conversion.

(5) Bit 7 of the successive approximation register (SAR) is set and the tap selector sets the series resistor string

voltage tap to (1/2) AVREF0.

(6) The voltage difference between the series resistor string voltage tap and analog input is compared with a

voltage comparator. If the analog input is greater than (1/2) AVREF0, the MSB of SAR remains set. If the

input is smaller than (1/2) AVREF0, the MSB is reset.

(7) Next, bit 6 of SAR is automatically set and the operation proceeds to the next comparison. In this case,

the series resistor string voltage tap is selected according to the preset value of bit 7 as described below.

  • Bit 7 = 1 : (3/4) AV REF0
  • Bit 7 = 0 : (1/4) AV REF0

The voltage tap and analog input voltage are compared and bit 6 of SAR is manipulated with the result as

follows.

  • Analog input voltage ≥ Voltage tap : Bit 6 = 1
  • Analog input voltage < Voltage tap : Bit 6 = 0

(8) Comparison of this sort continues up to bit 0 of SAR.

(9) Upon completion of the comparison of 8 bits, any effective digital resultant value remains in SAR and the

resultant value is transferred to and latched in the A/D conversion result register (ADCR).

At the same time, the A/D conversion termination interrupt request (INTAD) can also be generated.

Page 301 of the NEC PD78076Y user manual — SAR
Page 301 · click to enlarge
Page 301

CHAPTER 15 A/D CONVERTER

Figure 15-5. A/D Converter Basic Operation

Sampling A /D Conversion

SAR

ADCR

INTAD

A/D conversion operations are performed continuously until bit 7 (CS) of ADM is reset (0) by software.

If a write to ADM is performed during an A/D conversion operation, the conversion operation is initialized, and

if the CS bit is set (1), conversion starts again from the beginning.

After RESET input, the value of ADCR is undefined.

Show 9 more labels / short text on this page
Conversion · Time · Sampling · Time · A/D Converter Operation · Undefined 80H C0H · Conversion Result · or 40H · Conversion Result
Page 302 of the NEC PD78076Y user manual — Figure 15-6. Relationships between Analog Input Voltage and A/D Conversion Result
Page 302 · click to enlarge
Page 302

CHAPTER 15 A/D CONVERTER

15.4.2 Input voltage and conversion results

The relation between the analog input voltage input to the analog input pins (ANI0 to ANI7) and the A/D conversion

result (the value stored in ADCR) is shown by the following expression.

V IN AV REF0

ADCR = INT ( x 256 + 0.5)

AV REF0

256 AV REF0

(ADCR – 0.5) x ≤ VIN < (ADCR + 0.5) x

Where, INT( ) : Function which returns integer parts of value in parentheses.

V INAnalog input voltage
AV REF0AV REF0 pin voltage
ADCRA/D conversion result register (ADCR)

Figure 15-6 shows the relation between the analog input voltage and the A/D conversion result.

Figure 15-6. Relationships between Analog Input Voltage and A/D Conversion Result

A/D Conversion Results (ADCR)

1 512 1 256 3 512 2 256 5 512 3 256 507 512 254 256 509 512 255 256 511 512 1

or · Input Voltage/AVREF0

Page 303 of the NEC PD78076Y user manual — INTAD
Page 303 · click to enlarge
Page 303

CHAPTER 15 A/D CONVERTER

15.4.3 A/D converter operating mode

One analog input channel is selected from among ANI0 to ANI7 with the A/D converter input select register (ADIS)

and A/D converter mode register (ADM) and A/D conversion is executed.

The following two ways are available to start A/D conversion.

  • Hardware start: Conversion is started by trigger input (INTP3).
  • Software start: Conversion is started by setting ADM.

The A/D conversion result is stored in the A/D conversion result register (ADCR) and the interrupt request signal

(INTAD) is simultaneously generated.

(1) A/D conversion by hardware start

When bit 6 (TRG) and bit 7 (CS) of the A/D converter mode register (ADM) are set to 1, the A/D conversion

standby state is set. When the external trigger signal (INTP3) is input, the A/D conversion starts on the

voltage applied to the analog input pins specified with bits 1 to 3 (ADM1 to ADM3) of ADM.

Upon termination of the A/D conversion, the conversion result is stored in the A/D conversion result register

(ADCR) and the interrupt request signal (INTAD) is generated. After one A/D conversion operation is started

and terminated, another operation is not started until a new external trigger signal is input.

If data with CS set to 1 is written to ADM again during A/D conversion, the converter suspends its A/D

conversion operation and waits for a new external trigger signal to be input. When the external trigger input

signal is reinput, A/D conversion is carried out from the beginning.

If data with CS set to 0 is written to ADM during A/D conversion, the A/D conversion operation stops

immediately.

Figure 15-7. A/D Conversion by Hardware Start

INTP3

ADM Rewrite CS = 1, TRG = 1

ADM Rewrite CS = 1, TRG = 1

ANIn ANIn Standby State

ADCR

ANIn ANIn ANIn ANIm ANIm

INTAD

Remark n = 0, 1, ... , 7

m = 0, 1, ... , 7

Show 4 more labels / short text on this page
Standby State ANIn · Standby State · A/D Conversion · ANIm ANIm ANIm
Page 304 of the NEC PD78076Y user manual — ADCR
Page 304 · click to enlarge
Page 304

CHAPTER 15 A/D CONVERTER

(2) A/D conversion operation in software start

When bit 6 (TRG) and bit 7 (CS) of A/D converter mode register (ADM) are set to 0 and 1, respectively, the

A/D conversion starts on the voltage applied to the analog input pins specified with bits 1 to 3 (ADM1 to

ADM3) of ADM.

Upon termination of the A/D conversion, the conversion result is stored in the A/D conversion result register

(ADCR) and the interrupt request signal (INTAD) is generated. After one A/D conversion operation is started

and terminated, the next A/D conversion operation starts immediately. The A/D conversion operation con-

tinues repeatedly until new data is written to ADM.

If data with CS set to 1 is written to ADM again during A/D conversion, the converter suspends its A/D

conversion operation and starts A/D conversion on the newly written data.

If data with CS set to 0 is written to ADM during A/D conversion, the A/D conversion operation stops im-

mediately.

Figure 15-8. A/D Conversion by Software Start

Conversion Start CS = 1, TRG = 0

ADM Rewrite CS = 1, TRG = 0

ADM Rewrite CS = 0, TRG = 0

ANIn ANIm ANIm ANIn ANIn

Conversion suspended Conversion results are not stored

ADCR

INTAD

Remark n = 0, 1, ... , 7

m = 0, 1, ... , 7

A/D Conversion · Stop · ANIn ANIn ANIm

Page 305 of the NEC PD78076Y user manual — Figure 15-9. Example of Method of Reducing Current Consumption in Standby Mode
Page 305 · click to enlarge
Page 305

CHAPTER 15 A/D CONVERTER

15.5 A/D Converter Cautions

(1) Current consumption in standby mode

The A/D converter operates on the main system clock. Therefore, its operation stops in STOP mode or in

HALT mode with the subsystem clock. As a current still flows in the AVREF0 pin at this time, this current must

be cut in order to minimize the overall system power dissipation. In Figure 15-9, the power dissipation can

be reduced by outputting a low-level signal to the output port in standby mode. However, there is no precision

to the actual AVREF0 voltage, and therefore the conversion values themselves lack precision and can only

be used for relative comparison.

Figure 15-9. Example of Method of Reducing Current Consumption in Standby Mode

V DD

AV REF0

AV REF0

= V DD

AV SS

Output Port · µ PD78078, 78078Y · Series Resistor String

Page 306 of the NEC PD78076Y user manual — V DD
Page 306 · click to enlarge
Page 306

CHAPTER 15 A/D CONVERTER

(2) Input range of ANI0 to ANI7

The input voltages of ANI0 to ANI7 should be within the specification range. In particular, if a voltage above

AVREF0 or below AVSS is input (even if within the absolute maximum rating range), the conversion value for

that channel will be indeterminate. The conversion values of the other channels may also be affected.

(3) Noise countermeasures

In order to maintain 8-bit resolution, attention must be paid to noise on pins AVREF0 and ANI0 to ANI7. Since

the effect increases in proportion to the output impedance of the analog input source, it is recommended

that a capacitor be connected externally as shown in Figure 15-10 in order to reduce noise.

Figure 15-10. Analog Input Pin Disposition

If there is possibility that noise whose level is

AVREF0 or higher or AVSS or lower may enter,

clamp with a diode with a small VF (0.3 V or less).

AV REF0

V DD

C = 100 to

V DD

AV DD

AV SS

V SS

(4) Pins ANI0/P10 to ANI7/P17

The analog input pins ANI0 to ANI7 also function as input/output port (PORT1) pins. When A/D conversion

is performed with any of pins ANI0 to ANI7 selected, be sure not to execute an input instruction to PORT

1 while conversion is in progress, as this may reduce the conversion resolution.

Also, if digital pulses are applied to a pin adjacent to the pin in the process of A/D conversion, the expected

A/D conversion value may not be obtainable due to coupling noise. Therefore, avoid applying pulses to pins

adjacent to the pin undergoing A/D conversion.

Reference Voltage Input · ANI0 to ANI7 · 1000 pF

Page 307 of the NEC PD78076Y user manual — Figure 15-12. Handling of AV DD Pin
Page 307 · click to enlarge
Page 307

CHAPTER 15 A/D CONVERTER

(5) AV REF0 pin input impedance

A series resistor string of approximately 10 kΩ is connected between the AVREF0 pin and the AVSS pin.

Therefore, if the output impedance of the reference voltage source is high, this will result in parallel

connection to the series resistor string between the AVREF0 pin and the AVSS pin, and there will be a large

reference voltage error.

(6) Interrupt request flag (ADIF)

The interrupt request flag (ADIF) is not cleared even if the A/D converter mode register (ADM) is changed.

conversion result and ADIF for the pre-change analog input may be set just before the ADM rewrite, and

when ADIF is read immediately after the ADM rewrite, ADIF may be set despite the fact that the A/D

conversion for the post-change analog input has not ended.

When the A/D conversion is stopped and then resumed, clear the ADIF before it is resumed.

Figure 15-11. A/D Conversion End Interrupt Request Generation Timing

ADM Rewrite (Start of ANIm Conversion)

INTAD is set but ANIm conversion has not ended

ADM Rewrite (Start of ANIn Conversion)

ANIn ANIn ANIm ANIm

ADCR

ANIn ANIn ANIm ANIm

INTAD

Remark n = 0, 1, ... , 7

m = 0, 1, ... , 7

(7) AV DD pin

The AVDD pin is the analog circuit power supply pin, and supplies power to the input circuits of ANI0/P10

to ANI7/P17.

Therefore, be sure to apply the same voltage as VDD to this pin even when the application circuit is designed

so as to switch to a backup battery.

Figure 15-12. Handling of AV DD Pin

AV REF0

V DD

AV DD

AV SS

V SS

A/D Conversion · Main power supply · Capacitor for back-up

Page 308 of the NEC PD78076Y user manual — [MEMO]
Page 308 · click to enlarge
Page 308

[MEMO]

Page 309 of the NEC PD78076Y user manual — (2) Real-time output mode
Page 309 · click to enlarge
Page 309

CHAPTER 16 D/A CONVERTER

16.1 D/A Converter Functions

The D/A converter converts a digital input into an analog value. It consists of two 8-bit resolution channels of

voltage output type D/A converter.

The conversion method used is the R-2R resistor ladder method.

Start the A/D conversion by setting the DACE0 and DACE1 of the D/A converter mode register (DAM).

There are two types of modes for the D/A converter, as follows.

(1) Normal mode

Outputs an analog voltage signal immediately after the D/A conversion.

(2) Real-time output mode

Outputs an analog voltage signal synchronously with the output trigger after the D/A conversion.

Since a sine wave can be generated in the mode, the use of this mode easily realizes an MSK modem for

cordless telephone sets.

Page 310 of the NEC PD78076Y user manual — Figure 16-1. D/A Converter Block Diagram
Page 310 · click to enlarge
Page 310

CHAPTER 16 D/A CONVERTER

16.2 D/A Converter Configuration

The D/A converter consists of the following hardware.

Table 16-1. D/A Converter Configuration

D/A conversion value set register 0 (DACS0)

D/A conversion value set register 1 (DACS1)

Control register D/A converter mode register (DAM)

Figure 16-1. D/A Converter Block Diagram

(DACS1)

(DACS0)

INTTM1

2R

ANO1/P131

AV REF1

2R

R

AV SS

2R

R

2R

2R

ANO0/P130

2R

R

2R

R

2R

DAM5

DAM4 DACE1 DACE0

D/A Converter Mode Register

Show 12 more labels / short text on this page
Item Configuration · Register · Internal Bus · DACS1 Write · D/A Conversion Value · Set Register 1 · INTTM2 DACS0 Write · D/A Conversion Value · Set Register 0 · Selector · Selector · Internal Bus
Page 311 of the NEC PD78076Y user manual — CHAPTER 16 D/A CONVERTER
Page 311 · click to enlarge
Page 311

CHAPTER 16 D/A CONVERTER

(1) D/A conversion value set register 0, 1 (DACS0, DACS1)

DACS0 and DACS1 are registers that set the value used to determine analog voltage values output to the

ANO0 and ANO1 pins, re-spectively.

DACS0 and DACS1 are set with 8-bit memory manipulation instructions.

RESET input sets these registers to 00H.

Analog voltage output to the ANO0 and ANO1 pins is determined by the following expression.

ANOn output voltage = AVREF1 x

where, n = 0, 1

an output trigger is generated, the previous data are read rather than the set data.

2. In the real-time output mode, data should be set to DACS0 and DACS1 after an output

trigger and before the next output trigger.

DACSn

Page 312 of the NEC PD78076Y user manual — DAM5
Page 312 · click to enlarge
Page 312

CHAPTER 16 D/A CONVERTER

16.3 D/A Converter Control Registers

The D/A converter mode register (DAM) controls the D/A converter. This register sets D/A converter operation

enable/stop.

The DAM is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets this register to 00H.

Figure 16-2. D/A Converter Mode Register Format

3 2

R/W

DAM

DAM5 DAM4

0 DACE1 DACE0

FF98H

00H

R/W

DACE0

D/A Converter Channel 0 Control

DACE1

D/A Converter Channel 1 Control

DAM4

D/A Converter Channel 0 Operating Mode

DAM5

D/A Converter Channel 1 Operating Mode

a pull-up resistor should be disconnected.

2. Always set bits 2, 3, 6, and 7 to 0.
3. When D/A conversion is stopped, the output state is high-impedance.
4. The output triggers are INTTM1 and INTTM2 for channel 0 and channel 1, respectively, in

the real-time output mode.

Show 11 more labels / short text on this page
After Reset · Address · Symbol · D/A conversion stop · D/A conversion enable · D/A conversion stop · D/A conversion enable · Normal mode · Real-time output mode · Normal mode · Real-time output mode
Page 313 of the NEC PD78076Y user manual — CHAPTER 16 D/A CONVERTER
Page 313 · click to enlarge
Page 313

CHAPTER 16 D/A CONVERTER

16.4 D/A Converter Operations

(1) Select the channel 0 operating mode and channel 1 operating mode with DAM4 and DAM5, respectively,

of the D/A converter mode register (DAM).

(2) Set the data corresponding to the analog voltages output to the ANO0/P130 and ANO1/P131 pins to the

D/A conversion value setting registers 0 and 1 (DACS0 and DACS1), respectively.

(3) Start the channel 0 and channel 1 D/A conversion operations by setting DACE0 and DACE1, respectively,

of the DAM.

(4) In the normal mode, the analog voltage signals are output to the ANO0/P130 and ANO1/P131 pins

immediately after the D/A conversion. In the real-time output mode, the analog voltage signals are output

synchronously with the output triggers.

(5) In the normal mode, the analog voltage signals to be output are held until new data are set in DACS0 and

DACS1. In the realtime output mode, new data are set in DACS0 and DACS1 and then they are held until

the next trigger is generated.

Page 314 of the NEC PD78076Y user manual — (3) AV REF1 pin
Page 314 · click to enlarge
Page 314

CHAPTER 16 D/A CONVERTER

16.5 D/A Converter Cautions

(1) Output impedance of D/A converter

Because the output impedance of the D/A converter is high, use of current flowing from the ANOn pins (n

= 0,1) is prohibited. If the input impedance of the load for the converter is low, insert a buffer amplifier between

the load and the ANOn pins. In addition, wiring from the ANOn pins to the buffer amplifier or the load should

be as short as possible (because of high output impedance). If the wiring may be long, design the ground

pattern so as to be close to those lines or use some other expedient to achieve shorter wiring.

Figure 16-3. Use Example of Buffer Amplifier

(a) Inverting amplifier

R 2

R 1

  • The input impedance of the buffer amplifier is R 1 .

(b) Voltage-follower

R

R 1 C

  • The input impedance of the buffer amplifier is R 1 .
  • If R 1 is not connected, the output becomes undefined when RESET is low.

(2) Output voltage of D/A converter

Because the output voltage of the converter changes in steps, use the D/A converter output signals in general

by connecting a low-pass filter.

(3) AV REF1 pin

When only either one of the D/A converter channels is used with AVREF1< VDD, the other pins that are not

used as analog outputs must be set as follows:

  • Set PM13x bit of the port mode register 13 (PM13) to 1 (input mode) and connect the pin to V SS .
  • Set PM13x bit of the port mode register 13 (PM13) to 0 (output mode) and the output latch to 0, to output

low level from the pin.

Show 4 more labels / short text on this page
µPD78078, 78078Y · ANOn · µPD78078, 78078Y · ANOn
Page 315 of the NEC PD78076Y user manual — UART
Page 315 · click to enlarge
Page 315

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 ( µ PD78078 SUBSERIES)

The µPD78078 Subseries incorporates three channels of serial interfaces. Differences between channels 0, 1,

and 2 are as follows (Refer to CHAPTER 19 SERIAL INTERFACE CHANNEL 1 for details of the serial interface

channel 1. Refer to CHAPTER 20 SERIAL INTERFACE CHANNEL 2 for details of the serial interface channel

2).

Table 17-1. Differences between Channels 0, 1, and 2

Serial Transfer Mode Channel 0

fXX/2, fXX/22, fXX/23,

fXX/2, fXX/22, fXX/23,

fXX/24, fXX/25, fXX/26,

fXX/24, fXX/25, fXX/26,

fXX/27, fXX/28, external

fXX/27, fXX/28, external

Transfer method 3-wire serial I/O

as the start bit

as the start bit

as the start bit

(CSIIF0)

(CSIIF1)

(SRIF)

SBI (serial bus interface)

UART

Show 26 more labels / short text on this page
Channel 1 · Channel 2 · External clock, baud · Clock selection · rate generator output · clock, TO2 output · clock, TO2 output · MSB/LSB switchable · MSB/LSB switchable · MSB/LSB switchable · Automatic transmit/ · receive function · Transfer end flag · Serial transfer end · Serial transfer end · Serial transfer end · interrupt request flag · interrupt request flag · interrupt request flag · Use possible · None · 2-wire serial I/O · None · None · Use possible · (Asynchronous serial interface)
Page 316 of the NEC PD78076Y user manual — (3) SBI (serial bus interface) mode (MSB-first)
Page 316 · click to enlarge
Page 316

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

17.1 Serial Interface Channel 0 Functions

Serial interface channel 0 employs the following four modes.

  • Operation stop mode
  • 3-wire serial I/O mode
  • SBI (serial bus interface) mode
  • 2-wire serial I/O mode

serial interface channel 0 is enabled. Stop the serial operation before changing the operation

mode.

(1) Operation stop mode

This mode is used when serial transfer is not carried out. Power consumption can be reduced.

(2) 3-wire serial I/O mode (MSB-/LSB-first selectable)

This mode is used for 8-bit data transfer using three lines, one each for serial clock (SCK0), serial output

(SO0) and serial input (SI0). This enables simultaneous transmission/reception and therefore reduces the

data transfer processing time.

The start bit of transferred 8-bit data is switchable between MSB and LSB, so that devices can be connected

regardless of their start bit recognition.

This mode should be used when connecting with peripheral I/O devices or display controllers which

incorporate a conventional synchronous clocked serial interface as is the case with the 75X/XL, 78K, and

17K Series.

(3) SBI (serial bus interface) mode (MSB-first)

This mode is used for 8-bit data transfer with two or more devices using two lines of serial clock (SCK0)

and serial data bus (SB0 or SB1).

SBI mode complies with the NEC serial bus format. In the SBI mode, transfer data is transmitted/received

as one of the three data types: “address”, “command”, or “data”.

  • Address : Data to select the target device for serial communication
  • Command : Data to give an instruction to the target device
  • Data : Data actually transmitted

The actual transmission is performed in the following procedure: The master device outputs an “address”

on the serial bus and selects a slave device with which the master device is to perform communication from

among several devices. The master device and the slave device mutually transmit and receive “commands”

and “data” to achieve serial transfer. The receiving side can automatically identify the received data as an

“address”, “command”, or “data” in“ hardware.

This function enables the input/output ports to be used effectively and the application program serial interface

control portions to be simplified.

In this mode, the wake-up function for handshake and the output function of acknowledge and busy signals

can also be used.

Page 317 of the NEC PD78076Y user manual — Figure 17-1. Serial Bus Interface (SBI) System Configuration Example
Page 317 · click to enlarge
Page 317

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(4) 2-wire serial I/O mode (MSB-first)

This mode is used for 8-bit data transfer using two lines of serial clock (SCK0) and serial data bus (SB0

or SB1).

This mode enables to cope with any one of the possible data transfer formats by controlling the SCK0 level

and the SB0 or SB1 output level. Thus, the handshake line previously necessary for connection of two or

more devices can be removed, resulting in the increased number of available input/output port pins.

Figure 17-1. Serial Bus Interface (SBI) System Configuration Example

V DD0

SCK0

SCK0

SB0

SB0

SCK0

SB0

SCK0

SB0

Show 4 more labels / short text on this page
Master CPU · Slave CPU1 · Slave CPU2 · Slave CPUn
Page 318 of the NEC PD78076Y user manual — Figure 17-2. Serial Interface Channel 0 Block Diagram
Page 318 · click to enlarge
Page 318

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

17.2 Serial Interface Channel 0 Configuration

Serial interface channel 0 consists of the following hardware.

Table 17-2. Serial Interface Channel 0 Configuration

NEC PD78076Y — Table 17-2. Serial Interface Channel 0 Configuration diagram (page 318)
Fig. 18 · Table 17-2. Serial Interface Channel 0 Configuration

Diagram of P22 and P27.

Figure 17-2. Serial Interface Channel 0 Block Diagram

NEC PD78076Y — Figure 17-2. Serial Interface Channel 0 Block Diagram diagram (page 318)
Fig. 19 · Figure 17-2. Serial Interface Channel 0 Block Diagra…

fxx/2 to fxx/28

Remark Output control selects either CMOS output or N-ch open drain output.

Page 319 of the NEC PD78076Y user manual — (2) Slave address register (SVA)
Page 319 · click to enlarge
Page 319

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(1) Serial I/O shift register 0 (SIO0)

This is an 8-bit register to carry out parallel/serial conversion and to carry out serial transmission/reception

(shift operation) in synchronization with the serial clock.

SIO0 is set with an 8-bit memory manipulation instruction.

When bit 7 (CSIE0) of serial operating mode register 0 (CSIM0) is 1, writing data to SIO0 starts serial

operation.

In transmission, data written to SIO0 is output to the serial output (SO0) or serial data bus (SB0/SB1). In

reception, data is read from the serial input (SI0) or SB0/SB1 to SIO0.

and output. Thus, in the case of a device for reception, write FFH to SIO0 in advance (except when address

reception is carried out by setting bit 5 (WUP) of CSIM0 to 1).

In the SBI mode, the busy state can be cleared by writing data to SIO0. In this case, bit 7 (BSYE) of the

serial bus interface control register (SBIC) is not cleared to 0.

RESET input makes SIO0 undefined.

(2) Slave address register (SVA)

This is an 8-bit register to set the slave address value for connection of a slave device to the serial bus.

SVA is set with an 8-bit memory manipulation instruction. This register is not used in the 3-wire serial

I/O mode.

The master device outputs a slave address for selection of a particular slave device to the connected slave

device. These two data (the slave address output from the master device and the SVA value) are compared

with an address comparator. If they match, the slave device has been selected. In that case, bit 6 (COI)

of serial operating mode register 0 (CSIM0) becomes 1.

Address comparison can also be executed on the data of LSB-masked high-order 7 bits by setting (1) bit

4 (SVAM) of the interrupt timing specify register (SINT).

If no matching is detected in address reception, bit 2 (RELD) of the serial bus interface control register (SBIC)

is cleared to 0. In the SBI mode, when bit 5 (WUP) of the CSIM0 is set (1), the wake-up function can be

used. In this case, the interrupt request signal (INTCSI0) is generated only if the slave address output from

the master matches the SVA value. This interrupt request enables to recognize the generation of the

communication request from the master device. If the bit 5 (SIC) of the interrupt timing specify register (SINT)

is set (1), the wake-up function does not operate even when WUP is set (1) (the interrupt request signal

is generated when a bus release is detected). When using the wake-up function, clear SIC to 0.

Further, when SVA transmits data as master or slave device in the SBI or 2-wire serial I/O mode, errors are

detected if any.

RESET input makes SVA undefined.

Page 320 of the NEC PD78076Y user manual — (7) Busy/acknowledge output circuit and bus release/command/acknowledge detector
Page 320 · click to enlarge
Page 320

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(3) SO0 latch

This latch holds SI0/SB0/P25 and SO0/SB1/P26 pin levels. It can be directly controlled by software. In the

SBI mode, this latch is set upon termination of the 8th serial clock.

(4) Serial clock counter

This counter counts the serial clocks to be output and input during transmission/reception and to check

whether 8-bit data has been transmitted/received.

(5) Serial clock control circuit

This circuit controls serial clock supply to the serial I/O shift register 0 (SIO0). When the internal system

clock is used, the circuit also controls clock output to the SCK0/P27 pin.

(6) Interrupt request signal generator

This circuit controls interrupt request signal generation. It generates the interrupt request signal in the

following cases.

  • In the 3-wire serial I/O mode and 2-wire serial I/O mode

This circuit generates an interrupt request signal every eight serial clocks.

  • In the SBI mode

When WUPNote is 0 Generates an interrupt request signal every eight serial clocks.

When WUPNote is 1 Generates an interrupt request signal when the serial I/O shift register 0 (SIO0)

value matches the slave address register (SVA) value after address reception.

using the wake-up function (WUP = 1), clear bit 5 (SIC) of the interrupt timing specify register (SINT)

to 0.

(7) Busy/acknowledge output circuit and bus release/command/acknowledge detector

These two circuits output and detect various control signals in the SBI mode.

These do not operate in the 3-wire serial I/O mode and 2-wire serial I/O mode.

Page 321 of the NEC PD78076Y user manual — (1) Timer clock select register 3 (TCL3)
Page 321 · click to enlarge
Page 321

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

17.3 Serial Interface Channel 0 Control Registers

The following four types of registers are used to control serial interface channel 0.

  • Timer clock select register 3 (TCL3)
  • Serial operating mode register 0 (CSIM0)
  • Serial bus interface control register (SBIC)
  • Interrupt timing specify register (SINT)

(1) Timer clock select register 3 (TCL3)

This register sets the serial clock of serial interface channel 0.

TCL3 is set with an 8-bit memory manipulation instruction.

RESET input sets TCL3 to 88H.

Page 322 of the NEC PD78076Y user manual — MCS = 1
Page 322 · click to enlarge
Page 322

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

Figure 17-3. Timer Clock Select Register 3 Format

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

TCL3 TCL37 TCL36 TCL35 TCL34 TCL33 TCL32 TCL31 TCL30 FF43H 88H R/W

Serial Interface Channel 0 Serial Clock Selection TCL33 TCL32 TCL31 TCL30

MCS = 1

MCS = 0

fX/22 (1.25 MHz)

fXX/22

fX/22 (1.25 MHz)

fX/23 (625 kHz)

fXX/23

fX/23 (625 kHz)

fX/24 (313 kHz)

fXX/24

fX/24 (313 kHz)

fX/25 (156 kHz)

fXX/25

fX/25 (156 kHz)

fX/26 (78.1 kHz)

fXX/26

fX/26 (78.1 kHz)

fX/27 (39.1 kHz)

fXX/27

fX/27 (39.1 kHz)

fX/28 (19.5 kHz)

fXX/28

fX/28 (19.5 kHz)

fX/29 (9.8 kHz)

Other than above Setting prohibited

Serial Interface Channel 1 Serial Clock Selection TCL37 TCL36 TCL35 TCL34

MCS = 1

MCS = 0

fX/22 (1.25 MHz)

fXX/22

fX/22 (1.25 MHz)

fX/23 (625 kHz)

fXX/23

fX/23 (625 kHz)

fX/24 (313 kHz)

fXX/24

fX/24 (313 kHz)

fX/25 (156 kHz)

fXX/25

fX/25 (156 kHz)

fX/26 (78.1 kHz)

fXX/26

fX/26 (78.1 kHz)

fX/27 (39.1 kHz)

fXX/27

fX/27 (39.1 kHz)

fX/28 (19.5 kHz)

fXX/28

fX/28 (19.5 kHz)

fX/29 (9.8 kHz)

Other than above Setting prohibited

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. MCS : Bit 0 of oscillation mode selection register (OSMS)
4. Figures in parentheses apply to operation with f X = 5.0 MHz.
Show 4 more labels / short text on this page
fXX/2 · Setting prohibited · fXX/2 · Setting prohibited
Page 323 of the NEC PD78076Y user manual — (2) Serial operating mode register 0 (CSIM0)
Page 323 · click to enlarge
Page 323

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(2) Serial operating mode register 0 (CSIM0)

This register sets serial interface channel 0 serial clock, operating mode, operation enable/stop wake-up function and displays the address comparator match signal.

CSIM0 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets CSIM0 to 00H.

of the serial interface channel 0 is enabled. Stop the serial operation before changing the

operation mode.

Page 324 of the NEC PD78076Y user manual — R/W
Page 324 · click to enlarge
Page 324

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

Figure 17-4. Serial Operating Mode Register 0 Format

4 3 2 1 0 Symbol

Address After Reset R/W

CSIM0 CSIE0 COI WUP CSIM04 CSIM03 CSIM02 CSIM01 CSIM00

FF60H 00H R/WNote 1

R/W

CSIM01

CSIM00

Serial Interface Channel 0 Clock Selection

Input Clock to SCK0 pin from off-chip

8-bit timer register 2 (TM2) output

1 Clock specified with bits 0 to 3 of timer clock select register 3 (TCL3)

R/W CSIM

CSIM

CSIM

02 PM25 P25 PM26 P26 PM27 P27 Operation

Mode Start Bit SI0/SB0/P25

SO0/SB1/P26

SCK0/P27

MSB

SCK0 (CMOS

LSB 1 x 0 0 0 1

SB1 (N-ch open-drain input/output)

MSB

SCK0 (CMOS

SB0 (N-ch open-drain input/output)

SB1 (N-ch open-drain input/output)

2-wire serial l/O mode

SB0 (N-ch open-drain input/output)

R/W

WUP

Wake-up Function ControlNote 4

Interrupt request signal generation with each serial transfer in any mode

Interrupt request signal generation when the address received after bus release (when CMDD = RELD = 1) matches the slave address register data in SBI mode

R

COI

Slave Address Comparison Result FlagNote 5

Slave address register not equal to serial I/O shift register 0 data

Slave address register equal to serial I/O shift register 0 data

R/W

CSIE0

Serial Interface Channel 0 Operation Control

2. Can be used as P25 (CMOS input/output) when used only for transmission. 3. Can be used freely as port function.
4. When using the wake-up function (WUP = 1), set bit 5 (SIC) of the interrupt timing specify register (SINT) to 0.
5. When CSIE0 = 0, COI becomes 0.
Remark xDon’t care
PMxxPort mode register
PxxPort output latch
Show 17 more labels / short text on this page
Pin Function · Pin Function · Pin Function · SI0Note 2 · SO0 (CMOS output) · (Input) · input/output) · P25 (CMOS input/output) · SBI mode · input/output) · P26 (CMOS input/output) · P25 (CMOS input/output) · 0 SCK0 (N-ch · open-drain input/output) 1 · P26 (CMOS input/output) · Operation stopped · Operation enable
Page 325 of the NEC PD78076Y user manual — ACKT
Page 325 · click to enlarge
Page 325

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(3) Serial bus interface control register (SBIC)

This register sets serial bus interface operation and displays statuses.

SBIC is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SBIC to 00H.

Figure 17-5. Serial Bus Interface Control Register Format (1/2)

Symbol

Address After Reset R/W

SBIC BSYE ACKD ACKE ACKT CMDD RELD CMDT RELT

FF61H 00H R/WNote

R/W

Used for bus release signal output. When RELT = 1, SO0 Iatch is set to 1. After SO0 latch setting, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0.

RELT

R/W

Used for command signal output. When CMDT = 1, SO0 Iatch is cleared to 0. After SO0 latch clearance, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0.

CMDT

R RELD Bus Release Detection

Set Conditions (RELD =1) Clear Conditions (RELD = 0)

  • When transfer start instruction is executed
  • If SIO0 and SVA values do not match in address reception
  • When CSIE0 = 0
  • When bus release signal (REL) is detected
  • When RESET input is applied

R CMDD Command Detection

Clear Conditions (CMDD = 0)

Set Conditions (CMDD = 1)

  • When transfer start instruction is executed
  • When bus release signal (REL) is detected
  • When CSIE0 = 0
  • When command signal (CMD) is detected
  • When RESET input is applied

R/W

Acknowledge signal is output in synchronization with the falling edge clock of SCK0 just after execution of the instruction to be set to 1, and after acknowledge signal output, automatically cleared to 0. Used as ACKE = 0. Also cleared to 0 upon start of serial interface transfer or when CSIE0 = 0.

ACKT

Remarks 1. Bits 0, 1, and 4 (RELD, CMDT, and ACKT) are 0 when read after data setting.

2. CSIE0 : Bit 7 of serial operating mode register 0 (CSIM0)
Page 326 of the NEC PD78076Y user manual — Figure 17-5. Serial Bus Interface Control Register Format (2/2)
Page 326 · click to enlarge
Page 326

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

Figure 17-5. Serial Bus Interface Control Register Format (2/2)

R/W

ACKE Acknowledge Signal Output Control

0 Acknowledge signal automatic output disable (output with ACKT enable)

falling edge of SCK0 (automatically output when ACKE = 1). Before completion of transfer

Acknowledge signal is output in synchronization with the 9th clock

Acknowledge signal is output in synchronization with the falling edge of

After completion of transfer

SCK0 just after execution of the instruction to be set to 1 (automatically output when ACKE = 1). However, not automatically cleared to 0 after acknowledge signal output.

R ACKD Acknowledge Detection

Clear Conditions (ACKD = 0)

Set Conditions (ACKD = 1)

  • Falling edge of the SCK0 immediately after the busy mode is released while executing the transfer start instruction
  • When CSIE0 = 0
  • When acknowledge signal (ACK) is detected at the

rising edge of SCK0 clock after completion of transfer

  • When RESET input is applied

BSYE Synchronizing Busy Signal Output Control

0 Disables busy signal which is output in synchronization with the falling edge of SCK0 clock just after execution of the instruction to be cleared to 0.

1 Outputs busy signal at the falling edge of SCK0 clock following the acknowledge signal.

is not cleared to 0.

Remark CSIE0Bit 7 of serial operating mode register 0 (CSIM0)

R/W Note

Page 327 of the NEC PD78076Y user manual — R
Page 327 · click to enlarge
Page 327

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(4) Interrupt timing specify register (SINT)

This register sets the bus release interrupt and address mask functions and displays the SCK0/P27 pin level

status.

SINT is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SINT to 00H.

Figure 17-6. Interrupt Timing Specify Register Format

3 2 1 0 7 Symbol

Address After Reset R/W

SINT 0 CLD SIC SVAM 0 FF63H 00H R/WNote 1

R/W

SVAM

SVA Bit to be Used as Slave Address

Bits 0 to 7

Bits 1 to 7

R/W

SIC

INTCSI0 Interrupt Cause SelectionNote 2

CSIIF0 is set upon termination of serial interface channel 0 transfer

CSIIF0 is set upon bus release detection or termination of serial interface channel 0 transfer

R

CLD

SCK0/P27 Pin LevelNote 3

2. When using wake-up function in the SBI mode, set SIC to 0.
3. When CSIE0 = 0, CLD becomes 0.
Remark SVASlave address register
CSIIF0Interrupt request flag corresponding to INTCSI0
CSIE0Bit 7 of serial operating mode register 0 (CSIM0)

Low level · High level

Page 328 of the NEC PD78076Y user manual — R/W
Page 328 · click to enlarge
Page 328

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

17.4 Serial Interface Channel 0 Operations

The following four operating modes are available to the serial interface channel 0.

  • Operation stop mode
  • 3-wire serial I/O mode
  • SBI mode
  • 2-wire serial I/O mode

17.4.1 Operation stop mode

Serial transfer is not carried out in the operation stop mode. Thus, power consumption can be reduced. The

serial I/O shift register 0 (SIO0) does not carry out shift operation either and thus it can be used as ordinary 8-bit

register.

In the operation stop mode, the P25/SI0/SB0, P26/SO0/SB1 and P27/SCK0 pins can be used as ordinary input/

output ports.

(1) Register setting

The operation stop mode is set with the serial operating mode register 0 (CSIM0).

CSIM0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM0 to 00H.

4 3 2 1 0 Symbol

Address After Reset R/W

CSIM0 CSIE0 COI WUP CSIM04 CSIM03 CSIM02 CSIM01 CSIM00 FF60H 00H R/W

R/W

CSIE0

Serial Interface Channel 0 Operation Control

Operation stopped · Operation enabled

Page 329 of the NEC PD78076Y user manual — R/W
Page 329 · click to enlarge
Page 329

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

17.4.2 3-wire serial I/O mode operation

The 3-wire serial I/O mode is valid for connection of peripheral I/O units and display controllers which incorporate

a conventional synchronous clocked serial interface as is the case with the 75X/XL, 78K, and 17K series.

Communication is carried out with three lines of serial clock (SCK0), serial output (SO0), and serial input (SI0).

(1) Register setting

The 3-wire serial I/O mode is set with the serial operating mode register 0 (CSIM0) and serial bus interface

control register (SBIC).

(a) Serial operating mode register 0 (CSIM0)

CSIM0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM0 to 00H.

4 3 2 1 0 Symbol

Address After Reset R/W

CSIM0

CSIE0 COI WUP CSIM04 CSIM03 CSIM02 CSIM01 CSIM00

FF60H 00H R/WNote 1

R/W

Serial Interface Channel 0 Clock Selection

CSIM01

CSIM00

Input Clock to SCK0 pin from off-chip

8-bit timer register 2 (TM2) output

1 Clock specified with bits 0 to 3 of timer clock select register 3 (TCL3)

R/W CSIM

CSIM

CSIM

02 PM25 P25 PM26 P26 PM27 P27 Operation

Mode Start Bit SI0/SB0/P25

SO0/SB1/P26

SCK0/P27

MSB

3-wire serial l/O mode

SCK0 (CMOS

LSB 1 x 0 0 0 1

SBI mode (See 17.4.3 SBI mode operation.)

2-wire serial I/O mode (See 17.4.4 2-wire serial I/O mode operation.) 1 1

R/W

WUP

Wake-up Function ControlNote 3

Interrupt request signal generation with each serial transfer in any mode

Interrupt request signal generation when the address received after bus release (when CMDD = RELD = 1) matches the slave address register (SVA) data in SBI mode

R/W

CSIE0

Serial Interface Channel 0 Operation Control

2. Can be used as P25 (CMOS input/output) when used only for transmission.
3. Set WUP to 0 when the 3-wire serial I/O mode is selected.
Remark xDon’t care
PMxxPort mode register
PxxPort output latch
Show 9 more labels / short text on this page
Pin Function · Pin Function · Pin Function · SI0Note 2 · SO0 (CMOS output) · (Input) · input/output) · Operation stopped · Operation enabled
Page 330 of the NEC PD78076Y user manual — FF61H 00H R/W
Page 330 · click to enlarge
Page 330

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(b) Serial bus interface control register (SBIC)

SBIC is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SBIC to 00H.

Symbol

Address After Reset R/W

SBIC BSYE ACKD ACKE ACKT CMDD RELD CMDT RELT

FF61H 00H R/W

RELT When RELT = 1, SO0 Iatch is set to 1. After SO0 Iatch setting, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0. R/W

CMDT When CMDT = 1, SO0 Iatch is cleared to 0. After SO0 latch clearance, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0. R/W

Remark CSIE0Bit 7 of serial operating mode register 0 (CSIM0)
Page 331 of the NEC PD78076Y user manual — Figure 17-8. RELT and CMDT Operations
Page 331 · click to enlarge
Page 331

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(2) Communication operation

The 3-wire serial I/O mode is used for data transmission/reception in 8-bit units. Bit-wise data transmission/

reception is carried out in synchronization with the serial clock.

Shift operation of the serial I/O shift register 0 (SIO0) is carried out at the falling edge of the serial clock

(SCK0). The transmitted data is held in the SO0 latch and is output from the SO0 pin. The received data

input to the SI0 pin is latched in SIO0 at the rising edge of SCK0.

Upon termination of 8-bit transfer, SIO0 operation stops automatically and the interrupt request flag (CSIIF0)

is set.

Figure 17-7. 3-Wire Serial I/O Mode Timings

SCK0 1 2 3 4 5 6 7 8

SI0

DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0

SO0 DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0

CSIIF0

Transfer Start at the Falling Edge of SCK0

The SO0 pin is a CMOS output pin and outputs current SO0 latch statuses. Thus, the SO0 pin output status

can be manipulated by setting bit 0 (RELT) and bit 1 (CMDT) of the serial bus interface control register (SBIC).

However, do not carry out this manipulation during serial transfer.

Control the SCK0 pin output level in the output mode (internal system clock mode) by manipulating the P27

output latch (refer to 17.4.5 SCK0/P27 pin output manipulation).

(3) Other signals

Figure 17-8 shows RELT and CMDT operations.

Figure 17-8. RELT and CMDT Operations

RELT

CMDT

End of Transfer · SO0 latch

Page 332 of the NEC PD78076Y user manual — (5) Transfer start
Page 332 · click to enlarge
Page 332

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(4) MSB/LSB switching as the start bit

The 3-wire serial I/O mode enables to select transfer to start at MSB or LSB.

Figure 17-9 shows the configuration of the serial I/O shift register 0 (SIO0) and internal bus. As shown in

the figure, MSB/LSB can be read/written in reverse form.

MSB/LSB switching as the start bit can be specified with bit 2 (CSIM02) of the serial operating mode register

0 (CSIM0).

Figure 17-9. Circuit of Switching in Transfer Bit Order

SI0 Shift Register 0 (SIO0)

D Q

SO0

SCK0

Start bit switching is realized by switching the bit order for data write to SIO0. The SIO0 shift order remains

unchanged.

Thus, switching between the MSB-first and LSB-first must be performed before writing data to the shift

register.

(5) Transfer start

Serial transfer is started by setting transfer data to the serial I/O shift register 0 (SIO0) when the following

two conditions are satisfied.

  • Serial interface channel 0 operation control bit (CSIE0) = 1.
  • Internal serial clock is stopped or SCK0 is a high level after 8-bit serial transfer.

Upon termination of 8-bit transfer, serial transfer automatically stops and the interrupt request flag (CSIIF0)

is set.

Show 5 more labels / short text on this page
Internal Bus · LSB-first · MSB-first Read/Write Gate · Read/Write Gate · SO0 Latch
Page 333 of the NEC PD78076Y user manual — Figure 17-10. Example of Serial Bus Configuration with SBI
Page 333 · click to enlarge
Page 333

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

17.4.3 SBI mode operation

SBI (Serial Bus Interface) is a high-speed serial interface in compliance with the NEC serial bus format.

SBI uses a single-master device and employs the clocked serial I/O format with the addition of a bus configuration

function. This function enables devices to communicate using only two lines. Thus, when making up a serial bus

with two or more microcontrollers and peripheral ICs, the number of ports to be used and the number of wires on

the board can be decreased.

The master device outputs three kinds of data to slave devices on the serial data bus: “addresses” to select a

device to be communicated with, “commands” to instruct the selected device, and “data” which is actually required.

The slave device can identify the received data into “address”, “command,” or “data,” by hardware. This function

simplifies application programs which control serial interface channel 0.

The SBI function is incorporated into various devices including 75X/XL Series and 78K Series.

Figure 17-10 shows a serial bus configuration example when a CPU having a serial interface compliant with SBI

and peripheral ICs are used.

In SBI, the SB0 (SB1) serial data bus pin is an open-drain output pin and therefore the serial data bus line behaves

in the same way as the wired-OR configuration. In addition, a pull-up resistor must be connected to the serial data

bus line. When the SBI mode is used, refer to (11) SBI mode precautions (d) described later.

Figure 17-10. Example of Serial Bus Configuration with SBI

V DD

SCK0

SCK0

SB0 (SB1)

SB0 (SB1)

SCK0

SB0 (SB1)

SCK0

SB0 (SB1)

line (SCK0) as well because serial clock line (SCK0) input/output switching is carried out

asynchronously between the master and slave CPUs.

Show 11 more labels / short text on this page
Serial Clock · Slave CPU · Master CPU · Serial Data Bus · Address 1 · Slave CPU · Address 2 · • • • · • • • · Slave IC · Address N
Page 334 of the NEC PD78076Y user manual — (e) Busy signal (BUSY) control function
Page 334 · click to enlarge
Page 334

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(1) SBI functions

In the conventional serial I/O format, when a serial bus is configured by connecting two or more devices,

many ports and wiring are necessary, to provide chip select signal to identify command and data, and to

judge the busy state, because only the data transfer function is available. If these operations are to be

controlled by software, the software must be heavily loaded.

In SBI, a serial bus can be configured with two signal lines of serial clock SCK0 and serial data bus SB0

(SB1). Thus, use of SBI leads to reduction in the number of microcontroller ports and that of wirings and

routings on the board.

The SBI functions are described below.

(a) Address/command/data identify function

Serial data is distinguished into addresses, commands, and data.

(b) Chip select function by address transmission

The master executes slave chip selection by address transmission.

(c) Wake-up function

The slave can easily judge address reception (chip select judgment) with the wake-up function (which

can be set/reset by software).

When the wake-up function is set, the interrupt request signal (INTCSI0) is generated upon reception

of a match address.

Thus, when communication is executed with two or more devices, the CPU except the selected slave

devices can operate regardless of underway serial communications.

(d) Acknowledge signal (ACK) control function

The acknowledge signal to check serial data reception is controlled.

(e) Busy signal (BUSY) control function

The busy signal to report the slave busy state is controlled.

Page 335 of the NEC PD78076Y user manual — Figure 17-11. SBI Transfer Timings
Page 335 · click to enlarge
Page 335

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(2) SBI definition

The SBI serial data format and the signals to be used are defined as follows.

Serial data to be transferred with SBI consists of three kinds of data, “address”, “command”, and “data”.

Figure 17-11 shows the address, command, and data transfer timings.

Figure 17-11. SBI Transfer Timings

SCK0

SB0 (SB1)

A7 A0 ACK BUSY

SCK0

SB0 (SB1)

C7 C0 ACK BUSY READY

SCK0

SB0 (SB1)

D7 D0 ACK BUSY READY

Remark The broken lines indicate the READY state.

The bus release signal and the command signal are output by the master device. BUSY is output by the

slave signal. ACK can be output by either the master or slave device (normally, the 8-bit data receiver

outputs).

Serial clocks continue to be output by the master device from 8-bit data transfer start to BUSY reset.

Show 8 more labels / short text on this page
Address Transfer · Bus Release Signal · Address · Command Transfer · Command Signal · Command · Data Transfer · Data
Page 336 of the NEC PD78076Y user manual — Figure 17-13. Command Signal
Page 336 · click to enlarge
Page 336

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(a) Bus release signal (REL)

The bus release signal is a signal with the SB0 (SB1) line which has changed from the low level to the

high level when the SCK0 line is at the high level (without serial clock output).

This signal is output by the master device.

Figure 17-12. Bus Release Signal

SCK0 “H”

SB0 (SB1)

The bus release signal indicates that the master device is going to transmit an address to the slave

device. The slave device incorporates hardware to detect the bus release signal.

level, this is recognized as a bus release signal. Therefore, if the changing timing of

bus fluctuates because of the substrate capacity, etc., it may be recognized as a bus

release signal even while data is being transmitted. Care should be taken for the wiring.

(b) Command signal (CMD)

The command signal is a signal with the SB0 (SB1) line which has changed from the high level to the

low level when the SCK0 line is at the high level (without serial clock output). This signal is output by

the master device.

Figure 17-13. Command Signal

SCK0 “H”

SB0 (SB1)

The command signal indicates that the master device is going to transmit a command to the slave device

(however, the command signal following a bus release signal indicates that the master device is going

to transmit an address).

The slave device incorporates hardware to detect the command signal.

level, this is recognized as a command signal. Therefore, if the changing timing of bus

fluctuates because of the substrate capacity, etc., it may be recognized as a command

signal even while data is being transmitted. Care should be taken for the wiring.

Page 337 of the NEC PD78076Y user manual — Figure 17-15. Slave Selection with Address
Page 337 · click to enlarge
Page 337

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(c) Address

An address is 8-bit data which the master device outputs to the slave device connected to the bus line

in order to select a particular slave device.

Figure 17-14. Addresses

SCK0

1 2 3 4 5 6 7 8

SB0 (SB1)

A7 A6 A5 A4 A3 A2 A1 A0

8-bit data following bus release and command signals is defined as an “address”. In the slave device,

this condition is detected by hardware and whether or not 8-bit data matches the own specification

number (slave address) is checked by hardware. If the 8-bit data matches the slave address, the slave

device has been selected. After that, communication with the master device continues until a release

instruction is received from the master device.

Figure 17-15. Slave Selection with Address

Master Slave 1 Non-Selection

Slave 2 Address Transmission

Show 6 more labels / short text on this page
Address · Bus Release Signal · Command Signal · Slave 2 Selection · Slave 3 Non-Selection · Slave 4 Non-Selection
Page 338 of the NEC PD78076Y user manual — SB0 (SB1)
Page 338 · click to enlarge
Page 338

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(d) Command and data

The master device transmits commands to, and transmits/receives data to/from the slave device

selected by address transmission.

Figure 17-16. Commands

SCK0

1 2 3 4 5 6 7 8

SB0 (SB1)

C7 C6 C5 C4 C3 C2 C1 C0

Figure 17-17. Data

SCK0

1 2 3 4 5 6 7 8

SB0 (SB1)

D7 D6 D5 D4 D3 D2 D1 D0

8-bit data following a command signal is defined as “command” data. 8-bit data without command signal

is defined as “data”. Command and data operation procedures are allowed to determine by user

arbitrarily according to communications specifications.

Command Command Signal · Data

Page 339 of the NEC PD78076Y user manual — Figure 17-19. BUSY and READY Signals
Page 339 · click to enlarge
Page 339

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(e) Acknowledge signal (ACK)

The acknowledge signal is used to check serial data reception between transmitter and receiver.

Figure 17-18. Acknowledge Signal

[When output in synchronization with 11th clock SCK0]

SCK0

8 9 10 11

SB0 (SB1)

ACK

[When output in synchronization with 9th clock SCK0]

SCK0

SB0 (SB1)

ACK

Remark The brokens lines indicate the READY state.

The acknowledge signal is one-shot pulse to be generated at the falling edge of SCK0 after 8-bit data

transfer. It can be positioned anywhere and can be synchronized with any clock SCK0.

After 8-bit data transmission, the transmitter checks whether the receiver has returned the acknowledge

signal. If the acknowledge signal is not returned for the preset period of time after data transmission,

it can be judged that data reception has not been carried out correctly.

(f) Busy signal (BUSY) and ready signal (READY)

The BUSY signal is intended to report to the master device that the slave device is preparing for data

transmission/reception.

The READY signal is intended to report to the master device that the slave device is ready for data

transmission/reception.

Figure 17-19. BUSY and READY Signals

SCK0

SB0 (SB1) BUSY

READY ACK

In SBI, the slave device notifies the master device of the busy state by setting SB0 (SB1) line to the

low level.

The BUSY signal output follows the acknowledge signal output from the master or slave device. It is

set/reset at the falling edge of SCK0. When the BUSY signal is reset, the master device automatically

terminates the output of SCK0 serial clock.

When the BUSY signal is reset and the READY signal is set, the master device can start the next transfer.

generation to the falling edge of the next serial clock (SCK0). If WUP is set to 1 in this

period, BUSY will not be released. Therefore, before setting WUP to 1, clear BUSY and

then check that SB0 (SB1) pin has become high level.

Page 340 of the NEC PD78076Y user manual — R/W
Page 340 · click to enlarge
Page 340

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(3) Register setting

The SBI mode is set with the serial operating mode register 0 (CSIM0), the serial bus interface control register

(SBIC) and the interrupt timing specify register (SINT).

(a) Serial operating mode register 0 (CSIM0)

CSIM0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM0 to 00H.

4 3 2 1 0 Symbol

Address After Reset R/W

CSIM0 CSIE0 COI WUP CSIM04 CSIM03 CSIM02 CSIM01 CSIM00

FF60H 00H R/WNote 1

R/W

CSIM01

CSIM00

Serial Interface Channel 0 Clock Selection

Input Clock to SCK0 pin from off-chip

8-bit timer register 2 (TM2) output

1 Clock specified with bits 0 to 3 of timer clock select register 3 (TCL3)

R/W CSIM

CSIM

CSIM

02 PM25 P25 PM26 P26 PM27 P27 Operation

Mode Start Bit SI0/SB0/P25

SO0/SB1/P26

SCK0/P27

3-wire serial I/O mode (See 17.4.2 3-wire serial I/O mode operation.)

SB1 (N-ch open-drain input/output)

MSB

SCK0 (CMOS

SB0 (N-ch open-drain input/output)

2-wire serial I/O mode (see 17.4.4 2-wire serial I/O mode operation.)

R/W

WUP

Wake-up Function ControlNote 3

Interrupt request signal generation with each serial transfer in any mode

Interrupt request signal generation when the address received after bus release (when CMDD = RELD = 1) matches the slave address register (SVA) data in SBI mode

R

COI

Slave Address Comparison Result FlagNote 4

Slave address register (SVA) not equal to serial I/O shift register 0 (SIO0) data

Slave address register (SVA) equal to serial I/O shift register 0 (SIO0) data

R/W

CSIE0

Serial Interface Channel 0 Operation Control

2. Can be used as a port.
3. When using the wake-up function (WUP = 1), set bit 5 (SIC) of the interrupt timing specify

register (SINT) to 0.

4. When CSIE0 = 0, COI becomes 0.
Remark xDon’t care
PMxxPort mode register
PxxPort output latch
Show 9 more labels / short text on this page
Pin Function · Pin Function · Pin Function · P25 (CMOS input/output) · SBI mode · input/output) · P26 (CMOS input/output) · Operation stopped · Operation enabled
Page 341 of the NEC PD78076Y user manual — ACKT
Page 341 · click to enlarge
Page 341

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(b) Serial bus interface control register (SBIC)

SBIC is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SBIC to 00H.

Symbol

Address After Reset R/W

SBIC BSYE ACKD ACKE ACKT CMDD RELD CMDT RELT

FF61H 00H R/WNote

R/W

Used for bus release signal output. When RELT = 1, SO0 Iatch is set to 1. After SO0 latch setting, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0.

RELT

R/W

Used for command signal output. When CMDT = 1, SO0 Iatch is cleared to 0. After SO0 latch clearance, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0.

CMDT

R RELD Bus Release Detection

Set Conditions (RELD = 1) Clear Conditions (RELD = 0)

  • When transfer start instruction is executed
  • If SIO0 and SVA values do not match in address reception (when WUP = 1)
  • When CSIE0 = 0
  • When RESET input is applied
  • When bus release signal (REL) is detected

R CMDD Command Detection

Clear Conditions (CMDD = 0)

Set Conditions (CMDD = 1)

  • When transfer start instruction is executed
  • When bus release signal (REL) is detected
  • When CSIE0 = 0
  • When command signal (CMD) is detected
  • When RESET input is applied

R/W

Acknowledge signal is output in synchronization with the falling edge clock of SCK0 just after execution of the instruction to be set to (1) and, after acknowledge signal output, automatically cleared to (0). Used as ACKE = 0. Also cleared to (0) upon start of serial interface transfer or when CSIE0 = 0.

ACKT

R/W

ACKE Acknowledge Signal Output Control

0 Acknowledge signal automatic output disable (output with ACKT enable)

SCK0 (automatically output when ACKE = 1). Before completion of transfer

Acknowledge signal is output in synchronization with the 9th clock falling edge of

Acknowledge signal is output in synchronization with falling edge clock

After completion of transfer

of SCK0 just after execution of the instruction to be set to 1 (automatically output when ACKE = 1). However, not automatically cleared to 0 after acknowledge signal output.

Remarks 1. Bits 0, 1, and 4 (RELT, CMDT, and ACKT) are 0 when read after data setting.

2. CSIE0 : Bit 7 of serial operating mode register 0 (CSIM0)
Page 342 of the NEC PD78076Y user manual — 17.4.3 SBI mode operation
Page 342 · click to enlarge
Page 342

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

R ACKD Acknowledge Detection

Clear Conditions (ACKD = 0)

Set Conditions (ACKD = 1)

  • SCK0 fall immediately after the busy mode is released during the transfer start instruction execution.
  • When CSIE0 = 0
  • When RESET input is applied
  • When acknowledge signal (ACK) is detected at the rising edge of SCK0 clock after completion of transfer

BSYE Synchronizing Busy Signal Output Control

0 Disables busy signal which is output in synchronization with the falling edge of SCK0 clock just after execution of the instruction to be cleared to (0) (sets ready state).

1 Outputs busy signal at the falling edge of SCK0 clock following the acknowledge signal.

to 0.

Remark CSIE0Bit 7 of serial operating mode register 0 (CSIM0)

R/W Note

Page 343 of the NEC PD78076Y user manual — R
Page 343 · click to enlarge
Page 343

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(c) Interrupt timing specify register (SINT)

SINT is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SINT to 00H.

3 2 1 0 7 Symbol

Address After Reset R/W

SINT 0 CLD SIC SVAM 0 FF63H 00H R/WNote 1

R/W

SVAM

SVA Bit to be Used as Slave Address

Bits 0 to 7

Bits 1 to 7

R/W

SIC

INTCSI0 Interrupt Factor SelectionNote 2

CSIIF0 is set upon termination of serial interface channel 0 transfer

CSIIF0 is set upon bus release detection or termination of serial interface channel 0 transfer

R

CLD

SCK0/P27 Pin LevelNote 3

2. When using wake-up function in the SBI mode, set SIC to 0.
3. When CSIE0 = 0, CLD becomes 0.
Remark SVASlave address register
CSIIF0Interrupt request flag corresponding to INTCSI0
CSIE0Bit 7 of serial operating mode register 0 (CSIM0)

Low level · High level

Page 344 of the NEC PD78076Y user manual — CMDD
Page 344 · click to enlarge
Page 344

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(4) Various signals

Figures 17-20 to 17-25 show various signals and flag operations in the serial bus interface control register

(SBIC). Table 17-3 lists various signals in SBI.

Figure 17-20. RELT, CMDT, RELD, and CMDD Operations (Master)

Slave address write to SIO0 (Transfer Start Instruction)

SIO0

SCK0

SB0 (SB1)

RELT

CMDT

RELD

CMDD

Figure 17-21. RELD and CMDD Operations (Slave)

Write FFH to SIO0 (Transfer start instruction)

SIO0

A7 A6 A1 A0

SCK0

1 2 7 8 9

READY A7 A6 A1 A0 ACK

SB0 (SB1)

Slave address When addresses match

RELD

When addresses do not match

CMDD

Transfer start instruction

Page 345 of the NEC PD78076Y user manual — ACKT
Page 345 · click to enlarge
Page 345

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

Figure 17-22. ACKT Operation

SCK0 6

SB0 (SB1)

D2 D1 D0 ACK

ACK signal is output for a period of one clock just after setting

ACKT

When set during · this period

Page 346 of the NEC PD78076Y user manual — ACKE
Page 346 · click to enlarge
Page 346

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

Figure 17-23. ACKE Operations

(a) When ACKE = 1 upon completion of transfer

SCK0

1 2 7 8 9

SB0 (SB1)

D7 D6 D2 D1 D0 ACK

ACK signal is output at 9th clock

ACKE

When ACKE = 1 at this point

(b) When set after completion of transfer

SCK0

SB0 (SB1)

D2

D1 D0 ACK

ACK signal is output for a period of one clock just after setting

ACKE

If set during this period and ACKE = 1 at the falling edge of the next SCK0

(c) When ACKE = 0 upon completion of transfer

SCK0

1 2 7 8 9

SB0 (SB1)

D7 D6 D2 D1 D0

ACK signal is not output

ACKE

When ACKE = 0 at this point

(d) When “ACKE = 1” period is short

SCK0

SB0 (SB1)

ACK signal is not output D2 D1 D0

ACKE

If set and cleared during this period and ACKE = 0 at the falling edge of SCK0

Page 347 of the NEC PD78076Y user manual — Figure 17-24. ACKD Operations
Page 347 · click to enlarge
Page 347

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

Figure 17-24. ACKD Operations

(a) When ACK signal is output at 9th clock of SCK0

SIO0

SCK0

SB0 (SB1)

D2

D1 D0 ACK

ACKD

(b) When ACK signal is output after 9th clock of SCK0

SIO0

SCK0

SB0 (SB1)

D2 D0

D1

ACK

ACKD

(c) Clear timing when transfer start is instructed in BUSY

SIO0

SCK0

SB0 (SB1)

D2 D0 D6 D7 BUSY

D1

ACK

ACKD

Figure 17-25. BSYE Operation

SCK0

SB0 (SB1)

D2 D1 D0

ACK

BUSY

BSYE

If reset during this period and BSYE = 0 at the falling edge of SCK0

When BSYE = 1 at this point

Show 5 more labels / short text on this page
Transfer Start Instruction · Transfer Start · Transfer Start Instruction · Transfer Start · Transfer Start Instruction
Page 348 of the NEC PD78076Y user manual — (READY)
Page 348 · click to enlarge
Page 348

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

CMD signal is output

i) Transmit data is an

— Serial receive enable Slave Ready signal

Condition Effects on Flag Meaning of Signal

ii) REL signal is not

transmit data is an

mit data is an

signal output.

(2) ACKT set • ACKD set Completion of

command.

address.

  • RELT set
  • RELD set
  • CMDD clear
  • CMDD set
  • CMDT set Master Command

(BUSY) • BSYE = 1 —

(1) ACKE = 1

(1) BSYE = 0

SIO0

Table 17-3. Various Signals in SBI Mode (1/2)

D0 READY SB0 (SB1)

D0 READY SB0 (SB1)

BUSY ACK

ACK BUSY

Timing Chart Definition Signal Name Output

SCK0 “H”

“H”

SB0 (SB1)

SCK0

SB0 (SB1)

SCK0

output to SB0 (SB1) during

one-clock period of SCK0

before serial transfer start

after completion of serial

SB0 (SB1) rising edge

SB0 (SB1) falling edge

and after completion of

Low-level signal to be

Low-level signal to be

High-level signal to be

output to SB0 (SB1)

output to SB0 (SB1)

when SCK0 = 1 Master Bus release

when SCK0 = 1

(READY)

(REL)

(CMD)

(ACK)

Show 27 more labels / short text on this page
Serial receive disable · address after REL · output and trans- · to indicate that · because of · processing · reception · instruction for · (2) Execution of · data write to · (transfer start · instruction) · Output · [Synchronous BUSY output] · [Synchronous BUSY signal] · following Acknowledge · serial transfer · reception · signal · Device · Master/ · slave · Slave Busy signal · Acknowledge · signal · signal · signal
Page 349 of the NEC PD78076Y user manual — (SCK0)
Page 349 · click to enlarge
Page 349

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

Numeric values to be

When WUP = 1, an address is received. Only when the address matches the slave address register (SVA) value, CSIIF0 is set (when they do not

Condition Effects on Flag Meaning of Signal

output to serial data

slave device on the

edge of 9th clock

of SCK0)Note 1

When CSIE0 = 1,

Table 17-3. Various Signals in SBI Mode (2/2)

1 2 7 8 9 10

1 2 7 8

1 2 7 8

1 2 7 8

Timing Chart Definition Signal Name Output

REL CMD

CMD

2. In BUSY state, transfer starts after the READY state is set.

SCK0

SB0 (SB1)

SCK0

SB0 (SB1)

SCK0

SB0 (SB1)

SCK0

SB0 (SB1)

with the first eight synchronous

8-bit data to be transferred in synchronization with

SCK0 after output of REL

8-bit data to be transferred in synchronization with

8-bit data to be transferred in synchronization with

Synchronous clock to output

SCK0 after output of only

CMD signal without REL

SCK0 without output of

REL and CMD signals

signal, etc. Address/

match, RELD is cleared).

clocks.

(SCK0)

Show 33 more labels / short text on this page
processed with slave · Address value of · messages to the · or master device · Timing of signal · Instructions and · slave device · serial bus · bus · CSIIF0 set (rising · instruction)Note 2 · instruction for · Output · execution of · data write to · SIO0 (serial · transfer start · command/data are transferred · address/command/data, ACK · signal, synchronous BUSY · and CMD signals · signal output · Device · Master · Master · Master Commands · Master/ · slave Data · Serial clock · Address · (A7 to A0) · (C7 to C0) · (D7 to D0)
Page 350 of the NEC PD78076Y user manual — R L
Page 350 · click to enlarge
Page 350

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(5) Pin configuration

The serial clock pin SCK0 and serial data bus pin SB0 (SB1) have the following configurations.

(a) SCK0 Serial clock input/output pin

Master ... CMOS and push-pull output

Slave Schmitt input

(b) SB0 (SB1) Serial data input/output dual-function pin

Both master and slave devices have an N-ch open drain output and a Schmitt input.

Because the serial data bus line has an N-ch open-drain output, an external pull-up resistor is necessary.

Figure 17-26. Pin Configuration

SCK0 SCK0

SB0 (SB1) SB0 (SB1) N-ch Open Drain N-ch Open Drain

R L

SO0

SO0

SI0

SI0

reception, write FFH to the serial I/O shift register 0 (SIO0) in advance. The N-ch open-drain

can be high-impedance state at any time of transfer. However, when the wake-up function

specify bit (WUP) = 1, the N-ch open-drain output is always high-impedance state. Thus,

it is not necessary to write FFH to SIO0.

Show 8 more labels / short text on this page
Slave Device · Master Device · (Clock Output) · Clock Output · Clock Input · Serial Clock · (Clock Input) · Serial Data Bus
Page 351 of the NEC PD78076Y user manual — (8) Communication operation
Page 351 · click to enlarge
Page 351

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(6) Address match detection method

In the SBI mode, a particular slave device can be selected by transmitting slave address from the master

device.

Address match detection can be automatically executed by hardware. With slave address register, CSIIF0

is set only when the wake-up function specify bit (WUP) = 1 and the address transmitted from the master

device matches the value set to SVA.

When bit 5 (SIC) of the interrupt timing specify register (SINT) is set (1), the wake-up function does not

operate even if WUP is set (1) (the interrupt request signal is generated when a bus release is detected).

When using the wake-up function, clear SIC to 0.

after bus release (RELD = 1).

For this match detection, match interrupt request (INTCSI0) of the address to be

generated with WUP = 1 is normally used. Thus, execute selection/non-selection

detection by slave address when WUP = 1.

2. When detecting selection/non-selection without the use of interrupt request with WUP

= 0, do so by means of transmission/reception of the command preset by program

instead of using the address match detection method.

(7) Error detection

In the SBI mode, the serial bus SB0 (SB1) status being transmitted is fetched into the destination device,

that is, the serial I/O shift register 0 (SIO0). Thus, transmit errors can be detected in the following way.

(a) Method of comparing SIO0 data before transmission to that after transmission

In this case, if two data differ from each other, a transmit error is judged to have occurred.

(b) Method of using the slave address register (SVA)

Transmit data is set to both SIO0 and SVA and is transmitted. After termination of transmission, COI

bit (match signal coming from the address comparator) of the serial operating mode register 0 (CSIM0)

is tested. If “1”, normal transmission is judged to have been carried out. If “0”, a transmit error is judged

to have occurred.

(8) Communication operation

In the SBI mode, the master device selects normally one slave device as communication target from among

two or more devices by outputting an “address” to the serial bus.

After the communication target device has been determined, commands and data are transmitted/received

and serial communication is realized between the master and slave devices.

Figures 17-27 to 17-30 show data communication timing charts.

Shift operation of the serial I/O shift register 0 (SIO0) is carried out at the falling edge of serial clock (SCK0).

Transmit data is latched into the SO0 latch and is output with MSB set as the first bit from the SB0/P25 or

SB1/P26 pin. Receive data input to the SB0 (or SB1) pin at the rising edge of SCK0 is latched into the SIO0.

Page 352 of the NEC PD78076Y user manual — CMDD
Page 352 · click to enlarge
Page 352

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

READY

BUSY

BUSY

A7 A6 A5 A4 A3 A2 A1 A0 ACK BUSY SB0 (SB1) Pin

(Preparation for the Next Serial Transfer)

WUP<- 0 ACKT

Figure 17-27. Address Transmission from Master Device to Slave Device (WUP = 1)

to SIO0 Interrupt Servicing

(When SVA = SIO0)

1 2 3 4 5 6 7 8 9 SCK0 Pin

CMDD

RELD

CMDD

CMDT

Master Device Processing (Transmitter)

Slave Device Processing (Receiver)

Show 21 more labels / short text on this page
Set SCK0 · Stop Hardware Operation · Clear · Clear · Generation ACKD · Serial Reception BUSY · Output · Generation ACK · Output Hardware Operation · Set Program Processing · Serial Transmission INTCSI0 · Set INTCSI0 · Address · Set Write · Clear CMDD · Set · Set CMDT · Set · Set RELT · Program Processing · Transfer Line
Page 353 of the NEC PD78076Y user manual — CMDD
Page 353 · click to enlarge
Page 353

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

READY

BUSY

BUSY

C7 C6 C5 C4 C3 C2 C1 C0 ACK BUSY SB0 (SB1) Pin

(Preparation for the Next Serial Transfer)

Set Serial Reception BUSY

ACKT

to SIO0 Interrupt Servicing

Figure 17-28. Command Transmission from Master Device to Slave Device

INTCSI0

1 2 3 4 5 6 7 8 9 SCK0 Pin

CMDD

CMDT

Master Device Processing (Transmitter)

Slave Device Processing (Receiver)

Show 16 more labels / short text on this page
Set SCK0 · Stop Hardware Operation · Clear SIO0 · Clear · Generation ACKD · Output · Set Program Processing · Generation ACK · Output Hardware Operation · Read Command · analysis · Serial Transmission INTCSI0 · Command · Set Write · Program Processing · Transfer Line
Page 354 of the NEC PD78076Y user manual — ACKT
Page 354 · click to enlarge
Page 354

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

READY

BUSY

BUSY

(Preparation for the Next Serial Transfer)

D7 D6 D5 D4 D3 D2 D1 D0 ACK BUSY SB0 (SB1) Pin

to SIO0 Interrupt Servicing

ACKT

Figure 17-29. Data Transmission from Master Device to Slave Device

INTCSI0

1 2 3 4 5 6 7 8 9 SCK0 Pin

Master Device Processing (Transmitter)

Slave Device Processing (Receiver)

Show 16 more labels / short text on this page
Set SCK0 · Stop Hardware Operation · Clear SIO0 · Clear · Generation ACKD · Serial Reception BUSY · Output · Set Program Processing · Generation ACK · Output Hardware Operation · Serial Transmission INTCSI0 · Read · Data · Write · Program Processing · Transfer Line
Page 355 of the NEC PD78076Y user manual — SCK0
Page 355 · click to enlarge
Page 355

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

READY BUSY D7 D6

Read Receive data processing FFH Write

READY

BUSY

D7 D6 D5 D4 D3 D2 D1 D0 ACK BUSY SB0 (SB1) Pin

ACKT

Figure 17-30. Data Transmission from Slave Device to Master Device

INTCSI0

1 2 3 4 5 6 7 8 9 SCK0 Pin

SCK0

BUSY

Master Device Processing (Receiver)

Slave Device processing (Transmitter)

Show 23 more labels / short text on this page
Reception Hardware Operation · Output Serial · Write · to SIO0 · Clear · Serial Transmission BUSY · Output · to SIO0 · Generation ACKD · Set Hardware Operation · Generation ACK · Set SIO0 · Serial Reception INTCSI0 · Data · FFH Write · to SIO0 · Stop · Write · to SIO0 · Clear · Program Processing · Program Processing · Transfer Line
Page 356 of the NEC PD78076Y user manual — (11) SBI mode precautions
Page 356 · click to enlarge
Page 356

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(9) Transfer start

Serial transfer is started by setting transfer data to the serial I/O shift register 0 (SIO0) when the following

two conditions are satisfied.

  • Serial interface channel 0 operation control bit (CSIE0) = 1
  • Internal serial clock is stopped or SCK0 is at high level after 8-bit serial transfer.
2. Because the N-ch open-drain output must be high-impedance state for data reception,

write FFH to SIO0 in advance.

However, when the wake-up function specify bit (WUP) = 1, the N-ch open-drain output

is always high-impedance state. Thus, it is not necessary to write FFH to SIO0.

3. If data is written to SIO0 when the slave is busy, the data is not lost.

When the busy state is cleared and SB0 (or SB1) input is set to the high level (READY)

state, transfer starts.

Upon end of 8-bit transfer, serial transfer automatically stops and the interrupt request flag (CSIIF0) is set.

After RESET input, perform the following settings to the pins used as data input/output (SB0 or SB1) before

serial transfer of the first byte.

Set 1 to the output latch of P25 and P26

Set 1 to bit 0 (RELT) of the serial bus interface control register (SBIC).

Set 0 to the output latch of P25 and P26, to which 1 has been set.

(10) How to detect the busy state in a slave

When device is in the master mode, follow the procedure below to judge whether slave device is in the busy

state or not.

Detect acknowledge signal (ACK) or interrupt request signal generation.

Set the port mode register PM25 (or PM26) of the SB0/P25 (or SB1/P26) pin into the input mode.

Read out the pin state (when the pin level is high, the READY state is set).

After the detection of the READY state, set the port mode register to 0 and return to the output mode.

(11) SBI mode precautions

(a) Slave selection/non-selection is detected by match detection of the slave address received after bus

release (RELD = 1).

For this match detection, match interrupt (INTCSI0) of the address to be generated with WUP = 1 is normally

used. Thus, execute selection/non-selection detection by slave address when WUP = 1.

(b) When detecting selection/non-selection without the use of interrupt with WUP = 0, do so by means of

transmission/reception of the command preset by program instead of using the address match detection

method.

(c) In the SBI mode, the BUSY signal continues to be output after BUSY clear instruction generation to the

falling edge of the next serial clock (SCK0). If WUP is set to 1 in this period, BUSY will not be released.

Therefore, before setting WUP to 1, clear BUSY and then check that SB0 (SB1) pin has become high

level.

Page 357 of the NEC PD78076Y user manual — Figure 17-31. Serial Bus Configuration Example Using 2-Wire Serial I/O Mode
Page 357 · click to enlarge
Page 357

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(d) For pins which are to be used for data input/output, be sure to carry out the following settings before

serial transfer of the 1st byte after RESET input.

Set 1 to the output latch of P25 and P26

Set 1 to bit 0 (RELT) of the serial bus interface control register (SBIC).

Set 0 to the output latch of P25 and P26, to which 1 has been set.

(e) If the SB0 (SB1) line changes from low level to high level or from high level to low level while the SCK0

line is at high level, it is recognized as either a bus release signal or a command signal. Therefore,

if the changing timing of bus fluctuates because of the wiring capacitance, etc., this may be wrongly

interpreted as a bus release signal (or a command signal) even while data is being transmitted. Care

should be taken in the wiring.

17.4.4 2-wire serial I/O mode operation

The 2-wire serial I/O mode can cope with any communication format by program.

Communication is basically carried out with two lines of serial clock (SCK0) and serial data input/output (SB0

or SB1).

Figure 17-31. Serial Bus Configuration Example Using 2-Wire Serial I/O Mode

V DD V DD

SCK0

SCK0

SB0 (SB1)

SB0 (SB1)

Master · Slave

Page 358 of the NEC PD78076Y user manual — R/W
Page 358 · click to enlarge
Page 358

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(1) Register setting

The 2-wire serial I/O mode is set with the serial operating mode register 0 (CSIM0), the serial bus interface

control register (SBIC), and the interrupt timing specify register (SINT).

(a) Serial operating mode register 0 (CSIM0)

CSIM0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM0 to 00H.

4 3 2 1 0 Symbol

Address After Reset R/W

CSIM0 CSIE0 COI WUP CSIM04 CSIM03 CSIM02 CSIM01 CSIM00

FF60H 00H R/WNote 1

R/W

CSIM01

CSIM00

Serial Interface Channel 0 Clock Selection

Input Clock to SCK0 pin from off-chip

8-bit timer register 2 (TM2) output

1 Clock specified with bits 0 to 3 of timer clock select register 3 (TCL3)

R/W CSIM

CSIM

CSIM

02 PM25 P25 PM26 P26 PM27 P27 Operation

Mode Start Bit SI0/SB0/P25

SO0/SB1/P26

SCK0/P27

3-wire Serial I/O mode (See 17.4.2 3-wire serial I/O mode operation.)

SBI mode (See 17.4.3 SBI mode operation.)

SB1 (N-ch open-drain input/output)

2-wire serial l/O mode

MSB

SB0 (N-ch open-drain input/output)

R/W

WUP

Wake-up Function ControlNote 3

Interrupt request signal generation with each serial transfer in any mode

Interrupt request signal generation when the address received after bus release (when CMDD = RELD = 1) matches the slave address register (SVA) data in SBI mode

R

COI

Slave Address Comparison Result FlagNote 4

Slave address register (SVA) not equal to serial I/O shift register 0 (SIO0) data

Slave address register (SVA) equal to serial I/O shift register 0 (SIO0) data

R/W

CSIE0

Serial Interface Channel 0 Operation Control

2. Can be used freely as port function.
3. Set WUP to 0 when the 2-wire serial I/O mode is selected.
4. When CSIE0 = 0, COI becomes 0.
Remark xDon’t care
PMxxPort mode register
PxxPort output latch
Show 9 more labels / short text on this page
Pin Function · Pin Function · Pin Function · 0 SCK0 (N-ch · P25 (CMOS input/output · open-drain input/output) 1 · P26 (CMOS input/output) · Operation stopped · Operation enabled
Page 359 of the NEC PD78076Y user manual — FF61H 00H R/W
Page 359 · click to enlarge
Page 359

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(b) Serial bus interface control register (SBIC)

SBIC is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SBIC to 00H.

Symbol

Address After Reset R/W

SBIC BSYE ACKD ACKE ACKT CMDD RELD CMDT RELT

FF61H 00H R/W

RELT When RELT = 1, SO0 Iatch is set to 1. After SO0 Iatch setting, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0. R/W

CMDT When CMDT = 1, SO0 Iatch is cleared to 0. After SO0 latch clearance, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0. R/W

Remark CSIE0Bit 7 of serial operating mode register 0 (CSIM0)
Page 360 of the NEC PD78076Y user manual — R
Page 360 · click to enlarge
Page 360

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(c) Interrupt timing specify register (SINT)

SINT is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SINT to 00H.

3 2 1 0 7 Symbol

Address After Reset R/W

SINT 0 CLD SIC 0 FF63H 00H R/WNote 1

SVAM

R/W

SIC

INTCSI0 Interrupt Factor Selection

CSIIF0 is set upon termination of serial interface channel 0 transfer

CSIIF0 is set upon bus release detection or termination of serial interface channel 0 transfer

R

CLD

SCK0/P27 Pin LevelNote 2

2. When CSIE0 = 0, CLD becomes 0.
Remark CSIIF0Interrupt request flag corresponding to INTCSI0
CSIE0Bit 7 of serial operating mode register 0 (CSIM0)

Low level · High level

Page 361 of the NEC PD78076Y user manual — Figure 17-33. RELT and CMDT Operations
Page 361 · click to enlarge
Page 361

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(2) Communication operation

The 2-wire serial I/O mode is used for data transmission/reception in 8-bit units. Data transmission/reception

is carried out bit-wise in synchronization with the serial clock.

Shift operation of the serial I/O shift register 0 (SIO0) is carried out in synchronization with the falling edge

of the serial clock (SCK0). The transmit data is held in the SO0 latch and is output from the SB0/P25 (or

SB1/P26) pin on an MSB-first basis. The receive data input from the SB0 (or SB1) pin is latched into the

SIO0 at the rising edge of SCK0.

Upon termination of 8-bit transfer, the SIO0 operation stops automatically and the interrupt request flag

(CSIIF0) is set.

Figure 17-32. 2-Wire Serial I/O Mode Timings

1 2 3 4 5 6 7 8 SCK0

D7 D6 D5 D4 D3 D2 D1 D0 SB0 (SB1)

CSIIF0

Transfer Start at the Falling Edge of SCK0

The SB0 (or SB1) pin specified for the serial data bus is an N-ch open-drain input/output pin and thus it must

be externally connected to a pull-up resistor. Because it is necessary to set the N-ch open-drain output to

high-impedance state for data reception, write FFH to SIO0 in advance.

The SB0 (or SB1) pin generates the SO0 latch status and thus the SB0 (or SB1) pin output status can be

manipulated by setting bit 0 (RELT) and bit 1 (CMDT) of the serial bus interface control register (SBIC).

However, do not carry out this manipulation during serial transfer.

Control the SCK0 pin output level in the output mode (internal system clock mode) by manipulating the P27

output latch (refer to 17.4.5 SCK0/P27 pin output manipulation).

(3) Other signals

Figure 17-33 shows RELT and CMDT operations.

Figure 17-33. RELT and CMDT Operations

RELT

CMDT

End of Transfer · SO0 Latch

Page 362 of the NEC PD78076Y user manual — (b) Method of using the slave address register (SVA)
Page 362 · click to enlarge
Page 362

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

(4) Transfer start

Serial transfer is started by setting transfer data to the serial I/O shift register 0 (SIO0) when the following

two conditions are satisfied.

  • Serial interface channel 0 operation control bit (CSIE0) = 1
  • Internal serial clock is stopped or SCK0 is at high level after 8-bit serial transfer.
2. Because the N-ch transistor must be set N-ch open-drain output to high-impedance

state for data reception, write FFH to SIO0 in advance.

Upon termination of 8-bit transfer, serial transfer automatically stops and the interrupt request flag (CSIIF0)

is set.

(5) Error detection

In the 2-wire serial I/O mode, the serial bus SB0 (SB1) status being transmitted is fetched into the destination

device, that is, the serial I/O shift register 0 (SIO0). Thus, transmit error can be detected in the following

way.

(a) Method of comparing SIO0 data before transmission to that after transmission

In this case, if two data differ from each other, a transmit error is judged to have occurred.

(b) Method of using the slave address register (SVA)

Transmit data is set to both SIO0 and SVA and is transmitted. After termination of transmission, COI

bit (match signal coming from the address comparator) of the serial operating mode register 0 (CSIM0)

is tested. If “1”, normal transmission is judged to have been carried out. If “0”, a transmit error is judged

to have occurred.

Page 363 of the NEC PD78076Y user manual — Figure 17-34. SCK0/P27 Pin Configuration
Page 363 · click to enlarge
Page 363

CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (µPD78078 SUBSERIES)

17.4.5 SCK0/P27 pin output manipulation

Because the SCK0/P27 pin incorporates an output latch, static output is also possible by software in addition

to normal serial clock output.

P27 output latch manipulation enables setting any value to SCK0 by software (SI0/SB0 and SO0/SB1 pin to be

controlled with the RELT and CMDT bits of the serial bus interface control register (SBIC)).

SCK0/P27 pin output manipulating procedure is described below.

(1) Set the serial operating mode register 0 (CSIM0) (SCK0 pin enabled for serial operation in the output mode).

SCK0 = 1 with serial transfer suspended.

(2) Manipulate the P27 output latch with a bit manipulation instruction.

Figure 17-34. SCK0/P27 Pin Configuration

Set by bit manipulation instruction

To Internal Circuit SCK0/P27 P27 Output

SCK0 (1 when transfer stops)

When CSIE0 = 1

From Serial Clock Control Circuit

and CSIM01 and CSIM00 are 1 and 0, or 1 and 1.

Latch

Page 364 of the NEC PD78076Y user manual — [MEMO]
Page 364 · click to enlarge
Page 364

[MEMO]

Page 365 of the NEC PD78076Y user manual — UART
Page 365 · click to enlarge
Page 365

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 ( µ PD78078Y Subseries)

The µPD78078Y Subseries incorporates three channels of serial interfaces. Differences between channels 0,

1, and 2 are as follows (Refer to CHAPTER 19 SERIAL INTERFACE CHANNEL 1 for details of the serial interface

channel 1. Refer to CHAPTER 20 SERIAL INTERFACE CHANNEL 2 for details of the serial interface channel 2).

Table 18-1. Differences between Channels 0, 1, and 2

Serial Transfer Mode Channel 0

fXX/2, fXX/22, fXX/23, fXX/

fXX/2, fXX/22, fXX/23, fXX/

24, fXX/25, fXX/26, fXX/27,

24, fXX/25, fXX/26, fXX/27,

fXX/28, external clock,

fXX/28, external clock,

as the start bit

as the start bit

as the start bit

(CSIIF0)

(CSIIF1)

(SRIF)

I2C bus (Inter IC Bus)

UART

Show 28 more labels / short text on this page
Channel 1 · Channel 2 · External clock, baud · Clock selection · rate generator output · TO2 output · TO2 output · MSB/LSB switchable · 3-wire serial I/O · MSB/LSB switchable · MSB/LSB switchable · Transfer method · Automatic transmit/ · receive function · Serial transfer end · Serial transfer end · Serial transfer end · Transfer end flag · interrupt request flag · interrupt request flag · interrupt request flag · Use possible · None · 2-wire serial I/O · None · None · Use possible · (Asynchronous serial interface)
Page 366 of the NEC PD78076Y user manual — (3) 2-wire serial I/O mode (MSB-first)
Page 366 · click to enlarge
Page 366

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

18.1 Serial Interface Channel 0 Functions

Serial interface channel 0 employs the following four modes.

  • Operation stop mode
  • 3-wire serial I/O mode
  • 2-wire serial I/O mode
  • I 2 C (Inter IC) bus mode

of the serial interface channel 0 is enabled. Stop the serial operation before changing the

operation mode.

(1) Operation stop mode

This mode is used when serial transfer is not carried out. Power consumption can be reduced.

(2) 3-wire serial I/O mode (MSB-/LSB-first selectable)

This mode is used for 8-bit data transfer using three lines, one each for serial clock (SCK0), serial output

(SO0) and serial input (SI0). This mode enables simultaneous transmission/reception and therefore reduces

the data transfer processing time.

The start bit of transferred 8-bit data is switchable between MSB and LSB, so that devices can be connected

regardless of their start bit recognition.

This mode should be used when connecting with peripheral I/O devices or display controllers which

incorporate a conventional synchronous clocked serial interface as is the case with the 75X/XL, 78K, and

17K Series.

(3) 2-wire serial I/O mode (MSB-first)

This mode is used for 8-bit data transfer using two lines of serial clock (SCK0) and serial data bus (SB0

or SB1).

This mode enables to cope with any one of the possible data transfer formats by controlling the SCK0 level

and the SB0 or SB1 output level. Thus, the handshake line previously necessary for connection of two or

more devices can be removed, resulting in the increased number of available input/output ports.

Page 367 of the NEC PD78076Y user manual — Figure 18-1. Serial Bus Configuration Example Using I 2 C Bus
Page 367 · click to enlarge
Page 367

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(4) I 2 C (Inter IC) bus mode (MSB-first)

This mode is used for 8-bit data transfer with two or more devices using two lines of serial clock (SCL) and

serial data bus (SDA0 or SDA1).

This mode is in compliance with the I2C bus format. In this mode, the transmitter outputs three kinds of data

onto the serial data bus“start condition”, “data”, and “stop condition”, to be actually sent or received. The

receiver automatically distinguishes the received data into “start condition”, “data”, or “stop condition”, by

hardware.

Figure 18-1. Serial Bus Configuration Example Using I 2 C Bus

V DD V DD

SCL

SCL

SDA0 (SDA1)

SDA0 (SDA1)

SCL

SDA0 (SDA1)

SCL

SDA0 (SDA1)

Show 4 more labels / short text on this page
Master CPU · Slave CPU1 · Slave CPU2 · Slave CPUn
Page 368 of the NEC PD78076Y user manual — Table 18-2. Serial Interface Channel 0 Configuration
Page 368 · click to enlarge
Page 368

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

18.2 Serial Interface Channel 0 Configuration

Serial interface channel 0 consists of the following hardware.

Table 18-2. Serial Interface Channel 0 Configuration

Serial I/O shift register 0 (SIO0)

Slave address register (SVA)

Timer clock select register 3 (TCL3)

Serial operating mode register 0 (CSIM0)

Control register Serial bus interface control register (SBIC)

Interrupt timing specify register (SINT)

Port mode register 2 (PM2)Note

Diagram of P22 and P27.

Item Configuration · Register

Page 369 of the NEC PD78076Y user manual — Figure 18-2. Serial Interface Channel 0 Block Diagram
Page 369 · click to enlarge
Page 369

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

Figure 18-2. Serial Interface Channel 0 Block Diagram

NEC PD78076Y — Figure 18-2. Serial Interface Channel 0 Block Diagram diagram (page 369)
Fig. 20 · Figure 18-2. Serial Interface Channel 0 Block Diagra…

Remark Output Control performs selection between CMOS output and N-ch open-drain output.

Page 370 of the NEC PD78076Y user manual — (5) Serial clock control circuit
Page 370 · click to enlarge
Page 370

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(1) Serial I/O shift register 0 (SIO0)

This is an 8-bit register to carry out parallel-serial conversion and to carry out serial transmission/reception (shift operation) in synchronization with the serial clock.

SIO0 is set with an 8-bit memory manipulation instruction. When bit 7 (CSIE0) of serial operating mode register 0 (CSIM0) is 1, writing data to SIO0 starts serial

operation. In transmission, data written to SIO0 is output to the serial output (SO0) or serial data bus (SB0/SB1). In

reception, data is read from the serial input (SI0) or SB0/SB1 to SIO0. Note that, if a bus is driven in the I2C bus mode or 2-wire serial I/O mode, the bus pin must serve for both

input and output. Therefore, the transmission N-ch open-drain output of the device which will start reception of data must be set to high-impedance state beforehand. Consequently, write FFH to SIO0 in advance.

In the I2C bus mode, set SIO0 to FFH with bit 7 (BSYE) of the serial bus interface control register (SBIC) set to 0.

RESET input makes SIO0 undefined.

operation mode register 0 (CSIM0)) = 1. Data can be received when using the wake-up function (WUP = 1) even if write instruction to SIO0 is not executed. For the wake-up

function, refer to 18.4.4 (1) (c) Wake-up function.

(2) Slave address register (SVA)

This is an 8-bit register to set the slave address value for connection of a slave device to the serial bus. SVA is set with an 8-bit memory manipulation instruction. This register is not used in the 3-wire serial

I/O mode. The master device outputs a slave address for selection of a particular slave device to the connected slave

device. These two data (the slave address output from the master device and the SVA value) are compared with an address comparator. If they match, the slave device has been selected. In that case, bit 6 (COI)

of serial operating mode register 0 (CSIM0) becomes 1. Address of the data of LSB-masked high-order 7 bits can be compared by setting bit 4 (SVAM) of the interrupt

timing specify register (SINT). If no matching is detected in address reception, bit 2 (RELD) of the serial bus interface control register (SBIC)

is cleared to 0. In the I2C bus mode, when bit 5 (WUP) of CSIM0 is set (1), the wake-up function can be used. In this case, the interrupt request signal (INTCSI0) is generated if the slave address output from the

master and the SVA value match (the interrupt request signal is generated also when a stop condition is detected). This interrupt request enables to recognize the generation of the communication request from

the master device. Set SIC to 1 when using the wake-up function. Further, when SVA transmits data as master or slave device in the the I2C bus mode or 2-wire serial I/O

mode, errors are detected if any. RESET input makes SVA undefined.

(3) SO0 latch

This latch holds SI0/SB0/SDA0/P25 and SO0/SB1/SDA1/P26 pin levels. It can be directly controlled by

software.

(4) Serial clock counter

This counter counts the serial clocks to be output and input during transmission/reception and to check

whether 8-bit data has been transmitted/received.

(5) Serial clock control circuit

This circuit controls serial clock supply to the serial I/O shift register 0 (SIO0). When the internal system clock is used, the circuit also controls clock output to the SCK0/SCL/P27 pin.

Page 371 of the NEC PD78076Y user manual — Table 18-3. Serial Interface Channel 0 Interrupt Request Signal Generation
Page 371 · click to enlarge
Page 371

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(6) Interrupt request signal generator

This circuit controls interrupt request signal generation. It generates interrupt request signals according to

the settings of interrupt timing specification register (SINT) bits 0 and 1 (WAT0, WAT1) and serial operation

mode register 0 (CSIM0) bit 5 (WUP), as shown in Table 18-3.

(7) Acknowledge output circuit and stop condition/start condition/acknowledge detector

These two circuits output and detect various control signals in the I2C mode.

These do not operate in the 3-wire serial I/O mode and 2-wire serial I/O mode.

Table 18-3. Serial Interface Channel 0 Interrupt Request Signal Generation

Serial Transfer Mode BSYE WUP WAT1 WAT0 ACKE Description

3-wire or 2-wire serial I/O mode 0 An interrupt request signal is generated each

time 8 serial clocks are counted.

Other than above Setting prohibited

I2C bus mode (transmit) 0 0 1 0 0 An interrupt request signal is generated each time

8 serial clocks are counted (8-clock wait).

Normally, during transmission the settings WAT21,

WAT0 = 1, 0, are not used. They are used only

when wanting to coordinate receive time and

processing systematically using software. ACK

information is generated by the receiving side,

thus ACKE should be set to 0 (disable).

1 1 0 An interrupt request signal is generated each

time 9 serial clocks are counted (9-clock wait).

ACK information is generated by the receiving

side, thus ACKE should be set to 0 (disable).

Other than above Setting prohibited

I2C bus mode (receive) 1 0 1 0 0 An interrupt request signal is generated each

time 8 serial clocks are counted (8-clock wait).

ACK information is output by manipulating ACKT

by software after an interrupt request signal is

generated.

1 1 0/1 An interrupt request signal is generated each

time 9 serial clocks are counted (9-clock wait).

To automatically generate ACK information,

preset ACKE to 1 before transfer start. However,

in the case of the master, set ACKE to 0

(disable) before receiving the last data.

1 After address is received, if the values of the

serial I/O shift register 0 (SI00) and the slave

address register (SVA) match and if stop condition

is detected, an interrupt request signal is generated.

To automatically generate ACK information,

preset ACKE to 1 (enable) before transfer start.

Other than above Setting prohibited

Remark BSYE: Bit 7 of serial bus interface control register (SBIC) ACKE: Bit 5 of serial bus interface control register (SBIC)

Page 372 of the NEC PD78076Y user manual — 18.3 Serial Interface Channel 0 Control Registers
Page 372 · click to enlarge
Page 372

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

18.3 Serial Interface Channel 0 Control Registers

The following four types of registers are used to control serial interface channel 0.

  • Timer clock select register 3 (TCL3)
  • Serial operating mode register 0 (CSIM0)
  • Serial bus interface control register (SBIC)
  • Interrupt timing specify register (SINT)
Page 373 of the NEC PD78076Y user manual — MCS = 1
Page 373 · click to enlarge
Page 373

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(1) Timer clock select register 3 (TCL3)

This register sets the serial clock of serial interface channel 0.

TCL3 is set with an 8-bit memory manipulation instruction.

RESET input sets TCL3 to 88H.

Figure 18-3. Timer Clock Select Register 3 Format

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

TCL3 TCL37 TCL36 TCL35 TCL34 TCL33 TCL32 TCL31 TCL30 FF43H 88H R/W

Serial Interface Channel 0 Serial Clock Selection TCL33 TCL32 TCL31 TCL30

Serial Clock in I2C Bus Mode Serial Clock in 2-Wire or 3-Wire Serial I/O Mode

MCS = 1

MCS = 0

MCS = 1

MCS = 0

fXX/25

fX/26 (78.1 kHz)

fX/22 (1.25 MHz)

fXX/26

fX/26 (78.1 kHz)

fX/27 (39.1 kHz)

fXX/22

fX/22 (1.25 MHz)

fX/23 (625 kHz)

fXX/27

fX/27 (39.1 kHz)

fX/23 (625 kHz)

fX/28 (19.5 kHz)

fXX/23

fX/24 (313 kHz)

fXX/28

fX/28 (19.5 kHz)

fX/29 (9.77 kHz)

fXX/24

fX/24 (313 kHz)

fX/25 (156 kHz)

fXX/29

fX/29 (9.77 kHz)

fX/210 (4.88 kHz)

fXX/25

fX/25 (156 kHz)

fX/26 (78.1 kHz)

fXX/210

fX/210 (4.88 kHz)

fX/211 (2.44 kHz)

fXX/26

fX/26 (78.1 kHz)

fX/27 (39.1 kHz)

fXX/211

fX/211 (2.44 kHz)

fX/212 (1.22 kHz)

fXX/27

fX/27 (39.1 kHz)

fX/28 (19.5 kHz)

fXX/212

fX/212 (1.22 kHz)

fX/213 (0.61 kHz)

fXX/28

fX/28 (19.5 kHz)

fX/29 (9.8 kHz)

Other than above Setting prohibited

Serial Interface Channel 1 Serial Clock Selection TCL37 TCL36 TCL35 TCL34

MCS = 1

MCS = 0

fX/22 (1.25 MHz)

fXX/22

fX/22 (1.25 MHz)

fX/23 (625 kHz)

fXX/23

fX/23 (625 kHz)

fX/24 (313 kHz)

fXX/24

fX/24 (313 kHz)

fX/25 (156 kHz)

fXX/25

fX/25 (156 kHz)

fX/26 (78.1 kHz)

fXX/26

fX/26 (78.1 kHz)

fX/27 (39.1 kHz)

fXX/27

fX/27 (39.1 kHz)

fX/28 (19.5 kHz)

fXX/28

fX/28 (19.5 kHz)

fX/29 (9.8 kHz)

Other than above Setting prohibited

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. MCS : Bit 0 of oscillation mode selection register (OSMS)
4. Figures in parentheses apply to operation with f X = 5.0 MHz.
Show 5 more labels / short text on this page
Setting prohibited · fXX/2 · Setting prohibited · fXX/2 · Setting prohibited
Page 374 of the NEC PD78076Y user manual — (2) Serial operating mode register 0 (CSIM0)
Page 374 · click to enlarge
Page 374

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(2) Serial operating mode register 0 (CSIM0)

This register sets serial interface channel 0 serial clock, operating mode, operation enable/stop wake-up

function and displays the address comparator match signal.

CSIM0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM0 to 00H.

operation of the serial interface channel 0 is enabled. Stop the serial operation before

changing the operation mode.

Page 375 of the NEC PD78076Y user manual — R/W
Page 375 · click to enlarge
Page 375

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

Figure 18-4. Serial Operating Mode Register 0 Format

4 3 2 1 0 Symbol

Address After Reset R/W

CSIM0 CSIE0 COI WUP CSIM04 CSIM03 CSIM02 CSIM01 CSIM00

FF60H 00H R/WNote 1

R/W

CSIM01

CSIM00

Serial Interface Channel 0 Clock Selection

Input clock to SCK0/SCL pin from off-chip

8-bit timer register 2 (TM2) output

1 Clock specified with bits 0 to 3 of timer clock select register 3 (TCL3)

R/W CSIM

CSIM

CSIM

02 PM25 P25 PM26 P26 PM27 P27 Operation

Mode Start Bit SI0/SB0/SDA0/

SO0/SB1/SDA1/

SCK0/SCL/P27

MSB

SCK0 (CMOS

LSB 1 x 0 0 0 1

2-wire serial l/O mode

or I2C bus mode

R/W

WUP

Wake-up Function ControlNote 5

Interrupt request signal generation with each serial transfer in any mode

Interrupt request signal generation when the address received after detecting start condition (when CMDD = 1) matches the slave address register (SVA) data in I2C bus mode

R

COI

Slave Address Comparison Result FlagNote 6

Slave address register (SVA) not equal to serial I/O shift register 0 (SIO0) data

Slave address register (SVA) equal to serial I/O shift register 0 (SIO0) data

R/W

CSIE0

Serial Interface Channel 0 Operation Control

2. I 2 C bus mode, the clock frequency becomes 1/16 of that output from TO2.
3. Can be used as P25 (CMOS input/output) when used only for transmission.
4. Can be used freely as port function.
5. Set bit 5 (SIC) of the interrupt timing specify register (SINT) to 1 when using the wake-up

function (WUP = 1). Do not execute a write instruction to the serial I/O shift register 0 (SIO0)

while WUP = 1.

6. When CSIE0 = 0, COI becomes 0.
Remark xDon’t care
PMxxPort mode register
PxxPort output latch
Show 16 more labels / short text on this page
P25 Pin Function · P26 Pin Function · Pin Function · SI0 (Input) · SO0 (CMOS output) · input/output) · SB1/SDA1 (N-ch open-drain · P25 (CMOS input/output) · input/output) · SCK0/SCL (N-ch open-drain · SB0/SDA0 (N-ch open-drain · input/output) 1 · P26 (CMOS input/output) · input/output) · Operation stopped · Operation enabled
Page 376 of the NEC PD78076Y user manual — ACKT
Page 376 · click to enlarge
Page 376

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(3) Serial bus interface control register (SBIC)

This register sets serial bus interface operation and displays statuses.

SBIC is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SBIC to 00H.

Figure 18-5. Serial Bus Interface Control Register Format (1/2)

Symbol

Address After Reset R/W

SBIC BSYE ACKD ACKE ACKT CMDD RELD CMDT RELT

FF61H 00H R/WNote

R/W

Used for stop condition signal output. When RELT = 1, SO0 Iatch is set to 1. After SO0 latch setting, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0.

RELT

R/W

Used for start condition signal output. When CMDT = 1, SO0 Iatch is cleared to 0. After SO0 latch clearance, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0.

CMDT

R RELD Stop Condition Detection

Set Conditions (RELD = 1) Clear Conditions (RELD = 0)

  • When transfer start instruction is executed
  • If SIO0 and SVA values do not match in address reception
  • When CSIE0 = 0
  • When RESET input is applied
  • When stop condition signal is detected

R CMDD Start Condition Detection

Clear Conditions (CMDD = 0)

Set Conditions (CMDD = 1)

  • When transfer start instruction is executed
  • When stop condition signal is detected
  • When CSIE0 = 0
  • When RESET input is applied
  • When start condition signal is detected

R/W

Used to generate the ACK signal by software when 8-clock wait mode is selected. Keeps SDA0 (SDA1) low from set instruction (ACKT = 1) execution to the next falling edge of SCL. Also cleared to 0 upon start of serial interface transfer or when CSIE0 = 0.

ACKT

Remark CSIE0Bit 7 of serial operating mode register 0 (CSIM0)
Page 377 of the NEC PD78076Y user manual — Figure 18-5. Serial Bus Interface Control Register Format (2/2)
Page 377 · click to enlarge
Page 377

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

Figure 18-5. Serial Bus Interface Control Register Format (2/2)

R/W

ACKE Acknowledge Signal Output Control

0 Disables acknowledge signal automatic output. (However, output with ACKT is enabled) Used for reception when 8-clock wait mode is selected or for transmission.Note 2

Enables acknowledge signal automatic output. Outputs acknowledge signal in synchronization with the falling edge of the 9th SCL clock cycle (automatically output when ACKE = 1). However, not automatically cleared to 0 after acknowledge signal output. Used in reception with 9-clock wait mode selected.

R ACKD Acknowledge Detection

Clear Conditions (ACKD = 0)

Set Conditions (ACKD = 1)

  • While executing the transfer start instruction
  • When CSIE0 = 0
  • When RESET input is applied
  • When acknowledge signal (ACK) is detected at the rising edge of SCL clock after completion of transfer

BSYE Control of N-ch Open-Drain Output for Transmission in I2C Bus Mode

0 Output enabled (transmission)

2. If 8-clock wait mode is selected, the acknowledge signal at reception time must be output

using ACKT.

3. The busy mode can be canceled by start of serial interface transfer or reception of address

signal. However, the BSYE flag is not cleared to 0.

4. When using the wake-up function, set BSYE to 1.
Remark CSIE0Bit 7 of serial operating mode register 0 (CSIM0)

R/W Note 3 · Output disabled (reception)

Page 378 of the NEC PD78076Y user manual — R/W
Page 378 · click to enlarge
Page 378

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(4) Interrupt timing specify register (SINT)

This register sets the bus release interrupt and address mask functions and displays the SCK0/SCL pin level

status. SINT is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SINT to 00H.

Figure 18-6. Interrupt Timing Specify Register Format (1/2)

1 0 7 Symbol

Address After Reset R/W

SINT 0 CLD SIC SVAM CLC WREL WAT1 WAT0 FF63H 00H R/WNote 1

R/W WAT0

WAT1

Wait and Interrupt Control

Generates interrupt service request at rising edge of 8th SCK0 clock cycle. (keeping clock output in high impedance)

0 Setting prohibited 1

0 Used in I2C bus mode. (8-clock wait) Generates interrupt service request at rising edge of 8th SCK0 clock cycle. (In the case of master device, makes SCL output low to enter wait state after 8 clock pulses are output. In the case of slave device, makes SCL output low to request wait state after 8 clock pulses are input.)

1 1 Used in I2C bus mode. (9-clock wait) Generates interrupt service request at rising edge of 9th SCK0 clock cycle. (In the case of master device, makes SCL output low to enter wait state after 9 clock pulses are output. In the case of slave device, makes SCL output low to request wait state after 9 clock pulses are input.)

R/W

WREL

Wait Sate Cancellation Control

0 Wait state has been cancelled.

Cancels wait state. Automatically cleared to 0 when the state is cancelled. (Used to cancel wait state by means of WAT0 and WAT1.)

R/W

Clock Level ControlNote 2

Used in I2C bus mode. Make output level of SCL pin low unless serial transfer is being performed.

Used in I2C bus mode. Make SCL pin enter high-impedance state unless serial transfer is being performed. (except for clock line which is kept high) Used to enable master device to generate start condition and stop condition signals.

2. When not using the I 2 C mode, set CLC to 0.
Page 379 of the NEC PD78076Y user manual — R
Page 379 · click to enlarge
Page 379

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

Figure 18-6. Interrupt Timing Specify Register Format (2/2)

R/W

SVAM

SVA Bit to be Used as Slave Address

Bits 0 to 7

Bits 1 to 7

R/W

SIC

INTCSI0 Interrupt Cause SelectionNote 1

CSIIF0 is set to 1 upon termination of serial interface channel 0 transfer

CSIIF0 is set to 1 upon stop condition detection or termination of serial interface channel 0 transfer

R

CLD

SCK0/SCL Pin LevelNote 2

2. When CSIE0 = 0, CLD becomes 0.
Remark SVASlave address register
CSIIF0Interrupt request flag corresponding to INTCSI0
CSIE0Bit 7 of serial operating mode register 0 (CSIM0)

Low level · High level

Page 380 of the NEC PD78076Y user manual — R/W
Page 380 · click to enlarge
Page 380

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

18.4 Serial Interface Channel 0 Operations

The following four operating modes are available to the serial interface channel 0.

  • Operation stop mode
  • 3-wire serial I/O mode
  • 2-wire serial I/O mode
  • I 2 C (Inter IC) bus mode

18.4.1 Operation stop mode

Serial transfer is not carried out in the operation stop mode. Thus, power consumption can be reduced. The serial

I/O shift register 0 (SIO0) does not carry out shift operation either and thus it can be used as ordinary 8-bit register.

In the operation stop mode, the P25/SI0/SB0/SDA0, P26/SO0/SB1/SDA1 and P27/SCK0/SCL pins can be used

as general input/output ports.

(1) Register setting

The operation stop mode is set with the serial operating mode register 0 (CSIM0).

CSIM0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM0 to 00H.

4 3 2 1 0 Symbol

Address After Reset R/W

CSIM0 CSIE0 COI WUP CSIM04 CSIM03 CSIM02 CSIM01 CSIM00 FF60H 00H R/W

R/W

CSIE0

Serial Interface Channel 0 Operation Control

Operation stopped · Operation enabled

Page 381 of the NEC PD78076Y user manual — R/W
Page 381 · click to enlarge
Page 381

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

18.4.2 3-wire serial I/O mode operation

The 3-wire serial I/O mode is valid for connection of peripheral I/O units and display controllers which incorporate

a conventional synchronous clocked serial interface as is the case with the 75X/XL, 78K, and 17K Series.

Communication is carried out with three lines of serial clock (SCK0), serial output (SO0), and serial input (SI0).

(1) Register setting

The 3-wire serial I/O mode is set with the serial operating mode register 0 (CSIM0) and serial bus interface

control register (SBIC).

(a) Serial operating mode register 0 (CSIM0)

CSIM0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM0 to 00H.

4 3 2 1 0 Symbol

Address After Reset R/W

CSIM0 CSIE0 COI WUP CSIM04 CSIM03 CSIM02 CSIM01 CSIM00

FF60H 00H R/WNote 1

R/W

Serial Interface Channel 0 Clock Selection

CSIM01

CSIM00

Input Clock to SCK0 pin from off-chip

8-bit timer register 2 (TM2) output

1 Clock specified with bits 0 to 3 of timer clock select register 3 (TCL3)

R/W CSIM

CSIM

CSIM

02 PM25 P25 PM26 P26 PM27 P27 Operation

Mode Start Bit SI0/SB0/SDA0

SO0/SB1/SDA1

SCK0/SCL/P27

MSB

SCK0 (CMOS

LSB 1 x 0 0 0 1

2-wire serial I/O mode (See 18.4.3 2-wire serial I/O mode operation.)

I2C bus mode (See 18.4.4 I2C bus mode operation.)

R/W

WUP

Interrupt request signal generation with each serial transfer in any mode

Interrupt request signal generation when the address received after detecting start condition (when CMDD = 1) matches the slave address register (SVA) data in I2C bus mode

R/W

CSIE0

Serial Interface Channel 0 Operation Control

2. Can be used as P25 (CMOS input/output) when used only for transmission.
3. Set WUP to 0 when the 3-wire serial I/O mode is selected.
Remark xDon’t care
PMxxPort mode register
PxxPort output latch
Show 10 more labels / short text on this page
/P25 Pin Function · /P26 Pin Function · Pin Function · SI0 (Input) · SO0 (CMOS output) · input/output) · or · Wake-up Function Control · Operation stopped · Operation enabled
Page 382 of the NEC PD78076Y user manual — FF61H 00H R/W
Page 382 · click to enlarge
Page 382

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(b) Serial bus interface control register (SBIC)

SBIC is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SBIC to 00H.

Symbol

Address After Reset R/W

SBIC BSYE ACKD ACKE ACKT CMDD RELD CMDT RELT

FF61H 00H R/W

RELT When RELT = 1, SO0 Iatch is set to 1. After SO0 Iatch setting, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0. R/W

CMDT When CMDT = 1, SO0 Iatch is cleared to 0. After SO0 latch clearance, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0. R/W

Remark CSIE0Bit 7 of serial operating mode register 0 (CSIM0)
Page 383 of the NEC PD78076Y user manual — Figure 18-8. RELT and CMDT Operations
Page 383 · click to enlarge
Page 383

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(2) Communication operation

The 3-wire serial I/O mode is used for data transmission/reception in 8-bit units. Bit-wise data transmission/

reception is carried out in synchronization with the serial clock.

Shift operation of the serial I/O shift register 0 (SIO0) is carried out at the falling edge of the serial clock

(SCK0). The transmitted data is held in the SO0 latch and is output from the SO0 pin. The received data

input to the SI0 pin is latched in SIO0 at the rising edge of SCK0.

Upon termination of 8-bit transfer, SIO0 operation stops automatically and the interrupt request flag (CSIIF0)

is set.

Figure 18-7. 3-Wire Serial I/O Mode Timings

SCK0 1 2 3 4 5 6 7 8

SI0

DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0

SO0 DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0

CSIIF0

Transfer Start at the Falling Edge of SCK0

The SO0 pin is a CMOS output pin and outputs current SO0 latch statuses. Thus, the SO0 pin output status

can be manipulated by setting the bit 0 (RELT) and bit 1 (CMDT) of the serial bus interface control register

(SBIC). However, do not carry out this manipulation during serial transfer.

Control the SCK0 pin output level in the output mode (internal system clock mode) by manipulating the P27

output latch (refer to 18.4.7 SCK0/SCL/P27 pin output manipulation).

(3) Other signals

Figure 18-8 shows RELT and CMDT operations.

Figure 18-8. RELT and CMDT Operations

RELT

CMDT

End of Transfer · SO0 latch

Page 384 of the NEC PD78076Y user manual — (5) Transfer start
Page 384 · click to enlarge
Page 384

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(4) MSB/LSB switching as the start bit

The 3-wire serial I/O mode enables to select transfer to start from MSB or LSB.

Figure 18-9 shows the configuration of the serial I/O shift register 0 (SIO0) and internal bus. As shown in

the figure, MSB/LSB can be read/written in reverse form.

MSB/LSB switching as the start bit can be specified with bit 2 (CSIM02) of the serial operating mode register

0 (CSIM0).

Figure 18-9. Circuit of Switching in Transfer Bit Order

SI0 Shift Register 0 (SIO0)

D Q

SO0

SCK0

Start bit switching is realized by switching the bit order for data write to SIO0. The SIO0 shift order remains

unchanged.

Thus, MSB-first and LSB-first must be switched before writing data to the shift register.

(5) Transfer start

Serial transfer is started by setting transfer data to the serial I/O shift register 0 (SIO0) when the following

two conditions are satisfied.

  • Serial interface channel 0 operation control bit (CSIE0) = 1.
  • Internal serial clock is stopped or SCK0 is a high level after 8-bit serial transfer.

Upon termination of 8-bit transfer, serial transfer automatically stops and the interrupt request flag (CSIIF0)

is set.

Show 5 more labels / short text on this page
Internal Bus · LSB-first · MSB-first Read/Write Gate · Read/Write Gate · SO0 Latch
Page 385 of the NEC PD78076Y user manual — Figure 18-10. Serial Bus Configuration Example Using 2-Wire Serial I/O Mode
Page 385 · click to enlarge
Page 385

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

18.4.3 2-wire serial I/O mode operation

The 2-wire serial I/O mode can cope with any communication format by program.

Communication is basically carried out with two lines of serial clock (SCK0) and serial data input/output (SB0

or SB1).

Figure 18-10. Serial Bus Configuration Example Using 2-Wire Serial I/O Mode

V DD V DD

SCK0

SCK0

SB0 (SB1)

SB0 (SB1)

Master · Slave

Page 386 of the NEC PD78076Y user manual — R/W
Page 386 · click to enlarge
Page 386

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(1) Register setting

The 2-wire serial I/O mode is set with the serial operating mode register 0 (CSIM0), the serial bus interface

control register (SBIC), and the interrupt timing specify register (SINT).

(a) Serial operating mode register 0 (CSIM0)

CSIM0 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM0 to 00H.

4 3 2 1 0 Symbol

Address After Reset R/W

CSIM0 CSIE0 COI WUP CSIM04 CSIM03 CSIM02 CSIM01 CSIM00

FF60H 00H R/WNote 1

R/W

CSIM01

CSIM00

Serial Interface Channel 0 Clock Selection

Input Clock to SCK0 pin from off-chip

8-bit timer register 2 (TM2) output

1 Clock specified with bits 0 to 3 of timer clock select register 3 (TCL3)

R/W CSIM

CSIM

CSIM

02 PM25 P25 PM26 P26 PM27 P27 Operation

Mode Start Bit SI0/SB0/SDA0

SO0/SB1/SDA1

SCK0/SCL/P27

3-wire Serial I/O mode (See 18.4.2 3-wire serial I/O mode operation.)

0 SCK0/SCL (N-ch open-drain

2-wire serial l/O mode

or I2C bus mode

R/W

WUP

Interrupt request signal generation with each serial transfer in any mode

Interrupt request signal generation when the address received after detecting start condition (when CMDD = 1) matches the slave address register (SVA) data in I2C bus mode

R

COI

Slave Address Comparison Result FlagNote 4

Slave address register (SVA) not equal to serial I/O shift register 0 (SIO0) data

Slave address register (SVA) equal to serial I/O shift register 0 (SIO0) data

R/W

CSIE0

Serial Interface Channel 0 Operation Control

2. Can be used freely as port function.
3. Set WUP to 0 when the 2-wire serial I/O mode is selected.
4. When CSIE0 = 0, COI becomes 0.
Remark xDon’t care
PMxxxPort mode register
PxxPort output latch
Show 13 more labels / short text on this page
/P25 Pin Function · /P26 Pin Function · Pin Function · SB1/SDA1 (N-ch open-drain · P25 (CMOS input/output · input/output) · input/output) 1 · SB0/SDA0 (N-ch open-drain · P26 (CMOS input/output) · input/output) · Wake-up Function Control · Operation stopped · Operation enabled
Page 387 of the NEC PD78076Y user manual — R
Page 387 · click to enlarge
Page 387

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(b) Serial bus interface control register (SBIC)

SBIC is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SBIC to 00H.

Symbol

Address After Reset R/W

SBIC BSYE ACKD ACKE ACKT CMDD RELD CMDT RELT

FF61H 00H R/W

RELT When RELT = 1, SO0 Iatch is set to 1. After SO0 Iatch setting, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0. R/W

CMDT When CMDT = 1, SO0 Iatch is cleared to 0. After SO0 latch clearance, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0. R/W

Remark CSIE0Bit 7 of serial operating mode register 0 (CSIM0)

(c) Interrupt timing specify register (SINT)

SINT is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SINT to 00H.

1 0 7 Symbol

Address After Reset R/W

SINT 0 CLD SIC CLC WREL WAT1 WAT0 FF63H 00H R/WNote 1

SVAM

R/W

SIC

INTCSI0 Interrupt Factor Selection

CSIIF0 is set upon termination of serial interface channel 0 transfer

CSIIF0 is set upon bus release detection or termination of serial interface channel 0 transfer

R

CLD

SCK0 Pin LevelNote 2

2. When CSIE0 = 0, CLD becomes 0.
Remark CSIIF0Interrupt request flag corresponding to INTCSI0
CSIE0Bit 7 of serial operating mode register 0 (CSIM0)

Low level · High level

Page 388 of the NEC PD78076Y user manual — CSIIF0
Page 388 · click to enlarge
Page 388

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(2) Communication operation

The 2-wire serial I/O mode is used for data transmission/reception in 8-bit units. Data transmission/reception

is carried out bit-wise in synchronization with the serial clock.

Shift operation of the serial I/O shift register 0 (SIO0) is carried out in synchronization with the falling edge

of the serial clock (SCK0). The transmit data is held in the SO0 latch and is output from the SB0/SDA0/

P25 (or SB1/SDA1/P26) pin on an MSB-first basis. The receive data input from the SB0 (or SB1) pin is latched

into SIO0 at the rising edge of SCK0.

Upon termination of 8-bit transfer, the SIO0 operation stops automatically and the interrupt request flag

(CSIIF0) is set.

Figure 18-11. 2-Wire Serial I/O Mode Timings

1 2 3 4 5 6 7 8 SCK0

D7 D6 D5 D4 D3 D2 D1 D0 SB0 (SB1)

CSIIF0

Transfer Start at the Falling Edge of SCK0

The SB0 (or SB1) pin specified for the serial data bus is an N-ch open-drain input/output and thus it must

be externally connected to a pull-up resistor. Because it is necessary to set N-ch open-drain output to high-

impedance state for data reception, write FFH to SIO0 in advance.

The SB0 (or SB1) pin generates the SO0 latch status and thus the SB0 (or SB1) pin output status can be

manipulated by setting the bit 0 (RELT) and bit 1 (CMDT) of the serial bus interface control register (SBIC).

However, do not carry out this manipulation during serial transfer.

Control the SCK0 pin output level in the output mode (internal system clock mode) by manipulating the P27

output latch (refer to 18.4.7 SCK0/SCL/P27 pin output manipulation).

End of Transfer

Page 389 of the NEC PD78076Y user manual — (b) Method of using the slave address register (SVA)
Page 389 · click to enlarge
Page 389

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(3) Other signals

Figure 18-12 shows RELT and CMDT operations.

Figure 18-12. RELT and CMDT Operations

RELT

CMDT

(4) Transfer start

Serial transfer is started by setting transfer data to the serial I/O shift register 0 (SIO0) when the following

two conditions are satisfied.

  • Serial interface channel 0 operation control bit (CSIE0) = 1
  • Internal serial clock is stopped or SCK0 is at high level after 8-bit serial transfer.
2. Because the N-ch open-drain output must be set to high-impedance state for data

reception, write FFH to SIO0 in advance.

Upon termination of 8-bit transfer, serial transfer automatically stops and the interrupt request flag (CSIIF0)

is set.

(5) Error detection

In the 2-wire serial I/O mode, the serial bus SB0 (SB1) status being transmitted is fetched into the destination

device, that is, the serial I/O shift register 0 (SIO0). Thus, transmit error can be detected in the following

way.

(a) Method of comparing SIO0 data before transmission to that after transmission

In this case, if two data differ from each other, a transmit error is judged to have occurred.

(b) Method of using the slave address register (SVA)

Transmit data is set to both SIO0 and SVA and is transmitted. After termination of transmission, COI

bit (match signal coming from the address comparator) of the serial operating mode register 0 (CSIM0)

is tested. If “1”, normal transmission is judged to have been carried out. If “0”, a transmit error is judged

to have occurred.

SO0 Latch

Page 390 of the NEC PD78076Y user manual — SCL
Page 390 · click to enlarge
Page 390

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

18.4.4 I 2 C bus mode operation

The I2C bus mode is provided for when communication operations are performed between a single master device

and multiple slave devices. This mode configures a serial bus that includes only a single master device, and is

based on the clocked serial I/O format with the addition of bus configuration functions, which allows the master

device to communicate with a number of (slave) devices using only two lines: serial clock (SCL) line and serial data

bus (SDA0 or SDA1) line. Consequently, when the user plans to configure a serial bus which includes multiple

microcontrollers and peripheral devices, using this configuration results in reduction of the required number of port

pins and on-board wires.

In the I2C bus specification, the master sends start condition, data, and stop condition signals to slave devices

through the serial data bus, while slave devices automatically detect and distinguish the type of signals due to the

signal detection function incorporated as hardware. This simplifies the application program to control I2C bus.

An example of a serial bus configuration is shown in Figure 18-13. This system below is composed of CPUs and

peripheral ICs having serial interface hardware that complies with the I2C bus specification.

drain buffers are used for the serial clock pin (SCL) and the serial data bus pin (SDA0 or SDA1) on the I2C bus.

The signals used in the I2C bus mode are described in Table 18-4.

Figure 18-13. Example of Serial Bus Configuration Using I 2 C Bus

V DD

V DD

Slave CPU1 Master CPU

SCL

SCL

SDA0 (SDA1)

SDA0 (SDA1)

SCL

SDA0 (SDA1)

SCL

SDA

Show 4 more labels / short text on this page
Serial clock · Serial data bus · Slave CPU2 · Slave IC
Page 391 of the NEC PD78076Y user manual — SDA0 (SDA1)
Page 391 · click to enlarge
Page 391

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(1) I 2 C bus mode functions

In the I2C bus mode, the following functions are available.

(a) Automatic identification of serial data

Slave devices automatically detect and identifies start condition, data, and stop condition signals sent in

series through the serial data bus.

(b) Chip selection by specifying device addresses

The master device can select a specific slave device connected to the I2C bus and communicate with it

by sending in advance the address data corresponding to the destination device.

(c) Wake-up function

When address data is sent from the master device, slave devices compare it with the value registered in

their internal slave address registers. If the values in one of the slave devices match, the slave device

internally generates an interrupt request signal to terminate the current processing and communicates

with the master device (an interrupt request generates also when a stop condition is detected). Therefore,

CPUs other than the selected slave device on the I2C bus can operate independently during the serial

communication.

(d) Acknowledge signal (ACK) control function

The master device and a slave device send and receive acknowledge signals to confirm that the serial

communication has been executed normally.

(e) Wait signal (WAIT) control function

When a slave device is preparing for data transmission or reception and requires more waiting time, the

slave device outputs a wait signal on the bus to inform the master device of the wait status.

(2) I 2 C bus definition

This section describes the format of serial data communications and functions of the signals used in the I2C

bus mode.

First, the transfer timings of the start condition, data, and stop condition signals, which are output onto the

signal data bus of the I2C bus, are shown in Figure 18-14.

Figure 18-14. I 2 C Bus Serial Data Transfer Timing

SCL

1-7 8 9 1-7 8 9 1-7 8 9

SDA0 (SDA1)

Address R/W ACK Data ACK Data ACK

The start condition, slave address, and stop condition signals are output by the master. The acknowledge

signal (ACK) is output by either the master or the slave device (normally by the device which has received

the 8-bit data that was sent). A serial clock (SCL) is continuously supplied from the master device.

Start condition · Stop condition

Page 392 of the NEC PD78076Y user manual — SDA0 (SDA1)
Page 392 · click to enlarge
Page 392

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(a) Start condition

When the SDA0 (SDA1) pin level is changed from high to low while the SCL pin is high, this transition is

recognized as the start condition signal. This start condition signal, which is created using the SCL and

SDA0 (or SDA1) pins, is output from the master device to slave devices to initiate a serial transfer.

Refer to 18.4.5 Cautions on use of I2C bus mode, for details of the start condition output.

The start condition signal is detected by hardware incorporated in slave devices.

Figure 18-15. Start Condition

H SCL

SDA0 (SDA1)

(b) Address

The 7 bits following the start condition signal are defined as an address.

The 7-bit address data is output by the master device to specify a specific slave from among those

connected to the bus line. Each slave device on the bus line must therefore have a different address.

Therefore, after a slave device detects the start condition, it compares the 7-bit address data received

and the data of the slave address register (SVA). After the comparison, only the slave device in which

the data are a match becomes the communication partner, and subsequently performs communication

with the master device until the master device sends a start condition or stop condition signal.

Figure 18-16. Address

SCL

1 2 3 4 5 6 7

SDA0 (SDA1)

A6 A5 A4 A3 A2 A1 A0 R/W

(c) Transfer direction specification

The 1 bit that follows the 7-bit address data will be sent from the master device, and it is defined as the

transfer direction specification bit. If this bit is 0, it is the master device which will send data to the slave.

If it is 1, it is the slave device which will send data to the master.

Figure 18-17. Transfer Direction Specification

SCL 8 1

2 3 4 5 6 7

SDA0 (SDA1)

A6 A5 A4 A3 A2 A1 A0 R/W

Address · Transfer direction · specification

Page 393 of the NEC PD78076Y user manual — Figure 18-19. Stop Condition
Page 393 · click to enlarge
Page 393

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(d) Acknowledge signal (ACK)

The acknowledge signal indicates that the transferred serial data has definitely been received. This

signal is used between the sending side and receiving side devices for confirmation of correct data

transfer. In principle, the receiving side device returns an acknowledge signal to the sending device

each time it receives 8-bit data. The only exception is when the receiving side is the master device and

the 8-bit data is the last transfer data; the master device outputs no acknowledge signal in this case.

The sending side that has tranferred 8-bit data waits for the acknowledge signal which will be sent from

the receiving side. If the sending side device receives the acknowledge signal, which means a successful

data transfer, it proceeds to the next processing. If this signal is not sent back from the slave device, this

means that the data sent has not been received by the slave device, and therefore the master device

outputs a stop condition signal to terminate subsequent transmissions.

Figure 18-18. Acknowledge Signal

SCL

1 2 3 4 5 6 7

SDA0 (SDA1)

A6 A5 A4 A3 A2 A1 A0 R/W

ACK

(e) Stop condition

If the SDA0 (SDA1) pin level changes from low to high while the SCL pin is high, this transition is defined

as a stop condition signal.

The stop condition signal is output from the master to the slave device to terminate a serial transfer.

The stop condition signal is detected by hardware incorporated in the slave device.

Figure 18-19. Stop Condition

“H” SCL

SDA0 (SDA1)

Page 394 of the NEC PD78076Y user manual — SCL
Page 394 · click to enlarge
Page 394

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(f) Wait signal (WAIT)

The wait signal is output by a slave device to inform the master device that the slave device is in wait

state due to preparing for transmitting or receiving data.

During the wait state, the slave device continues to output the wait signal by keeping the SCL pin low to

delay subsequent transfers. When the wait state is released, the master device can start the next transfer.

For the releasing operation of slave devices, refer to 18.4.5 Cautions on use of I2C bus mode.

Figure 18-20. Wait Signal

(a) Wait of 8 Clock Cycles

Set low because slave device drives low, though master device returns to Hi-Z state.

No wait is inserted after 9th clock cycle. (and before master device starts next transfer.)

SCL of master device

6 7 8 9 1 3 2 4

SCL of slave device

SCL

SDA0 (SDA1)

D2 D1 D0 ACK D7

D6 D5 D4

Output by manipulating ACKT

(b) Wait of 9 Clock Cycles

Set low because slave device drives low, though master device returns to Hi-Z state.

SCL of master device

6 7 8 9 2 3

SCL of slave device

SCL

D2 D1 D0 ACK D7

D6 D5

SDA0 (SDA1)

Output based on the value set in ACKE in advance

Page 395 of the NEC PD78076Y user manual — CSIE0 COI WUP CSIM04 CSIM03 CSIM02 CSIM01 CSIM00
Page 395 · click to enlarge
Page 395

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(3) Register setting

The I2C bus mode is set with the serial operating mode register 0 (CSIM0), the serial bus interface control

register (SBIC), and the interrupt timing specify register (SINT).

(a) Serial operating mode register 0 (CSIM0)

CSIM0 is set by a 1-bit or 8-bit memory manipulation instruction.

RESET input sets 00H.

4 3 2 1 0 Symbol

Address After Reset R/W

CSIM0 FF60H 00H R/WNote 1

CSIE0 COI WUP CSIM04 CSIM03 CSIM02 CSIM01 CSIM00

R/W CSIM01 CSIM00 Serial Interface Channel 0 Clock Selection

0 x Input clock from off-chip to SCL pin

1 0 8-bit timer register 2 (TM2) outputNote 2

1 1 Clock specified with bits 0 to 3 of timer clock select register 3 (TCL3)

R/W CSIM CSIM CSIM PM25 P25 PM26 P26 PM27 P27 Operation Start SI0/SB0/SDA0/ SO0/SB1/SDA1/ SCK0/SCL/P27 04 03 02 mode bit P25 pin function P26 pin function pin function

0 x 3-wire serial I/O mode (see 18.4.2 3-wire serial I/O mode operation)

1 1 0 x x 0 0 0 1 2-wire MSB P25 SB1/SDA1 SCK0/SCL

1 1 1 0 0 x x 0 1 2-wire MSB SB0/SDA0 P26 SCK0/SCL

R/W WUP Wake-up Function ControlNote 4

0 Interrupt request signal generation with each serial transfer in any mode

1 In I2C bus mode, interrupt request signal is generated when the address data received after start condition detection (when CMDD = 1) matches data in slave address register (SVA).

R COI Slave Address Comparison Result FlagNote 5

0 Slave address register (SVA) not equal to data in serial I/O shift register 0 (SIO0)

1 Slave address register (SVA) equal to data in serial I/O shift register 0 (SIO0)

R/W CSIE0 Serial Interface Channel 0 Operation Control

0 Stops operation.

1 Enables operation.

2. In the I 2 C bus mode, the clock frequency is 1/16 of the clock frequency output by TO2.
3. Can be used freely as a port.
4. Set bit 5 (SIC) of the interrupt timing specify register (SINT) to 1 when using the wake-up function

(WUP = 1). Do not execute a write instruction to the serial I/O shift register 0 (SIO0) while WUP = 1.

5. When CSIE0 = 0, COI is 0.
Remark xDon’t care
PMxxxPort mode register
PxxPort output latch
Page 396 of the NEC PD78076Y user manual — ACKT CMDD RELD CMDT RELT
Page 396 · click to enlarge
Page 396

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(b) Serial bus interface control register (SBIC)

SBIC is set by a 1-bit or 8-bit memory manipulation instruction.

RESET input sets SBIC to 00H.

Symbol

Address After Reset R/W

SBIC BSYE ACKD ACKE FF61H 00H R/WNote1

ACKT CMDD RELD CMDT RELT

R/W RELT Use for stop condition output. When RELT = 1, SO0 latch is set to 1. After SO0 latch setting, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0.

R/W CMDT Use for start condition output. When CMDT = 1, SO0 latch is cleared to 0. After clearing SO0 latch, automatically cleared to 0. Also cleared to 0 when CSIE0 = 0.

R RELD Stop Condition Detection

  • 0 Clear Conditions
  • When transfer start instruction is executed
  • If SIO0 and SVA values do not match in address reception
  • When CSIE0 = 0
  • When RESET input is applied

1 Setting Condition • When stop condition is detected

R CMDD Start Condition Detection

  • 0 Clear Conditions
  • When transfer start instruction is executed
  • When stop condition is detected
  • When CSIE0 = 0
  • When RESET input is applied
  • When start condition is detected

R/W ACKT SDA0 (SDA1) is set to low after the Set instruction execution (ACKT = 1) before the next SCL falling edge. Used for generating an ACK signal by software if the 8-clock wait mode is selected. Cleared to 0 if CSIE = 0 when a transfer by the serial interface is started.

R/W ACKE Acknowledge Signal Automatic Output ControlNote 2

0 Disabled (with ACKT enabled). Used when receiving data in the 8-clock wait mode or when transmitting data.Note 3

1 Enabled. After completion of transfer, acknowledge signal is output in synchronization with the 9th falling edge of SCL clock (automatically output when ACKE = 1). However, not automatically cleared to 0 after acknowledge signal output. Used for reception when the 9-clock wait mode is selected.

R ACKD Acknowledge Detection

  • 0 Clear Conditions
  • When transfer start instruction is executed
  • When CSIE0 = 0
  • When RESET input is applied

1 Set Conditions • When acknowledge signal is detected at the rising edge of SCL clock after completion of transfer

R/W BSYE Control of N-ch Open-Drain Output for Transmission in I2C Bus ModeNote 5

0 Output enabled (transmission)

1 Output disabled (reception)

2. This setting must be performed prior to transfer start.
3. In the 8-clock wait mode, use ACKT for output of the acknowledge signal after normal data reception.
4. The busy mode can be released by the start of a serial interface transfer or reception of an address

signal. However, the BSYE flag is not cleared.

5. When using the wake-up function, set BSYE to 1.
Remark CSIE0Bit 7 of serial operating mode register 0 (CSIM0)

1 Setting Condition

Page 397 of the NEC PD78076Y user manual — SVAM CLC WREL WAT1 WAT0
Page 397 · click to enlarge
Page 397

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(c) Interrupt timing specification register (SINT)

SINT is set by the 1-bit or 8-bit memory manipulation instruction.

RESET input sets SINT to 00H.

1 0 7 Symbol

Address After Reset R/W

SINT 0 CLD SIC FF63H 00H R/WNote 1

SVAM CLC WREL WAT1 WAT0

R/W WAT1 WAT0 Interrupt control by waitNote 2

0 0 Interrupt service request is generated on rise of 8th SCK0 clock cycle (clock output is high impedance).

0 1 Setting prohibited

1 0 Used in I2C bus mode (8-clock wait) Generates an interrupt service request on rise of 8th SCL clock cycle. (In case of master device, SCL pin is driven low after output of 8 clock cycles, to enter the wait state. In case of slave device, SCL pin is driven low after input of 8 clock cycles, to require the wait state.) 1 1 Used in I2C bus mode (9-clock wait) Generates an interrupt service request on rise of 9th SCL clock cycle. (In case of master device, SCL pin is driven low after output of 9 clock cycles, to enter the wait state. In case of slave device, SCL pin is driven low after input of 9 clock cycles, to require the wait state.)

R/W WREL Wait release control

0 Indicates that the wait state has been released.

1 Releases the wait state. Automatically cleared to 0 after releasing the wait state. This bit is used to release the wait state set by means of WAT0 and WAT1.

R/W CLC Clock level control

0 Used in I2C bus mode. In cases other than serial transfer, SCL pin output is driven low.

1 Used in I2C bus mode. In cases other than serial transfer, SCL pin output is set to high impedance. (Clock line is held high.) Used by master device to generate the start condition and stop condition signals.

R/W SVAM SVA bits used as slave address

0 Bits 0 to 7

1 Bits 1 to 7

R/W SIC INTCSI0 interrupt source selectionNote 3

0 CSIIF0 is set to 1 after end of serial interface channel 0 transfer.

1 CSIIF0 is set to 1 after end of serial interface channel 0 transfer or when stop condition is detected.

R CLD SCL pin levelNote 4

2. When the I 2 C bus mode is used, set 1 and 0, or 1 and 1 in WAT0 and WAT1, respectively.
3. When using the wake-up function in I 2 C mode, set SIC to 1.
4. When CSIE0 = 0, CLD is 0.
Remark SVASlave address register
CSIIF0Interrupt request flag corresponding to INTCSI0
CSIE0Bit 7 of serial operating mode register 0 (CSIM0)

0 Low level · 1 High level

Page 398 of the NEC PD78076Y user manual — Table 18-4. Signals in I 2 C Bus Mode
Page 398 · click to enlarge
Page 398

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(4) Various signals

A list of signals in the I2C bus mode is given in Table 18-4.

Table 18-4. Signals in I 2 C Bus Mode

Signal name Description Start condition Definition : SDA0 (SDA1) falling edge when SCL is high (Note 1)

Function : Indicates that serial communication starts and subsequent data are address data.

Signaled by : Master Signaled when : CMDT is set.

Affected flag(s)CMDD (is set.)
Stop condition DefinitionSDA0 (SDA1) rising edge when SCL is high ( Note 1 )

Function : Indicates end of serial transmission.

Signaled byMaster
Signaled whenRELT is set. Affected flag(s) : RELD (is set) and CMDD (is cleared)
Acknowledge signal (ACK) DefinitionLow level of SDA0 (SDA1) pin during one SCL clock cycle after serial reception

Function : Indicates completion of reception of 1 byte.

Signaled byMaster or slave

Signaled when : ACKT is set with ACKE = 1.

Affected flag(s)ACKD (is set.) Wait (WAIT) Definition : Low-level signal output to SCL

Function : Indicates state in which serial reception is not possible.

Signaled bySlave

Signaled when : WAT1, WAT0 = 1x.

Affected flag(s)None

Serial Clock (SCL) Definition : Synchronization clock for output of various signals Function : Serial communication synchronization signal.

Signaled byMaster

Signaled when : See Note 2 below.

Affected flag(s) : CSIIF0. Also see Note 3 below.

Address (A6 to A0) Definition7-bit data synchronized with SCL immediately after start condition signal
FunctionIndicates address value for specification of slave on serial bus. Signaled by : Master

Signaled when : See Note 2 below.

Affected flag(s) : CSIIF0. Also see Note 3 below.

Transfer direction (R/W) Definition1-bit data output in synchronization with SCL after address output

Function : Indicates whether data transmission or reception is to be performed.

Signaled by : Master Signaled when : See Note 2 below.

Affected flag(s) : CSIIF0. Also see Note 3 below.

Data (D7 to D0)) Definition8-bit data synchronized with SCL, not immediately after start condition

Function : Contains data actually to be sent.

Signaled byMaster or slave

Signaled when : See Note 2 below. Affected flag(s) : CSIIF0. Also see Note 3 below.

2. Execution of instruction to write data to SIO0 when CSIE0 = 1 (serial transfer start directive). In the

wait state, the serial transfer operation will be started after the wait state is released. 3. If the 8-clock wait is selected when WUP = 0, CSIIF0 is set at the rising edge of the 8th clock cycle of

SCL. If the 9-clock wait is selected when WUP = 0, CSIIF0 is set at the rising edge of the 9th clock cycle of SCL. If WUP = 1, CSIIF0 is set when an address is received and the address matches the

slave address register (SVA) value and when a stop condition is detected.

Page 399 of the NEC PD78076Y user manual — operation mode register 0 (CSIM0)). N-ch open-drain always enters the high-impedance
Page 399 · click to enlarge
Page 399

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(5) Pin configurations

The configurations of the serial clock pin SCL and the serial data bus pins SDA0 (SDA1) are shown below.

(a) SCL

Pin for serial clock input/output dual-function pin.

Master N-ch open-drain output

Slave Schmitt input

(b) SDA0 (SDA1)

Serial data input/output dual-function pin.

Uses N-ch open-drain output and Schmitt-input buffers for both master and slave devices.

open-drain buffers are used for the serial clock pin (SCL) and the serial data bus pin (SDA0 or SDA1) on the

I2C bus.

Figure 18-21. Pin Configuration

V DD

SCL

SCL

V DD

SDA0(SDA1)

SDA0(SDA1)

reception, set bit 7 (BSYE) of the serial bus interface control register (SBIC) to 1 before

writing FFH to the serial I/O shift register 0 (SIO0). However, do not write FFH to the SIO0

during data reception when using the wake-up function (when bit 5 (WUP) of the serial

operation mode register 0 (CSIM0)). N-ch open-drain always enters the high-impedance

state even if FFH is not written to SIO0.

Show 10 more labels / short text on this page
Slave devices · Master device · Clock output · (Clock output) · (Clock input) · Clock input · Data output · Data output · Data input · Data input
Page 400 of the NEC PD78076Y user manual — (8) Communication operation
Page 400 · click to enlarge
Page 400

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(6) Address match detection method

In the I2C mode, the master can select a specific slave device by sending slave address data.

Address match detection is performed automatically by the slave device hardware. A slave device address has

a slave register (SVA), and compares its contents and the slave address sent from the master device. If they

match and the wake-up function specification (WUP) bit is then 1, CSIIF0 is set (also when a stop condition is

detected).

When using the wake-up function, set SIC to 1.

after start condition.

The matching detection interrupt request (INTCSI0) of the address generated in the WUP =

1 state is normally used for detecting the matching of the data. Therefore, detection of

whether a slave is selected or not using slave address must be performed in the WUP = 1

state.

(7) Error detection

In the I2C bus mode, transmission error can be detected by the following methods because the serial bus SDA0

(SDA1) status during transmission is also taken into the serial I/O shift register 0 (SIO0) of the transmitting device.

(a) Comparison of SIO0 data before and after transmission

In this case, a transmission error is judged to have occurred if the two data values are different.

(b) Using the slave address register (SVA)

Transmit data is set in SIO0 and SVA before transmission is performed. After transmission, the COI bit

(match signal from the address comparator) of serial operating mode register 0 (CSIM0) is tested: “1”

indicates normal transmission, and “0” indicates a transmission error.

(8) Communication operation

In the I2C bus mode, the master selects the slave device to be communicated with from among multiple

devices by outputting address data onto the serial bus.

After the slave address data, the master sends the R/W bit which indicates the data transfer direction, and

starts serial communication with the selected slave device.

Data communication timing charts are shown in Figures 18-22 and 18-23.

In the transmitting device, the serial I/O shift register 0 (SIO0) shifts transmission data to the SO latch in

synchronization with the falling edge of the serial clock (SCL), the SO0 latch outputs the data on an MSB-first

basis from the SDA0 or SDA1 pin to the receiving device.

In the receiving device, the data input from the SDA0 or SDA1 pin is taken into the SIO0 in synchronization

with the rising edge of SCL.

Page 401 of the NEC PD78076Y user manual — SIO0 <- FFH
Page 401 · click to enlarge
Page 401

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

Figure 18-22. Example of Communication from Master to Slave (with 9-Clock Wait Selected for Both

Master and Slave) (1/3)

(a) Start condition - address

Processing in master device

SIO0

COI

ACKD

CMDD

RELD

CLD

P27

H

WUP

BSYE

ACKE

CMDT

RELT

WREL

SIC

INTCSI0

SCL

2 3 4 5 6 7 8

1 2 3 4 5 9

SDA0

A5 A4 A3 A2 A1 A0 W ACK A6

D7 D6 D5 D4 D3

Processing in slave device

SIO0 <- FFH

COI

ACKD

CMDD

RELD

CLD

P27 WUP

BSYE

H

ACKE

H

CMDT

RELT

WREL

SIC

H

INTCSI0

CSIE0

H

P25

PM25

PM27

SIO0 write · Transfer line · SIO0 write

Page 402 of the NEC PD78076Y user manual — SIO0 <- FFH SIO0 <- FFH
Page 402 · click to enlarge
Page 402

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

Figure 18-22. Example of Communication from Master to Slave (with 9-Clock Wait Selected for Both

Master and Slave) (2/3)

(b) Data

Processing in master device

SIO0

COI

ACKD

CMDD

RELD

CLD

P27

H

WUP

BSYE

ACKE

CMDT

RELT

WREL

SIC

INTCSI0

SCL

2 3 4 5 6 7 8

1 2 3 4 5 9

SDA0

D5 D4 D3 D2 D1 D0 ACK D6 D7

D7 D6 D5 D4 D3

Processing in slave device

SIO0 <- FFH SIO0 <- FFH

COI

ACKD

CMDD

RELD

CLD

P27 WUP

BSYE

H

ACKE

H

CMDT

RELT

WREL

SIC

H

INTCSI0

CSIE0

H

P25

PM25

PM27

SIO0 write · Transfer line · SIO0 write

Page 403 of the NEC PD78076Y user manual — SIO0 <- FFH
Page 403 · click to enlarge
Page 403

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

Figure 18-22. Example of Communication from Master to Slave (with 9-Clock Wait Selected for Both

Master and Slave) (3/3)

(c) Stop condition

Processing in master device

SIO0

COI

ACKD

CMDD

RELD

CLD

P27

H

WUP

BSYE

ACKE

CMDT

RELT

WREL

SIC

INTCSI0

SCL

2 3 4 5 6 7 8

1 2 3 4 9

SDA0

D5 D4 D3 D2 D1 D0 ACK D6 D7

A6 A5 A4 A3

Processing in slave device

SIO0 <- FFH

SIO0 <- FFH

COI

ACKD

CMDD

RELD

CLD

P27 WUP

BSYE

H H

ACKE

CMDT

RELT

WREL

SIC

H

INTCSI0

CSIE0

P25

PM25

PM27

SIO0 write · Transfer line · SIO0 write

Page 404 of the NEC PD78076Y user manual — COI
Page 404 · click to enlarge
Page 404

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

Figure 18-23. Example of Communication from Slave to Master (with 9-Clock Wait Selected for Both

Master and Slave) (1/3)

(a) Start condition - address

Processing in master device

SIO0

COI

ACKD

CMDD

RELD

CLD

P27

H

WUP

BSYE

ACKE

CMDT

RELT

WREL

SIC

INTCSI0

SCL

2 3 4 5 6 7 8

2 1 3 4 5 9

SDA0

A0 A1 A2 A3 A4 A5 A6 R ACK

D6 D7 D5 D4 D3

Processing in slave device

COI

ACKD

CMDD

RELD

CLD

P27 WUP

BSYE

ACKE

CMDT

RELT

WREL

SIC

H

INTCSI0

CSIE0

H

P25

PM25

PM27

Show 4 more labels / short text on this page
SIO0 write · Transfer line · SIO0 <- data · SIO0 write
Page 405 of the NEC PD78076Y user manual — COI
Page 405 · click to enlarge
Page 405

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

Figure 18-23. Example of Communication from Slave to Master (with 9-Clock Wait Selected for Both

Master and Slave) (2/3)

(b) Data

Processing in master device

SIO0 <- FFH SIO0 <- FFH

COI

ACKD

CMDD

RELD

CLD

P27

H

WUP

BSYE

L H H

ACKE

CMDT

RELT

WREL

SIC

INTCSI0

SCL

2 3 4 5 6 7 8

2 1 3 4 5 9

SDA0

D1 D0 D2 D3 D4 D5 D6 D7 ACK

D6 D7 D5 D4 D3

Processing in slave device

SIO0

COI

ACKD

CMDD

RELD

CLD

P27 WUP

BSYE

ACKE

CMDT

RELT

WREL

H

SIC

INTCSI0

CSIE0

H

P25

PM25

PM27

SIO0 write · Transfer line · SIO0 write

Page 406 of the NEC PD78076Y user manual — COI
Page 406 · click to enlarge
Page 406

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

Figure 18-23. Example of Communication from Slave to Master (with 9-Clock Wait Selected for Both

Master and Slave) (3/3)

(c) Stop condition

Processing in master device

SIO0 <- FFH

COI

ACKD

CMDD

RELD

CLD

P27

H

WUP

BSYE

ACKE

CMDT

RELT

WREL

SIC

INTCSI0

SCL

2 3 4 5 6 7 8

1 2 3 4 9

SDA0

D1 D0 D2 D3 D4 D5 D6 D7 NAK

A6 A5 A4 A3

Processing in slave device

COI

ACKD

CMDD

RELD

CLD

P27 WUP

BSYE

ACKE

CMDT

RELT

WREL

SIC

H

INTCSI0

CSIE0

H

P25

PM25

PM27

Show 5 more labels / short text on this page
SIO0 <- address · SIO0 write · Transfer line · SIO0 write · SIO0 <- data
Page 407 of the NEC PD78076Y user manual — (9) Start of transfer
Page 407 · click to enlarge
Page 407

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(9) Start of transfer

A serial transfer is started by setting transfer data in the serial I/O shift register 0 (SIO0) if the following two

conditions have been satisfied:

  • The serial interface channel 0 operation control bit (CSIE0) = 1.
  • After an 8-bit serial transfer, the internal serial clock is stopped or SCL is low.

does not initiate transfer operation.

2. Because the N-ch open-drain output must be high-impedance state during data reception,

set bit 7 (BSYE) of the serial bus interface control register (SBIC) to 1 before writing FFH

to SIO0.

However, do not write FFH to the SIO0 during data reception when using the wake-up

function (setting the bit 5 (WUP) of the serial operation mode register 0 (CSIM0)). N-ch

open-drain output always enters the high-impedance state even when FFH is not written

to SIO0.

3. If data is written to SIO0 while the slave is in the wait state, that data is held. The

transfer is started when SCL is output after the wait state is cleared.

When an 8-bit data transfer ends, serial transfer is stopped automatically and the interrupt request flag (CSIIF0)

is set.

Page 408 of the NEC PD78076Y user manual — Figure 18-24. Start Condition Output
Page 408 · click to enlarge
Page 408

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

18.4.5 Cautions on use of I 2 C bus mode

(1) Start condition output (master)

The SCL pin normally outputs a low-level signal when no serial clock is output. It is necessary to change the SCL

pin to high in order to output a start condition signal. Set the bit 3 (CLC) of the interrupt timing specify register

(SINT) to drive the SCL pin high.

After setting CLC, clear CLC to 0 and return the SCL pin to low. If CLC remains 1, no serial clock is output.

If it is the master device which outputs the start condition and stop condition signals, confirm that CLD is set

to 1 after setting CLC to 1; a slave device may have set SCL to low (wait state).

Figure 18-24. Start Condition Output

SCL

SDA0 (SDA1)

CMDT

CLD

Page 409 of the NEC PD78076Y user manual — SDA0 (SDA1)
Page 409 · click to enlarge
Page 409

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(2) Slave wait release (slave transmission)

The wait status of a slave is released by setting the WREL flag, which is bit 2 of the interrupt timing specify

register (SINT), or by executing a serial I/O shift register 0 (SIO0) write instruction.

If the slave sends data, the wait is immediately released by execution of an SIO0 write instruction and the

clock rises without the start transmission bit being output in the data line. Therefore, manipulate the P27

output latch through the program as shown in Figure 18-25 to transmit data correctly. At this time, control the

low-level width (“a” in Figure 18-25) of the first serial clock at the timing used for setting the P27 output latch

to 1 after execution of an SIO0 write instruction.

In addition, if the acknowledge signal from the master is not output (if data transmission from the slave is

completed), set 1 in the WREL flag of SINT and release the wait.

For these timings, see Figure 18-23.

Figure 18-25. Slave Wait Release (Transmission)

Setting CSIIF0 Setting ACKD Serial reception

SCL

9 a 2 3

SDA0 (SDA1)

A0 R ACK D7 D6 D5

P27 output latch 0

P27 output latch 1

Setting CSIIF0 ACK output Serial transmission

Show 12 more labels / short text on this page
Master device operation · Writing · Software operation · FFH to SIO0 · Hardware operation · Transfer line · Slave device operation · Write · Software operation · data to SIO0 · Wait release · Hardware operation
Page 410 of the NEC PD78076Y user manual — (4) Reception completion of slave
Page 410 · click to enlarge
Page 410

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(3) Slave wait release (slave reception)

The wait status of a slave is released by setting the WREL flag, which is bit 2 of the interrupt timing specify

register (SINT), or by executing a serial I/O shift register 0 (SIO0) write instruction.

When a slave receives data, if the SCL line immediately enters a high-impedance state due to a write to

SIO0, the slave may not receive the first bit of the data sent from the master. This is because SIO0 cannot

start operation if the SCL line is in a high-impedance state during execution of a write instruction to SIO0

(until the next instruction execution is started). Therefore, manipulate the P27 output latch through the program

as shown in Figure 18-26 to receive data correctly.

For these timings, see Figure 18-22.

Figure 18-26. Slave Wait Release (Reception)

Setting CSIIF0 Setting ACKD Serial transmission

SCL

SDA0 (SDA1)

A0 W ACK D7 D6 D5

P27 output latch 0

P27 output latch 1

Setting CSIIF0 ACK output Serial reception

(4) Reception completion of slave

During processing of reception completion by a slave device, confirm the statuses of CMDD and COI (if

CMDD = 1). This procedure is necessary to use the wake-up function normally. If an uncertain amount of

data is sent from the master device, the slave device cannot determine whether the start condition signal or

the data will be sent from the master. This may disable use of the wake-up function.

Show 12 more labels / short text on this page
Master device operation · Writing · Software operation · data to SIO0 · Hardware operation · Transfer line · Slave device operation · Write · Software operation · FFH to SIO0 · Wait release · Hardware operation
Page 411 of the NEC PD78076Y user manual — 18.4.6 Restrictions in I 2 C bus mode
Page 411 · click to enlarge
Page 411

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

18.4.6 Restrictions in I 2 C bus mode

The following restrictions apply to the µPD78078Y Subseries.

  • Restrictions when used as slave device in I 2 C bus mode

Applicable models µPD78076Y, 78078Y, 78P078Y, and IE-78078-R-EM

Description When the wake-up function is executed (by setting the WUP flag (bit 5 of the serial

operation mode register 0 (CSIM0)) in the serial transfer statusNote, data between the

other slaves and master will be judged as an address. If this data happens to coincide

with the slave address of the µPD78078Y Subseries, the µPD78078Y Subseries will

initiate communication, destroying the communication data.

is set because of the end of serial transfer after the serial I/O shift register 0

(SIO0) has been written.

Preventive measure This restriction can be avoided by modifying the program.

Before executing the wake-up function, execute the following program that releases serial

transfer status. To execute the wake-up function, do not execute an instruction that

writes SIO0. Even if such an instruction is not executed, data can be received when the

wake-up function is executed.

This program releases the serial transfer status. To release the serial transfer status,

the serial interface channel 0 must be set once in the operation stop status (by clearing

the CSIE0 flag (bit 7 of the serial operation mode register (CSIM0) to 0). However, if the

serial interface channel 0 is set in the operation stop status in the I2C bus mode, the SCL

pin output a high level and the SDA0 (SDA1) pin outputs a low level, affecting

communication of the I2C bus. Therefore, this program places the SCL and SDA0 (SDA1)

pins in the high-impedance state to prevent the I2C bus from being affected.

In the example below, SDA0 (/P25) is used as a serial data input/output pin. When

SDA1 (/P26) is used as the serial data input/output pin, take P2.5 and PM2.5 in the

program below as P2.6 and PM2.6, respectively

For the timing of each signal when this program is executed, refer to Figure 18-22.

Page 412 of the NEC PD78076Y user manual — SET1 P2.5 ; <1>
Page 412 · click to enlarge
Page 412

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

  • Example of program releasing serial transfer status

SET1 P2.5 ; <1>

SET1 PM2.5 ; <2>

SET1 PM2.7 ; <3>

CLR1 CSIE0 ; <4>

SET1 CSIE0 ; <5>

SET1 RELT ; <6>

CLR1 PM2.7 ; <7>

CLR1 P2.5 ; <8>

CLR1 PM2.5 ; <9>

Prevents the SDA0 pin from outputting a low level when the I2C bus mode is restored by the instruction in

. The output of the SDA0 pin goes into a high-impedance state.

Sets the P25 (/SDA0) pin in the input mode to prevent the SDA0 line from being affected when the port

mode is set by the instruction in . The P25 pin is set in the input mode when the instruction in is

executed.

Sets the P27 (/SCL) pin in the input mode to prevent the SCL line from being affected when the port mode

is set by the instruction in . The P27 pin is set in the input mode when the instruction in is executed.

Changes the mode from the I2C bus mode to port mode.

Restores the mode from the port mode to the I2C bus mode.

Prevents the instruction in from causing the SDA0 pin to output a low level.

Sets the P27 pin in the output mode because the P27 pin must be in the output mode in the I2C bus mode.

Clears the output latch of the P25 pin to 0 because the output latch of the P25 pin must be cleared to 0 in

the I2C bus mode.

Sets the P25 pin in the output mode because the P25 pin must be in the output mode in the I2C bus mode.

Remark RELTbit 0 of serial bus interface control register (SBIC)
Page 413 of the NEC PD78076Y user manual — Figure 18-27. SCK0/SCL/P27 Pin Configuration
Page 413 · click to enlarge
Page 413

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

18.4.7 SCK0/SCL/P27 pin output manipulation

The SCK0/SCL/P27 pin enables static output by manipulating software in addition to normal serial clock output.

The value of serial clocks can be set by software (SI0/SB0/SDA0 and SO0/SB1/SDA1 pins are controlled with the

RELT and CMDT bits of serial bus interface control register (SBIC)).

The SCK0/SCL/P27 pin output should be manipulated as described below.

(1) In 3-wire serial I/O mode and 2-wire serial I/O mode

The SCK0/SCL/P27 pin output level is manipulated by the P27 output latch.

Set serial operating mode register 0 (CSIM0) (SCK0 pin is set in the output mode and serial operation

is enabled). While serial transfer is suspended, SCK0 is set to 1.

Manipulate the content of the P27 output latch by executing the bit manipulation instruction.

Figure 18-27. SCK0/SCL/P27 Pin Configuration

Set by bit manipulation instruction

To Internal Circuit SCK0/SCL/P27 P27 Output

SCK0 (1 when transfer stops)

When CSIE0 = 1

From Serial Clock Control Circuit

and CSIM01 and CSIM00 are 1 and 0, or 1 and 1.

Latch

Page 414 of the NEC PD78076Y user manual — SCL
Page 414 · click to enlarge
Page 414

CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (µPD78078Y Subseries)

(2) In I 2 C bus mode

The SCK0/SCL/P27 pin output level is manipulated by the CLC bit of interrupt timing specify register (SINT).

Set serial operating mode register 0 (CSIM0) (SCL pin is set in the output mode and serial operation is

enabled). Set 1 to the P27 output latch. While serial transfer is suspended, SCL is set to 0.

Manipulate the content of the CLC bit of SINT by executing the bit manipulation instruction.

Figure 18-28. SCK0/SCL/P27 Pin Configuration

To Internal Circuit SCK0/SCL/P27 P27 Output

SCL

From Serial Clock Control Circuit

When CSIE0 = 1

and CSIM01 and CSIM00 are 1 and 0, or 1 and 1.

Figure 18-29. Logic Circuit of SCL Signal

CLC (Set by bit manipulation instruction)

SCL

Serial Clock (low level when transfer stops)

Remarks 1. This figure shows the relationship of each signal, and does not show the internal circuit.

2. CLC: Bit 3 of interrupt timing specify register (SINT)

Set 1 · Latch · Wait Request Signal

Page 415 of the NEC PD78076Y user manual — (3) 3-wire serial I/O mode with automatic transmit/receive function (MSB-/LSB-first switchable)
Page 415 · click to enlarge
Page 415

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

19.1 Serial Interface Channel 1 Functions

Serial interface channel 1 employs the following three modes.

  • Operation stop mode
  • 3-wire serial I/O mode
  • 3-wire serial I/O mode with automatic transmit/receive function

(1) Operation stop mode

This mode is used when serial transfer is not carried out to reduce power consumption.

(2) 3-wire serial I/O mode (MSB-/LSB-first switchable)

This mode is used for 8-bit data transfer using three lines, each for serial clock (SCK1), serial output (SO1)

and, serial input (SI1).

The 3-wire serial I/O mode enables simultaneous transmission/reception and so decreases the data transfer

processing time.

Since the start bit of 8-bit data to undergo serial transfer is switchable between MSB and LSB, connection

is enabled with either start bit device.

The 3-wire serial I/O mode is valid for connection of peripheral I/O units and display controllers which

incorporate a conventional synchronous serial interface such as the 75X/XL, 78K, and 17K Series.

(3) 3-wire serial I/O mode with automatic transmit/receive function (MSB-/LSB-first switchable)

This mode has the same functions as those of the 3-wire serial I/O mode with automatic transmit/receive

function added.

The automatic transmit/receive function is used to transmit/receive data with a maximum of 32 bytes. This

function enables the hardware to transmit/receive data to/from the OSD (On Screen Display) device and

a device with built-in display controller/driver independently of the CPU, thus the software load can be

alleviated.

Page 416 of the NEC PD78076Y user manual — Figure 19-1. Serial Interface Channel 1 Block Diagram
Page 416 · click to enlarge
Page 416

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

19.2 Serial Interface Channel 1 Configuration

Serial interface channel 1 consists of the following hardware.

Table 19-1. Serial Interface Channel 1 Configuration

NEC PD78076Y — Table 19-1. Serial Interface Channel 1 Configuration diagram (page 416)
Fig. 21 · Table 19-1. Serial Interface Channel 1 Configuration

8 Block Diagram of P22 and P27.

Figure 19-1. Serial Interface Channel 1 Block Diagram

NEC PD78076Y — Figure 19-1. Serial Interface Channel 1 Block Diagram diagram (page 416)
Fig. 22 · Figure 19-1. Serial Interface Channel 1 Block Diagra…
Page 417 of the NEC PD78076Y user manual — (3) Serial clock counter
Page 417 · click to enlarge
Page 417

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(1) Serial I/O shift register 1 (SIO1)

This is an 8-bit register to carry out parallel/serial conversion and to carry out serial transmission/reception

(shift operation) in synchronization with the serial clock.

SIO1 is set with an 8-bit memory manipulation instruction.

When value in bit 7 (CSIE1) of serial operating mode register 1 (CSIM1) is 1, writing data to SIO1 starts

serial operation.

In transmission, data written to SIO1 is output to the serial output (SO1). In reception, data is read from

the serial input (SI1) to SIO1.

RESET input makes SIO1 undefined.

(2) Automatic data transmit/receive address pointer (ADTP)

This register stores the value (number of transmit data bytes – 1) while the automatic transmit/receive

function is activated. As data is transferred/received, it is automatically decremented.

ADTP is set with an 8-bit memory manipulation instruction. The high-order 3 bits must be set to 0.

RESET input sets ADTP to 00H.

(3) Serial clock counter

This counter counts the serial clocks to be output and input during transmission/reception to check whether

8-bit data has been transmitted/received.

Page 418 of the NEC PD78076Y user manual — MCS = 1
Page 418 · click to enlarge
Page 418

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

19.3 Serial Interface Channel 1 Control Registers

The following four types of registers are used to control serial interface channel 1.

  • Timer clock select register 3 (TCL3)
  • Serial operating mode register 1 (CSIM1)
  • Automatic data transmit/receive control register (ADTC)
  • Automatic data transmit/receive interval specify register (ADTI)

(1) Timer clock select register 3 (TCL3)

This register sets the serial clock of serial interface channel 1.

TCL3 is set with an 8-bit memory manipulation instruction.

RESET input sets TCL3 to 88H.

Remark Besides setting the serial clock of serial interface channel 1, TCL3 sets the serial clock of serial

interface channel 0.

Figure 19-2. Timer Clock Select Register 3 Format

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

TCL3 TCL37 TCL36 TCL35 TCL34 TCL33 TCL32 TCL31 TCL30 FF43H 88H R/W

Serial Interface Channel 1 Serial Clock Selection TCL37 TCL36 TCL35 TCL34

MCS = 1

MCS = 0

fX/22 (1.25 MHz)

fXX/22

fX/22 (1.25 MHz)

fX/23 (625 kHz)

fXX/23

fX/23 (625 kHz)

fX/24 (313 kHz)

fXX/24

fX/24 (313 kHz)

fX/25 (156 kHz)

fXX/25

fX/25 (156 kHz)

fX/26 (78.1 kHz)

fXX/26

fX/26 (78.1 kHz)

fX/27 (39.1 kHz)

fXX/27

fX/27 (39.1 kHz)

fX/28 (19.5 kHz)

fXX/28

fX/28 (19.5 kHz)

fX/29 (9.8 kHz)

Other than above Setting prohibited

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. MCS : Bit 0 of oscillation mode selection register (OSMS)
4. Figures in parentheses apply to operation with f X = 5.0 MHz.

fXX/2 · Setting prohibited

Page 419 of the NEC PD78076Y user manual — SO1 (CMOS
Page 419 · click to enlarge
Page 419

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(2) Serial operating mode register 1 (CSIM1)

This register sets serial interface channel 1 serial clock, operating mode, operation enable/stop, and

automatic transmit/receive operation enable/stop.

CSIM1 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM1 to 00H.

Figure 19-3. Serial Operation Mode Register 1 Format

6 4 3 2 1 0 Symbol

Address After Reset R/W

CSIM1 CSIE1 DIR ATE 0 0 0 CSIM11 CSIM10

FF68H 00H R/W

CSIM11

CSIM10

Serial Interface Channel 1 Clock Selection

Clock externally input to SCK1 pinNote 1

8-bit timer register 2 (TM2) output

1 Clock specified with bits 4 to 7 of timer clock select register 3 (TCL3)

ATE

Serial Interface Channel 1 Operating Mode Selection

3-wire serial I/O mode

3-wire serial I/O mode with automatic transmit/receive function

DIR

MSB

SI1/P20

LSB

CSIE

CSIM

11 P20 PM21 P21 PM22 Shift Register

1 Operation Serial Clock Counter

P22

x Operation

Clear P20 (CMOS input/output)

SO1 (CMOS

SCK1 (CMOS output) 1

of the automatic data transmit/receive control register (ADTC) to 0, 0.

2. Can be used freely as port function.
3. Can be used as P20 (CMOS input/output) when only transmitter is used (set bit 7 (RE) of ADTC to

0).

Remark xDon’t care
PMxxPort mode register
PxxPort output latch
Show 21 more labels / short text on this page
Start Bit · SI1 Pin Function · SO1 Pin Function · SO1 (CMOS output) · (Input) · PM20 SO1/P21 Pin · SI1/P20 Pin · SCK1/P22 Pin Function · Operation Control · Function · Function · P21 (CMOS input/output) · P22 (CMOS input/output) · stop · SCK1 (Input) · Operation · Count operation · SI1Note 3 · enable · (input) · output)
Page 420 of the NEC PD78076Y user manual — R/W
Page 420 · click to enlarge
Page 420

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(3) Automatic data transmit/receive control register (ADTC)

This register sets automatic receive enable/disable, the operating mode, strobe output enable/disable, busy input enable/disable, and error check enable/disable, and displays automatic transmit/receive execution and

error detection. ADTC is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets ADTC to 00H.

Figure 19-4. Automatic Data Transmit/Receive Control Register Format

Symbol

Address After Reset R/W

ADTC RE ARLD ERCE ERR TRF STRB BUSY1 BUSY0 FF69H 00H R/WNote 1

R/W

BUSY1

BUSY0

Not using busy input

Busy input enable (active high)

Busy input enable (active low)

R/W

STRB

R

TRF

Status in Automatic Transmit/Receive FunctionNote 2

Detection of termination of automatic transmission/ reception (This bit is set to 0 upon suspension of automatic transmission/reception or when ARLD = 0.)

During automatic transmission/reception (This bit is set to 1 when data is written to SIO1.)

R

ERR

Error Detection in Automatic Transmit/Receive Function

No error (Set to 0 when data is written to SIO1)

R/W

ERCE

Error Check in Automatic Transmit/Receive Function

Error check enable (only when BUSY1 = 1)

R/W

ARLD

Operating Mode for Automatic Transmit/Receive Function

R/W

RE

Receive operation in Automatic Transmit/Receive Function

2. The termination of automatic transmission/reception should be judged by using TRF, not CSIIF1

(interrupt request flag).

Remark xDon’t care
Show 10 more labels / short text on this page
Busy Input Control · Strobe Output Control · Strobe output disable · Strobe output enable · Error occurred · Error check disable · Single operating mode · Repetitive operating mode · Receive disable · Receive enable
Page 421 of the NEC PD78076Y user manual — ADTI0
Page 421 · click to enlarge
Page 421

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(4) Automatic data transmit/receive interval specify register (ADTI)

This register sets the automatic data transmit/receive function data transfer interval. ADTI is set by a 1-bit or 8-bit memory manipulation instruction.

RESET input sets ADTI to 00H.

Figure 19-5. Automatic Data Transmit/Receive Interval Specify Register Format (1/4)

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

ADTI ADTI7 0 0 ADTI4 ADTI3 ADTI2 ADTI1 ADTI0 FF6BH 00H R/W

ADTI7

Data Transfer Interval Control

No control of interval by ADTI

Control of interval by ADTI (ADTI0 to ADTI4) 1

Data Transfer Interval Specification (fXX = 5.0-MHz Operation) ADTI4 ADTI3 ADTI2 ADTI1

ADTI0

18.4 s + 0.5/fSCK

20.0 s + 1.5/fSCK

31.2 s + 0.5/fSCK

32.8 s + 1.5/fSCK

44.0 s + 0.5/fSCK

45.6 s + 1.5/fSCK

56.8 s + 0.5/fSCK

58.4 s + 1.5/fSCK

69.6 s + 0.5/fSCK

71.2 s + 1.5/fSCK

82.4 s + 0.5/fSCK

84.0 s + 1.5/fSCK

95.2 s + 0.5/fSCK

96.8 s + 1.5/fSCK

108.0 s + 0.5/fSCK

109.6 s + 1.5/fSCK

120.8 s + 0.5/fSCK

122.4 s + 1.5/fSCK

133.6 s + 0.5/fSCK

135.2 s + 1.5/fSCK

146.4 s + 0.5/fSCK

148.0 s + 1.5/fSCK

159.2 s + 0.5/fSCK

160.8 s + 1.5/fSCK

172.0 s + 0.5/fSCK

173.6 s + 1.5/fSCK

184.8 s + 0.5/fSCK

186.4 s + 1.5/fSCK

197.6 s + 0.5/fSCK

199.2 s + 1.5/fSCK

210.4 s + 0.5/fSCK

212.0 s + 1.5/fSCK

2. The data transfer interval includes an error. The data transfer minimum and maximum intervals are found from the following expressions (n: Value set in ADTI0 to ADTI4). However, if a minimum which

is calculated by the following expressions is smaller than 2/fSCK, the minimum interval time is 2/fSCK.

26 28 0.5 fXX

Minimum = (n + 1) × + +

fXX fSCK

26 36 1.5 fXX

Maximum = (n + 1) × + +

fXX fSCK

3. When controlling the data transfer interval by automatic transmit/receive using ADTI, busy control (refer to 19.4.3 (4) (a) Busy control option) becomes invalid.
Remark f XXMain system clock frequency (f X or f X /2)
f XMain system clock oscillation frequency
f SCKSerial clock frequency
Show 34 more labels / short text on this page
MinimumNote 2 · MaximumNote 2 · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ
Page 422 of the NEC PD78076Y user manual — 3. When controlling the data transfer interval by automatic transmit/receive using
Page 422 · click to enlarge
Page 422

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-5. Automatic Data Transmit/Receive Interval Specify Register Format (2/4)

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

ADTI ADTI7 0 0 ADTI4 ADTI3 ADTI2 ADTI1 ADTI0 FF6BH 00H R/W

Data Transfer Interval Specification (fXX = 5.0-MHz Operation) ADTI4 ADTI3 ADTI2 ADTI1

ADTI0

223.2 s + 0.5/fSCK

224.8 s + 1.5/fSCK

236.0 s + 0.5/fSCK

237.6 s + 1.5/fSCK

248.8 s + 0.5/fSCK

250.4 s + 1.5/fSCK

261.6 s + 0.5/fSCK

263.2 s + 1.5/fSCK

274.4 s + 0.5/fSCK

276.0 s + 1.5/fSCK

287.2 s + 0.5/fSCK

288.8 s + 1.5/fSCK

300.0 s + 0.5/fSCK

301.6 s + 1.5/fSCK

312.8 s + 0.5/fSCK

314.4 s + 1.5/fSCK

325.6 s + 0.5/fSCK

327.2 s + 1.5/fSCK

338.4 s + 0.5/fSCK

340.0 s + 1.5/fSCK

351.2 s + 0.5/fSCK

352.8 s + 1.5/fSCK

364.0 s + 0.5/fSCK

365.6 s + 1.5/fSCK

376.8 s + 0.5/fSCK

378.4 s + 1.5/fSCK

389.6 s + 0.5/fSCK

391.2 s + 1.5/fSCK

402.4 s + 0.5/fSCK

404.0 s + 1.5/fSCK

415.2 s + 0.5/fSCK

416.8 s + 1.5/fSCK

are found from the following expressions (n: Value set in ADTI0 to ADTI4). However, if a minimum

which is calculated by the following expressions is smaller than 2/fSCK, the minimum interval time

is 2/fSCK.

26 28 0.5 fXX fXX fSCK

Minimum = (n + 1) × + +

Maximum = (n + 1) × + +

26 36 1.5 fXX fXX fSCK

2. Bits 5 and 6 must be set to 0.

3. When controlling the data transfer interval by automatic transmit/receive using

ADTI, busy control (refer to 19.4.3 (4) (a) Busy control option) becomes invalid.

Remark f XXMain system clock frequency (f X or f X /2)
f XMain system clock oscillation frequency
f SCKSerial clock frequency
Show 34 more labels / short text on this page
MinimumNote · MaximumNote · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ
Page 423 of the NEC PD78076Y user manual — ADTI0
Page 423 · click to enlarge
Page 423

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-5. Automatic Data Transmit/Receive Interval Specify Register Format (3/4)

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

ADTI ADTI7 0 0 ADTI4 ADTI3 ADTI2 ADTI1 ADTI0 FF6BH 00H R/W

ADTI7

Data Transfer Interval Control

No control of interval by ADTINote 1

Control of interval by ADTI (ADTI0 to ADTI4) 1

Data Transfer Interval Specification (fXX = 2.5-MHz Operation) ADTI4 ADTI3 ADTI2 ADTI1

ADTI0

36.8 s + 0.5/fSCK

40.0 s + 1.5/fSCK

62.4 s + 0.5/fSCK

65.6 s + 1.5/fSCK

88.0 s + 0.5/fSCK

91.2 s + 1.5/fSCK

113.6 s + 0.5/fSCK

116.8 s + 1.5/fSCK

139.2 s + 0.5/fSCK

142.4 s + 1.5/fSCK

164.8 s + 0.5/fSCK

168.0 s + 1.5/fSCK

190.4 s + 0.5/fSCK

193.6 s + 1.5/fSCK

216.0 s + 0.5/fSCK

219.2 s + 1.5/fSCK

241.6 s + 0.5/fSCK

244.8 s + 1.5/fSCK

267.2 s + 0.5/fSCK

270.4 s + 1.5/fSCK

292.8 s + 0.5/fSCK

296.0 s + 1.5/fSCK

318.4 s + 0.5/fSCK

321.6 s + 1.5/fSCK

344.0 s + 0.5/fSCK

347.2 s + 1.5/fSCK

369.6 s + 0.5/fSCK

372.8 s + 1.5/fSCK

395.2 s + 0.5/fSCK

398.4 s + 1.5/fSCK

420.8 s + 0.5/fSCK

424.0 s + 1.5/fSCK

2. The data transfer interval includes an error. The data transfer minimum and maximum

intervals are found from the following expressions (n: Value set in ADTI0 to ADTI4). However, if a minimum which is calculated by the following expressions is smaller than

2/fSCK, the minimum interval time is 2/fSCK.

26 28 fXX fXX

Minimum = (n + 1) × + +

0.5 fSCK

26 36 fXX fXX

1.5 fSCK

Maximum = (n + 1) × + +

2. Bits 5 and 6 must be set to 0. 3. When controlling the data transfer interval by automatic transmit/receive using

ADTI, busy control (refer to 19.4.3 (4) (a) Busy control option) becomes invalid.

Remark f XXMain system clock frequency (f X or f X /2)
f XMain system clock oscillation frequency
f SCKSerial clock frequency
Show 34 more labels / short text on this page
MinimumNote 2 · MaximumNote 2 · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ
Page 424 of the NEC PD78076Y user manual — 3. When controlling the data transfer interval by automatic transmit/receive using
Page 424 · click to enlarge
Page 424

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-5. Automatic Data Transmit/Receive Interval Specify Register Format (4/4)

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

ADTI ADTI7 0 0 ADTI4 ADTI3 ADTI2 ADTI1 ADTI0 FF6BH 00H R/W

Data Transfer Interval Specification (fXX = 2.5-MHz Operation) ADTI4 ADTI3 ADTI2 ADTI1

ADTI0

446.4 s + 0.5/fSCK

449.6 s + 1.5/fSCK

472.0 s + 0.5/fSCK

475.2 s + 1.5/fSCK

497.6 s + 0.5/fSCK

500.8 s + 1.5/fSCK

523.2 s + 0.5/fSCK

526.4 s + 1.5/fSCK

548.8 s + 0.5/fSCK

552.0 s + 1.5/fSCK

574.4 s + 0.5/fSCK

577.6 s + 1.5/fSCK

600.0 s + 0.5/fSCK

603.2 s + 1.5/fSCK

625.6 s + 0.5/fSCK

628.8 s + 1.5/fSCK

651.2 s + 0.5/fSCK

654.4 s + 1.5/fSCK

676.8 s + 0.5/fSCK

680.0 s + 1.5/fSCK

702.4 s + 0.5/fSCK

705.6 s + 1.5/fSCK

728.0 s + 0.5/fSCK

731.2 s + 1.5/fSCK

753.6 s + 0.5/fSCK

756.8 s + 1.5/fSCK

779.2 s + 0.5/fSCK

782.4 s + 1.5/fSCK

804.8 s + 0.5/fSCK

808.0 s + 1.5/fSCK

830.4 s + 0.5/fSCK

833.6 s + 1.5/fSCK

are found from the following expressions (n: Value set in ADTI0 to ADTI4). However, if a minimum

which is calculated by the following expressions is smaller than 2/fSCK, the minimum interval time

is 2/fSCK.

26 28 0.5 fXX fXX fSCK

Minimum = (n + 1) × + +

26 36 1.5

Maximum = (n + 1) × + +

fXX fXX fSCK

2. Bits 5 and 6 must be set to 0.

3. When controlling the data transfer interval by automatic transmit/receive using

ADTI, busy control (refer to 19.4.3 (4) (a) Busy control option) becomes invalid.

Remark f XXMain system clock frequency (f X or f X /2)
f XMain system clock oscillation frequency
f SCKSerial clock frequency
Show 34 more labels / short text on this page
MinimumNote · MaximumNote · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ
Page 425 of the NEC PD78076Y user manual — SO1 (CMOS
Page 425 · click to enlarge
Page 425

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

19.4 Serial Interface Channel 1 Operations

The following three operating modes are available to the serial interface channel 1.

  • Operation stop mode
  • 3-wire serial I/O mode
  • 3-wire serial I/O mode with automatic transmit/receive function

19.4.1 Operation stop mode

Serial transfer is not carried out in the operation stop mode. Thus, power consumption can be reduced. The

serial I/O shift register 1 (SIO1) does not carry out shift operation either, and thus it can be used as an ordinary

8-bit register.

In the operation stop mode, the P20/SI1, P21/SO1, P22/SCK1, P23/STB, and P24/BUSY pins can be used as

ordinary input/output ports.

(1) Register setting

The operation stop mode is set with the serial operating mode register 1 (CSIM1).

CSIM1 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM1 to 00H.

6 4 3 2 1 0 Symbol

Address After Reset R/W

CSIM1 CSIE1 DIR ATE 0 0 0 CSIM11 CSIM10

FF68H 00H R/W

CSIE

CSIM

1 Operation Serial Clock Counter

11 P20 PM21 P21 PM22

P22

P22 (CMOS input/output) x

x Operation

Clear P20 (CMOS input/output)

SO1 (CMOS

SCK1 (CMOS output) 1

2. Can be used as P20 (CMOS input/output) when only transmitter is used (set bit 7 (RE) of the

automatic data transmit/receive control register (ADTC) to 0).

Remark xDon’t care
PMxxPort mode register
PxxPort output latch
Show 15 more labels / short text on this page
PM20 SO1/P21 Pin · Shift Register · SI1/P20 Pin · SCK1/P22 Pin Function · Operation Control · Function · Function · P21 (CMOS input/output) · stop · SCK1 (Input) · Operation · Count operation · SI1 (Input) · output) · enable
Page 426 of the NEC PD78076Y user manual — SO1 (CMOS
Page 426 · click to enlarge
Page 426

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

19.4.2 3-wire serial I/O mode operation The 3-wire serial I/O mode is valid for connection of peripheral I/O units and display controllers which incorporate

a conventional synchronous serial interface such as the 75X/XL, 78K, and 17K Series.

Communication is carried out with three lines of serial clock (SCK1), serial output (SO1) and serial input (SI1).

(1) Register setting

The 3-wire serial I/O mode is set with the serial operating mode register 1 (CSIM1). CSIM1 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM1 to 00H.

6 4 3 2 1 0 Symbol

Address After Reset R/W

CSIM1 CSIE1 DIR ATE 0 0 0 CSIM11 CSIM10

FF68H 00H R/W

Serial Interface Channel 1 Clock Selection

CSIM11

CSIM10

Clock externally input to SCK1 pinNote

8-bit timer register 2 (TM2) output

1 Clock specified with bits 4 to 7 of timer clock select register 3 (TCL3)

ATE

Serial Interface Channel 1 Operating Mode Selection

3-wire serial I/O mode

3-wire serial I/O mode with automatic transmit/receive function

DIR

MSB

SI1/P20

LSB

CSIE

CSIM

SCK1/P22

11 P20 PM21 P21 PM22

P22

P22 (CMOS input/output) x

x Operation

Clear P20 (CMOS input/output)

SO1 (CMOS

SCK1 (CMOS output) 1

(STRB) of the automatic data transmit/receive control register (ADTC) to 0, 0.

2. Can be used freely as port function. 3. Can be used as P20 (CMOS input/output) when only transmitter is used (set bit 7 (RE) of ADTC

to 0).

Remark xDon’t care PMxx : Port mode register
PxxPort output latch
Show 24 more labels / short text on this page
Start Bit · SI1 Pin Function · SO1 Pin Function · SO1 (CMOS output) · (Input) · PM20 SO1/P21 Pin · Shift Register 1 · Serial Clock Counter · SI1/P20 Pin · Operation · Operation Control · Function · Function · Pin Function · P21 (CMOS input/output) · stop · SCK1 (Input) · Operation · Count · SI1Note 2 · (Input) · output) · enable · operation
Page 427 of the NEC PD78076Y user manual — (3) MSB/LSB switching as the start bit
Page 427 · click to enlarge
Page 427

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(2) Communication operation

The 3-wire serial I/O mode is used for data transmission/reception in 8-bit units. Bit-wise data transmission/

reception is carried out in synchronization with the serial clock.

Shift operation of the serial I/O shift register 1 (SIO1) is carried out at the falling edge of the serial clock

SCK1. The transmit data is held in the SO1 latch and is output from the SO1 pin. The receive data input

to the SI1 pin is latched into SIO1 at the rising edge of SCK1.

Upon termination of 8-bit transfer, the SIO1 operation stops automatically and the interrupt request flag

(CSIIF1) is set.

Figure 19-6. 3-Wire Serial I/O Mode Timings

SCK1 1 2 3 4 5 6 7 8

SI1

DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0

SO1 DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0

CSIIF1

Transfer Start at the Falling Edge of SCK1

(3) MSB/LSB switching as the start bit

The 3-wire serial I/O mode enables to select transfer to start from MSB or LSB.

Figure 19-7 shows the configuration of the serial I/O shift register 1 (SIO1) and internal bus. As shown in

the figure, MSB/LSB can be read/written in reverse form.

MSB/LSB switching as the start bit can be specified with bit 6 (DIR) of the serial operating mode register

1 (CSIM1).

End of Transfer · SIO1 Write

Page 428 of the NEC PD78076Y user manual — (4) Transfer start
Page 428 · click to enlarge
Page 428

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-7. Circuit of Switching in Transfer Bit Order

SI1 Shift Register 1 (SIO1)

D Q

SO1

SCK1

Start bit switching is realized by switching the bit order write to SIO1. The SIO1 shift order remains

unchanged. Thus, MSB-first and LSB-first must be switched before writing data to the shift register.

(4) Transfer start

Serial transfer is started by setting transfer data to the serial I/O shift register 1 (SIO1) when the following

two conditions are satisfied.

  • Serial interface channel 1 operation control bit (CSIE1) = 1
  • Internal serial clock is stopped or SCK1 is a high level after 8-bit serial transfer.

Upon termination of 8-bit transfer, serial transfer automatically stops and the interrupt request flag (CSIIF1)

is set.

Show 5 more labels / short text on this page
Internal Bus · LSB-first · MSB-first Read/Write Gate · Read/Write Gate · SO1 Latch
Page 429 of the NEC PD78076Y user manual — SO1 (CMOS
Page 429 · click to enlarge
Page 429

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

19.4.3 3-wire serial I/O mode operation with automatic transmit/receive function

This 3-wire serial I/O mode is used for transmission/reception of a maximum of 32-byte data without the use of software. Once transfer is started, the data prestored in the RAM can be transmitted by the set number of bytes,

and data can be received and stored in the RAM by the set number of bytes.

Handshake signals (STB and BUSY) are supported by hardware to transmit/receive data continuously. OSD

(On Screen Display) LSI and peripheral LSI including LCD controller/driver can be connected without difficulty.

(1) Register setting

The 3-wire serial I/O mode with automatic transmit/receive function is set with the serial operating mode

register 1 (CSIM1), the automatic data transmit/receive control register (ADTC) and the automatic data transmit/receive interval specify register (ADTI).

(a) Serial operating mode register 1 (CSIM1)

CSIM1 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets CSIM1 to 00H.

6 4 3 2 1 0 Symbol

Address After Reset R/W

CSIM1 CSIE1 DIR ATE 0 0 0 CSIM11 CSIM10

FF68H 00H R/W

CSIM11

CSIM10

Serial Interface Channel 1 Clock Selection

Clock externally input to SCK1 pinNote 1

8-bit timer register 2 (TM2) output

1 Clock specified with bits 4 to 7 of timer clock select register 3 (TCL3)

ATE

Serial Interface Channel 1 Operating Mode Selection

3-wire serial I/O mode

1 3-wire serial I/O mode with automatic transmit/receive function

DIR

MSB

SI1/P20

LSB

CSIE

CSIM

11 P20 PM21 P21 PM22

P22

x Operation

Clear P20 (CMOS input/output)

SO1 (CMOS

SCK1 (CMOS output) 1

bit 2 (STRB) of the automatic data transmit/receive control register (ADTC) to 0, 0.

2. Can be used freely as port function. 3. Can be used as P20 (CMOS input/output) when only transmitter is used (set bit 7 (RE) of

ADTC to 0).

Remark xDon’t care PMxx : Port mode register
PxxPort output latch
Show 24 more labels / short text on this page
Start Bit · SI1 Pin Function · SO1 Pin Function · SO1 (CMOS output) · (Input) · PM20 SO1/P21 Pin · Shift Register 1 · Serial Clock Counter · SI1/P20 Pin · SCK1/P22 Pin Function · Operation · Operation Control · Function · Function · P21 (CMOS input/output) · P22 (CMOS input/output) · stop · SCK1 (Input) · Operation · Count operation · SI1Note 3 · enable · (Input) · output)
Page 430 of the NEC PD78076Y user manual — R/W
Page 430 · click to enlarge
Page 430

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(b) Automatic data transmit/receive control register (ADTC)

ADTC is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets ADTC to 00H.

Symbol

Address After Reset R/W

ADTC RE ARLD ERCE ERR TRF STRB BUSY1 BUSY0 FF69H 00H R/WNote 1

R/W

BUSY1

BUSY0

Not using busy input

Busy input enable (active high)

Busy input enable (active low)

R/W

STRB

R

TRF

Status of Automatic Transmit/Receive FunctionNote 2

Detection of termination of automatic transmission/ reception (This bit is set to 0 upon suspension of automatic transmission/reception or when ARLD = 0.)

During automatic transmission/reception (This bit is set to 1 when data is written to SIO1.)

R

ERR

Error Detection of Automatic Transmit/Receive Function

No error (This bit is set to 0 when data is written to SIO1)

R/W

ERCE

Error Check Control of Automatic Transmit/ Receive Function

Error check enable (only when BUSY1 = 1)

R/W

ARLD

Operating Mode Selection of Automatic Transmit/ Receive Function

R/W

RE

Receive Control of Automatic Transmit/Receive Function

2. Judge the termination of automatic transmission/reception by using TRF, not CSIIF1 (interrupt request flag).

mode register 1 (CSIM1) set to 0, set STRB and BUSY1 of ADTC to 0, 0 (when an external clock is input, handshake control cannot be carried out).

Remark xDon’t care
Show 10 more labels / short text on this page
Busy Input Control · Strobe Output Control · Strobe output disable · Strobe output enable · Error occurred · Error check disable · Single operating mode · Repetitive operating mode · Receive disable · Receive enable
Page 431 of the NEC PD78076Y user manual — 3. When controlling the data transfer interval by automatic transmit/receive using
Page 431 · click to enlarge
Page 431

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(c) Automatic data transmit/receive interval specify register (ADTI)

This register sets the automatic data transmit/receive function data transfer interval.

ADTI is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets ADTI to 00H.

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

ADTI ADTI7 0 0 ADTI4 ADTI3 ADTI2 ADTI1 ADTI0 FF6BH 00H R/W

ADTI7

Data Transfer Interval Control

No control of interval by ADTINote 1

Control of interval by ADTI (ADTI0 to ADTI4) 1

Data Transfer Interval Specification (fXX = 5.0-MHz Operation) ADTI4 ADTI3 ADTI2 ADTI1

ADTI0

18.4 s + 0.5/fSCK

20.0 s + 1.5/fSCK

31.2 s + 0.5/fSCK

32.8 s + 1.5/fSCK

44.0 s + 0.5/fSCK

45.6 s + 1.5/fSCK

56.8 s + 0.5/fSCK

58.4 s + 1.5/fSCK

69.6 s + 0.5/fSCK

71.2 s + 1.5/fSCK

82.4 s + 0.5/fSCK

84.0 s + 1.5/fSCK

95.2 s + 0.5/fSCK

96.8 s + 1.5/fSCK

108.0 s + 0.5/fSCK

109.6 s + 1.5/fSCK

120.8 s + 0.5/fSCK

122.4 s + 1.5/fSCK

133.6 s + 0.5/fSCK

135.2 s + 1.5/fSCK

146.4 s + 0.5/fSCK

148.0 s + 1.5/fSCK

159.2 s + 0.5/fSCK

160.8 s + 1.5/fSCK

172.0 s + 0.5/fSCK

173.6 s + 1.5/fSCK

184.8 s + 0.5/fSCK

186.4 s + 1.5/fSCK

197.6 s + 0.5/fSCK

199.2 s + 1.5/fSCK

210.4 s + 0.5/fSCK

212.0 s + 1.5/fSCK

2. The data transfer interval includes an error. The data transfer minimum and maximum

intervals are found from the following expressions (n: Value set in ADTI0 to ADTI4).

However, if a minimum which is calculated by the following expressions is smaller than

2/fSCK, the minimum interval time is 2/fSCK.

fXX fSCK 28 0.5 26 fXX

Minimum = (n + 1) × + +

26 fXX fSCK 36 1.5

Maximum = (n + 1) × + +

2. Bits 5 and 6 must be set to 0.

3. When controlling the data transfer interval by automatic transmit/receive using

ADTI, busy control (refer to 19.4.3 (4) (a) Busy control option) becomes invalid.

Remark f XXMain system clock frequency (f X or f X /2)
f XMain system clock oscillation frequency
f SCKSerial clock frequency
Show 35 more labels / short text on this page
MinimumNote 2 · MaximumNote 2 · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · fXX
Page 432 of the NEC PD78076Y user manual — 3. When controlling the data transfer interval by automatic transmit/receive using
Page 432 · click to enlarge
Page 432

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

ADTI ADTI7 0 0 ADTI4 ADTI3 ADTI2 ADTI1 ADTI0 FF6BH 00H R/W

Data Transfer Interval Specification (fXX = 5.0-MHz Operation) ADTI4 ADTI3 ADTI2 ADTI1

ADTI0

223.2 s + 0.5/fSCK

224.8 s + 1.5/fSCK

236.0 s + 0.5/fSCK

237.6 s + 1.5/fSCK

248.8 s + 0.5/fSCK

250.4 s + 1.5/fSCK

261.6 s + 0.5/fSCK

263.2 s + 1.5/fSCK

274.4 s + 0.5/fSCK

276.0 s + 1.5/fSCK

287.2 s + 0.5/fSCK

288.8 s + 1.5/fSCK

300.0 s + 0.5/fSCK

301.6 s + 1.5/fSCK

312.8 s + 0.5/fSCK

314.4 s + 1.5/fSCK

325.6 s + 0.5/fSCK

327.2 s + 1.5/fSCK

338.4 s + 0.5/fSCK

340.0 s + 1.5/fSCK

351.2 s + 0.5/fSCK

352.8 s + 1.5/fSCK

364.0 s + 0.5/fSCK

365.6 s + 1.5/fSCK

376.8 s + 0.5/fSCK

378.4 s + 1.5/fSCK

389.6 s + 0.5/fSCK

391.2 s + 1.5/fSCK

402.4 s + 0.5/fSCK

404.0 s + 1.5/fSCK

415.2 s + 0.5/fSCK

416.8 s + 1.5/fSCK

are found from the following expressions (n: Value set in ADTI0 to ADTI4). However, if a minimum

which is calculated by the following expressions is smaller than 2/fSCK, the minimum interval time

is 2/fSCK.

Minimum = (n + 1) × + +

26 fXX

28 0.5 fXX fSCK

26 fXX

Maximum = (n + 1) × + +

36 1.5 fXX fSCK

2. Bits 5 and 6 must be set to 0.

3. When controlling the data transfer interval by automatic transmit/receive using

ADTI, busy control (refer to 19.4.3 (4) (a) Busy control option) becomes invalid.

Remark f XXMain system clock frequency (f X or f X /2)
f XMain system clock oscillation frequency
f SCKSerial clock frequency
Show 34 more labels / short text on this page
MinimumNote · MaximumNote · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ
Page 433 of the NEC PD78076Y user manual — ADTI0
Page 433 · click to enlarge
Page 433

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

ADTI ADTI7 0 0 ADTI4 ADTI3 ADTI2 ADTI1 ADTI0 FF6BH 00H R/W

ADTI7

Data Transfer Interval Control

No control of interval by ADTINote 1

Control of interval by ADTI (ADTI0 to ADTI4) 1

Data Transfer Interval Specification (fXX = 2.5-MHz Operation) ADTI4 ADTI3 ADTI2 ADTI1

ADTI0

36.8 s + 0.5/fSCK

40.0 s + 1.5/fSCK

62.4 s + 0.5/fSCK

65.6 s + 1.5/fSCK

88.0 s + 0.5/fSCK

91.2 s + 1.5/fSCK

113.6 s + 0.5/fSCK

116.8 s + 1.5/fSCK

139.2 s + 0.5/fSCK

142.4 s + 1.5/fSCK

164.8 s + 0.5/fSCK

168.0 s + 1.5/fSCK

190.4 s + 0.5/fSCK

193.6 s + 1.5/fSCK

216.0 s + 0.5/fSCK

219.2 s + 1.5/fSCK

241.6 s + 0.5/fSCK

244.8 s + 1.5/fSCK

267.2 s + 0.5/fSCK

270.4 s + 1.5/fSCK

292.8 s + 0.5/fSCK

296.0 s + 1.5/fSCK

318.4 s + 0.5/fSCK

321.6 s + 1.5/fSCK

344.0 s + 0.5/fSCK

347.2 s + 1.5/fSCK

369.6 s + 0.5/fSCK

372.8 s + 1.5/fSCK

395.2 s + 0.5/fSCK

398.4 s + 1.5/fSCK

420.8 s + 0.5/fSCK

424.0 s + 1.5/fSCK

2. The data transfer interval includes an error. The data transfer minimum and maximum

intervals are found from the following expressions (n: Value set in ADTI0 to ADTI4). However, if a minimum which is calculated by the following expressions is smaller than

2/fSCK, the minimum interval time is 2/fSCK.

26 fXX

28 0.5 fXX fSCK

Minimum = (n + 1) × + +

26 fXX

Maximum = (n + 1) × + +

36 1.5 fXX fSCK

2. Bits 5 and 6 must be set to 0.
3. When controlling the data transfer interval by automatic transmit/receive using ADTI, busy control (refer to 19.4.3 (4) (a) Busy control option) becomes invalid.
Remark f XXMain system clock frequency (f X or f X /2)
f XMain system clock oscillation frequency
f SCKSerial clock frequency
Show 34 more labels / short text on this page
MinimumNote 2 · MaximumNote 2 · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ
Page 434 of the NEC PD78076Y user manual — 3. When controlling the data transfer interval by automatic transmit/receive using
Page 434 · click to enlarge
Page 434

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

ADTI ADTI7 0 0 ADTI4 ADTI3 ADTI2 ADTI1 ADTI0 FF6BH 00H R/W

Data Transfer Interval Specification (fXX = 2.5-MHz Operation) ADTI4 ADTI3 ADTI2 ADTI1

ADTI0

446.4 s + 0.5/fSCK

449.6 s + 1.5/fSCK

472.0 s + 0.5/fSCK

475.2 s + 1.5/fSCK

497.6 s + 0.5/fSCK

500.8 s + 1.5/fSCK

523.2 s + 0.5/fSCK

526.4 s + 1.5/fSCK

548.8 s + 0.5/fSCK

552.0 s + 1.5/fSCK

574.4 s + 0.5/fSCK

577.6 µs + 1.5/fSCK

600.0 s + 0.5/fSCK

603.2 s + 1.5/fSCK

625.6 s + 0.5/fSCK

628.8 s + 1.5/fSCK

651.2 s + 0.5/fSCK

654.4 s + 1.5/fSCK

676.8 s + 0.5/fSCK

680.0 s + 1.5/fSCK

702.4 s + 0.5/fSCK

705.6 s + 1.5/fSCK

728.0 s + 0.5/fSCK

731.2 s + 1.5/fSCK

753.6 s + 0.5/fSCK

756.8 s + 1.5/fSCK

779.2 s + 0.5/fSCK

782.4 s + 1.5/fSCK

804.8 s + 0.5/fSCK

808.0 s + 1.5/fSCK

830.4 s + 0.5/fSCK

833.6 s + 1.5/fSCK

are found from the following expressions (n: Value set in ADTI0 to ADTI4). However, if a minimum

which is calculated by the following expressions is smaller than 2/fSCK, the minimum interval time

is 2/fSCK.

26 fXX

28 0.5 fXX fSCK

Minimum = (n + 1) × + +

26 fXX

36 1.5 fXX fSCK

Maximum = (n + 1) × + +

2. Bits 5 and 6 must be set to 0.

3. When controlling the data transfer interval by automatic transmit/receive using

ADTI, busy control (refer to 19.4.3 (4) (a) Busy control option) becomes invalid.

Remark f XXMain system clock frequency (f X or f X /2)
f XMain system clock oscillation frequency
f SCKSerial clock frequency
Show 33 more labels / short text on this page
MinimumNote · MaximumNote · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ · µ
Page 435 of the NEC PD78076Y user manual — (b) Automatic transmit/receive mode setting
Page 435 · click to enlarge
Page 435

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(2) Automatic transmit/receive data setting

(a) Transmit data setting

Write transmit data from the least significant address FAC0H of buffer RAM (up to FADFH at

maximum). The transmit data should be in the order from high-order address to low-order

address.

Set to the automatic data transmit/receive address pointer (ADTP) the value obtained by

subtracting 1 from the number of transmit data bytes.

(b) Automatic transmit/receive mode setting

Set CSIE1 and ATE of the serial operating mode register 1 (CSIM1) to 1.

Set RE of the automatic data transmit/receive control register (ADTC) to 1.

Set a data transmit/receive interval in the automatic data transmit/receive interval specify register

(ADTI).

Write any value to the serial I/O shift register 1 (SIO1) (transfer start trigger).

the written value has no meaning.

The following operations are automatically carried out when (a) and (b) are carried out.

  • After the buffer RAM data specified with ADTP is transferred to SIO1, transmission is carried out (start

of automatic transmission/reception).

  • The received data is written to the buffer RAM address specified with ADTP.
  • ADTP is decremented and the next data transmission/reception is carried out. Data transmission/

reception continues until the ADTP decremental output becomes 00H and address FAC0H data is

output (end of automatic transmission/reception).

  • When automatic transmission/reception is terminated, TRF is cleared to 0.
Page 436 of the NEC PD78076Y user manual — dependent upon CPU processing and the value of the automatic data transmit/
Page 436 · click to enlarge
Page 436

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(3) Communication operation

(a) Basic transmission/reception mode

This transmission/reception mode is the same as the 3-wire serial I/O mode in which specified number

of data are transmitted/received in 8-bit units.

Serial transfer is started when any data is written to the serial I/O shift register 1 (SIO1) while bit 7 (CSIE1)

of the serial operating mode register 1 (CSIM1) is set to 1.

Upon completion of transmission of the last byte, the interrupt request flag (CSIIF1) is set. However,

determine whether the automatic transmission/reception is completed, not with CSIIF1 but with bit 3

(TRF) of the automatic data transmission/reception control register (ADTC).

If busy control and strobe control are not executed, the P23/STB and P24/BUSY pins can be used as

normal input/output ports.

Figure 19-8 shows the basic transmission/reception mode operation timings, and Figure 19-9 shows

the operation flowchart. Figure 19-10 shows an example of the buffer RAM operation in 6-byte

transmission/reception.

Figure 19-8. Basic Transmission/Reception Mode Operation Timings

SCK1

SO1 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

SI1 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

CSIIF1

TRF

Cautions 1. Because, in the basic transmission/reception mode, the automatic transmit/receive

function writes/reads data to/from the buffer RAM after 1-byte transmission/reception,

an interval is inserted till the next transmission/reception. As the buffer RAM write/

read is performed at the same time as CPU processing, the maximum interval is

dependent upon CPU processing and the value of the automatic data transmit/

receive interval specify register (ADTI) (see (5) Automatic transmit/receive interval

time).

2. When TRF is cleared, the SO1 pin becomes low level.
Remark CSIIF0Interrupt request flag
TRFBit 3 of automatic data transmit/receive control register (ADTC)

Interval

Page 437 of the NEC PD78076Y user manual — TRF = 0
Page 437 · click to enlarge
Page 437

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-9. Basic Transmission/Reception Mode Flowchart

Set ADTP to the value (pointer value) obtained by subtracting 1

from the number of transmit

Set the transmission/reception operation interval time in ADTI

Write any data to SIO1

Write transmit data from

buffer RAM to SIO1

Write receive data from

SIO1 to buffer RAM

Pointer value = 0

TRF = 0

ADTPAutomatic data transmit/receive address pointer
ADTIAutomatic data transmit/receive interval specify register
SIO1Serial I/O shift register 1
TRFBit 3 of automatic data transmit/receive control register (ADTC)
Show 16 more labels / short text on this page
Start · Write transmit data · in buffer RAM · data bytes · Software Execution · (Start trigger) · Transmission/reception · Decrement pointer value · operation · Hardware Execution · No · Yes · No · Software Execution · Yes · End
Page 438 of the NEC PD78076Y user manual — 0 CSIIF1
Page 438 · click to enlarge
Page 438

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

In 6-byte transmission/reception (ARLD = 0, RE = 1) in basic transmit/receive mode, buffer RAM operates as

follows.

(i) Before transmission/reception (refer to Figure 19-10 (a))

After any data has been written to the serial I/O shift register 1 (SIO1) (start trigger: this data is not

transferred), transmit data 1 (T1) is transferred from the buffer RAM to SIO1. When transmission

of the first byte is completed, the receive data 1 (R1) is transferred from SIO1 to the buffer RAM,

and automatic data transmit/receive address pointer (ADTP) is decremented. Then transmit data

2 (T2) is transferred from the buffer RAM to SIO1.

(ii) 4th byte transmission/reception point (refer to Figure 19-10 (b))

Transmission/reception of the third byte is completed, and transmit data 4 (T4) is transferred from

the buffer RAM to SIO1. When transmission of the fourth byte is completed, the receive data 4 (R4)

is transferred from SIO1 to the buffer RAM, and ADTP is decremented.

(iii) Completion of transmission/reception (refer to Figure 19-10 (c))

When transmission of the sixth byte is completed, the receive data 6 (R6) is transferred from SIO1

to the buffer RAM, and the interrupt request flag (CSIIF1) is set (INTCSI1 generation).

Figure 19-10. Buffer RAM Operation in 6-byte Transmission/Reception

(in Basic Transmit/Receive Mode) (1/2)

(a) Before transmission/reception

FADFH

FAC5H

Transmit data 1 (T1)

Receive data 1 (R1) SIO1

Transmit data 2 (T2)

Transmit data 3 (T3)

5 ADTP

Transmit data 4 (T4)

Transmit data 5 (T5)

FAC0H

Transmit data 6 (T6)

0 CSIIF1

Page 439 of the NEC PD78076Y user manual — 1 CSIIF1
Page 439 · click to enlarge
Page 439

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-10. Buffer RAM Operation in 6-byte Transmission/Reception

(in Basic Transmit/Receive Mode) (2/2)

(b) 4th byte transmission/reception

FADFH

FAC5H

Receive data 1 (R1)

Receive data 4 (R4) SIO1

Receive data 2 (R2)

Receive data 3 (R3)

2 ADTP

Transmit data 4 (T4)

Transmit data 5 (T5)

FAC0H

Transmit data 6 (T6)

0 CSIIF1

(c) Completion of transmission/reception

FADFH

FAC5H

Receive data 1 (R1)

SIO1

Receive data 2 (R2)

Receive data 3 (R3)

0 ADTP

Receive data 4 (R4)

Receive data 5 (R5)

FAC0H

Receive data 6 (R6)

1 CSIIF1

Page 440 of the NEC PD78076Y user manual — CPU processing, the maximum interval is dependent upon CPU processing and the
Page 440 · click to enlarge
Page 440

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(b) Basic transmission mode

In this mode, the specified number of 8-bit unit data are transmitted.

Serial transfer is started when any data is written to the serial I/O shift register 1 (SIO1) while bit 7 (CSIE1)

of the serial operating mode register 1 (CSIM1) is set to 1.

Upon completion of transmission of the last byte, the interrupt request flag (CSIIF1) is set. However,

determine whether the automatic transmission/reception is completed, not with CSIIF1 but with the bit

3 (TRF) of automatic data transmission/reception control register (ADTC).

If receive operation, busy control and strobe control are not executed, the P20/SI1, P23/STB and P24/

BUSY pins can be used as normal input/ports.

Figure 19-11 shows the basic transmission mode operation timings, and Figure 19-12 shows the

operation flowchart. Figure 19-13 shows an example of the buffer RAM operation in 6-byte transmission.

Figure 19-11. Basic Transmission Mode Operation Timings

SCK1

SO1 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

CSIIF1

TRF

Cautions 1. Because, in the basic transmission mode, the automatic transmit/receive function

reads data from the buffer RAM after 1-byte transmission, an interval is inserted till

the next transmission. As the buffer RAM read is performed at the same time as

CPU processing, the maximum interval is dependent upon CPU processing and the

value of the automatic data transmit/receive interval specify register (ADTI) (see (5)

Automatic transmit/receive interval time).

2. When TRF is cleared, the SO1 pin becomes low level.
Remark CSIIF1Interrupt request flag
TRFBit 3 of automatic data transmit/receive control register (ADTC)

Interval

Page 441 of the NEC PD78076Y user manual — TRF = 0
Page 441 · click to enlarge
Page 441

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-12. Basic Transmission Mode Flowchart

Set ADTP to the value (pointer value) obtained by subtracting 1

from the number of transmit

Set the transmission/reception operation interval time in ADTI

Write any data to SIO1

Write transmit data from

buffer RAM to SIO1

Pointer value = 0

TRF = 0

ADTPAutomatic data transmit/receive address pointer
ADTIAutomatic data transmit/receive interval specify register
SIO1Serial I/O shift register 1
TRFBit 3 of automatic data transmit/receive control register (ADTC)
Show 15 more labels / short text on this page
Start · Write transmit data · in buffer RAM · data bytes · Software Execution · (Start trigger) · Decrement pointer value · Transmission operation · Hardware Execution · No · Yes · No · Software Execution · Yes · End
Page 442 of the NEC PD78076Y user manual — 0 CSIIF1
Page 442 · click to enlarge
Page 442

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

In 6-byte transmission (ARLD = 0, RE = 0) in basic transmit mode, buffer RAM operates as follows.

(i) Before transmission (refer to Figure 19-13 (a))

After any data has been written to the serial I/O shift register 1 (SIO1) (start trigger: this data is not

transferred), transmit data 1 (T1) is transferred from the buffer RAM to SIO1. When transmission

of the first byte is completed, the automatic data transmit/receive address pointer (ADTP) is

decremented. Then transmit data 2 (T2) is transferred from the buffer RAM to SIO1.

(ii) 4th byte transmission point (refer to Figure 19-13 (b))

Transmission of the third byte is completed, and transmit data 4 (T4) is transferred from the buffer

RAM to SIO1. When transmission of the fourth byte is completed, ADTP is decremented.

(iii) Completion of transmission/reception (refer to Figure 19-13 (c))

When transmission of the sixth byte is completed, the interrupt request flag (CSIIF1) is set (INTCSI1

generation).

Figure 19-13. Buffer RAM Operation in 6-byte Transmission

(in Basic Transmit Mode) (1/2)

(a) Before transmission

FADFH

FAC5H

Transmit data 1 (T1)

SIO1

Transmit data 2 (T2)

Transmit data 3 (T3)

5 ADTP

Transmit data 4 (T4)

Transmit data 5 (T5)

FAC0H

Transmit data 6 (T6)

0 CSIIF1

Page 443 of the NEC PD78076Y user manual — 1 CSIIF1
Page 443 · click to enlarge
Page 443

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-13. Buffer RAM Operation in 6-byte Transmission

(in Basic Transmit Mode) (2/2)

(b) 4th byte transmission point

FADFH

FAC5H

Transmit data 1 (T1)

SIO1

Transmit data 2 (T2)

Transmit data 3 (T3)

2 ADTP

Transmit data 4 (T4)

Transmit data 5 (T5)

FAC0H

Transmit data 6 (T6)

0 CSIIF1

(c) Completion of transmission/reception

FADFH

FAC5H

Transmit data 1 (T1)

SIO1

Transmit data 2 (T2)

Transmit data 3 (T3)

0 ADTP

Transmit data 4 (T4)

Transmit data 5 (T5)

FAC0H

Transmit data 6 (T6)

1 CSIIF1

Page 444 of the NEC PD78076Y user manual — automatic data transmit/receive interval specify register (ADTI) (see (5) Automatic
Page 444 · click to enlarge
Page 444

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(c) Repeat transmission mode

In this mode, data stored in the buffer RAM is transmitted repeatedly.

Serial transfer is started by writing any data to serial I/O shift register 1 (SIO1) when 1 is set in bit 7

(CSIE1) of the serial operating mode register 1 (CSIM1).

Unlike the basic transmission mode, after the last byte (data in address FAC0H) has been transmitted,

the interrupt request flag (CSIIF1) is not set, the value at the time when the transmission was started

is set in the automatic data transmit/receive address pointer (ADTP) again, and the buffer RAM contents

are transmitted again.

When a reception operation, busy control and strobe control are not performed, the P20/SI1, P23/STB

and P24/BUSY pins can be used as ordinary input/output ports.

The repeat transmission mode operation timing is shown in Figure 19-14, and the operation flowchart

in Figure 19-15. Figure 19-16 shows an example of the buffer RAM operation in 6-byte repeat

transmission.

Figure 19-14. Repeat Transmission Mode Operation Timing

SCK1

SO1

D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

D7 D6 D5

the transmission of one byte, the interval is included in the period up to the next

transmission. As the buffer RAM read is performed at the same time as CPU processing,

the maximum interval is dependent upon the CPU operation and the value of the

automatic data transmit/receive interval specify register (ADTI) (see (5) Automatic

transmit/receive interval time).

Interval Interval

Page 445 of the NEC PD78076Y user manual — CHAPTER 19 SERIAL INTERFACE CHANNEL 1
Page 445 · click to enlarge
Page 445

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-15. Repeat Transmission Mode Flowchart

Set ADTP to the value (pointer value) obtained by subtracting 1

from the number of transmit

Set the transmission/reception operation interval time in ADTI

Write any data to SIO1

Write transmit data from

buffer RAM to SIO1

Pointer value = 0

ADTPAutomatic data transmit/receive address pointer
ADTIAutomatic data transmit/receive interval specify register
SIO1Serial I/O shift register 1
Show 12 more labels / short text on this page
Start · Write transmit data · in buffer RAM · data bytes · Software Execution · (Start trigger) · Decrement pointer value · Transmission operation · Hardware Execution · No · Yes · Reset ADTP
Page 446 of the NEC PD78076Y user manual — 0 CSIIF1
Page 446 · click to enlarge
Page 446

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

In 6-byte transmission (ARLD = 1, RE = 0) in repeat transmit mode, buffer RAM operates as follows.

(i) Before transmission (refer to Figure 19-16 (a))

After any data has been written to the serial I/O shift register 1 (SIO1) (start trigger: this data is not

transferred), transmit data 1 (T1) is transferred from the buffer RAM to SIO1. When transmission

of the first byte is completed, the automatic data transmit/receive address pointer (ADTP) is

decremented. Then transmit data 2 (T2) is transferred from the buffer RAM to SIO1.

(ii) Upon completion of transmission of 6 bytes (refer to Figure 19-16 (b))

When transmission of the sixth byte is completed, the interrupt request flag (CSIIF1) is not set.

The first pointer value is set to ADTP again.

(iii) 7th byte transmission point (refer to Figure 19-16 (c))

Transmit data 1 (T1) is transferred from the buffer RAM to SIO1 again. When transmission of the

first byte is completed, ADTP is decremented. Then transmit data 2 (T2) is transferred from the

buffer RAM to SIO1.

Figure 19-16. Buffer RAM Operation in 6-byte Transmission

(in Repeat Transmit Mode) (1/2)

(a) Before transmission

FADFH

FAC5H

Transmit data 1 (T1)

SIO1

Transmit data 2 (T2)

Transmit data 3 (T3)

5 ADTP

Transmit data 4 (T4)

Transmit data 5 (T5)

FAC0H

Transmit data 6 (T6)

0 CSIIF1

Page 447 of the NEC PD78076Y user manual — 0 CSIIF1
Page 447 · click to enlarge
Page 447

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-16. Buffer RAM Operation in 6-byte Transmission

(in Repeat Transmit Mode) (2/2)

(b) Upon completion of transmission of 6 bytes

FADFH

FAC5H

Transmit data 1 (T1)

SIO1

Transmit data 2 (T2)

Transmit data 3 (T3)

5 ADTP

Transmit data 4 (T4)

Transmit data 5 (T5)

FAC0H

Transmit data 6 (T6)

0 CSIIF1

(c) 7th byte transmission point

FADFH

FAC5H

Transmit data 1 (T1)

SIO1

Transmit data 2 (T2)

Transmit data 3 (T3)

5 ADTP

Transmit data 4 (T4)

Transmit data 5 (T5)

FAC0H

Transmit data 6 (T6)

0 CSIIF1

Page 448 of the NEC PD78076Y user manual — SCK1
Page 448 · click to enlarge
Page 448

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(d) Automatic transmission/reception suspending and restart

Automatic transmission/reception can be temporarily suspended by setting bit 7 (CSIE1) of the serial

operating mode register 1 (CSIM1) to 0.

If during 8-bit data transfer, the transmission/reception is not suspended if bit 7 (CSIE1) is set to 0, it

is suspended upon completion of 8-bit data transfer.

When suspended, bit 3 (TRF) of the automatic data transmit/receive control register (ADTC) is set to

0 after transfer of the 8th bit, and all the port pins used with the serial interface pins for dual function

(P20/SI1, P21/SO1, P22/SCK1, P23/STB, and P24/BUSY) are set to the port mode.

For restart of automatic transmission/reception, remaining data can be transferred by setting CSIE1 to

1 and writing any data to the serial I/O shift register 1 (SIO1).

Cautions 1. If the HALT instruction is executed during automatic transmission/reception,

transfer is suspended and the HALT mode is set if during 8-bit data transfer. When

the HALT mode is cleared, automatic transmission/reception is restarted from the

suspended point.

2. When suspending automatic transmission/reception, do not change the operating

mode to 3-wire serial I/O mode while TRF = 1.

Figure 19-17. Automatic Transmission/Reception Suspension and Restart

Suspend CSIE1 = 0 (Suspended Command)

Restart Command CSIE1 = 1, Write to SIO1

SCK1

SO1 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

SI1 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

CSIE1Bit 7 of serial operating mode register 1 (CSIM1)
Page 449 of the NEC PD78076Y user manual — automatic data transmit/receive interval specify register (ADTI). If both are used
Page 449 · click to enlarge
Page 449

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(4) Synchronization control

Busy control and strobe control are functions for synchronizing sending and receiving between the master

device and slave device.

By using these functions, it is possible to detect bit slippage during sending and receiving.

(a) Busy control option

Busy control is a function which causes the master device’s serial transmission to wait when the slave

device outputs a busy signal to the master device, and maintain the wait state while that busy signal

is active.

When the busy control option is used, the conditions shown below are necessary.

  • Bit 5 (ATE) of serial operation mode register 1 (CSIM1) should be set at (1).
  • Bit 1 (BUSY1) of the automatic data transmit/receive control register (ADTC) should be set at (1).

The system configuration between the master device and slave device in cases where the busy control

option is used is shown in Figure 19-18.

Figure 19-18. System Configuration when the Busy Control Option is Used

Master Device (µPD78078, 78078Y Subseries) Slave Device

SCK1

SCK1

SO1

SO1 SI1

SI1

BUSY

The master device inputs the busy signal output by the slave device to pin BUSY/P24. In sync with

the fall of the serial clock, the master device samples the input busy signal. Even if the busy signal

becomes active during sending or receiving of 8 bit data, the wait does not apply. If the busy signal

becomes active at the rise of the serial clock 2 clock cycles after sending or receiving of 8 bit data ends,

the busy input first becomes effective at that point, and thereafter, sending or receiving of data waits

during the period that the busy signal is active.

The busy signal’s active level is set in bit 0 (BUSY0) of ADTC.

BUSY0 = 0Active high
BUSY0 = 1Active low

Furthermore, in the case that the busy control option is used, select the internal clock for the serial clock.

The busy signal cannot be controlled with an external clock.

The operation timing when the busy control option is used is shown in Figure 19-19.

automatic data transmit/receive interval specify register (ADTI). If both are used

simultaneously, busy control becomes invalid.

Page 450 of the NEC PD78076Y user manual — BUSY
Page 450 · click to enlarge
Page 450

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-19. Operation Timings when Using Busy Control Option (BUSY0 = 0)

SCK1

SO1 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

SI1 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

BUSY

CSIIF1

TRF

Remark CSIIF1Interrupt request flag
TRFBit 3 of the automatic data transmit/receive control register (ADTC)

If the busy signal becomes inactive, the wait is canceled. If the sampled busy signal is inactive, sending

or receiving of the next 8 bit data begins from the fall of the next serial clock cycle.

Furthermore, the busy signal is asynchronous with the serial clock, so even if the slave side inactivates

the busy signal, it takes nearly 1 clock cycle at the most until it is sampled again. Also, it takes another

0.5 clock cycle after sampling until data transmission resumes.

Therefore, in order to definitely cancel a wait state, it is necessary for the slave side to keep the busy

signal for at least 1.5 clock cycles.

Figure 19-20 shows the timing of the busy signal and wait cancel. In this figure, an example of the case

where the busy signal becomes active when sending or receiving starts is shown.

Wait · Busy Input Clear · Busy Input Valid

Page 451 of the NEC PD78076Y user manual — (b) Busy & strobe control option
Page 451 · click to enlarge
Page 451

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-20. Busy Signal and Wait Cancel (BUSY0 = 0)

SCK1

D7 SO1

D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

SI1

D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

1.5 clocks (min.)

In the case where the busy signal becomes inactive directly when sampled

BUSY Input Cancel Wait

(b) Busy & strobe control option

Strobe control is a function for synchronizing the sending and receiving of data between a master device

and slave device. When sending or receiving of 8 bit data ends, the strobe signal is output by the master

device from pin STB/P23. Through this means, the slave device can know the timing of the end of master

data transmission. Therefore, even if there is noise in the serial clock and bit slippage occurs,

synchronization is maintained and bit slippage has no effect on transmission of the next byte.

In the case that the strobe control option is used, the conditions shown below are necessary.

  • Set bit 5 (ATE) of serial operation mode register 1 (CSIM1) at (1).
  • Set bit 2 (STRB) of the automatic data transmit/receive control register (ADTC) at (1).

Normally, busy control and strobe control are used simultaneously as handshake signals. In this case,

together with output of the strobe signal from pin STB/P23, pin BUSY/P24 can be sampled and sending

or receiving can wait while the busy signal is being input.

If strobe control is not carried out, pin P23/STB can be used as a normal I/O port.

Operation timing when busy and strobe control are used is shown in Figure 19-21.

Furthermore, if strobe control is used, the interrupt request flag (CSIIF1), set when sending or receiving

ends, is set after the strobe signal is output.

BUSY (Active High) · BUSY Input Effective

Page 452 of the NEC PD78076Y user manual — STB
Page 452 · click to enlarge
Page 452

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

Figure 19-21. Operation Timings when Using Busy & Strobe Control Option (BUSY0 = 0)

SCK1

SO1 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

SI1 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

STB

BUSY

CSIIF1

TRF

Remark CSIIF1Interrupt request flag
TRFBit 3 of the automatic data transmit/receive control register (ADTC)

Busy Input Clear · Busy Input Valid

Page 453 of the NEC PD78076Y user manual — D7
Page 453 · click to enlarge
Page 453

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(c) Bit slippage detection function through the busy signal

During an automatic transmit/receive operation, noise occur in the serial clock signal output by the

master device and bit slippage may occur in the slave device side serial clock. At this time, if the strobe

control option is not used, this bit slippage will have an effect on sending of the next byte. In such a

case, the busy control option can be used on the master device side and, by checking the busy signal

during sending, bit slippage can be detected.

Bit slippage detection through the busy signal is accomplished as follows.

The slave side outputs a busy signal after the serial clock rises on the 8th cycle of data sending or

receiving (at this time, if application of the wait state by the busy signal is not desired, the busy signal

is made inactive within 2 clock cycles).

The master device side samples the busy signal in sync with the fall of the serial clock’s front side. If

no bit slippage is occurring, the busy signal will be inactive in sampling for 8 clock cycles. If the busy

signal is found to be active in sampling, it is regarded as an occurrence of bit slippage error processing

is executed (bit 4 (ERR) of the automatic data transmit/receive control register (ADTC) is set at (1)).

The operation timing of the bit slippage detection function through the busy signal is shown in Figure

Figure 19-22. Operation Timing of the Bit Slippage Detection Function through the Busy Signal

(BUSY0 = 1)

Bit slippage due to noise

SCK1

D7 SO1

D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

D7

SI1

D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

D7

BUSY

CSIIF1

CSIE1

ERR

No busy detection Error interrrupt request generation

CSIIF1Interrupt request flag
CSIE1Bit 7 of serial operating mode register 1 (CSIM1)
ERRBit 4 of the automatic data transmit/receive control register (ADTC)

SCK1 (Master Side) · (Slave Side) · Error detection

Page 454 of the NEC PD78076Y user manual — CSIIF1
Page 454 · click to enlarge
Page 454

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(5) Automatic transmit/receive interval time

When using the automatic transmit/receive function, the read/write operations from/to the buffer RAM are

performed after transmitting/receiving one byte. Therefore, an interval is inserted before the next transmit/

receive.

Since the read/write operations from/to the buffer RAM are performed in parallel with the CPU processing

when using the automatic transmit/receive function by the internal clock, the interval depends on the value

which is set in the automatic transmit/receive interval specification register (ADTI) and the CPU processing

at the rising edge of the eighth serial clock. Whether it depends on the ADTI or not can be selected by the

setting of its bit 7 (ADTI7). When it is set to 0, the interval depends only on the CPU processing. When

it is set to 1, the interval depends on the contents of the ADTI or CPU processing, whichever is greater.

When the automatic transmit/receive function is used by an external clock, it must be selected so that the

interval may be longer than the value indicated by paragraph (b).

Figure 19-23. Automatic Data Transmit/Receive Interval

SCK1

SO1 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

SI1 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0

CSIIF1

CSIIF1Interrupt request flag

Interval

Page 455 of the NEC PD78076Y user manual — Figure 19-24. Operation Timing with Automatic Data Transmit/Receive Function Performed by
Page 455 · click to enlarge
Page 455

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(a) When the automatic transmit/receive function is used by the internal clock

If bit 1 (CSIM11) of serial operation mode register 1 (CSIM1) is set at (1), the internal clock operates.

If the automatic transmit/receive function is operated by the internal clock, interval timing by CPU

processing is as follows.

When bit 7 (ADTI7) of automatic data transmit/receive interval specify register (ADTI) is set to 0, the

interval depends on the CPU processing. When ADTI7 is set to 1, it depends on the contents of the

ADTI or CPU processing, whichever is greater.

Refer to Figure 19-5. Automatic Data Transmit/Receive Interval Specify Register Format for the

intervals which are set by the ADTI.

Table 19-2. Interval Timing through CPU Processing (when the Internal Clock is Operating)

CPU Processing Interval Time

When using multiplication instruction Max. (2.5TSCK, 13TCPU)

When using division instruction Max. (2.5TSCK, 20TCPU)

External access 1 wait mode Max. (2.5TSCK, 9TCPU)

Other than above Max. (2.5TSCK, 7TCPU)

T SCK1/f SCK
f SCKSerial clock frequency
T CPU1/f CPU

fCPU : CPU clock (set by bits 0 to 2 (PCC0 to PCC2) of the processor clock control register (PCC)

and bit 0 (MCS) of the oscillation mode selection register (OSMS))

MAX. (a, b)a or b, whichever is greater

Figure 19-24. Operation Timing with Automatic Data Transmit/Receive Function Performed by

Internal Clock

T CPU

T SCK

SCK1

SO1

D7 D6 D5 D4 D3 D2 D1 D0

SI1

D7 D6 D5 D4 D3 D2 D1 D0

f XMain system clock oscillation frequency

fCPU : CPU clock (set by bits 0 to 2 (PCC0 to PCC2) of the processor clock control register (PCC) and

bit 0 (MCS) of the oscillation mode selection register (OSMS).

T CPU1/f CPU
T SCK1/f SCK
f SCKSerial clock frequency

fX · fCPU · Interval

Page 456 of the NEC PD78076Y user manual — CHAPTER 19 SERIAL INTERFACE CHANNEL 1
Page 456 · click to enlarge
Page 456

CHAPTER 19 SERIAL INTERFACE CHANNEL 1

(b) When the automatic transmit/receive function is used by the external clock

If bit 1 (CSIM11) of serial operating mode register 1 (CSIM1) is cleared to 0, external clock operation

is set.

When the automatic transmit/receive function is used by the external clock, it must be selected so that

the interval may be longer than the values shown as follows.

Table 19-3. Interval Timing through CPU Processing (when the External Clock is Operating)

CPU Processing Interval Time

When using multiplication instruction 13TCPU or longer

When using division instruction 20TCPU or longer

External access 1 wait mode 9TCPU or longer

Other than above 7TCPU or longer

T CPU1/f CPU

fCPU : CPU clock (set by the bits 0 to 2 (PCC0 to PCC2) of the processor clock control register (PCC)

and bit 0 (MCS) of the oscillation mode selection register (OSMS))

Page 457 of the NEC PD78076Y user manual — (3) 3-wire serial I/O mode (MSB-first/LSB-first switchable)
Page 457 · click to enlarge
Page 457

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

20.1 Serial Interface Channel 2 Functions

Serial interface channel 2 has the following three modes.

  • Operation stop mode
  • Asynchronous serial interface (UART) mode
  • 3-wire serial I/O mode

(1) Operation stop mode

This mode is used when serial transfer is not carried out to reduce power consumption.

(2) Asynchronous serial interface (UART) mode

In this mode, one byte of data is transmitted/received following the start bit, and full-duplex operation is

possible.

A dedicated UART baud rate generator is incorporated, allowing communication over a wide range of baud

rates. In addition, the baud rate can be defined by scaling the input clock to the ASCK pin.

The MIDI standard baud rate (31.25 kbps) can be used by employing the dedicated UART baud rate

generator.

(3) 3-wire serial I/O mode (MSB-first/LSB-first switchable)

In this mode, 8-bit data transfer is performed using three lines: the serial clock (SCK2), and serial data lines

(SI2, SO2).

In the 3-wire serial I/O mode, simultaneous transmission and reception is possible, increasing the data

transfer processing speed.

Either the MSB or LSB can be specified as the start bit for an 8-bit data serial transfer, allowing connection

to devices using either as the start bit.

The 3-wire serial I/O mode is useful for connection to peripheral I/Os and display controllers, etc., which

incorporate a conventional synchronous clocked serial interface, such as the 75X/XL Series, 78K Series,

17K Series, etc.

Page 458 of the NEC PD78076Y user manual — ASCK/SCK2
Page 458 · click to enlarge
Page 458

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

20.2 Serial Interface Channel 2 Configuration

Serial interface channel 2 consists of the following hardware.

Table 20-1. Serial Interface Channel 2 Configuration

NEC PD78076Y — Table 20-1. Serial Interface Channel 2 Configuration diagram (page 458)
Fig. 23 · Table 20-1. Serial Interface Channel 2 Configuration

P72.

Figure 20-1. Serial Interface Channel 2 Block Diagram

NEC PD78076Y — Figure 20-1. Serial Interface Channel 2 Block Diagram diagram (page 458)
Fig. 24 · Figure 20-1. Serial Interface Channel 2 Block Diagra…

ASCK/SCK2

Baud Rate Generator fxx to fxx/210

Page 459 of the NEC PD78076Y user manual — TPS3 TPS2 TPS1 TPS0
Page 459 · click to enlarge
Page 459

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

Figure 20-2. Baud Rate Generator Block Diagram

TXE CSIE2

Start Bit Sampling Clock

ASCK/SCK2/P72

Selector fxx to fxx/210

SCK CSCK

RXE Start Bit Detection

TPS3 TPS2 TPS1 TPS0

MDL3 MDL2 MDL1 MDL0

Show 18 more labels / short text on this page
5-Bit Counter · Selector · Selector · Terminal Clock · Selector · 1/2 · Match · TPS0 to TPS3 · MDL0 to MDL3 · Decoder · Selector · Receive Clock · Match · 1/2 · 5-Bit Counter · Baud Rate Generator · Control Register · Internal Bus
Page 460 of the NEC PD78076Y user manual — (5) Reception control circuit
Page 460 · click to enlarge
Page 460

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(1) Transmit shift register (TXS)

This register is used to set the transmit data. The data written in TXS is transmitted as serial data.

If the data length is specified as 7 bits, bits 0 to 6 of the data written in TXS are transferred as transmit data.

Writing data to TXS starts the transmit operation.

TXS is written to with an 8-bit memory manipulation instruction. It cannot be read.

TXS value is FFH after RESET input.

(RXB) are allocated to the same address, and when a read is performed, the value of RXB

is read.

(2) Receive shift register (RXS)

This register is used to convert serial data input to the RxD pin to parallel data. When one byte of data is

received, the receive data is transferred to the receive buffer register (RXB).

RXS cannot be directly manipulated by a program.

(3) Receive buffer register (RXB)

This register holds receive data. Each time one byte of data is received, new receive data is transferred

from the receive shift register (RXS).

If the data length is specified as 7 bits, the receive data is transferred to bits 0 to 6 of RXB, and the MSB

of RXB is always set to 0.

RXB is read with an 8-bit memory manipulation instruction. It cannot be written to.

RXB value is FFH after RESET input.

write is performed, the value is written to TXS.

(4) Transmission control circuit

This circuit performs transmit operation control such as the addition of a start bit, parity bit and stop bit to

data written in the transmit shift register (TXS) in accordance with the contents set in the asynchronous serial

interface mode register (ASIM).

(5) Reception control circuit

This circuit controls receive operations in accordance with the contents set in the asynchronous serial

interface mode register (ASIM). It performs error checks for parity errors, etc., during a receive operation,

and if an error is detected, sets a value in the asynchronous serial interface status register (ASIS) in

accordance with the error contents.

Page 461 of the NEC PD78076Y user manual — CSIM22
Page 461 · click to enlarge
Page 461

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

20.3 Serial Interface Channel 2 Control Registers

Serial interface channel 2 is controlled by the following four registers.

  • Serial Operating Mode Register 2 (CSIM2)
  • Asynchronous Serial Interface Mode Register (ASIM)
  • Asynchronous Serial Interface Status Register (ASIS)
  • Baud Rate Generator Control Register (BRGC)

(1) Serial operating mode register 2 (CSIM2)

This register is set when serial interface channel 2 is used in the 3-wire serial I/O mode.

CSIM2 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM2 to 00H.

Figure 20-3. Serial Operating Mode Register 2 Format

6 5 4 3 2 1 0 Symbol

Address After Reset R/W

CSIM2 CSIE2 0 CSIM

22 CSCK 0 FF72H 00H R/W

CSCK

Clock Selection in 3-wire Serial I/O Mode

Input clock from off-chip to SCK2 pin

Dedicated baud rate generator output

CSIM22

MSB

LSB

CSIE2

Operation Control in 3-wire Serial I/O Mode

2. When UART mode is selected, CSIM2 should be set to 00H.

First Bit Specification · Operation stopped · Operation enabled

Page 462 of the NEC PD78076Y user manual — RXE
Page 462 · click to enlarge
Page 462

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(2) Asynchronous serial interface mode register (ASIM)

This register is set when serial interface channel 2 is used in the asynchronous serial interface mode.

ASIM is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets ASIM to 00H.

Figure 20-4. Asynchronous Serial Interface Mode Register Format

5 4 3 2 1 0 Symbol

Address After Reset R/W

ASIM TXE RXE PS1 PS0 CL SL ISRM SCK FF70H 00H R/W

SCK

Clock in Asynchronous Serial Interface Mode

Input clock from off-chip to ASCK pin

Dedicated baud rate generator outputNote

ISRM

Control of Reception Completion Interrupt in Case of Error Generation

Reception completion interrupt request generated in case of error generation

Reception completion interrupt request not generated in case of error generation

SL Transmit Data Stop Bit Length Specification

PS1

PS0

0 parity always added in transmission No parity test in reception (parity error not generated) 0 1

1 Odd parity 0

RXE

TXE

2. The serial transmit/receive operation must be stopped before changing the operating mode.
Show 14 more labels / short text on this page
0 1 bit · 1 2 bits · Character Length Specification · 7 bits · 8 bits · Parity Bit Specification · No parity · Even parity · Receive Operation Control · Receive operation stopped · Receive operation enabled · Transmit Operation Control · Transmit operation stopped · Transmit operation enabled
Page 463 of the NEC PD78076Y user manual — P72
Page 463 · click to enlarge
Page 463

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

Table 20-2. Serial Interface Channel 2 Operating Mode Settings

(1) Operation Stop Mode

Shift Clock Start Bit TXE RXE SCK CSIE2 CSIM22 CSCK

PM70 P70 PM71 P71 PM72 P72 ASIM CSIM2

P70/SI2 /RxD Pin Functions

P71/SO2 /TxD Pin Functions

P72/SCK2 /ASCK Pin Functions

0 0 x 0 x x x

Other than above Setting prohibited

(2) 3-wire Serial I/O Mode

Shift Clock Start Bit TXE RXE SCK CSIE2 CSIM22 CSCK

PM70 P70 PM71 P71 PM72 P72 ASIM CSIM2

P70/SI2 /RxD Pin Functions

P71/SO2 /TxD Pin Functions

P72/SCK2 /ASCK Pin Functions

1 Note 2 x

0 0 0 1

MSB

SI2 SO2 (CMOS

LSB

SI2

Other than above Setting prohibited

(3) Asynchronous Serial Interface Mode

Shift Clock Start Bit TXE RXE SCK CSIE2 CSIM22 CSCK

PM70 P70 PM71 P71 PM72 P72 ASIM CSIM2

P70/SI2 /RxD Pin Functions

P71/SO2 /TxD Pin Functions

P72/SCK2 /ASCK Pin Functions

P72

P71

x Note 1 x

P72

0 1 1 x TxD (CMOS

P72

Other than above Setting prohibited

2. Can be used as P70 (CMOS input/output) when only transmitter is used.
Remark xDon’t care
PMxxPort mode register
PxxPort output latch
Show 22 more labels / short text on this page
External clock · SCK2 input · output) · Internal clock · SCK2 output · External clock · SCK2 input · output) · Internal clock · SCK2 output · LSB External clock · P70 TxD (CMOS · ASCK input · output) · Internal clock · External clock · ASCK input · Internal clock · External clock · ASCK input · output) · Internal clock
Page 464 of the NEC PD78076Y user manual — PE
Page 464 · click to enlarge
Page 464

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(3) Asynchronous serial interface status register (ASIS)

This is a register which displays the type of error when a reception error is generated in the asynchronous

serial interface mode.

ASIS is read with a 1-bit or 8-bit memory manipulation instruction.

In 3-wire serial I/O mode, the contents of the ASIS are undefined.

RESET input sets ASIS to 00H.

Figure 20-5. Asynchronous Serial Interface Status Register Format

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

ASIS 0 FE OVE FF71H 00H R

PE

OVE

Overrun error not generated

Overrun error generatedNote 1

(When next receive operation is completed before data from receive buffer register is read)

FE

Framing error not generated

Framing error generatedNote 2

(When stop bit is not detected)

PE

Parity error not generated

Parity error generated (When transmit data parity does not match)

errors will continue to be generated until RXB is read.

2. Even if the stop bit length has been set as 2 bits by bit 2 (SL) of the asynchronous serial interface

mode register, only single stop bit detection is performed during reception.

Overrun Error Flag · Framing Error Flag · Parity Error Flag

Page 465 of the NEC PD78076Y user manual — Figure 20-6. Baud Rate Generator Control Register Format (1/2)
Page 465 · click to enlarge
Page 465

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(4) Baud rate generator control register (BRGC)

This register sets the serial clock for serial interface channel 2.

BRGC is set with an 8-bit memory manipulation instruction.

RESET input sets BRGC to 00H.

Figure 20-6. Baud Rate Generator Control Register Format (1/2)

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

BRGC TPS3 TPS2 TPS1 TPS0 MDL3 MDL2 MDL1 MDL0 FF73H 00H R/W

Baud Rate Generator Input Clock Selection MDL3 MDL2 MDL1 MDL0

Remarks 1. f SCK5-bit counter source clock
2. k : Value set in MDL0 to MDL3 (0 ≤ k ≤ 14)
Show 17 more labels / short text on this page
k · fSCK/16 · fSCK/17 · fSCK/18 · fSCK/19 · fSCK/20 · fSCK/21 · fSCK/22 · fSCK/23 · fSCK/24 · fSCK/25 · fSCK/26 · fSCK/27 · fSCK/28 · fSCK/29 · fSCK/30 · fSCKNote
Page 466 of the NEC PD78076Y user manual — output is disrupted and communication cannot be performed normally. Therefore, BRGC
Page 466 · click to enlarge
Page 466

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

Figure 20-6. Baud Rate Generator Control Register Format (2/2)

5-Bit Counter Source Clock Selection

TPS3 TPS2 TPS1 TPS0 n

MCS = 1 MCS = 0

0 fXX/210 fXX/210 (4.9 kHz) fX/211 (2.4 kHz) 11

0 1 0 1 fXX fX (5.0 MHz) fX/2 (2.5 MHz) 1

0 1 1 0 fXX/2 fX/2 (2.5 MHz) fX/22 (1.25 MHz) 2

0 1 1 1 fXX/22 fX/22 (1.25 MHz) fX/23 (625 kHz) 3

1 0 0 0 fXX/23 fX/23 (625 kHz) fX/24 (313 kHz) 4

1 0 0 1 fXX/24 fX/24 (313 kHz) fX/25 (156 kHz) 5

1 0 1 0 fXX/25 fX/25 (156 kHz) fX/26 (78.1 kHz) 6

1 0 1 1 fXX/26 fX/26 (78.1 kHz) fX/27 (39.1 kHz) 7

1 1 0 0 fXX/27 fX/27 (39.1 kHz) fX/28 (19.5 kHz) 8

1 1 0 1 fXX/28 fX/28 (19.5 kHz) fX/29 (9.8 kHz) 9

1 1 1 0 fXX/29 fX/29 (9.8 kHz) fX/210 (4.9 kHz) 10

Other than above Setting prohibited

output is disrupted and communication cannot be performed normally. Therefore, BRGC

must not be written to during a communication operation.

Remarks 1. f XMain system clock oscillation frequency
2. f XX : Main system clock frequency (f X or f X /2)
3. MCS : Bit 0 of oscillation mode selection register (OSMS)
4. n : Value set in TPS0 to TPS3 (1 ≤ n ≤ 11)
5. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 467 of the NEC PD78076Y user manual — 75 — 00H 1.73 0BH 1.14 EBH 1.14
Page 467 · click to enlarge
Page 467

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

The baud rate transmit/receive clock generated is either a signal scaled from the main system clock, or a signal

scaled from the clock input from the ASCK pin.

(a) Generation of baud rate transmit/receive clock by means of main system clock

The transmit/receive clocks generated by scaling the main system clock. The baud rate generated from

the main system clock is found from the following expression.

[Baud rate] = [Hz]

2n x (k + 16)

where, f XMain system clock oscillation frequency
f XXMain system clock frequency (f X or f X /2)
nValue set in TPS0 to TPS3 (1 ≤ n ≤ 11)
kValue set in MDL0 to MDL3 (0 ≤ k ≤ 14)

Table 20-3. Relationship between Main System Clock and Baud Rate

fx = 5.0 MHz fx = 4.19 MHz

MCS = 1 MCS = 0 MCS = 1 MCS = 0

BRGC Set Value Error (%) BRGC Set Value Error (%) BRGC Set Value Error (%) BRGC Set Value Error (%)

75 — 00H 1.73 0BH 1.14 EBH 1.14

110 06H 0.88 E6H 0.88 03H –2.01 E3H –2.01

150 00H 1.73 E0H 1.73 EBH 1.14 DBH 1.14

300 E0H 1.73 D0H 1.73 DBH 1.14 CBH 1.14

600 D0H 1.73 C0H 1.73 CBH 1.14 BBH 1.14

1200 C0H 1.73 B0H 1.73 BBH 1.14 ABH 1.14

2400 B0H 1.73 A0H 1.73 ABH 1.14 9BH 1.14

4800 A0H 1.73 90H 1.73 9BH 1.14 8BH 1.14

9600 90H 1.73 80H 1.73 8BH 1.14 7BH 1.14

19200 80H 1.73 70H 1.73 7BH 1.14 6BH 1.14

31250 74H 0 64H 0 71H –1.31 61H –1.31

38400 70H 1.73 60H 1.73 6BH 1.14 5BH 1.14

76800 60H 1.73 50H 1.73 5BH 1.14 — —

MCSBit 0 of oscillation mode selection register (OSMS)

fXX · Baud · Rate (bps)

Page 468 of the NEC PD78076Y user manual — CHAPTER 20 SERIAL INTERFACE CHANNEL 2
Page 468 · click to enlarge
Page 468

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(b) Generation of baud rate transmit/receive clock by means of external clock from ASCK pin

The transmit/receive clock is generated by scaling the clock input from the ASCK pin. The baud rate

generated from the clock input from the ASCK pin is obtained with the following expression.

[Baud rate] = [Hz]

2 x (k + 16)

f ASCKFrequency of clock input to ASCK pin
kValue set in MDL0 to MDL3 (0 ≤ k ≤ 14)

Table 20-4. Relationship between ASCK Pin Input Frequency and Baud Rate (When BRGC is set to 00H)

Baud Rate (bps) ASCK Pin Input Frequency

75 2.4 kHz

110 3.52 kHz

150 4.8 kHz

300 9.6 kHz

600 19.2 kHz

1200 38.4 kHz

2400 76.8 kHz

4800 153.6 kHz

9600 307.2 kHz

19200 614.4 kHz

31250 1000.0 kHz

38400 1228.8 kHz

fASCK

Page 469 of the NEC PD78076Y user manual — CSIM
Page 469 · click to enlarge
Page 469

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

20.4 Serial Interface Channel 2 Operation

Serial interface channel 2 has the following three modes.

  • Operation stop mode
  • Asynchronous serial interface (UART) mode
  • 3-wire serial I/O mode

20.4.1 Operation stop mode

In the operation stop mode, serial transfer is not performed, and therefore power consumption can be reduced.

In the operation stop mode, the P70/SI2/RxD, P71/SO2/TxD and P72/SCK2/ASCK pins can be used as normal

input/output ports.

(1) Register setting

Operation stop mode is set using serial operating mode register 2 (CSIM2) and the asynchronous serial

interface mode register (ASIM).

(a) Serial operating mode register 2 (CSIM2)

CSIM2 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM2 to 00H.

6 5 4 3 2 1 0 Symbol

Address After Reset R/W

CSIM2 CSIE2 0 CSCK 0 FF72H 00H R/W

CSIM

CSIE2

Operation Control in 3-wire Serial I/O Mode

Operation stopped · Operation enabled

Page 470 of the NEC PD78076Y user manual — SL
Page 470 · click to enlarge
Page 470

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(b) Asynchronous serial interface mode register (ASIM)

ASIM is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets ASIM to 00H.

5 4 3 2 1 0 Symbol

Address After Reset R/W

ASIM TXE RXE PS1 PS0 CL ISRM SCK FF70H 00H R/W

SL

RXE

TXE

Show 6 more labels / short text on this page
Receive Operation Control · Receive operation stopped · Receive operation enabled · Transmit Operation Control · Transmit operation stopped · Transmit operation enabled
Page 471 of the NEC PD78076Y user manual — CSIM22
Page 471 · click to enlarge
Page 471

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

20.4.2 Asynchronous serial interface (UART) mode

In this mode, one byte of data is transmitted/received following the start bit, and full-duplex operation is possible.

A dedicated UART baud rate generator is incorporated, allowing communication over a wide range of baud rates.

In addition, the baud rate can be defined by scaling the input clock to the ASCK pin.

The MIDI standard baud rate (31.25 kbps) can be used by employing the dedicated UART baud rate generator.

(1) Register setting

UART mode is set using serial operating mode register 2 (CSIM2), the asynchronous serial interface mode

register (ASIM), the asynchronous serial interface status register (ASIS), and the baud rate generator control

register (BRGC).

(a) Serial operating mode register 2 (CSIM2)

CSIM2 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM2 to 00H.

When the UART mode is selected, 00H should be set in CSIM2.

6 5 4 3 2 1 0 Symbol

Address After Reset R/W

CSIM2 CSIE2 0 CSIM

22 CSCK 0

FF72H 00H R/W

CSCK

Clock Selection in 3-wire Serial I/O Mode

Input clock from off-chip to SCK2 pin

Dedicated baud rate generator output

CSIM22

MSB

LSB

CSIE2

Operation Control in 3-wire Serial I/O Mode

First Bit Specification · Operation stopped · Operation enabled

Page 472 of the NEC PD78076Y user manual — Caution The serial transmit/receive operation must be stopped before changing the operating
Page 472 · click to enlarge
Page 472

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(b) Asynchronous serial interface mode register (ASIM)

ASIM is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets ASIM to 00H.

5 4 3 2 1 0 Symbol

Address After Reset R/W

ASIM TXE RXE PS1 PS0 CL SL ISRM SCK FF70H 00H R/W

SCK

Clock Selection in Asynchronous Serial Interface Mode

Input clock from off-chip to ASCK pin

Dedicated baud rate generator outputNote

ISRM

Control of Reception Completion Interrupt in Case of Error Generation

Reception completion interrupt request generated in case of error generation

Reception completion interrupt request not generated in case of error generation

SL Transmit Data Stop Bit Length Specification

PS1

PS0

0 parity always added in transmission No parity test in reception (parity error not generated) 0 1

1 Odd parity 0

RXE

TXE

as an input/output port.

Caution The serial transmit/receive operation must be stopped before changing the operating

mode.

Show 14 more labels / short text on this page
0 1 bit · 1 2 bits · Character Length Specification · 7 bits · 8 bits · Parity Bit Specification · No parity · Even parity · Receive Operation Control · Receive operation stopped · Receive operation enabled · Transmit Operation Control · Transmit operation stopped · Transmit operation enabled
Page 473 of the NEC PD78076Y user manual — PE
Page 473 · click to enlarge
Page 473

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(c) Asynchronous serial interface status register (ASIS)

ASIS is set with an 8-bit memory manipulation instruction.

RESET input sets ASIS to 00H.

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

ASIS 0 FE OVE FF71H 00H R

PE

OVE

Overrun error not generated

Overrun error generatedNote 1

(When next receive operation is completed before data from receive buffer register is read)

FE

Framing error not generated

Framing error generatedNote 2

(When stop bit is not detected)

PE

Parity error not generated

Parity error generated (When transmit data parity does not match)

errors will continue to be generated until RXB is read.

2. Even if the stop bit length has been set as 2 bits by bit 2 (SL) of the asynchronous serial

interface mode register (ASIM), only single stop bit detection is performed during reception.

Overrun Error Flag · Framing Error Flag · Parity Error Flag

Page 474 of the NEC PD78076Y user manual — MCS = 1 MCS = 0
Page 474 · click to enlarge
Page 474

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(d) Baud rate generator control register (BRGC)

BRGC is set with an 8-bit memory manipulation instruction.

RESET input sets BRGC to 00H.

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

BRGC TPS3 TPS2 TPS1 TPS0 MDL3 MDL2 MDL1 MDL0 FF73H 00H R/W

Baud Rate Generator Input Clock Selection MDL3 MDL2 MDL1 MDL0

5-Bit Counter Source Clock Selection

TPS3 TPS2 TPS1 TPS0 n

MCS = 1 MCS = 0

0 fXX/210 fX/210 (4.9 kHz) fX/211 (2.4 kHz) 11

0 1 0 1 fXX fX (5.0 MHz) fX/2 (2.5 MHz) 1

0 1 1 0 fXX/2 fX/2 (2.5 MHz) fX/22 (1.25 MHz) 2

0 1 1 1 fXX/22 fX/22 (1.25 MHz) fX/23 (625 kHz) 3

1 0 0 0 fXX/23 fX/23 (625 kHz) fX/24 (313 kHz) 4

1 0 0 1 fXX/24 fX/24 (313 kHz) fX/25 (156 kHz) 5

1 0 1 0 fXX/25 fX/25 (156 kHz) fX/26 (78.1 kHz) 6

1 0 1 1 fXX/26 fX/26 (78.1 kHz) fX/27 (39.1 kHz) 7

1 1 0 0 fXX/27 fX/27 (39.1 kHz) fX/28 (19.5 kHz) 8

1 1 0 1 fXX/28 fX/28 (19.5 kHz) fX/29 (9.8 kHz) 9

1 1 1 0 fXX/29 fX/29 (9.8 kHz) fX/210 (4.9 kHz) 10

Other than above Setting prohibited

Show 16 more labels / short text on this page
k · fSCK/16 · fSCK/17 · fSCK/18 · fSCK/19 · fSCK/20 · fSCK/21 · fSCK/22 · fSCK/23 · fSCK/24 · fSCK/25 · fSCK/26 · fSCK/27 · fSCK/28 · fSCK/29 · fSCK/30
Page 475 of the NEC PD78076Y user manual — CHAPTER 20 SERIAL INTERFACE CHANNEL 2
Page 475 · click to enlarge
Page 475

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

generator output is disrupted and communication cannot be performed normally.

Therefore, BRGC must not be written to during a communication operation.

Remarks 1. f SCK5-bit counter source clock
2. k : Value set in MDL0 to MDL3 (0 ≤ k ≤ 14)
3. f X : Main system clock oscillation frequency
4. f XX : Main system clock frequency (f X or f X /2)
5. MCS : Bit 0 of oscillation mode selection register (OSMS)
6. n : Value set in TPS0 to TPS3 (1 ≤ n ≤ 11)
7. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 476 of the NEC PD78076Y user manual — 75 — 00H 1.73 0BH 1.14 EBH 1.14
Page 476 · click to enlarge
Page 476

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

The baud rate transmit/receive clock generated is either a signal scaled from the main system clock,

or a signal scaled from the clock input from the ASCK pin.

(i) Generation of baud rate transmit/receive clock by means of main system clock

The transmit/receive clock is generated by scaling the main system clock. The baud rate generated

from the main system clock is obtained with the following expression.

[Baud rate] = [Hz]

2n x (k + 16)

where, f XMain system clock oscillation frequency
f XXMain system clock frequency (f X or f X /2)
nValue set in TPS0 to TPS3 (1 ≤ n ≤ 11)
kValue set in MDL0 to MDL3 (0 ≤ k ≤ 14)

Table 20-5. Relationship between Main System Clock and Baud Rate

fx = 5.0 MHz fx = 4.19 MHz

MCS = 1 MCS = 0 MCS = 1 MCS = 0

BRGC Set Value Error (%) BRGC Set Value Error (%) BRGC Set Value Error (%) BRGC Set Value Error (%)

75 — 00H 1.73 0BH 1.14 EBH 1.14

110 06H 0.88 E6H 0.88 03H –2.01 E3H –2.01

150 00H 1.73 E0H 1.73 EBH 1.14 DBH 1.14

300 E0H 1.73 D0H 1.73 DBH 1.14 CBH 1.14

600 D0H 1.73 C0H 1.73 CBH 1.14 BBH 1.14

1200 C0H 1.73 B0H 1.73 BBH 1.14 ABH 1.14

2400 B0H 1.73 A0H 1.73 ABH 1.14 9BH 1.14

4800 A0H 1.73 90H 1.73 9BH 1.14 8BH 1.14

9600 90H 1.73 80H 1.73 8BH 1.14 7BH 1.14

19200 80H 1.73 70H 1.73 7BH 1.14 6BH 1.14

31250 74H 0 64H 0 71H –1.31 61H –1.31

38400 70H 1.73 60H 1.73 6BH 1.14 5BH 1.14

76800 60H 1.73 50H 1.73 5BH 1.14 — —

MCSBit 0 of oscillation mode selection register (OSMS)

fXX · Baud · Rate (bps)

Page 477 of the NEC PD78076Y user manual — CHAPTER 20 SERIAL INTERFACE CHANNEL 2
Page 477 · click to enlarge
Page 477

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(ii) Generation of baud rate transmit/receive clock by means of external clock from ASCK pin

The transmit/receive clock is generated by scaling the clock input from the ASCK pin. The baud

rate generated from the clock input from the ASCK pin is obtained with the following expression.

2n x (k + 16) fASCK

[Baud rate] = [Hz]

where, f ASCKFrequency of clock input to ASCK pin
kValue set in MDL0 to MDL3 (0 ≤ k ≤ 14)

Table 20-6. Relationship between ASCK Pin Input Frequency and Baud Rate (When BRGC is set to 00H)

Baud Rate (bps) ASCK Pin Input Frequency

75 2.4 kHz

110 3.52 kHz

150 4.8 kHz

300 9.6 kHz

600 19.2 kHz

1200 38.4 kHz

2400 76.8 kHz

4800 153.6 kHz

9600 307.2 kHz

19200 614.4 kHz

31250 1000.0 kHz

38400 1228.8 kHz

Page 478 of the NEC PD78076Y user manual — Figure 20-7. Asynchronous Serial Interface Transmit/Receive Data Format
Page 478 · click to enlarge
Page 478

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(2) Communication operation

(a) Data format

The transmit/receive data format is shown in Figure 20-7.

Figure 20-7. Asynchronous Serial Interface Transmit/Receive Data Format

Bit Stop Bit Start

D0 D1 D2 D3 D4 D5 D6 D7 Parity

One data frame consists of the following bits.

  • Start bit ................... 1 bit
  • Character bits ......... 7 bits/8 bits
  • Parity bit.................. Even parity/odd parity/0 parity/no parity
  • Stop bit(s) ............... 1 bit/2 bits

The specification of character bit length, parity selection, and specification of stop bit length for each

data frame is carried out with asynchronous serial interface mode register (ASIM).

When 7 bits are selected as the number of character bits, only the lower 7 bits (bits 0 to 6) are valid;

in transmission the most significant bit (bit 7) is ignored, and in reception the most significant bit (bit

7. is always “0”.

The serial transfer rate is selected by ASIM and the baud rate generator control register (BRGC).

If a serial data receive error is generated, the receive error contents can be determined by reading the

status of the asynchronous serial interface status register (ASIS).

One Data Frame · Bit · Character Bit

Page 479 of the NEC PD78076Y user manual — (iv) No parity
Page 479 · click to enlarge
Page 479

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(b) Parity types and operation

The parity bit is used to detect a bit error in the communication data. Normally, the same kind of parity

bit is used on the transmitting side and the receiving side. With even parity and odd parity, a one-bit

(odd number) error can be detected. With 0 parity and no parity, an error cannot be detected.

(i) Even parity

  • At transmission

Control is executed so that the number of bits with a value of “1” contained in the transmit data

including parity bit is an even number. The parity bit value should be as follows.

The number of bits with a value of “1” is an odd number in transmit data : 1

The number of bits with a value of “1” is an even number in transmit data : 0

  • At reception

The number of bits with a value of “1” contained in the receive data including parity bit are counted,

and if this is an odd number, a parity error is generated.

(ii) Odd parity

  • At transmission

Conversely to the situation with even parity, control is executed so that the number of bits with

a value of “1” contained in the transmit data including parity bit is an odd number. The parity bit

value should be as follows.

The number of bits with a value of “1” is an odd number in transmit data : 0

The number of bits with a value of “1” is an even number in transmit data : 1

  • At reception

The number of bits with a value of “1” contained in the receive data including parity bit are counted,

and if this is an even number, a parity error is generated.

(iii) 0 Parity

When transmitting, the parity bit is set to “0” irrespective of the transmit data.

At reception, a parity bit check is not performed. Therefore, a parity error is not generated,

irrespective of whether the parity bit is set to “0” or “1”.

(iv) No parity

A parity bit is not added to the transmit data. At reception, data is received assuming that there

is no parity bit. Since there is no parity bit, a parity error is not generated.

Page 480 of the NEC PD78076Y user manual — a transmission completion interrupt request (INTST) or the interrupt request flag
Page 480 · click to enlarge
Page 480

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(c) Transmission

A transmit operation is started by writing transmit data to the transmit shift register (TXS). The start

bit, parity bit, and stop bit(s) are added automatically.

When the transmit operation starts, the data in the transmit shift register (TXS) is shifted out, and when

the transmit shift register (TXS) is empty, a transmission completion interrupt request (INTST) is

generated.

Figure 20-8. Asynchronous Serial Interface Transmission Completion Interrupt Request Generation Timing

(a) Stop bit length: 1

STOP

D1 D2 D6 D7 Parity D0 TxD (Output)

START

INTST

(b) Stop bit length: 2

D1 D2 D6 D7 Parity D0 TxD (Output)

STOP

START

INTST

Caution The asynchronous serial interface mode register (ASIM) should not be rewritten

during a transmit operation. If the ASIM register is rewritten during transmission,

subsequent transmit operations may not be possible (the normal state is restored

by RESET input).

It is possible to determine whether transmission is in progress by software by using

a transmission completion interrupt request (INTST) or the interrupt request flag

(STIF) set by the INTST.

Page 481 of the NEC PD78076Y user manual — START
Page 481 · click to enlarge
Page 481

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(d) Reception

When the RXE bit of the asynchronous serial interface mode register (ASIM) is set (1), a receive

operation is enabled and sampling of the RxD pin input is performed.

RxD pin input sampling is performed using the serial clock specified by ASIM.

When the RxD pin input becomes low, the 5-bit counter of baud rate generaor (see Figure 20-2) starts

counting, and at the time when the half time determined by specified baud rate has passed, the data

sampling start timing signal is output. If the RxD pin input sampled again as a result of this start timing

signal is low, it is identified as a start bit, the 5-bit counter is initialized and starts counting, and data

sampling is performed. When character data, a parity bit and one stop bit are detected after the start

bit, reception of one frame of data ends.

When one frame of data has been received, the receive data in the shift register is transferred to the

receive buffer register (RXB), and a reception completion interrupt request (INTSR) is generated.

If an error is generated, the receive data in which the error was generated is still transferred to RXB.

When an error is generated, if bit 1 (ISRM) of ASIM is cleared to 0, INTSR is generated.

If ISRM bit is set to 1, INTSR is not generated.

If the RXE bit is reset (0) during the receive operation, the receive operation is stopped immediately.

In this case, the contents of RXB and ASIS are not changed, and INTSR and INTSER are not generated.

Figure 20-9. Asynchronous Serial Interface Reception Completion Interrupt Request Generation Timing

STOP

D1 D2 D6 D7 Parity D0 RxD (Input)

START

INTSR

RXB is not read, an overrun error will be generated when the next data is received, and

the receive error state will continue indefinitely.

Page 482 of the NEC PD78076Y user manual — Figure 20-10. Receive Error Timing
Page 482 · click to enlarge
Page 482

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(e) Receive errors

Three kinds of errors can occur during a receive operation: a parity error, framing error, or overrun error.

If the data reception result error flag is set in the asynchronous serial interface status register (ASIS),

a receive error interrupt request (INTSER) is generated. A receive error interrupt is generated prior to

a receive completion interrupt request (INTSR). Receive error causes are shown in Table 20-7.

It is possible to determine what kind of error was generated during reception by reading the contents

of ASIS in the reception error interrupt servicing (see Figures 20-9 and 20-10).

The contents of ASIS are reset (0) by reading the receive buffer register (RXB) or receiving the next

data (if there is an error in the next data, the corresponding error flag is set).

Table 20-7. Receive Error Causes

Parity error Transmission-time parity specification and reception data parity do not match

Framing error Stop bit not detected

Overrun error Reception of next data is completed before data is read from receive register buffer

Figure 20-10. Receive Error Timing

D0 D1 D2 D6 D7 STOP

START

INTSER (when a framing error or an overrun error is generated)

INTSER (when a parity error is generated)

(ASIM) is set to (1), INTSR is not generated.

by reading the receive buffer register (RXB) or receiving the next data. To ascertain

the error contents, ASIS must be read before reading RXB.

2. The receive buffer register (RXB) must be read even if a receive error is generated. If

RXB is not read, an overrun error will be generated when the next data is received, and

the receive error state will continue indefinitely.

Show 4 more labels / short text on this page
Receive Errors Cause · RxD (Input) · Parity · INTSRNote
Page 483 of the NEC PD78076Y user manual — Whether Interrupt Request (INTSR) is Generated or Not
Page 483 · click to enlarge
Page 483

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(3) UART mode cautions

(a) When transmit operation is stopped by clearing (0) bit 7 (TXE) of the asynchronous serial interface mode

register (ASIM) during transmission, be sure to set the transmit shift register (TXS) to FFH, then set

the TXE to 1, before executing the next transmission.

(b) When receive operation is stopped by clearing (0) bit 6 (RXE) of the asynchronous serial interface mode

register (ASIM) during reception, the state of the receive buffer register (RXB) and whether a receive

completion interrupt request (INTSR) is generated or not differ depending on the receive stop timing.

Figure 20-11 shows the timing.

Figure 20-11. State of Receive Buffer Register (RXB) When Receive Operation is Stopped and

Whether Interrupt Request (INTSR) is Generated or Not

RXB

INTSR

<3 > <1 >

When RXE is set to 0 at a time indicated by <1>, RXB holds the previous data and does not generate INTSR.

When RXE is set to 0 at a time indicated by <2>, RXB renews the data and does not generate INTSR.

When RXE is set to 0 at a time indicated by <3>, RXB renews the data and generates INTSR.

Parity RxD Pin · <2 >

Page 484 of the NEC PD78076Y user manual — CSIM22
Page 484 · click to enlarge
Page 484

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

20.4.3 3-wire serial I/O mode

The 3-wire serial I/O mode is useful for connection of peripheral I/Os and display controllers, etc., which incorporate

a conventional synchronous clocked serial interface, such as the 75X/XL Series, 78K Series, 17K Series, etc.

Communication is performed using three lines: the serial clock (SCK2), serial output (SO2), and serial input (SI2).

(1) Register setting

3-wire serial I/O mode is set using serial operating mode register 2 (CSIM2), the asynchronous serial

interface mode register (ASIM), and the baud rate generator control register (BRGC).

(a) Serial operating mode register 2 (CSIM2)

CSIM2 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets CSIM2 to 00H.

6 5 4 3 2 1 0 Symbol

Address After Reset R/W

CSIM2 CSIE2 0 CSIM

22 CSCK 0

FF72H 00H R/W

CSCK

Clock Selection in 3-wire Serial I/O Mode

Input clock from off-chip to SCK2 pin

Dedicated baud rate generator output

CSIM22

MSB

LSB

CSIE2

Operation Control in 3-wire Serial I/O Mode

First Bit Specification · Operation stopped · Operation enabled

Page 485 of the NEC PD78076Y user manual — RXE
Page 485 · click to enlarge
Page 485

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(b) Asynchronous serial interface mode register (ASIM)

ASIM is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets ASIM to 00H.

When the 3-wire serial I/O mode is selected, 00H should be set in ASIM.

5 4 3 2 1 0 Symbol

Address After Reset R/W

ASIM TXE RXE PS1 PS0 CL SL ISRM SCK FF70H 00H R/W

SCK

Clock in Asynchronous Serial Interface Mode

Input clock from off-chip to ASCK pin

Dedicated baud rate generator output

ISRM

Control of Reception Completion Interrupt in Case of Error Generation

Reception completion interrupt request generated in case of error generation

Reception completion interrupt request not generated in case of error generation

SL Transmit Data Stop Bit Length Specification

PS1

PS0

0 parity always added in transmission No parity test in reception (parity error not generated) 0 1

1 Odd parity 0

RXE

TXE

Show 14 more labels / short text on this page
0 1 bit · 1 2 bits · Character Length Specification · 7 bits · 8 bits · Parity Bit Specification · No parity · Even parity · Receive Operation Control · Receive operation stopped · Receive operation enabled · Transmit Operation Control · Transmit operation stopped · Transmit operation enabled
Page 486 of the NEC PD78076Y user manual — CHAPTER 20 SERIAL INTERFACE CHANNEL 2
Page 486 · click to enlarge
Page 486

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(c) Baud rate generator control register (BRGC)

BRGC is set with an 8-bit memory manipulation instruction.

RESET input sets BRGC to 00H.

6 5 4 3 2 1 0 7 Symbol

Address After Reset R/W

BRGC TPS3 TPS2 TPS1 TPS0 MDL3 MDL2 MDL1 MDL0 FF73H 00H R/W

Baud Rate Generator Input Clock Selection MDL3 MDL2 MDL1 MDL0

f SCK5-bit counter source clock
kValue set in MDL0 to MDL3 (0 ≤ k ≤ 14)
Show 17 more labels / short text on this page
k · fSCK/16 · fSCK/17 · fSCK/18 · fSCK/19 · fSCK/20 · fSCK/21 · fSCK/22 · fSCK/23 · fSCK/24 · fSCK/25 · fSCK/26 · fSCK/27 · fSCK/28 · fSCK/29 · fSCK/30 · fSCK
Page 487 of the NEC PD78076Y user manual — MCS = 1 MCS = 0
Page 487 · click to enlarge
Page 487

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

5-Bit Counter Source Clock Selection

TPS3 TPS2 TPS1 TPS0 n

MCS = 1 MCS = 0

0 fXX/210 fX/210 (4.9 kHz) fX/211 (2.4 kHz) 11

0 1 0 1 fXX fX (5.0 MHz) fX/2 (2.5 MHz) 1

0 1 1 0 fXX/2 fX/2 (2.5 MHz) fX/22 (1.25 MHz) 2

0 1 1 1 fXX/22 fX/22 (1.25 MHz) fX/23 (625 kHz) 3

1 0 0 0 fXX/23 fX/23 (625 kHz) fX/24 (313 kHz) 4

1 0 0 1 fXX/24 fX/24 (313 kHz) fX/25 (156 kHz) 5

1 0 1 0 fXX/25 fX/25 (156 kHz) fX/26 (78.1 kHz) 6

1 0 1 1 fXX/26 fX/26 (78.1 kHz) fX/27 (39.1 kHz) 7

1 1 0 0 fXX/27 fX/27 (39.1 kHz) fX/28 (19.5 kHz) 8

1 1 0 1 fXX/28 fX/28 (19.5 kHz) fX/29 (9.8 kHz) 9

1 1 1 0 fXX/29 fX/29 (9.8 kHz) fX/210 (4.9 kHz) 10

Other than above Setting prohibited

generator output is disrupted and communication cannot be performed normally.

Therefore, BRGC must not be written to during a communication operation.

Remarks 1. f XMain system clock oscillation frequency
2. f XX : Main system clock frequency (f X or f X /2)
3. MCS : Bit 0 of oscillation mode selection register (OSMS)
4. n : Value set in TPS0 to TPS3 (1 ≤ n ≤ 11)
5. Figures in parentheses apply to operation with f X = 5.0 MHz.
Page 488 of the NEC PD78076Y user manual — (ii) When the baud rate generator is used:
Page 488 · click to enlarge
Page 488

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

When the internal clock is used as the serial clock in the 3-wire serial I/O mode, set BRGC as described

below. BRGC Setting is not required if an external serial clock is used.

(i) When the baud rate generator is not used:

Select a serial clock frequency with TPS0 through TPS3. Be sure then to set MDL0 through MDL3 to

1,1,1,1.

The serial clock frequency becomes 1/2 of the source clock frequency for the 5-bit counter.

(ii) When the baud rate generator is used:

Select a serial clock frequency with MDL0 through MDL3 and TPS0 through TPS3. Be sure then to

set MDL0 through MDL3 to 1,1,1,1.

The serial clock frequency is calculated by the following formula.

fXX Serial clock frequency = [Hz]

2n x (k + 16)

f XMain system clock oscillation frequency
f XXMain system clock frequency (f X or f X /2)
nValue set in TPS0 to TPS3 (1 ≤ n ≤ 11)
kValue set in MDL0 to MDL3 (0 ≤ k ≤ 14)
Page 489 of the NEC PD78076Y user manual — SRIF
Page 489 · click to enlarge
Page 489

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(2) Communication operation

In the 3-wire serial I/O mode, data transmission/reception is performed in 8-bit units. Data is transmitted/

received bit by bit in synchronization with the serial clock.

Transmit shift register (TXS/SIO2) and receive shift register (RXS) shift operations are performed in

synchronization with the fall of the serial clock (SCK2). Then transmit data is held in the SO2 latch and output

from the SO2 pin. Also, receive data input to the SI2 pin is latched in the receive buffer register (RXB/SIO2)

on the rise of SCK2.

At the end of an 8-bit transfer, the operation of TXS/SIO2 and RXS stops automatically, and the interrupt

request flag (SRIF) is set.

Figure 20-12. 3-Wire Serial I/O Mode Timing

SCK2 1 2 3 4 5 6 7 8

SI2

DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0

SO2 DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0

SRIF

Transfer Start at the Falling Edge of SCK2

End of Transfer

Page 490 of the NEC PD78076Y user manual — (4) Transfer start
Page 490 · click to enlarge
Page 490

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

(3) MSB/LSB switching as the start bit

The 3-wire serial I/O mode enables to select transfer to start from MSB or LSB.

Figure 20-13 shows the configuration of the transmit shift register (TXS/SIO2) and internal bus. As shown

in the figure, MSB/LSB can be read/written in reverse form.

MSB/LSB switching as the start bit can be specified with bit 2 (CSIM22) of the serial operating mode register

2 (CSIM2).

Figure 20-13. Circuit of Switching in Transfer Bit Order

SI2 Transmit Shift Register (TXS/SIO2)

D Q

SO2

SCK2

Start bit switching is realized by switching the bit order for data write to SIO2. The SIO2 shift order remains

unchanged.

Thus, MSB-first and LSB-first must be switched before writing data to the shift register.

(4) Transfer start

Serial transfer is started by setting transfer data to the transmission shift register (TXS/SIO2) when the

following two conditions are satisfied.

  • Serial interface channel 2 operation control bit (CSIE2) = 1
  • Internal serial clock is stopped or SCK2 is a high level after 8-bit serial transfer.

Upon termination of 8-bit transfer, serial transfer automatically stops and the interrupt request flag (SRIF)

is set.

Show 5 more labels / short text on this page
Internal Bus · LSB-first · MSB-first Read/Write Gate · Read/Write Gate · SO2 Latch
Page 491 of the NEC PD78076Y user manual — Countermeasures
Page 491 · click to enlarge
Page 491

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

20.4.4 Restrictions on using UART mode

In the UART mode, a receive completion interrupt request (INTSR) is generated after a certain period of time

following the generation and clearing of the receive error interrupt request (INTSER). Thereby, the phenomenon

shown below may occur.

Details

If the bit 1 (ISRM) of the asynchronous serial interface mode register (ASIM) is set to 1, the setting is made

such that receive completion interrupt request (INTSR) will not be generated upon the generation of a receive

error. However, in the receive error interrupt request (INTSER) servicing, if the receive buffer register (RXB)

is read within a certain timing (“a” in Figure 20-14), internal error flag is cleared (to 0). Therefore, no receive

error is judged to have been generated, and INTSR, which is not supposed to be generated, will be

generated. Figure 20-14 illustrates the operation above.

Figure 20-14. Receive Completion Interrupt Request Generation Timing (ISRM = 1)

INTSER (when framing or overrun error is generated)

Error flag (internal flag)

Cleared upon reading RXB

INTSR

Interrupt servicing routine on CPU side

Judged no receive error has been generated, and INTSR is generated.

Remark ISRMBit 1 of asynchronous serial interface mode register (ASIM)
f SCK5-bit counter source clock of baud rate generator
RXBReceive buffer register

To avoid this phenomenon, implement the following countermeasures.

Countermeasures

  • In the case of framing error or overrun error

Prohibit the reading of the receive buffer register (RXB) for a certain period (“T2” in Figure 20-15) after

the generation of a receive error interrupt request (INTSER).

  • In the case of parity error

Prohibit the reading of the receive buffer register (RXB) for a certain period (“T1 + T2” in Figure 20-15)

after the generation of a receive error interrupt request (INTSER).

fSCK · a · RXB reading

Page 492 of the NEC PD78076Y user manual — [Condition]
Page 492 · click to enlarge
Page 492

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

Figure 20-15. Period that Reading Receive Buffer Register is Prohibited

D1 D2 D6 D7 STOP

D0

START

INTSR

INTSER (when framing or overrun error is generated)

INTSER (when parity error is generated)

T1 T2

T1 : The amount of time for one unit of data sent in the baud rate selected with the baud

rate generator control register (BRGC) (1/baud rate)

T2 : The amount of time for 2 clocks of 5-bit counter source clock (fSCK) selected with

BRGC

Example of countermeasures

An example of the countermeasures is shown below.

[Condition]

fX = 5.0 MHz

Processor clock control register (PCC) = 00H

Oscillation mode selection register (OSMS) = 01H

Baud rate generator control register (BRGC) = B0H (when 2400 bps is selected for baud rate)

TCY = 0.4 µs (tCY = 0.2 µs)

1 T1 = = 416.7 µs 2400

T2 = 12.8 x 2 = 25.6 µs

T1 + T2 = 2212 (clock)

RxD (input) · Parity · tCY

Page 493 of the NEC PD78076Y user manual — MOV A,RXB
Page 493 · click to enlarge
Page 493

CHAPTER 20 SERIAL INTERFACE CHANNEL 2

[Example]

UART receive error interrupt request (INTSER) servicing EI

Instructions for 2205 clocks (MIN.) of CPU clock are required.

7 clocks (MIN.) of CPU clock (time from interrupt request to servicing)

MOV A,RXB

RETI

Main processing · INTSER is generated

Page 494 of the NEC PD78076Y user manual — [MEMO]
Page 494 · click to enlarge
Page 494

[MEMO]

Page 495 of the NEC PD78076Y user manual — P120 P127
Page 495 · click to enlarge
Page 495

CHAPTER 21 REAL-TIME OUTPUT PORT

21.1 Real-Time Output Port Functions

Data set previously in the real-time output buffer register can be transferred to the output latch by hardware

concurrently with timer interrupt request or external interrupt request generation, then output externally. This is

called the real-time output function. The pins that output data externally are called real-time output ports.

By using a real-time output, a signal which has no jitter can be output. This port is therefore suitable for control

of stepping motors, etc.

Port mode/real-time output port mode can be specified bit-wise.

21.2 Real-Time Output Port Configuration

The real-time output port consists of the following hardware.

Table 21-1. Real-time Output Port Configuration

Register Real-time output buffer register (RTBL, RTBH)

Control register Port mode register 12 (PM12)

Real-time output port mode register (RTPM)

Real-time output port control register (RTPC)

Figure 21-1. Real-time Output Port Block Diagram

Real-time Output Port Control Register

EXTR BYTE

Port Mode Register 12 (PM12)

INTP2

Real-time Output Buffer Register Higher 4 Bits (RTBH)

Real-time Output Buffer Register Lower 4 Bits (RTBL)

Output Trigger Control Circuit

INTTM1

INTTM2

Real-time Output port Mode Register (RTPM)

P120 P127

Item Configuration · Internal Bus · Output Latch

Page 496 of the NEC PD78076Y user manual — RTBH RTBH RTBL RTBH RTBL
Page 496 · click to enlarge
Page 496

CHAPTER 21 REAL-TIME OUTPUT PORT

(1) Real-time output buffer register (RTBL, RTBH)

Addresses of RTBL and RTBH are mapped individually in the special function register (SFR) area as shown

in Figure 21-2.

When specifying 4 bits x 2 channels as the operating mode, data are set individually in RTBL and RTBH.

When specifying 8 bits x 1 channel as the operating mode, data are set to both RTBL and RTBH by writing

8-bit data to either RTBL or RTBH.

Table 21-2 shows operations during manipulation of RTBL and RTBH.

Figure 21-2. Real-time Output Buffer Register Configuration

Higher 4 Bits Lower 4 Bits

FF30H

RTBL

FF31H

RTBH

Table 21-2. Operation in Real-time Output Buffer Register Manipulation

In ReadNote 1 In WriteNote 2

Operating Mode Register to be

Higher 4 Bits Lower 4 Bits Higher 4 Bits Lower 4 Bits

RTBL RTBH RTBL Invalid RTBL

4 Bits x 2 Channels

RTBH RTBH RTBL RTBH Invalid

RTBL RTBH RTBL RTBH RTBL

8 Bits x 1 Channel

RTBH RTBH RTBL RTBH RTBL

set in the port mode, 0 is read out.

2. After setting data in the real-time output port, output data should be set in RTBL and RTBH by the

time a real-time output trigger is generated.

Manipulated

Page 497 of the NEC PD78076Y user manual — Figure 21-4. Real-time Output Port Mode Register Format
Page 497 · click to enlarge
Page 497

CHAPTER 21 REAL-TIME OUTPUT PORT

21.3 Real-Time Output Port Control Registers

The following three registers control the real-time output port.

  • Port mode register 12 (PM12)
  • Real-time output port mode register (RTPM)
  • Real-time output port control register (RTPC)

(1) Port mode register 12 (PM12)

This register sets the input or output mode of port 12 pins (P120 to P127) which also function as real-time

output pins (RTP0 to RTP7). To use port 12 as a real-time output port, the port pin that performs real-time

output must be set in the output mode (PM12n = 0: n = 0 to 7).

PM12 is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets this register to FFH.

Figure 21-3. Port Mode Register 12 Format

PM12

PM127

PM126

PM125

PM124

PM123

PM122

PM121

PM120

FF2CH FFH

R/W

Selects I/O Mode of P12n Pin (n = 0 to 7)

Output mode (output buffer ON)

Input mode (output buffer OFF)

(2) Real-time output port mode register (RTPM)

This register selects the real-time output port mode/port mode bit-wise.

RTPM is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets this register to 00H.

Figure 21-4. Real-time Output Port Mode Register Format

RTPM

RTPM7

RTPM6

RTPM5

RTPM4

RTPM3

RTPM2

RTPM1

RTPM0

FF34H 00H

R/W

Real-time Output Port Selection (n = 0 to 7)

Real-time output port mode

is performed to the output mode (set the bits of the port mode register 12 (PM12) to 0).

2. In the port specified as a real-time output port, data cannot be set to the output latch.

Therefore, when setting an initial value, data should be set to the output latch before

setting the real-time output mode.

Show 9 more labels / short text on this page
After Reset R/W · Symbol · Address · PM12n · After Reset R/W · Symbol · Address · RTPMn · Port mode
Page 498 of the NEC PD78076Y user manual — 1 INTP2
Page 498 · click to enlarge
Page 498

CHAPTER 21 REAL-TIME OUTPUT PORT

(3) Real-time output port control register (RTPC)

This register sets the real-time output port operating mode and output trigger.

Table 21-3 shows the relationship between the real-time output port operating mode and output trigger.

RTPC is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets this register to 00H.

Figure 21-5. Real-time Output Port Control Register Format

RTPC

BYTE

EXTR

FF36H 00H

R/W

EXTR

Real-time Output Control by INTP2

INTP2 not specified as real-time output trigger

INTP2 specified as real-time output trigger

BYTE

Real-time Output Port Operating Mode

4 bits x 2 channels

8 bits x 1 channel

Table 21-3. Real-time Output Port Operating Mode and Output Trigger

BYTE EXTR Operating Mode RTBH → Port Output RTBL → Port Output

0 INTTM2 INTTM1

4 bits x 2 channels

1 INTTM1 INTP2

0 INTTM1

8 bits x 1 channel

1 INTP2

Show 5 more labels / short text on this page
After Reset R/W · Symbol · <1> · <0> · Address
Page 499 of the NEC PD78076Y user manual — (3) Software interrupt
Page 499 · click to enlarge
Page 499

CHAPTER 22 INTERRUPT FUNCTIONS

22.1 Interrupt Function Types

The following three types of interrupt functions are used.

(1) Non-maskable interrupt

This interrupt is acknowledged unconditionally even in a disabled state. It does not undergo interrupt priority

control and is given top priority over all other interrupt requests.

It generates a standby release signal.

The non-maskable interrupt has one source of interrupt request from the watchdog timer.

(2) Maskable interrupts

These interrupts undergo mask control. Maskable interrupts can be divided into a high interrupt priority group

and a low interrupt priority group by setting the priority specify flag register (PR0L, PR0H, and PR1L).

Multiple high priority interrupts can be applied to low priority interrupts. If two or more interrupts with the

same priority are simultaneously generated, each interrupts has a predetermined priority (see Table 22-1).

A standby release signal is generated.

The maskable interrupt has seven sources of external interrupt requests and fifteen sources of internal

interrupt requests.

(3) Software interrupt

This is a vectored interrupt to be generated by executing the BRK instruction. It is acknowledged even in

a disabled state. The software interrupt does not undergo interrupt priority control.

Page 500 of the NEC PD78076Y user manual — 12 INTST 001CH
Page 500 · click to enlarge
Page 500

CHAPTER 22 INTERRUPT FUNCTIONS

22.2 Interrupt Sources and Configuration

There are total of 24 non-maskable, maskable, and software interrupts in the interrupt sources (see Table 22-1).

Table 22-1. Interrupt Source List (1/2)

Default PriorityNote 1

Watchdog timer overflow (with

– INTWDT (A)

watchdog timer mode 1 selected)

0004H

Watchdog timer overflow (with

0 INTWDT (B)

interval timer mode selected)

1 INTP0 0006H (C)

2 INTP1 0008H

3 INTP2 000AH

4 INTP3 Pin input edge detection External 000CH (D)

5 INTP4 000EH

6 INTP5 0010H

7 INTP6 0012H

End of serial interface channel 0

8 INTCSI0 0014H

End of serial interface channel 1

9 INTCSI1 0016H

Serial interface channel 2 UART

10 INTSER 0018H

(B)

End of serial interface channel 2

INTSR

11 001AH

End of serial interface channel 2

INTCSI2

End of serial interface channel 2

12 INTST 001CH

0 is the highest priority and 20 is the lowest priority.

2. Basic configuration types (A) to (E) correspond to (A) to (E) of Figure 22-1.
Show 19 more labels / short text on this page
Interrupt Source · Vector · Basic Configuration · Interrupt · Internal/ External · Type · Table Address · Name Trigger · TypeNote 2 · Non- maskable · Internal · Maskable · transfer · transfer · reception error generation · Internal · UART reception · 3-wire transfer · UART transfer
Page 501 of the NEC PD78076Y user manual — 20 INTTM6 002CH
Page 501 · click to enlarge
Page 501

CHAPTER 22 INTERRUPT FUNCTIONS

Table 22-1. Interrupt Source List (2/2)

Default PriorityNote 1 Interrupt

Reference time interval signal from

13 INTTM3 001EH

Generation of 16-bit timer register,

14 INTTM00 0020H

Generation of 16-bit timer register,

15 INTTM01 0022H

Generation of 8-bit timer/event

Maskable 16 INTTM1 Internal 0024H (B)

counter 1 match signal

Generation of 8 bit timer/event

17 INTTM2 0026H

counter 2 match signal

18 INTAD End of A/D converter conversion 0028H

Generation of 8-bit timer/event

19 INTTM5 002AH

counter 5 match signal

Generation of 8-bit timer/event

20 INTTM6 002CH

counter 6 match signal

Software — BRK BRK instruction execution — 003EH (E)

0 is the highest priority and 20 is the lowest priority.

2. Basic configuration types (A) to (E) correspond to (A) to (E) of Figure 22-1.
Show 13 more labels / short text on this page
Interrupt Source · Vector · Basic Configuration · Internal/ External · Type · Table Address · Name Trigger · TypeNote 2 · watch timer · capture/compare register (CR00) · match signal · capture/compare register (CR01) · match signal
Page 502 of the NEC PD78076Y user manual — IF
Page 502 · click to enlarge
Page 502

CHAPTER 22 INTERRUPT FUNCTIONS

Figure 22-1. Basic Configuration of Interrupt Function (1/2)

(A) Internal non-maskable interrupt

Vector Table Address Generator

(B) Internal maskable interrupt

IE PR ISP MK

Vector Table Address Generator

(C) External maskable interrupt (INTP0)

Sampling Clock Select Register (SCS)

External Interrupt Mode Register (INTM0)

IE PR ISP MK

Vector Table Address Generator

IF

Show 14 more labels / short text on this page
Internal Bus · Interrupt Request · Priority Control Circuit · Standby Release Signal · Internal Bus · Priority Control Circuit · IF Interrupt Request · Standby Release Signal · Internal Bus · Priority Control Circuit · Interrupt Request · Sampling Clock · Edge Detector · Standby Release Signal
Page 503 of the NEC PD78076Y user manual — IF
Page 503 · click to enlarge
Page 503

CHAPTER 22 INTERRUPT FUNCTIONS

Figure 22-1. Basic Configuration of Interrupt Function (2/2)

(D) External maskable interrupt (except INTP0)

External Interrupt Mode Register (INTM0, INTM1)

IE PR ISP MK

Vector Table Address Generator

Edge Detector Interrupt Request

IF

(E) Software interrupt

Vector Table Address Generator

IFInterrupt request flag
IEInterrupt enable flag
ISPInservice priority flag
MKInterrupt mask flag
PRPriority specify flag
Show 6 more labels / short text on this page
Internal Bus · Priority Control Circuit · Standby Release Signal · Internal Bus · Interrupt Request · Priority Control Circuit
Page 504 of the NEC PD78076Y user manual — INTWDT TMIF4 IF0L TMMK4 MK0L TMPR4 PR0L
Page 504 · click to enlarge
Page 504

CHAPTER 22 INTERRUPT FUNCTIONS

22.3 Interrupt Function Control Registers

The following six types of registers are used to control the interrupt functions.

  • Interrupt request flag register (IF0L, IF0H, IF1L)
  • Interrupt mask flag register (MK0L, MK0H, MK1L)
  • Priority specify flag register (PR0L, PR0H, PR1L)
  • External interrupt mode register (INTM0, INTM1)
  • Sampling clock select register (SCS)
  • Program status word (PSW)

Table 22-2 gives a listing of interrupt request flags, interrupt mask flags, and priority specify flags corresponding

to interrupt request sources.

Table 22-2. Various Flags Corresponding to Interrupt Request Sources

Interrupt Source Interrupt Request Flag Interrupt Mask Flag Priority Specify Flag

INTWDT TMIF4 IF0L TMMK4 MK0L TMPR4 PR0L

INTP0 PIF0 PMK0 PPR0

INTP1 PIF1 PMK1 PPR1

INTP2 PIF2 PMK2 PPR2

INTP3 PIF3 PMK3 PPR3

INTP4 PIF4 PMK4 PPR4

INTP5 PIF5 PMK5 PPR5

INTP6 PIF6 PMK6 PPR6

INTCSI0 CSIIF0 IF0H CSIMK0 MK0H CSIPR0 PR0H

INTCSI1 CSIIF1 CSIMK1 CSIPR1

INTSER SERIF SERMK SERPR

INTSR/INTCSI2 SRIF SRMK SRPR

INTST STIF STMK STPR

INTTM3 TMIF3 TMMK3 TMPR3

INTTM00 TMIF00 TMMK00 TMPR00

INTTM01 TMIF01 TMMK01 TMPR01

INTTM1 TMIF1 IF1L TMMK1 MK1L TMPR1 PR1L

INTTM2 TMIF2 TMMK2 TMPR2

INTAD ADIF ADMK ADPR

INTTM5 TMIF5 TMMK5 TMPR5

INTTM6 TMIF6 TMMK6 TMPR6

Register Register Register

Page 505 of the NEC PD78076Y user manual — WTIF
Page 505 · click to enlarge
Page 505

CHAPTER 22 INTERRUPT FUNCTIONS

(1) Interrupt request flag registers (IF0L, IF0H, IF1L)

The interrupt request flag is set to 1 when the corresponding interrupt request is generated or an instruction

is executed. It is cleared to 0 when an instruction is executed upon acknowledgment of an interrupt request

or upon application of RESET input.

IF0L, IF0H, and IF1L are set with a 1-bit or 8-bit memory manipulation instruction. If IF0L and IF0H are used

as a 16-bit register IF0, use a 16-bit memory manipulation instruction for the setting.

RESET input sets these registers to 00H.

Figure 22-2. Interrupt Request Flag Register Format

IF0L

PIF6

PIF5

PIF4

PIF3

PIF2

PIF1

PIF0

TMIF4

FFE0H 00H

R/W

TMIF01 IF0H

TMIF00

TMIF3

STIF

SRIF

SERIF

CSIIF1

CSIIF0

FFE1H 00H R/W

WTIF

TMIF6

TMIF5

ADIF

TMIF2

TMIF1

FFE2H 00H R/W

No interrupt request signal

Interrupt request signal is generated; Interrupt request state

used in the watchdog timer mode 1, set TMIF4 flag to 0.

2. Set always 0 in IF1L bit 5 and bit 6.
Show 27 more labels / short text on this page
After Reset R/W · Symbol · <7> · <6> · <5> · <4> · <3> · <2> · <1> · <0> · Address · <7> · <6> · <5> · <4> · <3> · <2> · <1> · <0> · <7> · <4> · <3> · <2> · <1> · <0> · xxIFx · Interrupt Request Flag
Page 506 of the NEC PD78076Y user manual — TMMK6
Page 506 · click to enlarge
Page 506

CHAPTER 22 INTERRUPT FUNCTIONS

(2) Interrupt mask flag registers (MK0L, MK0H, MK1L)

The interrupt mask flag is used to enable/disable the corresponding maskable interrupt service and to set

standby clear enable/disable.

MK0L, MK0H, and MK1L are set with a 1-bit or 8-bit memory manipulation instruction. If IF0L and IF0H are

used as a 16-bit register MK0, use a 16-bit memory manipulation instruction for the setting.

RESET input sets these registers to FFH.

Figure 22-3. Interrupt Mask Flag Register Format

MK0L

PMK6

PMK5

PMK4

PMK3

PMK2

PMK

PMK

TMMK4

FFE4H FFH

R/W

TMMK01 MK0H

TMMK00

TMMK3

STMK

SRMK

SERMK

CSIMK1

CSIMK0

FFE5H FFH R/W

TMMK6

TMMK5

ADMK

TMMK2

TMMK1

FFE6H FFH R/W

WTMK

read value becomes undefined.

2. Because port 0 has a dual function as the external interrupt request input, when the

output level is changed by specifying the output mode of the port function, an interrupt

request flag is set. Therefore, 1 should be set in the interrupt mask flag before using

the output mode.

3. Set always 1 in MK1L bit 5 and bit 6.
Show 29 more labels / short text on this page
After Reset R/W · Symbol · <7> · <6> · <5> · <4> · <3> · <2> · <1> · <0> · Address · <7> · <6> · <5> · <4> · <3> · <2> · <1> · <0> · <7> · <4> · <3> · <2> · <1> · <0> · xxMKx · Interrupt Servicing Control · Interrupt servicing enabled · Interrupt servicing disabled
Page 507 of the NEC PD78076Y user manual — Figure 22-4. Priority Specify Flag Register Format
Page 507 · click to enlarge
Page 507

CHAPTER 22 INTERRUPT FUNCTIONS

(3) Priority specify flag registers (PR0L, PR0H, PR1L)

The priority specify flag is used to set the corresponding maskable interrupt priority orders.

PR0L, PR0H, and PR1L are set with a 1-bit or 8-bit memory manipulation instruction. If IF0L and IF0H are

used as a 16-bit register PR0, use a 16-bit memory manipulation instruction for the setting.

RESET input sets these registers to FFH.

Figure 22-4. Priority Specify Flag Register Format

PR0L

PPR6

PPR5

PPR4

PPR3

PPR2

PPR1

PPR0

TMPR4

FFE8H FFH

R/W

TMPR01 PR0H

TMPR00

TMPR3

STPR

SRPR

SERPR

CSIPR1

CSIPR0

FFE9H FFH R/W

1 PR1L

TMPR6

TMPR5

ADPR

TMPR2

TMPR1

FFEAH FFH R/W

2. Set always 1 in PR1L bit 5 to bit 7.
Show 28 more labels / short text on this page
After Reset R/W · Address · Symbol · <7> · <6> · <5> · <4> · <3> · <2> · <1> · <0> · <7> · <6> · <5> · <4> · <3> · <2> · <1> · <0> · <4> · <3> · <2> · <1> · <0> · xxPRx · Priority Level Selection · High priority level · Low priority level
Page 508 of the NEC PD78076Y user manual — ES31
Page 508 · click to enlarge
Page 508

CHAPTER 22 INTERRUPT FUNCTIONS

(4) External interrupt mode register (INTM0, INTM1)

These registers set the valid edge for INTP0 to INTP6.

INTM0 and INTM1 are set by 8-bit memory manipulation instructions.

RESET input sets these registers to 00H.

Figure 22-5. External Interrupt Mode Register 0 Format

INTM0

ES31

ES30

ES21

ES20

ES11

ES10

FFECH 00H

R/W

ES11

ES10

INTP0 Valid Edge Selection

Both falling and rising edges

ES21

ES20

INTP1 Valid Edge Selection

Both falling and rising edges

ES31

ES30

INTP2 Valid Edge Selection

Both falling and rising edges

register (TMC0) and stop the timer operation before setting the valid edges of INTP0/TI00/

P00 pin.

Show 12 more labels / short text on this page
After Reset R/W · Symbol · Address · Falling edge · Rising edge · Setting prohibited · Falling edge · Rising edge · Setting prohibited · Falling edge · Rising edge · Setting prohibited
Page 509 of the NEC PD78076Y user manual — ES71
Page 509 · click to enlarge
Page 509

CHAPTER 22 INTERRUPT FUNCTIONS

Figure 22-6. External Interrupt Mode Register 1 Format

INTM1

ES71

ES70

ES61

ES60

ES51

ES50

ES41

ES40

FFEDH 00H

R/W

ES41

ES40

INTP3 Valid Edge Selection

Both falling and rising edges

ES51

ES50

INTP4 Valid Edge Selection

Both falling and rising edges

ES61

ES60

INTP5 Valid Edge Selection

Both falling and rising edges

ES71

ES70

INTP6 Valid Edge Selection

Both falling and rising edges

Show 15 more labels / short text on this page
Address · After Reset R/W · Symbol · Falling edge · Rising edge · Setting prohibited · Falling edge · Rising edge · Setting prohibited · Falling edge · Rising edge · Setting prohibited · Falling edge · Rising edge · Setting prohibited
Page 510 of the NEC PD78076Y user manual — SCS1
Page 510 · click to enlarge
Page 510

CHAPTER 22 INTERRUPT FUNCTIONS

(5) Sampling clock select register (SCS)

This register is used to set the valid edge clock sampling clock to be input to INTP0. When remote controlled

data reception is carried out using INTP0, digital noise is removed with sampling clocks.

SCS is set with an 8-bit memory manipulation instruction.

RESET input sets SCS to 00H.

Figure 22-7. Sampling Clock Select Register Format

SCS

SCS1

SCS0

FF47H 00H

R/W

INTP0 Sampling Clock Selection

SCS1

SCS0 MCS = 1 MCS = 0

N

7(39.1 kHz)

8(19.5 kHz)

5(156.3 kHz)

6(78.1 kHz)

6(78.1 kHz)

7(39.1 kHz)

to the peripheral hardware. fXX/2N stops in the HALT mode.

Remarks 1. N : Value (N = 0 to 4) at bits 0 to 2 (PCC0 to PCC2) of processor clock control register

2. f XX : Main system clock frequency (f X or f X /2)
3. f X : Main system clock oscillation frequency
4. MCS : Bit 0 of oscillation mode selection register (OSMS)
5. Figures in parentheses apply to operation with f X = 5.0 MHz.
Show 13 more labels / short text on this page
After Reset R/W · Symbol · Address · fxx/2 · fxx/2 · fx/2 · fx/2 · fxx/2 · fx/2 · fx/2 · fxx/2 · fx/2 · fx/2
Page 511 of the NEC PD78076Y user manual — INTP0
Page 511 · click to enlarge
Page 511

CHAPTER 22 INTERRUPT FUNCTIONS

When the setting INTP0 input level is active twice in succession, the noise eliminator sets interrupt request

flag (PIF0) to 1.

Figure 22-8 shows the noise eliminator input/output timing.

Figure 22-8. Noise Eliminator Input/Output Timing (during Rising Edge Detection)

(a) When input is less than the sampling cycle (t SMP )

INTP0

PIF0 “L”

Because INTP0 level is not active in sampling, PIF0 output remains at low level.

(b) When input is equal to or twice the sampling cycle (tSMP)

INTP0

PIF0

Because sampling INTP0 level is active twice in succession in , PIF0 flag is set to 1.

(c) When input is twice or more than the cycle frequency (tSMP)

INTP0

PIF0

When INTP0 level is active twice in succession, PIF0 flag is set to 1.

Show 7 more labels / short text on this page
tSMP · Sampling Clock · tSMP · Sampling Clock · <1> <2> · tSMP · Sampling Clock
Page 512 of the NEC PD78076Y user manual — ISP
Page 512 · click to enlarge
Page 512

CHAPTER 22 INTERRUPT FUNCTIONS

(6) Program status word (PSW)

The program status word is a register to hold the instruction execution result and the current status for

interrupt request. The IE flag to set maskable interrupt enable/disable and the ISP flag to control multiple

interrupt servicing are mapped.

Besides 8-bit unit read/write, this register can carry out operations with a bit manipulation instruction and

dedicated instructions (EI and DI). When a vectored interrupt request is acknowledged, and when the BRK

instruction is executed, the contents of PSW automatically is saved into a stack and the IE flag is reset to

0. If a maskable interrupt request is acknowledged contents of the priority specify flag of the acknowledged

interrupt are transferred to the ISP flag. The acknowledged contents of PSW is also saved into the stack

with the PUSH PSW instruction. It is reset from the stack with the RETI, RETB, and POP PSW instructions.

RESET input sets PSW to 02H.

Figure 22-9. Program Status Word Format

IE PSW

Z

RBS1

AC

RBS0

ISP

CY 02H

Used when Normal Instruction is Executed

ISP

Priority of Interrupt Currently Being Received

High-priority interrupt servicing (low-priority interrupt disable)

1 Interrupt request not acknowledged or low-priority interrupt servicing (all-maskable interrupts enable)

IE Interrupt Request Acknowledge Enable/Disable

After Reset · 0 Disable · 1 Enable

Page 513 of the NEC PD78076Y user manual — CHAPTER 22 INTERRUPT FUNCTIONS
Page 513 · click to enlarge
Page 513

CHAPTER 22 INTERRUPT FUNCTIONS

22.4 Interrupt Servicing Operations

22.4.1 Non-maskable interrupt request acknowledge operation

A non-maskable interrupt request is unconditionally acknowledged even if in an interrupt request acknowledge

disable state. It does not undergo interrupt priority control and has highest priority over all other interrupts.

If a non-maskable interrupt request is acknowledged, the acknowledged interrupt is saved in the stacks, PSW

and PC, in that order, the IE and ISP flags are reset to 0, and the vector table contents are loaded into PC and

branched.

A new non-maskable interrupt request generated during execution of a non-maskable interrupt servicing program

is acknowledged after the current execution of the non-maskable interrupt servicing program is terminated (following

RETI instruction execution) and one main routine instruction is executed. If a new non-maskable interrupt request

is generated twice or more during non-maskable interrupt service program execution, only one non-maskable

interrupt request is acknowledged after termination of the non-maskable interrupt service program execution.

Figure 22-10 shows the flowchart from non-maskable interrupt request generation to acknowledge. Figure 22-

11 shows the non-maskable interrupt request acknowledge timing. Figure 22-12 shows the acknowledge operation

if multiple non-maskable interrupt requests are generated.

Page 514 of the NEC PD78076Y user manual — TMIF4
Page 514 · click to enlarge
Page 514

CHAPTER 22 INTERRUPT FUNCTIONS

Figure 22-10. Flowchart from Non-Maskable Interrupt Generation to Acknowledge

WDTM4 = 1 (with watchdog timer

WDTM3 = 0 (with non-maskable interrupt selected)?

Interrupt control register unaccessed?

WDTMWatchdog timer mode register
WDTWatchdog timer

Figure 22-11. Non-Maskable Interrupt Request Acknowledge Timing

PSW and PC Save, Jump to Interrupt Servicing

TMIF4

The interrupt request generated in this period is acknowledged at timing.

TMIF4Watchdog timer interrupt request flag
Show 23 more labels / short text on this page
Start · No · mode selected)? · Interval timer · Yes · No · Overflow in WDT? · Yes · No · Reset processing · Yes · Interrupt request generation · No · WDT interrupt servicing? · Interrupt request · held pending · Yes · No · Yes · Interrupt service start · Interrupt Sevicing Program · Instruction CPU Instruction · Instruction
Page 515 of the NEC PD78076Y user manual — (b) If two non-maskable interrupt requests are generated during
Page 515 · click to enlarge
Page 515

CHAPTER 22 INTERRUPT FUNCTIONS

Figure 22-12. Non-Maskable Interrupt Request Acknowledge Operation

(a) If a new non-maskable interrupt request is generated during

non-maskable interrupt servicing program execution

NMI Request Execute NMI Request Reserve

Reserved NMI Request Processing

(b) If two non-maskable interrupt requests are generated during

non-maskable interrupt servicing program execution

NMI Request Execute NMI Request Reserve NMI Request Reserve

NMI Request NMI Request

Reserved NMI Request Processing

NMI Request Not Acknowledged (Only 1 NMI request is acknowledged even if two or more NMI requests are generated.)

Show 7 more labels / short text on this page
Main Routine · NMI Request <1> · NMI Request <2> · 1 Instruction Execution · Main Routine · NMI Request <3> · 1 Instruction Execution
Page 516 of the NEC PD78076Y user manual — Table 22-3. Times from Maskable Interrupt Request Generation to Interrupt Service
Page 516 · click to enlarge
Page 516

CHAPTER 22 INTERRUPT FUNCTIONS

22.4.2 Maskable interrupt request acknowledge operation

A maskable interrupt request becomes acknowledgeable when an interrupt request flag is set to 1 and the

interrupt mask (MK) flag is cleared to 0. A vectored interrupt request is acknowledged in an interrupt enable state

(with IE flag set to 1). However, a low-priority interrupt request is not acknowledged during high-priority interrupt

service (with ISP flag reset to 0).

Wait times maskable interrupt request generation to interrupt servicing are shown in Figure 22-3.

Refer to Figures 22-14 and 22-15 for the interrupt request acknowledge timing.

Table 22-3. Times from Maskable Interrupt Request Generation to Interrupt Service

Minimum Time Maximum TimeNote

When xxPRx = 0 7 clocks 32 clocks

When xxPRx = 1 8 clocks 33 clocks

Remark 1 clock(f CPU : CPU clock)

If two or more maskable interrupt requests are generated simultaneously, the request specified for higher priority

with the priority specify flag is acknowledged first. If two or more requests are specified for the same priority with

the priority specify flag, the interrupt request with the higher default priority is acknowledged first.

Any reserved interrupt requests are acknowledged when they become acknowledgeable.

Figure 22-13 shows interrupt request acknowledge algorithms.

When a maskable interrupt request is acknowledged, the contents of program status word (PSW) and program

counter (PC) are saved to stacks, in this order. Then, the IE flag is reset (to 0), and the value of the acknowledged

interrupt priority specify flag is transferred to the ISP flag. Further, the vector table data determined for each interrupt

request is loaded into PC and branched.

Return from the interrupt is possible with the RETI instruction.

fCPU

Page 517 of the NEC PD78076Y user manual — IE = 1?
Page 517 · click to enlarge
Page 517

CHAPTER 22 INTERRUPT FUNCTIONS

Figure 22-13. Interrupt Request Acknowledge Processing Algorithm

Yes (Interrupt Request Generation)

Any high- priority interrupt among simultaneously generated

xxPR = 0 interrupt

xxPR = 0 interrupt

IE = 1?

IE = 1?

ISP = 1?

xxIFInterrupt request flag
xxMKInterrupt mask flag
xxPRPriority specify flag
IEFlag to control maskable interrupt request acknowledge

ISP : Flag to indicate the priority of interrupt being serviced (0 = an interrupt with higher priority

is being serviced, 1 = interrupt request is not acknowledged or an interrupt with lower

priority is being serviced)

Show 36 more labels / short text on this page
Start · No · xxIF = 1? · No · xxMK = 0? · Yes · Interrupt request reserve · Yes (High priority) · xxPR = 0? · No (Low Priority) · Yes · Any simultaneously generated · Yes · Interrupt request reserve · requests? · requests? · Interrupt request reserve · No · No · No · Any simultaneously generated · Yes · high-priority interrupt · Interrupt request reserve · Yes · requests? · Interrupt request reserve · Vectored interrupt servicing · No · No · Yes · Interrupt request reserve · No · Yes · Interrupt request reserve · Vectored interrupt servicing
Page 518 of the NEC PD78076Y user manual — 22.4.3 Software interrupt request acknowledge operation
Page 518 · click to enlarge
Page 518

CHAPTER 22 INTERRUPT FUNCTIONS

Figure 22-14. Interrupt Request Acknowledge Timing (Minimum Time)

PSW and PC Save, Jump to Interrupt Servicing

xxIF (xxPR = 1)

xxIF (xxPR = 0)

Remark 1 clock(f CPU : CPU clock)

Figure 22-15. Interrupt Request Acknowledge Timing (Maximum Time)

PSW and PC Save, Jump to Interrupt Servicing

xxIF (xxPR = 1)

xxIF (xxPR = 0)

Remark 1 clock(f CPU : CPU clock)

22.4.3 Software interrupt request acknowledge operation

A software interrupt request is acknowledged by BRK instruction execution. Software interrupt cannot be

disabled.

If a software interrupt is acknowledged, the contents of program status word (PSW) and program counter (PC)

are saved to stacks, in this order. Then the IE flag is reset (to 0), and the contents of the vector tables (003EH

and 003FH) are loaded into PC and branched.

Return from the software interrupt is possible with the RETB instruction.

Show 15 more labels / short text on this page
6 Clocks · Interrupt Servicing Program · CPU Processing · Instruction Instruction · 8 Clocks · 7 Clocks · fCPU · 25 Clocks · 6 Clocks · Interrupt Servicing Program · CPU Processing · Instruction Divide Instruction · 33 Clocks · 32 Clocks · fCPU
Page 519 of the NEC PD78076Y user manual — ISP = 0 E E D D D
Page 519 · click to enlarge
Page 519

CHAPTER 22 INTERRUPT FUNCTIONS

22.4.4 Multiple interrupt servicing

A multiple interrupt consists in acknowledging another interrupt during the execution of the interrupt.

A multiple interrupt is generated only in the interrupt request acknowledge enable state (IE = 1) (except non-

maskable interrupt). As soon as an interrupt request is acknowledged, it enters the acknowledge disable state (IE

= 0). Therefore, in order to enable a multiple interrupt, it is necessary to set the interrupt enable state by setting

the IE flag (1) with the EI instruction during interrupt servicing.

Even in an interrupt enabled state, a multiple interrupt may not be enabled. However, it is controlled according

to the interrupt priority. There are two priorities, the default priority and the programmable priority. The multiple

interrupt is controlled by the programmable priority control.

If an interrupt request with the same or higher priority than that of the interrupt being serviced is generated, it

is acknowledged as a multiple interrupt. In the case of an interrupt with a priority lower than that of the interrupt

being processed, it is not acknowledged as a multiple interrupt.

Interrupt request not acknowledged as a multiple interrupt due to interrupt disable or a low priority is reserved

and acknowledged following one instruction execution of the main processing after the completion of the interrupt

being serviced.

During non-maskable interrupt servicing, multiple interrupts are not enabled.

Table 22-4 shows an interrupt request enabled for multiple interrupt during interrupt servicing, and Figure 22-

16 shows multiple interrupt examples.

Table 22-4. Interrupt Request Enabled for Multiple Interrupt during Interrupt Servicing

xxPR = 0 xxPR = 1

IE = 1 IE = 0 IE = 1 IE = 0

Non-maskable interrupt D

ISP = 0 E E D D D

ISP = 1 E E D E D

Software interrupt E E D E D

Remarks 1. EMultiple interrupt enable
2. D : Multiple interrupt disable
3. ISP and IE are the flags contained in PSW
ISP = 0An interrupt with higher priority is being serviced
ISP = 1An interrupt request is not accepted or an interrupt with lower priority is
IE = 0Interrupt request acknowledge is disabled
IE = 1Interrupt request acknowledge is enabled
4. xxPR is a flag contained in PR0L, PR0H, and PRIL
xxPR = 0Higher priority level
xxPR = 1Lower priority level
Show 9 more labels / short text on this page
Multiple Interrupt · Non-maskable · Maskable Interrupt Request · Request · Interrupt · Interrupt being Serviced · Request · Maskable interrupt · being serviced
Page 520 of the NEC PD78076Y user manual — RETI
Page 520 · click to enlarge
Page 520

CHAPTER 22 INTERRUPT FUNCTIONS

Figure 22-16. Multiple Interrupt Example (1/2)

Example 1. Two multiple interrupts generated

IE = 0

IE = 0

IE = 0

EI

EI

EI

INTyy (PR = 0)

INTzz (PR = 0)

INTxx (PR = 1)

RETI

RETI

RETI

During interrupt INTxx servicing, two interrupt requests, INTyy and INTzz are acknowledged, and

a multiple interrupt is generated. An EI instruction is issued before each interrupt request

acknowledge, and the interrupt request acknowledge enable state is set.

Example 2. Multiple interrupt is not generated by priority control

Main Processing INTxx Servicing

EI IE = 0

EI

INTyy (PR = 1)

INTxx (PR = 0)

RETI

1 Instruction Execution IE = 0

RETI

The interrupt request INTyy generated during interrupt INTxx servicing is not acknowledged

because the interrupt priority is lower than that of INTxx, and a multiple interrupt is not generated.

INTyy request is retained and acknowledged after execution of 1 instruction execution of the main

processing.

PR = 0Higher priority level
PR = 1Lower priority level
IE = 0Interrupt request acknowledge disable
Show 5 more labels / short text on this page
Main Processing · INTxx Servicing · INTyy Servicing · INTzz Servicing · INTyy Servicing
Page 521 of the NEC PD78076Y user manual — RETI
Page 521 · click to enlarge
Page 521

CHAPTER 22 INTERRUPT FUNCTIONS

Figure 22-16. Multiple Interrupt Example (2/2)

Example 3. A multiple interrupt is not generated because interrupts are not enabled

Main Processing INTxx Servicing

EI

IE = 0

INTyy (PR = 0)

INTxx (PR = 0)

RETI

IE = 0

RETI

Because interrupts are not enabled in interrupt INTxx servicing (an EI instruction is not issued),

interrupt request INTyy is not acknowledged, and a multiple interrupt is not generated. The INTyy

request is reserved and acknowledged after 1 instruction execution of the main processing.

PR = 0Higher priority level
IE = 0Interrupt request acknowledge disable

INTyy Servicing · 1 Instruction Execution

Page 522 of the NEC PD78076Y user manual — Figure 22-17. Interrupt Request Hold
Page 522 · click to enlarge
Page 522

CHAPTER 22 INTERRUPT FUNCTIONS

22.4.5 Interrupt request reserve

Some instructions may reserve the acknowledge of an instruction request until the completion of the execution

of the next instruction even if the interupt request is generated during the execution. The following shows such

instructions (interrupt request reserve instruction).

  • MOV PSW, #byte
  • MOV A, PSW
  • MOV PSW, A
  • MOV1 PSW.bit, CY
  • MOV1 CY, PSW.bit
  • AND1 CY, PSW.bit
  • OR1 CY, PSW.bit
  • XOR1 CY, PSW.bit
  • SET1/CLR1 PSW.bit
  • RETB
  • RETI
  • PUSH PSW
  • POP PSW
  • BT PSW.bit, $addr16
  • BF PSW.bit, $addr16
  • BTCLR PSW.bit, $addr16
  • EI
  • DI
  • Manipulate instructions for IF0L, IF0H, IF1L, MK0L, MK0H, MK1L, PR0L, PR0H, PR1L, INTM0, INTM1

a software interrupt started by the execution of BRK instruction, the IE flag is cleared to 0.

Therefore, interrupt requests are not acknowledged even when a maskable interrupt request

is issued during the execution of the BRK instruction. However, non-maskable interrupt

requests are acknowledged.

Figure 22-17 shows the interrupt request hold timing.

Figure 22-17. Interrupt Request Hold

Instruction N Instruction M Save PSW and PC, Jump to interrupt service

Remarks 1. Instruction NInstruction that holds interrupts requests
2. Instruction M: Instructions other than interrupt request pending instruction
3. The xxPR (priority level) values do not affect the operation of xxIF (interrupt request).
Show 4 more labels / short text on this page
registers · Interrupt service program · CPU processing · xxIF
Page 523 of the NEC PD78076Y user manual — INTWT WTIF WTMK
Page 523 · click to enlarge
Page 523

CHAPTER 22 INTERRUPT FUNCTIONS

22.5 Test Functions

In this function, when the watch timer overflows and when a rising edge of port 4 is detected, the corresponding

test input flag is set (1), and a standby release signal is generated.

Unlike the interrupt function, vectored processing is not performed.

There are two test input factors as shown in Table 22-5. The basic configuration is shown in Figure 22-18.

Table 22-5. Test Input Factors

INTWT Clock timer overflow Internal

INTPT4 Negative edge detection at port 4 External

Figure 22-18. Basic Configuration of Test Function

MK

IF Test input signal

IFTest input flag
MKTest mask flag

22.5.1 Registers controlling the test function

The test function is controlled by the following three registers.

  • Interrupt request flag register 1L (IF1L)
  • Interrupt mask flag register 1L (MK1L)
  • Key return mode register (KRM)

The names of the test input flag and test mask flag corresponding to the test input signals are listed in Table

Table 22-6. Flags Corresponding to Test Input Signals

Test Input Signal Name Test Input Flag Test Mask Flag

INTWT WTIF WTMK

INTPT4 KRIF KRMK

Show 6 more labels / short text on this page
Test Input Factors · Internal/ · Name Trigger · external · Internal bus · Standby release signal
Page 524 of the NEC PD78076Y user manual — Figure 22-20. Format of Interrupt Mask Flag Register 1L
Page 524 · click to enlarge
Page 524

CHAPTER 22 INTERRUPT FUNCTIONS

(1) Interrupt request flag register 1L (IF1L)

It indicates whether a clock timer overflow is detected or not.

It is set by a 1-bit memory manipulation instruction and 8-bit memory manipulation instruction.

It is set to 00H by the RESET signal input.

Figure 22-19. Format of Interrupt Request Flag Register 1L

IF1L

WTIF

TMIF6

TMIF5

ADIF

TMIF2

TMIF1

FFE2H 00H

R/W

WTIF

Clock timer overflow detection flag

(2) Interrupt mask flag register 1L (MK1L)

It is used to set the standby mode enable/disable at the time the standby mode is released by the clock timer.

It is set by a 1-bit memory manipulation instruction and 8-bit memory manipulation instruction.

It is set to FFH by the RESET signal input.

Figure 22-20. Format of Interrupt Mask Flag Register 1L

MK1L

WTMK

TMMK6

TMMK5

ADMK

TMMK2

TMMK1

FFE6H FFH

R/W

WTMK

Standby mode control by clock timer

Enables releasing the standby mode.

Disables releasing the standby mode.

Show 20 more labels / short text on this page
After Reset R/W · Symbol · <7> · <4> · <3> · <2> · <1> · <0> · Address · Not detected · Detected · After Reset R/W · Address · Symbol · <7> · <4> · <3> · <2> · <1> · <0>
Page 525 of the NEC PD78076Y user manual — (2) External test signal
Page 525 · click to enlarge
Page 525

CHAPTER 22 INTERRUPT FUNCTIONS

(3) Key return mode register (KRM)

This register is used to set enable/disable of standby function clear by key return signal (port 4 falling edge

detection).

KRM is set with a 1-bit or 8-bit memory manipulation instruction.

RESET input sets KRM to 02H.

Figure 22-21. Key Return Mode Register Format

KRM

KRMK

KRIF

FFF6H 02H

R/W

KRIF

Detected (port 4 rising edge detection)

KRMK

Standby Mode Control by Key Return Signal

Standby mode release enabled

Standby mode release disabled

22.5.2 Test input signal acknowledge operation

(1) Internal test signal

If the watch timer overflows, an internal test input signal (INTWT) is generated, by which the WTIF flag is

set. At this time, if it is not masked with the interrupt mask flag (WTMK), a standby release signal is generated.

The watch function is available by checking the WTIF flag at a shorter cycle than the watch timer overflow

cycle.

(2) External test signal

When a falling edge is input to the port 4 (P40 to P47) pins, an external test input signal (INTPT4) is generated,

by which the KRIF flag is set. At this time, if it is not masked with the interrupt mask flag (KRMK), a standby

release signal is generated. If port 4 is used as key matrix return signal input, whether or not a key input

has been applied can be checked from the KRIF status.

Show 7 more labels / short text on this page
Address · After Reset R/W · Symbol · <1> · <0> · Key Return Signal · Not detected
Page 526 of the NEC PD78076Y user manual — [MEMO]
Page 526 · click to enlarge
Page 526

[MEMO]

Page 527 of the NEC PD78076Y user manual — Table 23-1. Pin Functions in External Memory Expansion Mode
Page 527 · click to enlarge
Page 527

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

23.1 External Device Expansion Functions

The external device expansion functions connect external devices to areas other than the internal ROM, RAM,

and SFR.

The external device expansion function can be used in the following two modes:

  • Multiplexed bus mode
  • Separate bus mode

(1) Multiplexed bus mode

External devices are connected via the multiplexed address/data bus. Connecting external devices using

this mode may reduce the number of ports to be used. In this mode, ports 4 through 6 are used for control

of address/data, reafd/write strobe, wait, address strobe as shown below.

Table 23-1. Pin Functions in External Memory Expansion Mode

Pin function at external device connection Alternate function

AD0 to AD7 Multiplexed address/data bus P40 to P47

A8 to A15 Upper Address bus P50 to P57

RD Read strobe signal P64

WR Write strobe signal P65

WAIT Wait signal P66

ASTB Address strobe signal P67

Table 23-2. State of Port 4 to Port 6 Pins in External Memory Expansion Mode

Ports and bits Port 4 Port 5 Port 6

Modes 0 to 7 0 1 2 3 4 5 6 7 0 to 3 4 to 7

Single-chip mode Port

256-byte expansion mode Address/data Port Port RD, WR, WAIT, ASTB

4-Kbyte expansion mode Address/data Address Port Port RD, WR, WAIT, ASTB

16-Kbyte expansion mode Address/data Address Port Port RD, WR, WAIT, ASTB

Full address mode Address/data Address Port RD, WR, WAIT, ASTB

Name Function

Page 528 of the NEC PD78076Y user manual — Table 23-3. Pin Functions in Separate Bus Mode
Page 528 · click to enlarge
Page 528

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

(2) Separate bus mode

External devices are connected using independent address and data buses. This connection requires no

latches externally, resulting in reduction of external parts and area on the mounting board. In this mode,

ports 4 through 6 and port 8 are used for control of address/data, reafd/write strobe, wait as shown below.

Table 23-3. Pin Functions in Separate Bus Mode

Pin function in separate bus mode Alternate function

AD0 to AD7 Multiplexed address/data bus P40 to P47

A0 to A7 Lower Address bus P80 to P87

A8 to A15 Upper Address bus P50 to P57

RD Read strobe signal P64

WR Write strobe signal P65

WAIT Wait signal P66

from the ASTB/P67 pin. The output timings are shown in Figures 23-9 through 23-

Table 23-4. State of Port 4 to Port 6 and Port 8 Pins in Separate Bus Mode

Ports and bits Port 4 Port 8 Port 5 Port 6

Modes 0 to 7 0 to 7 0 1 2 3 4 5 6 7 0 to 3 4 to 7

Single-chip mode Port

256-byte expansion mode Data Address Port Port RD, WR, WAIT, (ASTB)

4-Kbyte expansion mode Data Address Address Port Port RD, WR, WAIT, (ASTB)

16-Kbyte expansion mode Data Address Address Port Port RD, WR, WAIT, (ASTB)

Full address mode Data Address Address Port RD, WR, WAIT, (ASTB)

2. In this mode, the address strobe signal is not required to be used though it is output from the

ASTB/P67 pin. The output timings are shown in Figures 23-9 through 23-12.

Name Function

Page 529 of the NEC PD78076Y user manual — C000H BFFFH
Page 529 · click to enlarge
Page 529

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

Memory maps when using the external device expansion function are as follows.

Figure 23-1. Memory Map when Using External Device Expansion Function (1/2)

(a) Memory map of µ PD78076, 78076Y,

and of µ PD78P078, 78P078Y when

internal PROM capacity is 48 Kbytes

FFFFH

SFR

FF00H FEFFH

FB00H FAFFH

FAE0H FADFH

FAC0H FABFH

F800H F7FFH

F400H F3FFH

Full-Address Mode (when MM2 to MM0 = 111)

or 16-Kbyte Expansion Mode (when MM2 to MM0 = 101)

D000H CFFFH

4-Kbyte Expansion Mode (when MM2 to MM0 = 100)

C100H C0FFH

256-byte Expansion Mode (when MM2 to MM0 = 011)

C000H BFFFH

0000H

Show 6 more labels / short text on this page
Internal High-Speed RAM · Reserved · Buffer RAM · Reserved · Internal Expansion RAM · Single-chip Mode
Page 530 of the NEC PD78076Y user manual — E000H DFFFH
Page 530 · click to enlarge
Page 530

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

Figure 23-1. Memory Map when Using External Device Expansion Function (2/2)

(b) Memory map of µPD78078, 78078Y, 78P078, (c) Memory map of µPD78078, 78078Y and of

78P078Y when internal ROM capacity (PROM) µPD78P078, 78P078Y when internal PROM

is 56 Kbytes capacity is 60 Kbytes

FFFFH

FFFFH

SFR

SFR

FF00H FEFFH

FF00H FEFFH

FB00H FAFFH

FB00H FAFFH

FAE0H FADFH

FAE0H FADFH

FAC0H FABFH

FAC0H FABFH

F800H F7FFH

F800H F7FFH

F400H F3FFH

F400H F3FFH

Full-Address Mode (when MM2 to MM0 = 111)

or 16-Kbyte Expansion Mode (when MM2 to MM0 = 101)

F000H EFFFH

F000H EFFFH

4-Kbyte Expansion Mode (when MM2 to MM0 = 100)

E100H E0FFH

256-byte Expansion Mode (when MM2 to MM0 = 011)

E000H DFFFH

0000H

0000H

F000H to F3FFH can be used as external memory by setting the internal ROM size to less than

56 Kbytes by the internal memory size switching register (IMS).

Show 13 more labels / short text on this page
Internal High-Speed RAM · Internal High-Speed RAM · Reserved · Reserved · Buffer RAM · Buffer RAM · Reserved · Reserved · Internal Expansion RAM · Internal Expansion RAM · Reserved · Single-chip Mode · Single-chip Mode
Page 531 of the NEC PD78076Y user manual — PW1 PW0
Page 531 · click to enlarge
Page 531

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

23.2 External Device Expansion Function Control Register

The external device expansion function is controlled by the memory expansion mode register (MM) and internal

memory size switching register (IMS).

(1) Memory expansion mode register (MM)

MM sets the wait count and external expansion area, and also sets the input/output of port 4.

MM is set with 1- or 8-bit memory manipulation instruction.

RESET input sets this register to 10H.

Figure 23-2. Memory Expansion Mode Register Format

MM

PW1

PW0

MM2

MM1

MM0

FFF8H 10H

R/W

Single-chip/ Memory Expansion Mode Selection

P40 to P47, P50 to P57, P64 to P67, P80 to P87 Pin state

MM2 MM1 MM0

P40 to P47 P80 to P87 P50 to P53 P54, P55 P56, P57 P64 to P67

P64 = RD

P65 = WR

AD0 to AD7 A0 to A7Note 1

P66 = WAIT

P67 = ASTB

A12, A13

Full address modeNote 2

A14, A15

Other than above Setting prohibited

PW1 PW0

Wait (one wait state insertion)

Wait control by external wait pin

the port mode.

2. The full address mode allows external expansion to the entire 64-Kbyte address space except

for the internal ROM, RAM, and SFR areas and the reserved area.

Remark P60 to P63 enter the port mode without regard to the mode (single-chip mode or memory

expansion mode).

Show 19 more labels / short text on this page
After Reset R/W · Symbol · Address · Port mode · Input · Single-chip mode · Port mode · Output · 256-byte mode · Port mode · 4-Kbyte mode · Port mode · Memory expansion mode · 16-Kbyte mode · A8 to A11 · Port mode · Wait Control · No wait · Setting prohibited
Page 532 of the NEC PD78076Y user manual — Table 23-5. Values when the Internal Memory Size Switching Register is Reset
Page 532 · click to enlarge
Page 532

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

(2) Internal memory size switching register (IMS)

The µPD78P078, 78P078Y can specify the internal memory size by internal memory size switching register

(IMS).

IMS is set with an 8-bit memory manipulation instruction.

RESET input sets this register to the value indicated in Table 23-5.

Figure 23-3. Internal Memory Size Switching Register Format

IMS

RAM2

RAM1

RAM0

ROM3

ROM2

ROM1

ROM0

R/W

Internal ROM size selection ROM3

ROM2

ROM1

ROM0

56 KbytesNote 2

Setting prohibited Other than above

Internal high-speed RAM size selection RAM2 RAM1 RAM0

1024 bytes 1 1 0

Setting prohibited Other than above

Table 23-5. Values when the Internal Memory Size Switching Register is Reset

Type Number Reset Value

µPD78076, 78076Y CCH

µPD78078, 78078Y CFH

2. When using the external device expansion function in the µ PD78078, 78078Y, 78P078, and

78P078Y set the internal ROM size to 56 Kbytes.

IMS except for the cases where the external device extension function is used in µPD78078

and 78078Y.

Remark IMS should be set according to the internal ROM capacity.

Show 7 more labels / short text on this page
Symbol · Address · After Reset R/W · FFF0H Note 1 · 48 Kbytes · 60 Kbytes 1 · µPD78P078, 78P078Y
Page 533 of the NEC PD78076Y user manual — Figure 23-4. External Bus Type Select Register Format
Page 533 · click to enlarge
Page 533

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

(3) External bus type select register (EBTS)

This register sets the operation mode of the external device expansion function. When the multiplexed bus

mode is selected, the P80/A0 through P87/A7 pins can be used as an I/O port.

It is set by an 8-bit memory manipulation instruction.

RESET signal input sets EBTS to 00H.

Figure 23-4. External Bus Type Select Register Format

EBTS

EBTS0

FF3FH 00H

R/W

EBTS0

Sets operation mode of external device expansion function

Show 5 more labels / short text on this page
After Reset R/W · Address · Symbol · Multiplexed bus mode · Separate bus mode
Page 534 of the NEC PD78076Y user manual — (4) ASTB pin (Alternate function: P67)
Page 534 · click to enlarge
Page 534

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

23.3 External Device Expansion Function Timing

23.3.1 Timings in multiplexed bus mode

Timing control signal output pins in the multiplexed bus mode are as follows.

(1) RD pin (Alternate function: P64)

Read strobe signal output pin. The read strobe signal is output in data accesses and instruction fetches

from external memory.

During internal memory access, the read strobe signal is not output (maintains high level).

(2) WR pin (Alternate function: P65)

Write strobe signal output pin. The write strobe signal is output in data access to external memory.

During internal memory access, the write strobe signal is not output (maintains high level).

(3) WAIT pin (Alternate function: P66)

External wait signal input pin. When the external wait is not used, the WAIT pin can be used as an input/

output port.

During internal memory access, the external wait signal is ignored.

(4) ASTB pin (Alternate function: P67)

Address strobe signal output pin. Timing signal is output without regard to the data accesses and instruction

fetches from external memory. The ASTB signal is also output when the internal memory is accessed.

(5) AD0 to AD7, A8 to A15 pins (Alternate function : P40 to P47, P80 to P87, P50 to P57)

Address/data signal output pin. Valid signal is output or input during data accesses and instruction fetches

from external memory.

These signals change when the internal memory is accessed (output values are undefined).

Timing charts are shown in Figure 23-5 to 23-8.

Page 535 of the NEC PD78076Y user manual — WAIT
Page 535 · click to enlarge
Page 535

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

Figure 23-5. Instruction Fetch from External Memory in Multiplexed Bus Mode

(a) No wait (PW1, PW0 = 0, 0) setting

ASTB

RD

Lower Address Operation Code

(b) Wait (PW1, PW0 = 0, 1) setting

ASTB

RD

Lower Address Operation Code

(c) External wait (PW1, PW0 = 1, 1) setting

ASTB

RD

Lower Address Operation Code AD0 to AD7

A8 to A15 Higher Address

WAIT

Show 8 more labels / short text on this page
AD0 to AD7 · A8 to A15 · Higher Address · AD0 to AD7 · A8 to A15 · Higher Address · Internal Wait Signal · (1-clock wait)
Page 536 of the NEC PD78076Y user manual — WAIT
Page 536 · click to enlarge
Page 536

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

Figure 23-6. External Memory Read Timing in Multiplexed Bus Mode

(a) No wait (PW1, PW0 = 0, 0) setting

ASTB

RD

Lower Address Read Data

(b) Wait (PW1, PW0 = 0, 1) setting

ASTB

RD

Lower Address Read Data

(c) External wait (PW1, PW0 = 1, 1) setting

ASTB

RD

Lower Address Read Data AD0 to AD7

A8 to A15 Higher Address

WAIT

Show 8 more labels / short text on this page
AD0 to AD7 · A8 to A15 · Higher Address · AD0 to AD7 · A8 to A15 · Higher Address · Internal Wait Signal · (1-clock wait)
Page 537 of the NEC PD78076Y user manual — WAIT
Page 537 · click to enlarge
Page 537

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

Figure 23-7. External Memory Write Timing in Multiplexed Bus Mode

(a) No wait (PW1, PW0 = 0, 0) setting

ASTB

WR

Lower Address Write Data Hi-Z

(b) Wait (PW1, PW0 = 0, 1) setting

ASTB

WR

Lower Address Write Data

(c) External wait (PW1, PW0 = 1, 1) setting

ASTB

WR

Hi-Z Lower Address Write Data

WAIT

Show 12 more labels / short text on this page
AD0 to AD7 · A8 to A15 · Higher Address · Hi-Z · AD0 to AD7 · A8 to A15 · Higher Address · Internal Wait Signal · (1-clock wait) · AD0 to AD7 · A8 to A15 · Higher Address
Page 538 of the NEC PD78076Y user manual — WAIT
Page 538 · click to enlarge
Page 538

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

Figure 23-8. External Memory Read Modify Write Timing in Multiplexed Bus Mode

(a) No wait (PW1, PW0 = 0, 0) setting

ASTB

RD

WR

Lower Address Write Data

(b) Wait (PW1, PW0 = 0, 1) setting

ASTB

RD

WR

Write Data Read Data

(c) External wait (PW1, PW0 = 1, 1) setting

ASTB

RD

WR

Hi-Z Lower Address Write Data Read Data

WAIT

Show 14 more labels / short text on this page
Hi-Z Read Data · AD0 to AD7 · A8 to A15 · Higher Address · Hi-Z · AD0 to AD7 · Lower Address · A8 to A15 · Higher Address · Internal Wait Signal · (1-clock wait) · AD0 to AD7 · A8 to A15 · Higher Address
Page 539 of the NEC PD78076Y user manual — (3) WAIT pin (Alternate function: P66)
Page 539 · click to enlarge
Page 539

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

23.3.2 Timings in separate bus mode

Timing control signal output pins in the separate bus mode are as follows.

(1) RD pin (Alternate function: P64)

Read strobe signal output pin. The read strobe signal is output in data accesses and instruction fetches

from external memory.

During internal memory access, the read strobe signal is not output (maintains high level).

(2) WR pin (Alternate function: P65)

Write strobe signal output pin. The write strobe signal is output in data access to external memory.

During internal memory access, the write strobe signal is not output (maintains high level).

(3) WAIT pin (Alternate function: P66)

External wait signal input pin. When the external wait is not used, the WAIT pin can be used as an input/

output port.

During internal memory access, the external wait signal is ignored.

(4) AD0 to AD7, A0 to A7, A8 to A15 pins (Alternate function : P40 to P47, P80 to P87, P50 to P57)

Address/data signal output pin. Valid signal is output or input during data accesses and instruction fetches

from external memory.

These signals change when the internal memory is accessed (output values are undefined).

Timing charts are shown in Figure 23-9 to 23-12.

from the ASTB/P67 pin. The output timings of the signals are shown in Figure 23-9 to 23-12.

Page 540 of the NEC PD78076Y user manual — WAIT
Page 540 · click to enlarge
Page 540

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

Figure 23-9. Instruction Fetch from External Memory in Separate Bus Mode

(a) No wait (PW1, PW0 = 0, 0) setting

RD

Lower Address Operation Code

(b) Wait (PW1, PW0 = 0, 1) setting

RD

Lower Address Operation Code

(c) External wait (PW1, PW0 = 1, 1) setting

RD

Lower Address Operation Code

WAIT

the ASTB/P67 pin.

Show 20 more labels / short text on this page
ASTBNote · AD0 to AD7 · A0 to A7 · Lower Address · A8 to A15 · Higher Address · ASTBNote · AD0 to AD7 · A0 to A7 · Lower Address · A8 to A15 · Higher Address · Internal Wait Signal · (1-clock wait) · ASTBNote · AD0 to AD7 · A0 to A7 · Lower Address · A8 to A15 · Higher Address
Page 541 of the NEC PD78076Y user manual — WAIT
Page 541 · click to enlarge
Page 541

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

Figure 23-10. External Memory Read Timing in Separate Bus Mode

(a) No wait (PW1, PW0 = 0, 0) setting

RD

Lower Address Read Data

(b) Wait (PW1, PW0 = 0, 1) setting

RD

Lower Address Read Data

(c) External wait (PW1, PW0 = 1, 1) setting

RD

Lower Address Read Data

WAIT

the ASTB/P67 pin.

Show 20 more labels / short text on this page
ASTBNote · AD0 to AD7 · A0 to A7 · Lower Address · A8 to A15 · Higher Address · ASTBNote · AD0 to AD7 · A0 to A7 · Lower Address · A8 to A15 · Higher Address · Internal Wait Signal · (1-clock wait) · ASTBNote · AD0 to AD7 · A0 to A7 · Lower Address · A8 to A15 · Higher Address
Page 542 of the NEC PD78076Y user manual — WAIT
Page 542 · click to enlarge
Page 542

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

Figure 23-11. External Memory Write Timing in Separate Bus Mode

(a) No wait (PW1, PW0 = 0, 0) setting

WR

Lower Address Write Data

(b) Wait (PW1, PW0 = 0, 1) setting

WR

Lower Address Write Data

(c) External wait (PW1, PW0 = 1, 1) setting

WR

Hi-Z Lower Address Write Data

WAIT

the ASTB/P67 pin.

Show 22 more labels / short text on this page
ASTBNote · Hi-Z · AD0 to AD7 · A0 to A7 · Lower Address · A8 to A15 · Higher Address · ASTBNote · Hi-Z · AD0 to AD7 · A0 to A7 · Lower Address · A8 to A15 · Higher Address · Internal Wait Signal · (1-clock wait) · ASTBNote · AD0 to AD7 · A0 to A7 · Lower Address · A8 to A15 · Higher Address
Page 543 of the NEC PD78076Y user manual — WAIT
Page 543 · click to enlarge
Page 543

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

Figure 23-12. External Memory Read Modify Write Timing in Separate Bus Mode

(a) No wait (PW1, PW0 = 0, 0) setting

RD

WR

Lower Address Write Data

(b) Wait (PW1, PW0 = 0, 1) setting

RD

WR

Write Data Read Data

(c) External wait (PW1, PW0 = 1, 1) setting

RD

WR

Hi-Z Lower Address Write Data Read Data

WAIT

the ASTB/P67 pin.

Show 23 more labels / short text on this page
ASTBNote · Hi-Z Read Data · AD0 to AD7 · A0 to A7 · Lower Address · A8 to A15 · Higher Address · ASTBNote · Hi-Z · AD0 to AD7 · Lower Address · A0 to A7 · Lower Address · A8 to A15 · Higher Address · Internal Wait Signal · (1-clock wait) · ASTBNote · AD0 to AD7 · A0 to A7 · Lower Address · A8 to A15 · Higher Address
Page 544 of the NEC PD78076Y user manual — [MEMO]
Page 544 · click to enlarge
Page 544

[MEMO]

Page 545 of the NEC PD78076Y user manual — (2) STOP mode
Page 545 · click to enlarge
Page 545

CHAPTER 24 STANDBY FUNCTION

24.1 Standby Function and Configuration

24.1.1 Standby function

The standby function is designed to decrease power consumption of the system. The following two modes are

available.

(1) HALT mode

HALT instruction execution sets the HALT mode. The HALT mode is intended to stop the CPU operation

clock. System clock oscillator continues oscillation. In this mode, current consumption cannot be decreased

as in the STOP mode. The HALT mode is valid to restart immediately upon interrupt request and to carry

out intermittent operations such as watch applications.

(2) STOP mode

STOP instruction execution sets the STOP mode. In the STOP mode, the main system clock oscillator stops

and the whole system stops. CPU current consumption can be considerably decreased.

Data memory low-voltage hold (down to VDD = 1.8 V) is possible. Thus, the STOP mode is effective to hold

data memory contents with ultra-low current consumption. Because this mode can be cleared upon interrupt

request, it enables intermittent operations to be carried out.

However, because a wait time is necessary to secure an oscillation stabilization time after the STOP mode

is cleared, select the HALT mode if it is necessary to start processing immediately upon interrupt request.

In any mode, all the contents of the register, flag, and data memory just before standby mode setting are held.

The input/output port output latch and output buffer statuses are also held.

(subsystem clock oscillation cannot be stopped). The HALT mode can be used with either

the main system clock or the subsystem clock.

2. When proceeding to the STOP mode, be sure to stop the peripheral hardware operation and

execute the STOP instruction.

3. The following sequence is recommended for power consumption reduction of the A/D

converter when the standby function is used: first clear bit 7 (CS) to 0 to stop the A/D

conversion operation, and then execute the HALT or STOP instruction.

Page 546 of the NEC PD78076Y user manual — V SS
Page 546 · click to enlarge
Page 546

CHAPTER 24 STANDBY FUNCTION

24.1.2 Standby function control register

A wait time after the STOP mode is cleared upon interrupt request till the oscillation stabilizes is controlled with

the oscillation stabilization time select register (OSTS).

OSTS is set with an 8-bit memory manipulation instruction.

RESET input sets OSTS to 04H. However, it takes 217/fX, not 218/fX, until the STOP mode is cleared by RESET

input.

Figure 24-1. Oscillation Stabilization Time Select Register Format

OSTS

OSTS2

OSTS1

OSTS0

FFFAH 04H

R/W

Selection of Oscillation Stabilization Time wnen STOP Mode is Released

OSTS2

OSTS1

OSTS0

MCS = 1 MCS = 0

212/fxx

212/fx (819 s)

213/fx (1.64 ms)

214/fxx

214/fx (3.28 ms)

215/fx (6.55 ms)

215/fxx

215/fx (6.55 ms)

216/fx (13.1 ms)

216/fxx

216/fx (13.1 ms)

217/fx (26.2 ms)

217/fxx

217/fx (26.2 ms)

218/fx (52.4 ms)

oscillation start (see “a” in the illustration below), whether the STOP mode is cleared by RESET

input or by interrupt request generation.

X1 Pin Voltage Waveform

V SS

Remarks 1. f XXMain system clock frequency (f X or f X /2)
2. f X : Main system clock oscillation frequency
3. MCS : Bit 0 of oscillation mode select register (OSMS)
4. Figures in parentheses apply to operation with f X = 5.0 MHz.
Show 8 more labels / short text on this page
Symbol · Address · After Reset R/W · µ 0 · Other than above · Setting prohibited · STOP Mode Clear · a
Page 547 of the NEC PD78076Y user manual — Table 24-1. HALT Mode Operating Status
Page 547 · click to enlarge
Page 547

CHAPTER 24 STANDBY FUNCTION

24.2 Standby Function Operations

24.2.1 HALT mode

(1) HALT mode set and operating status

The HALT mode is set by executing the HALT instruction. It can be set with the main system clock or the

subsystem clock. The operating status in the HALT mode is described below.

Table 24-1. HALT Mode Operating Status

HALT mode setting HALT execution during HALT execution during

main system clock operation subsystem clock operation

w/ subsystem w/o. subsystem Main system Main system

Item clockNote 1 clockNote 2 clock oscillates clock stops

Clock Generator Both main system and subsystem clocks can be oscillated. Clock supply to the CPU stops.

CPU Operation stops.

Port (output latch) Status before HALT mode setting is held.

16-bit timer/event counter Operable. Operable when watch timer output

is used as count clock (with fXT

selected as count clock of watch

timer).

8-bit timer/event counter 1 and 2 Operable. Operable when TI1 or TI2 is

selected as count clock.

8-bit timer/event counter 5 and 6 Operable. Operable when TI5 or TI6 is

selected as count clock.

Watch timer Operable when Operable. Operable when fXT is selected

fXX/27 is selected as count clock.

as count clock.

Watchdog timer Operable. Operation stops.

A/D converter Operable. Operation stops.

D/A converter Operable.

Real-time output port Operable.

When a function other than Operable Operable at external SCK.

auto transmit/receive is used

When auto transmit/receive Operation stops.

INTP0 Operable when a clock (fXX/25, fXX/26, fXX/27) for the Operation stops.

peripheral hardware is selected as sampling clock.

INTP1 to INTP6 Operable.

Bus lines in external expansion

AD0 to AD7 Enters high impedance state.

A0 to A15 Holds the state before HALT mode is set.

ASTB Outputs low level.

WR, RD Outputs high level.

WAIT Enters high impedance state.

2. Including case when external clock is not supplied.

Serial Interface · function is used · External interrupt

Page 548 of the NEC PD78076Y user manual — (c) Release by unmasked test input
Page 548 · click to enlarge
Page 548

CHAPTER 24 STANDBY FUNCTION

(2) HALT mode release

The HALT mode can be released with the following four types of sources.

(a) Release by unmasked interrupt request

An unmasked interrupt request is generated to release the HALT mode. If interrupt request acknowledge

is enabled, vectored interrupt service is carried out. If disabled, the next address instruction is executed.

Figure 24-2. HALT Mode Released by Interrupt Request Generation

Remarks 1. The broken line indicates the case when the interrupt request which has released the

standby status is acknowledged.

2. Wait time will be as follows:
  • When vectored interrupt service is carried out: 8 to 9 clocks
  • When vectored interrupt service is not carried out: 2 to 3 clocks

(b) Release by non-maskable interrupt request

The HALT mode is released and vectored interrupt service is carried out if non-maskable interrupt

request is generated whether interrupt request acknowledge is enabled or disabled.

(c) Release by unmasked test input

The HALT mode is released by inputting an unmasked test signal and the next address instruction of

the HALT instruction is executed.

Show 9 more labels / short text on this page
Interrupt Request · HALT Instruction · Wait · Standby Release Signal · Operating Mode · HALT Mode Wait · Operating Mode · Oscillation · Clock
Page 549 of the NEC PD78076Y user manual — Table 24-2. Operation after HALT Mode Release
Page 549 · click to enlarge
Page 549

CHAPTER 24 STANDBY FUNCTION

(d) Release by RESET input

As is the case with normal reset operation, a program is executed after branch to the reset vector

address.

Figure 24-3. HALT Mode Released by RESET Input

17 /f x26.2 ms)

Oscillation Stabilization Wait Status

Reset Period HALT Mode

Remarks 1. f XMain system clock oscillation frequency
2. Figures in parentheses apply to operation with f X = 5.0 MHz.

Table 24-2. Operation after HALT Mode Release

Release Source MKxx PRxx IE ISP Operation

Maskable interrupt 0 0 0 x Next address instruction execution

request 0 0 1 x Interrupt service execution

0 1 0 1 Next address instruction execution

0 1 x 0

0 1 1 1 Interrupt service execution

1 x x x HALT mode hold

Non-maskable interrupt – – x x Interrupt service execution

Test input 0 – x x Next address instruction execution

1. x x HALT mode hold

RESET input – – x x Reset processing

x: Don’t care

Show 10 more labels / short text on this page
Wait (2 · HALT Instruction · RESET Signal · Operating Mode · Operating Mode · Oscillation stop · Oscillation · Oscillation · Clock · request
Page 550 of the NEC PD78076Y user manual — Table 24-3. STOP Mode Operating Status
Page 550 · click to enlarge
Page 550

CHAPTER 24 STANDBY FUNCTION

24.2.2 STOP mode

(1) STOP mode set and operating status

The STOP mode is set by executing the STOP instruction. It can be set only with the main system clock.

resistor to minimize leakage current at the crystal oscillator. Thus, do not use the STOP

mode in a system where an external clock is used for the main system clock.

2. Because the interrupt request signal is used to release the standby mode, if there is

an interrupt source with the interrupt request flag set and the interrupt mask flag reset,

the standby mode is immediately cleared if set. Thus, the STOP mode is reset to the

HALT mode immediately after execution of the STOP instruction. After the wait set

using the oscillation stabilization time select register (OSTS), the operating mode is set.

The operating status in the STOP mode is described below.

Table 24-3. STOP Mode Operating Status

STOP Mode Setting With Subsystem Clock Without Subsystem Clock

Clock Generator Only main system clock stops oscillation.

CPU Operation stops.

Port (output latch) Status before STOP mode setting is held.

16-bit timer/event counter Operable when watch timer output is used Operation stops.

as count clock (fXT is selected as count

clock for watch timer).

8-bit timer/event counters 1 and 2 Operable when TI1 or TI2 is selected for the count clock.

8-bit timer/event counters 5 and 6 Operable when TI5 or TI6 is selected for the count clock.

Watch timer Operable when fXT is selected for the count clock. Operation stops.

Watchdog timer Operation stops.

A/D converter Operation stops.

D/A converter Operable.

Real-time output port Operable when external trigger is used, or TI1 or TI2 is selected for the 8-bit timer/

event counter 1 or 2 count clock.

When a function other than auto Operable only when externally supplied clock is specified as the serial clock.

transmit/receive & UART is used

When auto transmit/receive Operation stops.

function or UART is used

INTP0 Operation disabled.

INTP1 to INTP6 Operable.

Bus lines in external expansion

AD0 to AD7 Enters high-impedance state.

A0 to A15 Holds the state before STOP mode is set.

ASTB Outputs low level.

WR, RD Outputs high level.

WAIT Enters high-impedance state.

Item · Serial Interface · External interrupt

Page 551 of the NEC PD78076Y user manual — (b) Release by unmasked test input
Page 551 · click to enlarge
Page 551

CHAPTER 24 STANDBY FUNCTION

(2) STOP mode release

The STOP mode can be released with the following three types of sources.

(a) Release by unmasked interrupt request

An unmasked interrupt request is used to release the STOP mode. If interrupt request acknowledge

is enabled after the lapse of oscillation stabilization time, vectored interrupt service is carried out. If

interrupt request acknowledge is disabled, the next address instruction is executed.

Figure 24-4. STOP Mode Released by Interrupt Request Generation

Wait (Time set by OSTS)

Operationg Mode STOP Mode

Remark The broken line indicates the case when the interrupt request which has cleared the standby status

is acknowledged.

(b) Release by unmasked test input

The STOP mode is released by inputting an unmasked test signal. After the lapse of oscillation

stabilization time, the instruction at the next address of the STOP instruction is executed.

Show 9 more labels / short text on this page
Interrupt Request · STOP Instruction · Standby Release Signal · Oscillation Stabilization · Operating Mode · Wait Status · Oscillation Stop Oscillation · Oscillation · Clock
Page 552 of the NEC PD78076Y user manual — Table 24-4. Operation after STOP Mode Release
Page 552 · click to enlarge
Page 552

CHAPTER 24 STANDBY FUNCTION

(c) Release by RESET input

The STOP mode is released and after the lapse of oscillation stabilization time, reset operation is carried

out.

Figure 24-5. STOP Mode Released by RESET Input

17 /f x26.2 ms) STOP Instruction

Oscillation Stabilization Wait Status

Reset Period STOP Mode

Remarks 1. f XMain system clock oscillation frequency
2. Figures in parentheses apply to operation with f X = 5.0 MHz.

Table 24-4. Operation after STOP Mode Release

Release Source MKxx PRxx IE ISP Operation

Maskable interrupt request 0 0 0 x Next address instruction execution

0 0 1 x Interrupt service execution

0 1 0 1 Next address instruction execution

0 1 x 0

0 1 1 1 Interrupt service execution

1 x x x STOP mode hold

Test input 0 – x x Next address instruction execution

1. x x STOP mode hold

RESET input – – x x Reset processing

x: Don’t care

Show 8 more labels / short text on this page
Wait (2 · RESET Signal · Operating Mode · Operating Mode · Oscillation · Oscillation Stop · Oscillation · Clock
Page 553 of the NEC PD78076Y user manual — Figure 25-1. Block Diagram of Reset Function
Page 553 · click to enlarge
Page 553

CHAPTER 25 RESET FUNCTION

25.1 Reset Function

The following two operations are available to generate the reset signal.

(1) External reset input with RESET pin

(2) Internal reset by watchdog timer overrun time detection

External reset and internal reset have no functional differences. In both cases, program execution starts at the

address at 0000H and 0001H by RESET input.

When a low level is input to the RESET pin or the watchdog timer overflows, a reset is applied and each hardware

is set to the status as shown in Table 25-1. Each pin has high impedance during reset input or during oscillation

stabilization time just after reset clear.

When a high level is input to the RESET input, the reset is cleared and program execution starts after the lapse

of oscillation stabilization time (217/fX). The reset applied by watchdog timer overflow is automatically cleared after

a reset and program execution starts after the lapse of oscillation stabilization time (217/fX) (see Figures 25-2 to

25-4).

2. During reset input, main system clock oscillation remains stopped but subsystem clock

oscillation continues.

3. When the STOP mode is released by reset, the STOP mode contents are held during reset

input. However, the port pin becomes high-impedance.

Figure 25-1. Block Diagram of Reset Function

RESET

Show 7 more labels / short text on this page
Reset Signal · Reset Control Circuit · Over- flow · Interrupt Function · Count Clock · Watchdog Timer · Stop
Page 554 of the NEC PD78076Y user manual — RESET
Page 554 · click to enlarge
Page 554

CHAPTER 25 RESET FUNCTION

Figure 25-2. Timing of Reset by RESET Input

Normal Operation Reset Period (Oscillation Stop)

Oscillation Stabilization Time Wait

Normal Operation (Reset Processing)

RESET

Figure 25-3. Timing of Reset due to Watchdog Timer Overflow

Reset Period (Oscillation Stop)

Oscillation Stabilization Time Wait

Normal Operation (Reset Processing)

Figure 25-4. Timing of Reset by RESET Input in STOP Mode

Normal Operation Normal Operation (Reset Processing)

Stop Status (Oscillation Stop)

Reset Period (Oscillation Stop)

Oscillation Stabilization Time Wait

RESET

Show 15 more labels / short text on this page
Internal Reset Signal · Delay · Delay · Hi-z · Port Pin · Normal Operation · Watchdog Timer Overflow · Internal Reset Signal · Hi-z · Port Pin · STOP Instruction Execution · Internal Reset Signal · Delay Delay · Hi-z · Port Pin
Page 555 of the NEC PD78076Y user manual — RAM
Page 555 · click to enlarge
Page 555

CHAPTER 25 RESET FUNCTION

Table 25-1. Hardware Status after Reset (1/3)

Hardware Status after Reset

Program counter (PC)Note 1 The contents of reset vector tables

(0000H and 0001H) are set.

Stack pointer (SP) Undefined

Program status word (PSW) 02H

Data memory UndefinedNote 2

RAM

General register UndefinedNote 2

Ports 0 to 3, Port 7, 9, 10, 12, 13 00H

(P0 to P3, P7, P9, P10, P12, P13)

Port 4 to Port 6, Port 8 (P4 to P6, P8) Undefined

Port mode register (PM0 to PM3, PM5 to PM10, PM12, PM13) FFH

Pull-up resistor option register (PUOH, PUOL) 00H

Processor clock control register (PCC) 04H

Oscillation mode selection register (OSMS) 00H

Memory size switching register (IMS) Note3

Internal expansion RAM size switching register (IXS) 0AH

External bus type selection register (EBTS) 00H

Memory expansion mode register (MM) 10H

Oscillation stabilization time select register (OSTS) 04H

Timer register (TM0) 00H

Capture/compare register (CR00, CR01) Undefined

Clock selection register (TCL0) 00H

Mode control register (TMC0) 00H

Capture/compare control register 0 (CRC0) 04H

Output control register (TOC0) 00H

Timer register (TM1, TM2) 00H

Compare registers (CR10, CR20) Undefined

Clock select register (TCL1) 00H

Mode control registers (TMC1) 00H

Output control register (TOC1) 00H

statuses become undefined. All other hardware statuses remains unchanged after reset.

2. In the standby mode, the status before the reset is held even after the reset.
3. The values after reset depend on the product.
µ PD78076, 78076YCCH µ PD78078, 78078Y : CFH
µ PD78P078, 78P078YCFH
Show 4 more labels / short text on this page
Port (Output latch) · 16-bit timer/event counter · 8-bit timer/event counter · 1 and 2
Page 556 of the NEC PD78076Y user manual — (DACS0, DACS1)
Page 556 · click to enlarge
Page 556

CHAPTER 25 RESET FUNCTION

Table 25-1. Hardware Status after Reset (2/3)

Hardware Status after Reset

8-bit timer/event counters Timer register (TM5, TM6) 00H

5 and 6 Compare register (CR50, CR60) 00H

Clock select register (TCL5, TCL6) 00H

Mode control register (TMC5, TMC6) 00H

Watch timer Mode control register (TMC2) 00H

Clock select register (TCL2) 00H

Mode register (WDTM) 00H

Serial interface Clock select register (TCL3) 88H

Shift registers (SIO0, SIO1) Undefined

Mode registers (CSIM0, CSIM1, CSIM2) 00H

Serial bus interface control register (SBIC) 00H

Slave address register (SVA) Undefined

Automatic data transmit/receive control 00H

Automatic data transmit/receive address 00H

Automatic data transmit/receive interval 00H

Asynchronous serial interface mode 00H

Asynchronous serial interface status 00H

Baud rate generator control register (BRGC) 00H

Transmit shift register (TXS) FFH

Receive buffer register (RXB)

Interrupt timing specify register (SINT) 00H

A/D converter Mode register (ADM) 01H

Conversion result register (ADCR) Undefined

Input select register (ADIS) 00H

D/A converter Mode register (DAM) 00H

Conversion value setting register 00H

(DACS0, DACS1)

Real-time output port Mode register (RTPM) 00H

Control register (RTPC) 00H

Buffer register (RTBL, RTBH) 00H

ROM correction Correction address register (CORAD0, CORAD1) 00H

Correction control register (CORCN) 00H

Show 6 more labels / short text on this page
Watchdog timer · register (ADTC) · pointer (ADTP) · specify register (ADTI) · register (ASIM) · register (ASIS)
Page 557 of the NEC PD78076Y user manual — (INTM0, INTM1)
Page 557 · click to enlarge
Page 557

CHAPTER 25 RESET FUNCTION

Table 25-1. Hardware Status after Reset (3/3)

Hardware Status after Reset

Interrupt Request flag register (IF0L, IF0H, IF1L) 00H

Mask flag register (MK0L, MK0H, MK1L) FFH

Priority specify flag register FFH

(PR0L, PR0H, PR1L)

External interrupt mode register 00H

(INTM0, INTM1)

Key return mode register (KRM) 02H

Sampling clock select register (SCS) 00H

Page 558 of the NEC PD78076Y user manual — [MEMO]
Page 558 · click to enlarge
Page 558

[MEMO]

Page 559 of the NEC PD78076Y user manual — Figure 26-1. Block Diagram of ROM Correction
Page 559 · click to enlarge
Page 559

CHAPTER 26 ROM CORRECTION

26.1 ROM Correction Functions

The µPD78078, 78078Y Subseries can replace part of a program in the mask ROM with a program in the internal

expansion RAM.

Instruction bugs found in the mask ROM can be avoided, and program flow can be changed by using the ROM

correction.

The ROM correction can correct two places (max.) of the internal ROM (program).

IE-78001-R-A, IE-78K0-NS).

26.2 ROM Correction Configuration

The ROM correction is executed by the following hardware.

Table 26-1. ROM Correction Configuration

Register Correction address registers 0 and 1 (CORAD0, CORAD1)

Control register Correction control register (CORCN)

Figure 26-1 shows a block diagram of the ROM correction.

Figure 26-1. Block Diagram of ROM Correction

Correction branch request signal (BR !7FDH)

Correction address register (CORADn)

Remark n = 0, 1

Show 7 more labels / short text on this page
Item Configuration · Program counter (PC) · Match · Comparator · CORENn CORSTn · Correction control register · Internal bus
Page 560 of the NEC PD78076Y user manual — (2) Comparator
Page 560 · click to enlarge
Page 560

CHAPTER 26 ROM CORRECTION

(1) Correction address registers 0 and 1 (CORAD0, CORAD1)

These registers set the start address (correction address) of the instruction(s) to be corrected in the mask

ROM.

The ROM correction corrects two places (max.) of the program. Addresses are set to two registers, CORAD0

and CORAD1. If only one place needs to be corrected, set the address to either of the registers.

CORAD0 and CORAD1 are set with a 16-bit memory manipulation instruction.

RESET input sets CORAD0 and CORAD1 to 0000H.

Figure 26-2. Correction Address Registers 0 and 1 Format

R/W

CORAD0

FF38H/FF39H

0000H

R/W

CORAD1 R/W

FF3AH/FF3BH 0000H

control register (CORCN : see Figure 26-3) are 0.

2. Only addresses where operation codes are stored can be set in CORAD0 and CORAD1.
3. Do not set the following addresses to CORAD0 and CORAD1.
  • Address value in table area of table reference instruction (CALLT instruction) : 0040H

to 007FH

  • Address value in vector table area : 0000H to 003FH

(2) Comparator

The comparator always compares the correction address value set in correction address registers 0 and

1 (CORAD0, CORAD1) with the fetch address value. When bit 1 (COREN0) or bit 3 (COREN1) of the

correction control register (CORCN) is 1 and the correction address matches the fetch address value, the

correction branch request signal (BR !F7FDH) is generated from the ROM correction circuit.

Symbol 15 · 0 Address · After reset

Page 561 of the NEC PD78076Y user manual — COREN1
Page 561 · click to enlarge
Page 561

CHAPTER 26 ROM CORRECTION

26.3 ROM Correction Control Registers

The ROM correction is controlled with the correction control register (CORCN).

(1) Correction control register (CORCN)

This register controls whether or not the correction branch request signal is generated when the fetch

address matches the correction address set in correction address registers 0 and 1. The correction control

register consists of correction enable flags (COREN0, COREN1) and correction status flags (CORST0,

CORST1). The correction enable flags enable or disable the comparator match detection signal, and

correction status flags show the values are matched. CORCN is set with a 1-bit or 8-bit memory manipulation

instruction.

RESET input sets CORCN to 00H.

Figure 26-3. Correction Control Register Format

R/W

CORCN

0 COREN1 CORST1 COREN0 CORST0

FF8AH

R

CORST0

Correction address register 0 and fetch address match detection

R/W

Correction address register 0 and fetch address match detection control

COREN0

R

CORST1

Correction address register 1 and fetch address match detection

R/W

Correction address register 1 and fetch address match detection control

COREN1

Show 12 more labels / short text on this page
Symbol · Address · After reset · R/WNote 00H · Not detected · Detected · Disabled · Enabled · Not detected · Detected · Disabled · Enabled
Page 562 of the NEC PD78076Y user manual — V DD
Page 562 · click to enlarge
Page 562

CHAPTER 26 ROM CORRECTION

26.4 ROM Correction Application

(1) Store the correction address and instruction after correction (patch program) to nonvolatile memory (such

as EEPROMTM) outside the microcontroller.

When two places should be corrected, store the branch destination judgment program as well. The branch

destination judgment program checks which one of the addresses set to CORAD0 or CORAD1 generates

the correction branch.

Figure 26-4. Storing Example to EEPROM (when One Place is Corrected)

00H

CSEG AT 1000H

01H

02H

0D

ADD A, #2

RA78K/0

BR !1002H

9B

FFH

Figure 26-5. Connecting Example with EEPROM (Using 2-Wire Serial I/O Mode)

PD78078, 78078Y Subseries EEPROM

V DD

V DD V DD

CE

SCK0

SCL

SB1

SDA

P32

CS

EEPROM Source program · µ

Page 563 of the NEC PD78076Y user manual — Figure 26-6. Initialization Routine
Page 563 · click to enlarge
Page 563

CHAPTER 26 ROM CORRECTION

(2) Assemble in advance the initialization routine as shown in Figure 26-6 to correct the program.

Figure 26-6. Initialization Routine

Is ROM correction used ? Note

Load the contents of external nonvolatile memory into internal expansion RAM Correction address register setting ROM correction enabled

the P20 input level is high, the ROM correction is used, otherwise, it is not used.

(3) After reset, store the contents that have been previously stored in the external nonvolatile memory with

initialization routine for ROM correction of the user to internal expansion RAM (see Figure 26-6).

Set the start address of the instruction to be corrected to CORAD0 and CORAD1, and set bits 1 and 3

(COREN0, COREN1) of the correction control register (CORCN) to 1.

(4) Set the entire-space branch instruction (BR !addr16) to the specified address (F7FDH) of the internal

expansion RAM with the main program.

(5) After the main program is started, the fetch address value and the values set in CORAD0 and CORAD1 are

always compared by the comparator in the ROM correction circuit. When these values match, the correction

branch request signal is generated. Simultaneously the corresponding correction status flag (CORST0 or

CORST1) is set to 1.

(6) Branch to the address F7FDH by the correction branch request signal.

(7) Branch to the internal expansion RAM address set with the main program by the entire-space branch

instruction of the address F7FDH.

(8) When one place is corrected, the correction program is executed. When two places are corrected, the

correction status flag is checked with the branch destination judgment program, and branches to the

correction program.

Show 5 more labels / short text on this page
Initialization · ROM correction · No · Yes · Main program
Page 564 of the NEC PD78076Y user manual — CHAPTER 26 ROM CORRECTION
Page 564 · click to enlarge
Page 564

CHAPTER 26 ROM CORRECTION

Figure 26-7. ROM Correction Operation

Start of internal ROM program

Does fetch address match with correction

Set correction status flag

Correction branch (branch to address F7FDH)

Execution of correction program

Show 4 more labels / short text on this page
No · address? · Yes · ROM correction
Page 565 of the NEC PD78076Y user manual — 0000H
Page 565 · click to enlarge
Page 565

CHAPTER 26 ROM CORRECTION

26.5 ROM Correction Example

The example of ROM correction when the instruction at address 1000H “ADD A, #1” is changed to “ADD A, #2”

is as follows.

Figure 26-8. ROM Correction Example

Internal ROM Internal expansion RAM 0000H

0000H

F702H

ADD A, #2 BR !1002H

ADD A, #1 MOV B, A

1000H

1002H

F7FDH

BR !F702H

F7FFH

(1) Branches to address F7FDH when the preset value 1000H in the correction address register matches the

fetch address value after the main program is started.

(2) Branches to any address (address F702H in this example) by setting the entire-space branch instruction

(BR !addr16) to address F7FDH with the main program.

(3) Returns to the internal ROM program after executing the substitute instruction ADD A, #2.

Show 4 more labels / short text on this page
0080H Program start · (3) · (2) · (1)
Page 566 of the NEC PD78076Y user manual — Figure 26-9. Program Transition Diagram (when One Place is Corrected)
Page 566 · click to enlarge
Page 566

CHAPTER 26 ROM CORRECTION

26.6 Program Execution Flow

Figures 26-9 and 26-10 show the program transition diagrams when the ROM correction is used.

Figure 26-9. Program Transition Diagram (when One Place is Corrected)

FFFFH

F7FFH

BR !JUMP

F7FDH

JUMP

0000H

(1) Branches to address F7FDH when fetch address matches correction address

(2) Branches to correction program

(3) Returns to internal ROM program

Remark Area filled with diagonal lines : Internal expansion RAM

JUMPCorrection program start address
Show 8 more labels / short text on this page
(2) · Correction program · (1) · (3) · Internal ROM · Correction place · xxxxH · Internal ROM
Page 567 of the NEC PD78076Y user manual — CHAPTER 26 ROM CORRECTION
Page 567 · click to enlarge
Page 567

CHAPTER 26 ROM CORRECTION

Figure 26-10. Program Transition Diagram (when Two Places are Corrected)

FFFFH

F7FFH

BR !JUMP

F7FDH

JUMP

0000H

(1) Branches to address F7FDH when fetch address matches correction address

(2) Branches to branch destination judgment program

(3) Branches to correction program 1 by branch destination judgment program (BTCLR !CORST0, $xxxxH)

(4) Returns to internal ROM program

(5) Branches to address F7FDH when fetch address matches correction address

(6) Branches to branch destination judgment program

(7) Branches to correction program 2 by branch destination judgment program (BTCLR !CORST1, $yyyyH)

(8) Returns to internal ROM program

Remark Area filled with diagonal lines : Internal expansion RAM

JUMPCorrection program start address
Show 18 more labels / short text on this page
(6) · (2) · Correction program 2 · yyyyH · (7) · Correction program 1 · xxxxH · (3) · Destination judge program · (8) · (4) · (5) · Internal ROM · (1) · Correction place 2 · Internal ROM · Correction place 1 · Internal ROM
Page 568 of the NEC PD78076Y user manual — CHAPTER 26 ROM CORRECTION
Page 568 · click to enlarge
Page 568

CHAPTER 26 ROM CORRECTION

26.7 Cautions on ROM Correction

(1) Address values set in correction address registers 0 and 1 (CORAD0, CORAD1) must be addresses where

instruction codes are stored.

(2) Correction address registers 0 and 1 (CORAD0, CORAD1) should be set when the correction enable flag

(COREN0, COREN1) is 0 (when the correction branch is in disabled state). If address is set to CORAD0

or CORAD1 when COREN0 or COREN1 is 1 (when the correction branch is in enabled state), the correction

branch may start with the different address from the set address value.

(3) Do not set the address value of instruction immediately after the instruction that sets the correction enable

flag (COREN0, COREN1) to 1, to correction address register 0 or 1 (CORAD0, CORAD1) ; the correction

branch may not start.

(4) Do not set the address value in table area of table reference instruction (CALLT instruction) (0040H to

007FH), and the address value in vector table area (0000H to 003FH) to correction address registers 0 and

1 (CORAD0, CORAD1).

(5) Do not set two addresses immediately after the instructions shown below to correction address registers

0 and 1 (CORAD0, CORAD1). (that is, when the mapped terminal address of these instructions is N, do

not set the address values of N+1 and N+2.)

  • RET
  • RETI
  • RETB
  • BR $addr16
  • STOP
  • HALT
Page 569 of the NEC PD78076Y user manual — Table 27-1. Differences between PROM and Mask ROM Versions
Page 569 · click to enlarge
Page 569

CHAPTER 27 µ PD78P078, 78P078Y

The µPD78P078 and 78P078Y (PROM versions) replace the internal mask ROM of the mask ROM versions

(µPD78074, 78075, 78076, 78078, and µPD78074Y, 78075Y, 78076Y, 78078Y) with one-time programmable ROM

or EPROM, which enable program writing, erasure, and rewriting. Table 27-1 lists differences between the PROM

versions and mask ROM versions.

Table 27-1. Differences between PROM and Mask ROM Versions

Item µPD78P078, 78P078Y Mask ROM Versions

Internal ROM format One-time PROM/EPROM Mask ROM

Internal ROM capacity 60 Kbytes µPD78076, 78076Y: 48 Kbytes

µ PD78078, 78078Y60 Kbytes

Changing internal ROM and internal high-speed RAM YesNote 1 No capacities by the internal memory size switching register (IMS)

Changing internal expansion RAM capacity by the YesNote 2 No internal expansion RAM size switching register (IXS)

IC pin None Available

VPP pin Available None

P60 to P63 pins pull-up resistor internal mask option None Available

Electrical specifications Refer to the data sheet of individual product

bytes by RESET input.

2. Internal expansion RAM capacity becomes 1024 bytes by RESET input.

versions. When pre-producing an application set with the PROM version and then mass-

producing it with the mask ROM version, be sure to conduct sufficient evaluations for the

consumer samples (not engineering samples) of the mask ROM version.

Page 570 of the NEC PD78076Y user manual — Table 27-2. Examples of Internal Memory Size Switching Register Settings
Page 570 · click to enlarge
Page 570

CHAPTER 27 µPD78P078, 78P078Y

27.1 Internal Memory Size Switching Register

The µPD78P078 and 78P078Y allow users to define its internal memory sizes using the internal memory size

switching register (IMS), so that the same memory mapping as that of a mask ROM version with a different-size

internal ROM is possible.

IMS is set with an 8-bit memory manipulation instruction.

RESET input sets IMS to CFH.

Figure 27-1. Internal Memory Size Switching Register Format

IMS

RAM2

RAM1

RAM0

ROM3

ROM2

ROM1

ROM0

FFF0H CFH

R/W

ROM3

ROM2

ROM1

ROM0

Internal ROM Capacity Selection

Setting prohibited Other than above

Internal High-Speed RAM Capacity Selection RAM2 RAM1 RAM0

1024 bytes 1 1 0

Setting prohibited Other than above

must be 56 Kbytes or less: µPD78078, 78078Y, 78P078, 78P078Y.

except for the case where the external device extension function is used on the µPD78078 and

78078Y.

The IMS settings to give the same memory map as mask ROM versions are shown in Table 27-2.

Table 27-2. Examples of Internal Memory Size Switching Register Settings

Relevant Mask ROM Version IMS Setting

µPD78076, 78076Y CCH

µPD78078, 78078Y CFH

Show 6 more labels / short text on this page
After Reset R/W · Symbol · Address · 48 Kbytes · 56 KbytesNote · 60 Kbytes 1
Page 571 of the NEC PD78076Y user manual — Table 27-3. Examples of Internal Extension RAM Size Switching Register Settings
Page 571 · click to enlarge
Page 571

CHAPTER 27 µPD78P078, 78P078Y

27.2 Internal Extension RAM Size Switching Register

The µPD78P078 and 78P078Y allow users to define its internal extension RAM size by using the internal

extension RAM size switching register (IXS), so that the same memory mapping as that of a mask ROM version

with a different internal extension RAM is possible.

The IXS is set by an 8-bit memory manipulation instruction.

RESET signal input sets IXS to 0AH.

Table 27-3 to IXS. Other settings are prohibited.

Figure 27-2. Internal Extension RAM Size Switching Register Format

R/W

IXS

IXRAM3

IXRAM2

IXRAM1

IXRAM0

FFF4H 0AH

W

Internal Extension RAM Capacity Selection IXRAM3 IXRAM2 IXRAM1

IXRAM0

0 bytes 1 1 0 0

1024 bytes 1 0 1

Setting prohibited Other than above

The value which is set in the IXS that has the identical memory map to the mask ROM versions is given in

Table 27-3.

Table 27-3. Examples of Internal Extension RAM Size Switching Register Settings

Relevant Mask ROM Version IXS Setting

µPD78076, 78076Y 0AH

Show 4 more labels / short text on this page
After Reset · Address · Symbol · µPD78078, 78078Y
Page 572 of the NEC PD78076Y user manual — (2) Output disable mode
Page 572 · click to enlarge
Page 572

CHAPTER 27 µPD78P078, 78P078Y

27.3 PROM Programming

The µPD78P078 and 78P078Y each incorporate a 60-Kbyte PROM as program memory. To write a program

into the PROM make the device enter the PROM programming mode by setting the levels of the VPP and RESET

pins as specified. For the connection of unused pins, refer to 1.5 (2) PROM programming mode and 2.5 Pin

Configuration (Top Vew).

EFFFH). The program cannot be written by a PROM programmer in which the write address

cannot be specified.

27.3.1 Operating modes

When +5 V or +12.5 V is applied to the VPP pin and a low-level signal is applied to the RESET pin, the device

is set to the PROM programming mode. This is one of the operating modes shown in Table 27-4 below according

to the setting of the CE, OE, and PGM pins.

The PROM contents can be read by setting the read mode.

Table 27-4. PROM Programming Operating Modes

RESET VPP VDD CE OE PGM D0 to D7

Page data latch H L H Data input

Page write H H L High impedance

Byte write L H L Data input

+12.5 V +6.5 V

Program verify L L H Data output

L x H H

Program inhibit High impedance

Read L L H Data output

Output disabled +5 V +5 V L H x High impedance

Standby H x x High impedance

x: L or H

(1) Read mode

Read mode is set by setting CE to L and OE to L.

(2) Output disable mode

If OE is set to H, data output becomes high impedance and the output disable mode is set.

Therefore, if multiple µPD78P078s or 78P078Ys are connected to the data bus, data can be read from any

one device by controlling the OE pin.

Pin · Operating mode

Page 573 of the NEC PD78076Y user manual — (8) Program inhibit mode
Page 573 · click to enlarge
Page 573

CHAPTER 27 µPD78P078, 78P078Y

(3) Standby mode

Setting CE to H sets the standby mode.

In this mode, data output becomes high impedance irrespective of the status of OE.

(4) Page data latch mode

Setting CE to H, PGM to H, and OE to L at the start of the page write mode sets the page data latch mode.

In this mode, 1-page 4-byte data is latched in the internal address/data latch circuit.

(5) Page write mode

After a 1-page 4-byte address and data are latched by the page data latch mode, a page write is executed

by applying a 0.1-ms program pulse (active-low) to the PGM pin while CE = H and OE = H. After this, program

verification can be performed by setting CE to L and OE to L.

If programming is not performed by one program pulse, repeated write and verify operations are executed

X times (X ≤ 10).

(6) Byte write mode

A byte write is executed by applying a 0.1-ms program pulse (active-low) to the PGM pin while CE = L and

OE = H. After this, program verification can be performed by setting OE to L.

If programming is not performed by one program pulse, repeated write and verify operations are executed

X times (X ≤ 10).

(7) Program verify mode

Setting CE to L, PGM to H, and OE to L sets the program verify mode.

After writing is performed, this mode should be used to check whether the data was written correctly.

(8) Program inhibit mode

The program inhibit mode is used when the OE pins, VPP pins and pins D0 to D7 of multiple µPD78P078s

or 78P078Ys are connected in parallel, and you wish to write to one of these devices.

The page write mode or byte write mode described above is used to perform a write. At this time, the write

is not performed on the device which has the PGM pin driven high.

Page 574 of the NEC PD78076Y user manual — X = X + 1
Page 574 · click to enlarge
Page 574

CHAPTER 27 µPD78P078, 78P078Y

27.3.2 PROM write procedure

Figure 27-3. Page Program Mode Flowchart

VDD = 6.5 V, VPP = 12.5 V

G = Start address

X = 0

N = Last address of program

Address = Address + 1

Address = Address + 1

Address = Address + 1

Address = Address + 1

X = X + 1

Yes X = 10 ?

0.1 ms program pulse

Address = N? No

VDD = 4.5 to 5.5 V, VPP = VDD

Show 17 more labels / short text on this page
Start · Address = G · Latch · Latch · Latch · Latch · No · Fail · Verify 4 bytes · Pass · Yes · Pass · Fail · All bytes verified? · All Pass · End of write · Defective product
Page 575 of the NEC PD78076Y user manual — V PP
Page 575 · click to enlarge
Page 575

CHAPTER 27 µPD78P078, 78P078Y

Figure 27-4. Page Program Mode Timing

Page Data Latch Page Program Program Verify

A0, A1

Data Input Data Output

V PP

V DD V PP

V DD + 1.5

V DD V PP

V IH CE

V IH

PGM

V IH

OE

A2 to A16 · Hi-Z · D0 to D7

Page 576 of the NEC PD78076Y user manual — X = 0
Page 576 · click to enlarge
Page 576

CHAPTER 27 µPD78P078, 78P078Y

Figure 27-5. Byte Program Mode Flowchart

G = Start address

N = Last address of program

VDD = 6.5 V, VPP = 12.5 V

X = 0

X = X + 1

Yes X = 10 ? Address = Address + 1

0.1 ms program pulse

Address = N ?

VDD = 4.5 to 5.5 V, VPP = VDD

Show 14 more labels / short text on this page
Start · Address = G · No · Fail · Verify · Pass · No · Yes · Pass · Fail · All bytes verified? · All Pass · End of write · Defective product
Page 577 of the NEC PD78076Y user manual — V PP
Page 577 · click to enlarge
Page 577

CHAPTER 27 µPD78P078, 78P078Y

Figure 27-6. Byte Program Mode Timing

D0 to D7 Data Input

V PP

V PP

V DD

V DD + 1.5

V DD

V DD

V IH

CE

V IH

PGM

V IH

OE

2. V PP must not exceed +13.5 V including overshoot voltage.
3. Disconnecting/inserting the device from/to the on-board socket while +12.5 V is being

applied to VPP may have an adverse affect on reliability.

Show 4 more labels / short text on this page
Program Program Verify · A0 to A16 · Hi-Z · Data Output
Page 578 of the NEC PD78076Y user manual — Figure 27-7. PROM Read Timing
Page 578 · click to enlarge
Page 578

CHAPTER 27 µPD78P078, 78P078Y

27.3.3 PROM reading procedure

PROM contents can be read onto the external data bus (D0 to D7) using the following procedure.

(1) Fix the RESET pin low, and supply +5 V to the VPP pin. Unused pins are handled as shown in, 1.5 (2) PROM

programming mode and 2.5 Pin Configuration (Top View).

(2) Supply +5 V to the VDD and VPP pins.

(3) Input address of data to be read to pins A0 through A16.

(4) Read mode.

(5) Output data to pins D0 through D7.

The timing for steps (2) through (5) above is shown in Figure 27-7.

Figure 27-7. PROM Read Timing

Address Input A0 to A16

Hi-Z Hi-Z Data output

CE (Input) · OE (Input) · D0 to D7

Page 579 of the NEC PD78076Y user manual — 27.6 Screening of One-Time PROM Versions
Page 579 · click to enlarge
Page 579

CHAPTER 27 µPD78P078, 78P078Y

27.4 Erasure Procedure ( µ PD78P078KL-T and 78P078YKL-T Only)

With the µPD78P078KL-T or 78P078YKL-T, it is possible to erase (all contents to FFH) the data contents written

in the program memory, and rewrite the memory.

The data can be erased by exposing the window to light with a wavelength of approximately 400 nm or shorter.

Typically, data is erased by 254-nm ultraviolet light rays. The minimum lighting level to completely erase the written

data is shown below.

  • UV intensity x erasure time: 30 W·s/cm 2 or more
  • Erasure time: 40 minutes (using a 12 mW/cm 2 ultraviolet lamp. A longer erasure time may be required in case

of deterioration of the ultraviolet lamp or dirt on the package window).

When erasing written data, remove any filter on the window and place the device within 2.5 cm of the lamp tube.

27.5 Opaque Film Masking Window ( µ PD78P078KL-T and 78P078YKL-T Only)

To prevent unintentional erasure of the EPROM contents by light and to prevent internal circuits from malfunction

due to light coming in through the erasure window, mask the window with the attached opaque film after writing

the EPROM.

27.6 Screening of One-Time PROM Versions

One-time PROM versions cannot be fully tested by NEC before shipment due to the structure of one-time PROM.

Therefore, after users have written data to the PROM, screening should be implemented: that is, store devices under

the following conditions. Then verify their contents after the device have returned to room temperature.

Storage Temperature Storage Time

125°C 24 hours

For users who do not wish to implement screening by themselves, NEC provides such users with a charged

service in which NEC performs a series of processes from writing one-time PROMs and screening them to verifying

their contents for users by request. The PROM version devices which provide this service are called QTOPTM

microcontrollers. This service will soon be available for the µPD78P078Y. For details, please consult an NEC sales

representative.

Page 580 of the NEC PD78076Y user manual — [MEMO]
Page 580 · click to enlarge
Page 580

[MEMO]

Page 581 of the NEC PD78076Y user manual — (U12326E).”
Page 581 · click to enlarge
Page 581

CHAPTER 28 INSTRUCTION SET

This chapter describes each instruction set of the µPD78078 and 78078Y Subseries as list table. For details of its

operation and operation code, refer to the separate document “78K/0 Series USER’S MANUAL — Instructions

(U12326E).”

Page 582 of the NEC PD78076Y user manual — Table 28-1. Operand Identifiers and Description Methods
Page 582 · click to enlarge
Page 582

CHAPTER 28 INSTRUCTION SET

28.1 Legends Used in Operation List

28.1.1 Operand identifiers and description methods

Operands are described in “Operand” column of each instruction in accordance with the description method of the

instruction operand identifier (refer to the assembler specifications for detail). When there are two or more description

methods, select one of them. Alphabetic letters in capitals and symbols, #, !, $ and [ ] are key words and must be

described as they are. Each symbol has the following meaning.

  • # : Immediate data specification
  • ! : Absolute address specification
  • $ : Relative address specification
  • [ ] : Indirect address specification

In the case of immediate data, describe an appropriate numeric value or a label. When using a label, be sure to

describe the #, !, $, and [ ] symbols.

For operand register identifiers, r and rp, either function names (X, A, C, etc.) or absolute names (names in

parentheses in the table below, R0, R1, R2, etc.) can be used for description.

Table 28-1. Operand Identifiers and Description Methods

r X (R0), A (R1), C (R2), B (R3), E (R4), D (R5), L (R6), H (R7),

rp AX (RP0), BC (RP1), DE (RP2), HL (RP3)

sfr Special-function register symbolNote

sfrp Special-function register symbol (16-bit manipulatable register even addresses only)Note

saddr FE20H to FF1FH Immediate data or labels

saddrp FE20H to FF1FH Immediate data or labels (even address only)

addr16 0000H to FFFFH Immediate data or labels

(Only even addresses for 16-bit data transfer instructions)

addr11 0800H to 0FFFH Immediate data or labels

addr5 0040H to 007FH Immediate data or labels (even address only)

word 16-bit immediate data or label

byte 8-bit immediate data or label

bit 3-bit immediate data or label

RBn RB0 to RB3

Remark For special-function register symbols, refer to Table 5-3 Special-Function Register List.

Identifier Description Method

Page 583 of the NEC PD78076Y user manual — 23.1.3 Description of “flag operation” column
Page 583 · click to enlarge
Page 583

CHAPTER 28 INSTRUCTION SET

28.1.2 Description of “operation” column

AA register; 8-bit accumulator
XX register
BB register
CC register
DD register
EE register
HH register
LL register
AXAX register pair; 16-bit accumulator
BCBC register pair
DEDE register pair
HLHL register pair
PCProgram counter
SPStack pointer
PSWProgram status word
CYCarry flag
ACAuxiliary carry flag
ZZero flag
RBSRegister bank select flag
IEInterrupt request enable flag
NMISNon-maskable interrupt servicing flag
( )Memory contents indicated by address or register contents in parentheses
x H , x LHigher 8 bits and lower 8 bits of 16-bit register
/\Logical product (AND)
\/Logical sum (OR)
\/Exclusive logical sum (exclusive OR)
——Inverted data
addr1616-bit immediate data or label
jdisp8Signed 8-bit data (displacement value)

23.1.3 Description of “flag operation” column

(Blank)Not affected
0. Cleared to 0
1. Set to 1
xSet/cleared according to the result
RPreviously saved value is restored
Page 584 of the NEC PD78076Y user manual — A, PSW 2 — 5 A ← PSW
Page 584 · click to enlarge
Page 584

CHAPTER 28 INSTRUCTION SET

28.2 Operation List

Instruction Mnemonic Operands Byte Clock Operation Flag

Group Note 1 Note 2 Z AC CY

8-bit data MOV r, #byte 2 4 — r ← byte

transfer saddr, #byte 3 6 7 (saddr) ← byte

sfr, #byte 3 — 7 sfr ← byte

A, rNote 3 1 2 — A ← r

r, ANote 3 1 2 — r ← A

A, saddr 2 4 5 A ← (saddr)

saddr, A 2 4 5 (saddr) ← A

A, sfr 2 — 5 A ← sfr

sfr, A 2 — 5 sfr ← A

A, !addr16 3 8 9 + n A ← (addr16)

!addr16, A 3 8 9 + m (addr16) ← A

PSW, #byte 3 — 7 PSW ← byte x x x

A, PSW 2 — 5 A ← PSW

PSW, A 2 — 5 PSW ← A x x x

A, [DE] 1 4 5 + n A ← (DE)

[DE], A 1 4 5 + m (DE) ← A

A, [HL] 1 4 5 + n A ← (HL)

[HL], A 1 4 5 + m (HL) ← A

A, [HL + byte] 2 8 9 + n A ← (HL + byte)

[HL + byte], A 2 8 9 + m (HL + byte) ← A

A, [HL + B] 1 6 7 + n A ← (HL + B)

[HL + B], A 1 6 7 + m (HL + B) ← A

A, [HL + C] 1 6 7 + n A ← (HL + C)

[HL + C], A 1 6 7 + m (HL + C) ← A

XCH A, rNote 3 1 2 — A ↔ r

A, saddr 2 4 6 A ↔ (saddr)

A, sfr 2 — 6 A ↔ sfr

A, !addr16 3 8 10+n+m A ↔ (addr16)

A, [DE] 1 4 6+n+m A ↔ (DE)

A, [HL] 1 4 6+n+m A ↔ (HL)

A, [HL + byte] 2 8 10+n+m A ↔ (HL + byte)

A, [HL + B] 2 8 10+n+m A ↔ (HL + B)

A, [HL + C] 2 8 10+n+m A ↔ (HL + C)

2. For instructions that access an area other than the internal high-speed RAM area
3. Except when “r = A”

Remarks 1. One clock in the “Clock” columns is equal to one cycle of the CPU clock (fCPU) selected by the processor

clock control register (PCC).

2. The values in the “Clock” column assumes that the internal ROM area contains programs.
3. n indicates wait cycles to be inserted when an external expansion memory area is read from.
4. m indicates wait cycles to be inserted when an external expansion memory area is written to.
Page 585 of the NEC PD78076Y user manual — CHAPTER 28 INSTRUCTION SET
Page 585 · click to enlarge
Page 585

CHAPTER 28 INSTRUCTION SET

Instruction Mnemonic Operands Byte Clock Operation Flag

Group Note 1 Note 2 Z AC CY

16-bit data MOVW rp, #word 3 6 — rp ← word

transfer saddrp, #word 4 8 10 (saddrp) ← word

sfrp, #word 4 — 10 sfrp ← word

AX, saddrp 2 6 8 AX ← (saddrp)

saddrp, AX 2 6 8 (saddrp) ← AX

AX, sfrp 2 — 8 AX ← sfrp

sfrp, AX 2 — 8 sfrp ← AX

AX, rpNote 3 1 4 — AX ← rp

rp, AXNote 3 1 4 — rp ← AX

AX, !addr16 3 10 12 + 2n AX ← (addr16)

!addr16, AX 3 10 12 + 2m (addr16) ← AX

XCHW AX, rpNote 3 1 4 — AX ↔ rp

8-bit ADD A, #byte 2 4 — A, CY ← A + byte x x x

operation saddr, #byte 3 6 8 (saddr), CY ← (saddr) + byte x x x

A, rNote 4 2 4 — A, CY ← A + r x x x

r, A 2 4 — r, CY ← r + A x x x

A, saddr 2 4 5 A, CY ← A + (saddr) x x x

A, !addr16 3 8 9 + n A, CY ← A + (addr16) x x x

A, [HL] 1 4 5 + n A, CY ← A + (HL) x x x

A, [HL + byte] 2 8 9 + n A, CY ← A + (HL + byte) x x x

A, [HL + B] 2 8 9 + n A, CY ← A + (HL + B) x x x

A, [HL + C] 2 8 9 + n A, CY ← A + (HL + C) x x x

ADDC A, #byte 2 4 — A, CY ← A + byte + CY x x x

saddr, #byte 3 6 8 (saddr), CY ← (saddr) + byte + CY x x x

A, rNote 4 2 4 — A, CY ← A + r + CY x x x

r, A 2 4 — r, CY ← r + A + CY x x x

A, saddr 2 4 5 A, CY ← A + (saddr) + CY x x x

A, !addr16 3 8 9 + n A, CY ← A + (addr16) + CY x x x

A, [HL] 1 4 5 + n A, CY ← A + (HL) + CY x x x

A, [HL + byte] 2 8 9 + n A, CY ← A + (HL + byte) + CY x x x

A, [HL + B] 2 8 9 + n A, CY ← A + (HL + B) + CY x x x

A, [HL + C] 2 8 9 + n A, CY ← A + (HL + C) + CY x x x

2. For instructions that access an area other than the internal high-speed RAM area
3. Only when rp = BC, DE, or HL
4. Except when “r = A”

Remarks 1. One clock in the “Clock” columns is equal to one cycle of the CPU clock (fCPU) selected by the processor

clock control register (PCC).

2. The values in the “Clock” column assumes that the internal ROM area contains programs.
3. n indicates wait cycles to be inserted when an external expansion memory area is read from.
4. m indicates wait cycles to be inserted when an external expansion memory area is written to.
Page 586 of the NEC PD78076Y user manual — CHAPTER 28 INSTRUCTION SET
Page 586 · click to enlarge
Page 586

CHAPTER 28 INSTRUCTION SET

Instruction Mnemonic Operands Byte Clock Operation Flag

Group Note 1 Note 2 Z AC CY

8-bit SUB A, #byte 2 4 — A, CY ← A – byte x x x

operation saddr, #byte 3 6 8 (saddr), CY ← (saddr) – byte x x x

A, rNote 3 2 4 — A, CY ← A – r x x x

r, A 2 4 — r, CY ← r – A x x x

A, saddr 2 4 5 A, CY ← A – (saddr) x x x

A, !addr16 3 8 9 + n A, CY ← A – (addr16) x x x

A, [HL] 1 4 5 + n A, CY ← A – (HL) x x x

A, [HL + byte] 2 8 9 + n A, CY ← A – (HL + byte) x x x

A, [HL + B] 2 8 9 + n A, CY ← A – (HL + B) x x x

A, [HL + C] 2 8 9 + n A, CY ← A – (HL + C) x x x

SUBC A, #byte 2 4 — A, CY ← A – byte – CY x x x

saddr, #byte 3 6 8 (saddr), CY ← (saddr) – byte – CY x x x

A, rNote 3 2 4 — A, CY ← A – r – CY x x x

r, A 2 4 — r, CY ← r – A – CY x x x

A, saddr 2 4 5 A, CY ← A – (saddr) – CY x x x

A, !addr16 3 8 9 + n A, CY ← A – (addr16) – CY x x x

A, [HL] 1 4 5 + n A, CY ← A – (HL) – CY x x x

A, [HL + byte] 2 8 9 + n A, CY ← A – (HL + byte) – CY x x x

A, [HL + B] 2 8 9 + n A, CY ← A – (HL + B) – CY x x x

A, [HL + C] 2 8 9 + n A, CY ← A – (HL + C) – CY x x x

AND A, #byte 2 4 — A ← A /\ byte x

saddr, #byte 3 6 8 (saddr) ← (saddr) /\ byte x

A, rNote 3 2 4 — A ← A /\ r x

r, A 2 4 — r ← r /\ A x

A, saddr 2 4 5 + n A ← A /\ (saddr) x

A, !addr16 3 8 9 + n A ← A /\ (addr16) x

A, [HL] 1 4 5 + n A ← A /\ (HL) x

A, [HL + byte] 2 8 9 + n A ← A /\ (HL + byte) x

A, [HL + B] 2 8 9 + n A ← A /\ (HL + B) x

A, [HL + C] 2 8 9 + n A ← A /\ (HL + C) x

2. For instructions that access an area other than the internal high-speed RAM area
3. Except when “r = A”

Remarks 1. One clock in the “Clock” columns is equal to one cycle of the CPU clock (fCPU) selected by the processor

clock control register (PCC).

2. The values in the “Clock” column assumes that the internal ROM area contains programs.
3. n indicates wait cycles to be inserted when an external expansion memory area is read from.
Page 587 of the NEC PD78076Y user manual — CHAPTER 28 INSTRUCTION SET
Page 587 · click to enlarge
Page 587

CHAPTER 28 INSTRUCTION SET

Instruction Mnemonic Operands Byte Clock Operation Flag

Group Note 1 Note 2 Z AC CY

8-bit OR A, #byte 2 4 — A ← A \/ byte x

operation saddr, #byte 3 6 8 (saddr) ← (saddr) \/ byte x

A, rNote 3 2 4 — A ← A \/ r x

r, A 2 4 — r ← r \/ A x

A, saddr 2 4 5 A ← A \/ (saddr) x

A, !addr16 3 8 9 + n A ← A \/ (addr16) x

A, [HL] 1 4 5 + n A ← A \/ (HL) x

A, [HL + byte] 2 8 9 + n A ← A \/ (HL + byte) x

A, [HL + B] 2 8 9 + n A ← A \/ (HL + B) x

A, [HL + C] 2 8 9 + n A ← A \/ (HL + C) x

XOR A, #byte 2 4 — A ← A \/ byte x

saddr, #byte 3 6 8 (saddr) ← (saddr) \/ byte x

A, rNote 3 2 4 — A ← A \/ r x

r, A 2 4 — r ← r \/ A x

A, saddr 2 4 5 + n A ← A \/ (saddr) x

A, !addr16 3 8 9 + n A ← A \/ (addr16) x

A, [HL] 1 4 5 + n A ← A \/ (HL) x

A, [HL + byte] 2 8 9 + n A ← A \/ (HL + byte) x

A, [HL + B] 2 8 9 + n A ← A \/ (HL + B) x

A, [HL + C] 2 8 9 + n A ← A \/ (HL + C) x

CMP A, #byte 2 4 — A – byte x x x

saddr, #byte 3 6 8 (saddr) – byte x x x

A, rNote 3 2 4 — A – r x x x

r, A 2 4 — r – A x x x

A, saddr 2 4 5 + n A – (saddr) x x x

A, !addr16 3 8 9 + n A – (addr16) x x x

A, [HL] 1 4 5 + n A – (HL) x x x

A, [HL + byte] 2 8 9 + n A – (HL + byte) x x x

A, [HL + B] 2 8 9 + n A – (HL + B) x x x

A, [HL + C] 2 8 9 + n A – (HL + C) x x x

2. For instructions that access an area other than the internal high-speed RAM area
3. Except when “r = A”

Remarks 1. One clock in the “Clock” columns is equal to one cycle of the CPU clock (fCPU) selected by the processor

clock control register (PCC).

2. The values in the “Clock” column assumes that the internal ROM area contains programs.
3. n indicates wait cycles to be inserted when an external expansion memory area is read from.
Page 588 of the NEC PD78076Y user manual — CHAPTER 28 INSTRUCTION SET
Page 588 · click to enlarge
Page 588

CHAPTER 28 INSTRUCTION SET

Instruction Mnemonic Operands Byte Clock Operation Flag

Group Note 1 Note 2 Z AC CY

16-bit ADDW AX, #word 3 6 — AX, CY ← AX + word x x x

operation SUBW AX, #word 3 6 — AX, CY ← AX – word x x x

CMPW AX, #word 3 6 — AX – word x x x

Multiply MULU X 2 16 — AX ← A x X

divide DIVUW C 2 25 — AX (Quotient), C (Remainder) ← AX/C

Increment INC r 1 2 — r ← r + 1 x x

decrement saddr 2 4 6 (saddr) ← (saddr) + 1 x x

DEC r 1 2 — r ← r – 1 x x

saddr 2 4 6 (saddr) ← (saddr) – 1 x x

INCW rp 1 4 — rp ← rp + 1

DECW rp 1 4 — rp ← rp – 1

Rotate ROR A, 1 1 2 — (CY, A7 ← A0, Am - 1 ← Am) x 1 time x

ROL A, 1 1 2 — (CY, A0 ← A7, Am + 1 ← Am) x 1 time x

RORC A, 1 1 2 — (CY ← A0, A7 ← CY, Am - 1 ← Am) x 1 time x

ROLC A, 1 1 2 — (CY ← A7, A0 ← CY, Am + 1 ← Am) x 1 time x

ROR4 [HL] 2 10 12+n+m A3 - 0 ← (HL)3 - 0, (HL)7 - 4 ← A3 - 0,

(HL)3 - 0 ← (HL)7 - 4

ROL4 [HL] 2 10 12+n+m A3 - 0 ← (HL)7 - 4, (HL)3 - 0 ← A3 - 0,

(HL)7 - 4 ← (HL)3 - 0

BCD ADJBA 2 4 — Decimal Adjust Accumulator after Addition x x x

adjust ADJBS 2 4 — Decimal Adjust Accumulator after Subtract x x x

Bit mani- MOV1 CY, saddr.bit 3 6 7 CY ← (saddr.bit) x

pulation CY, sfr.bit 3 — 7 CY ← sfr.bit x

CY, A.bit 2 4 — CY ← A.bit x

CY, PSW.bit 3 — 7 CY ← PSW.bit x

CY, [HL].bit 2 6 7 + n CY ← (HL).bit x

saddr.bit, CY 3 6 8 (saddr.bit) ← CY

sfr.bit, CY 3 — 8 sfr.bit ← CY

A.bit, CY 2 4 — A.bit ← CY

PSW.bit, CY 3 — 8 PSW.bit ← CY x x

[HL].bit, CY 2 6 8+n+m (HL).bit ← CY

2. For instructions that access an area other than the internal high-speed RAM area

Remarks 1. One clock in the “Clock” columns is equal to one cycle of the CPU clock (fCPU) selected by the processor

clock control register (PCC).

2. The values in the “Clock” column assumes that the internal ROM area contains programs.
3. n indicates wait cycles to be inserted when an external expansion memory area is read from.
4. m indicates wait cycles to be inserted when an external expansion memory area is written to.
Page 589 of the NEC PD78076Y user manual — CHAPTER 28 INSTRUCTION SET
Page 589 · click to enlarge
Page 589

CHAPTER 28 INSTRUCTION SET

Instruction Mnemonic Operands Byte Clock Operation Flag

Group Note 1 Note 2 Z AC CY

Bit mani- AND1 CY, saddr.bit 3 6 7 CY ← CY /\ (saddr.bit) x

pulation CY, sfr.bit 3 — 7 CY ← CY /\ sfr.bit x

CY, A.bit 2 4 — CY ← CY /\ A.bit x

CY, PSW.bit 3 — 7 CY ← CY /\ PSW.bit x

CY, [HL].bit 2 6 7 + n CY ← CY /\ (HL).bit x

OR1 CY, saddr.bit 3 6 7 CY ← CY \/ (saddr.bit) x

CY, sfr.bit 3 — 7 CY ← CY \/ sfr.bit x

CY, A.bit 2 4 — CY ← CY \/ A.bit x

CY, PSW.bit 3 — 7 CY ← CY \/ PSW.bit x

CY, [HL].bit 2 6 7 + n CY ← CY \/ (HL).bit x

XOR1 CY, saddr.bit 3 6 7 CY ← CY \/ (saddr.bit) x

CY, sfr.bit 3 — 7 CY ← CY \/ sfr.bit x

CY, A.bit 2 4 — CY ← CY \/ A.bit x

CY, PSW. bit 3 — 7 CY ← CY \/ PSW.bit x

CY, [HL].bit 2 6 7 + n CY ← CY \/ (HL).bit x

SET1 saddr.bit 2 4 6 (saddr.bit) ← 1

sfr.bit 3 — 8 sfr.bit ← 1

A.bit 2 4 — A.bit ← 1

PSW.bit 2 — 6 PSW.bit ← 1 x x x

[HL].bit 2 6 8+n+m (HL).bit ← 1

CLR1 saddr.bit 2 4 6 (saddr.bit) ← 0

sfr.bit 3 — 8 sfr.bit ← 0

A.bit 2 4 — A.bit ← 0

PSW.bit 2 — 6 PSW.bit ← 0 x x x

[HL].bit 2 6 8+n+m (HL).bit ← 0

SET1 CY 1 2 — CY ← 1 1

CLR1 CY 1 2 — CY ← 0 0

NOT1 CY 1 2 — CY ← CY x

2. For instructions that access an area other than the internal high-speed RAM area

Remarks 1. One clock in the “Clock” columns is equal to one cycle of the CPU clock (fCPU) selected by the processor

clock control register (PCC).

2. The values in the “Clock” column assumes that the internal ROM area contains programs.
3. n indicates wait cycles to be inserted when an external expansion memory area is read from.
4. m indicates wait cycles to be inserted when an external expansion memory area is written to.
Page 590 of the NEC PD78076Y user manual — SP, AX 2 — 8 SP ← AX
Page 590 · click to enlarge
Page 590

CHAPTER 28 INSTRUCTION SET

Instruction Mnemonic Operands Byte Clock Operation Flag

Group Note 1 Note 2 Z AC CY

Call / CALL !addr16 3 7 — (SP – 1) ← (PC + 3)H, (SP - 2) ← (PC + 3)L,

return PC ← addr16, SP ← SP – 2

CALLF !addr11 2 5 — (SP – 1) ← (PC + 2)H, (SP – 2) ← (PC + 2)L,

PC15 - 11 ← 00001, PC10 - 0 ← addr11,

SP ← SP – 2

CALLT [addr5] 1 6 — (SP – 1) ← (PC + 1)H, (SP – 2) ← (PC + 1)L,

PCH ← (00000000, addr5 + 1),

PCL ← (00000000, addr5),

SP ← SP – 2

BRK 1 6 — (SP – 1) ← PSW, (SP – 2) ← (PC + 1)H,

(SP – 3) ← (PC + 1)L, PCH ← (003FH),

PCL ← (003EH), SP ← SP – 3, IE ← 0

RET 1 6 — PCH ← (SP + 1), PCL ← (SP),

SP ← SP + 2

RETI 1 6 — PCH ← (SP + 1), PCL ← (SP), R R R

PSW ← (SP + 2), SP ← SP + 3,

NMIS ← 0

RETB 1 6 — PCH ← (SP + 1), PCL ← (SP), R R R

PSW ← (SP + 2), SP ← SP + 3

Stack PUSH PSW 1 2 — (SP – 1) ← PSW, SP ← SP – 1

manipulate rp 1 4 — (SP – 1) ← rpH, (SP – 2) ← rpL,

SP ← SP – 2

POP PSW 1 2 — PSW ← (SP), SP ← SP + 1 R R R

rp 1 4 — rpH ← (SP + 1), rpL ← (SP),

SP ← SP + 2

MOVW SP, #word 4 — 10 SP ← word

SP, AX 2 — 8 SP ← AX

AX, SP 2 — 8 AX ← SP

Uncondi- BR !addr16 3 6 — PC ← addr16

tional $addr16 2 6 — PC ← PC + 2 + jdisp8

branch AX 2 8 — PCH ← A, PCL ← X

Conditional BC $addr16 2 6 — PC ← PC + 2 + jdisp8 if CY = 1

branch BNC $addr16 2 6 — PC ← PC + 2 + jdisp8 if CY = 0

BZ $addr16 2 6 — PC ← PC + 2 + jdisp8 if Z = 1

BNZ $addr16 2 6 — PC ← PC + 2 + jdisp8 if Z = 0

2. For instructions that access an area other than the internal high-speed RAM area

Remarks 1. One clock in the “Clock” columns is equal to one cycle of the CPU clock (fCPU) selected by the processor

clock control register (PCC).

2. The values in the “Clock” column assumes that the internal ROM area contains programs.
Page 591 of the NEC PD78076Y user manual — CHAPTER 28 INSTRUCTION SET
Page 591 · click to enlarge
Page 591

CHAPTER 28 INSTRUCTION SET

Instruction Mnemonic Operands Byte Clock Operation Flag

Group Note 1 Note 2 Z AC CY

Conditional BT saddr.bit, $addr16 3 8 9 PC ← PC + 3 + jdisp8 if(saddr.bit) = 1

branch sfr.bit, $addr16 4 — 11 PC ← PC + 4 + jdisp8 if sfr.bit = 1

A.bit, $addr16 3 8 — PC ← PC + 3 + jdisp8 if A.bit = 1

PSW.bit, $addr16 3 — 9 PC ← PC + 3 + jdisp8 if PSW.bit = 1

[HL].bit, $addr16 3 10 11 + n PC ← PC + 3 + jdisp8 if (HL).bit = 1

BF saddr.bit, $addr16 4 10 11 PC ← PC + 4 + jdisp8 if(saddr.bit) = 0

sfr.bit, $addr16 4 — 11 PC ← PC + 4 + jdisp8 if sfr.bit = 0

A.bit, $addr16 3 8 — PC ← PC + 3 + jdisp8 if A.bit = 0

PSW.bit, $addr16 4 — 11 PC ← PC + 4 + jdisp8 if PSW. bit = 0

[HL].bit, $addr16 3 10 11 + n PC ← PC + 3 + jdisp8 if (HL).bit = 0

BTCLR saddr.bit, $addr16 4 10 12 PC ← PC + 4 + jdisp8 if(saddr.bit) = 1

then reset(saddr.bit)

sfr.bit, $addr16 4 — 12 PC ← PC + 4 + jdisp8 if sfr.bit = 1

then reset sfr.bit

A.bit, $addr16 3 8 — PC ← PC + 3 + jdisp8 if A.bit = 1

then reset A.bit

PSW.bit, $addr16 4 — 12+n+m PC ← PC + 4 + jdisp8 if PSW.bit = 1 x x x

then reset PSW.bit

[HL].bit, $addr16 3 10 12 PC ← PC + 3 + jdisp8 if (HL).bit = 1

then reset (HL).bit

DBNZ B, $addr16 2 6 — B ← B – 1, then

PC ← PC + 2 + jdisp8 if B ≠ 0

C, $addr16 2 6 — C ← C –1, then

PC ← PC + 2 + jdisp8 if C ≠ 0

saddr. $addr16 3 8 10 (saddr) ← (saddr) – 1, then

PC ← PC + 3 + jdisp8 if(saddr) ≠ 0

CPU SEL RBn 2 4 — RBS1, 0 ← n

control NOP 1 2 — No Operation

EI 2 — 6 IE ← 1 (Enable Interrupt)

DI 2 — 6 IE ← 0 (Disable Interrupt)

HALT 2 6 — Set HALT Mode

STOP 2 6 — Set STOP Mode

2. For instructions that access an area other than the internal high-speed RAM area

Remarks 1. One clock in the “Clock” columns is equal to one cycle of the CPU clock (fCPU) selected by the processor

clock control register (PCC).

2. The values in the “Clock” column assumes that the internal ROM area contains programs.
3. n indicates wait cycles to be inserted when an external expansion memory area is read from.
4. m indicates wait cycles to be inserted when an external expansion memory area is written to.
Page 592 of the NEC PD78076Y user manual — ROLC, ROR4, ROL4, PUSH, POP, DBNZ
Page 592 · click to enlarge
Page 592

CHAPTER 28 INSTRUCTION SET

28.3 Instructions Listed by Addressing Type

(1) 8-bit instructions

MOV, XCH, ADD, ADDC, SUB, SUBC, AND, OR, XOR, CMP, MULU, DIVUW, INC, DEC, ROR, ROL, RORC,

ROLC, ROR4, ROL4, PUSH, POP, DBNZ

Page 593 of the NEC PD78076Y user manual — [HL + C]
Page 593 · click to enlarge
Page 593

CHAPTER 28 INSTRUCTION SET

Second Operand [HL + byte] #byte A r Note sfr saddr !addr16 PSW [DE] [HL] [HL + B] $addr16 1 None First Operand [HL + C]

A ADD MOV ROR

ADDC XCH ROL SUB ADD RORC

SUBC ADDC ROLC AND SUB

OR SUBC XOR AND

CMP OR XOR

CMP

r MOV MOV INC

ADD DEC ADDC

SUB SUBC

AND OR

XOR CMP

B, C DBNZ

saddr MOV MOV DBNZ INC ADD DEC

ADDC SUB

SUBC AND

OR XOR

CMP

PSW MOV MOV PUSH

POP

[DE] MOV

[HL] MOV ROR4 ROL4

[HL + byte] MOV [HL + B]

[HL + C]

X MULU

C DIVUW

sfr MOV MOV · !addr16 MOV

Page 594 of the NEC PD78076Y user manual — BF CLR1
Page 594 · click to enlarge
Page 594

CHAPTER 28 INSTRUCTION SET

(2) 16-bit instructions

MOVW, XCHW, ADDW, SUBW, CMPW, PUSH, POP, INCW, DECW

Second Operand #word AX rpNote sfrp saddrp !addr16 SP None

AX ADDW MOVW

SUBW XCHW

CMPW

rp MOVW MOVWNote INCW

DECW

PUSH

POP

SP MOVW MOVW

(3) Bit manipulation instructions

MOV1, AND1, OR1, XOR1, SET1, CLR1, NOT1, BT, BF, BTCLR

Second Operand A.bit sfr.bit saddr.bit PSW.bit [HL].bit CY $addr16 None

A.bit MOV1 BT SET1

BF CLR1

BTCLR

sfr.bit MOV1 BT SET1

BF CLR1

BTCLR

saddr.bit MOV1 BT SET1

BF CLR1

BTCLR

PSW.bit MOV1 BT SET1

BF CLR1

BTCLR

[HL].bit MOV1 BT SET1

BF CLR1

BTCLR

CY MOV1 MOV1 MOV1 MOV1 MOV1 SET1

AND1 AND1 AND1 AND1 AND1 CLR1

OR1 OR1 OR1 OR1 OR1 NOT1

XOR1 XOR1 XOR1 XOR1 XOR1

Show 5 more labels / short text on this page
1st Operand · sfrp MOVW MOVW · saddrp MOVW MOVW · !addr16 MOVW · First Operand
Page 595 of the NEC PD78076Y user manual — BR BC
Page 595 · click to enlarge
Page 595

CHAPTER 28 INSTRUCTION SET

(4) Call/instructions/branch instructions

CALL, CALLF, CALLT, BR, BC, BNC, BZ, BNZ, BT, BF, BTCLR, DBNZ

Second Operand AX !addr16 !addr11 [addr5] $addr16

Basic instruction BR CALL CALLF CALLT BR

BR BC

BNC

BZ

BNZ

BTCLR

DBNZ

(5) Other instructions

ADJBA, ADJBS, BRK, RET, RETI, RETB, SEL, NOP, EI, DI, HALT, STOP

First Operand · Compound BT · instruction BF

Page 596 of the NEC PD78076Y user manual — [MEMO]
Page 596 · click to enlarge
Page 596

[MEMO]

Page 597 of the NEC PD78076Y user manual — CMOS I/O 78 51
Page 597 · click to enlarge
Page 597

APPENDIX A DIFFERENCES BETWEEN µ PD78078, 78075B SUBSERIES, AND µ PD78070A

The major differences between the µPD78078, 78075B Subseries, and µPD78070A are shown in Table A-1.

Table A-1. Major Differences between µPD78078, 78075B Subseries, and µPD78070A

Part Number µPD78078 Subseries µPD78075B Subseries µPD78070A

Anti-EMI noise measure Not provided Provided Not provided

Product equipped with I2C bus Available Not available Available

Supply voltage VDD = 1.8 to 5.5 V VDD = 2.7 to 5.5 V

Internal ROM size µPD78076 : 48 Kbytes µPD78074B : 32 Kbytes Not provided µPD78078, 78P078 µPD78075B : 40 Kbytes

: 60 Kbytes

Internal expansion RAM size 1024 bytes None

I/O port Total 88 61

CMOS I/O 78 51

N-ch open-drain I/O 8

Pins withNote 1 Pin with pull-up resistor 86 (78 for µPD78P078) 51 additional Medium-voltage pin 8 Not provided functions

LED direct drive output 16 Not provided 4

AVDD pin Provided Not provided Provided

(AVREF0 pin functions alternately)

External Bus mode Selectable from multiplexed bus mode or separate Only separate bus mode expansion bus mode function Memory expansion mode Selectable from four types of memory expansion modes Only full-address mode

ROM correction function Provided Not provided

  • Package
  • 100-pin plastic QFP
  • 100-pin plastic QFP
  • 100-pin plastic QFP
  • (Fine pitch) (14 x 14 mm) Note 2 (Fine pitch) (14 x 14 mm) (Fine pitch) (14 x 14 mm)
  • 100-pin plastic LQFP
  • 100-pin plastic LQFP
  • 100-pin plastic LQFP (Fine pitch) (14 x 14 mm) (Fine pitch) (14 x 14 mm) (Fine pitch) (14 x 14 mm) Note 4
  • 100-pin plastic QFP
  • 100-pin plastic QFP
  • 100-pin plastic QFP (14 x 20 mm) (14 x 20 mm) (14 x 20 mm)
  • 100-pin ceramic WQFN Note 3

Electrical specifications Refer to the data sheet of individual product. Recommended soldering conditions

2. Not available in the Y subseries
3. PROM version only
4. Under development

Item · CMOS input 2

Page 598 of the NEC PD78076Y user manual — [MEMO]
Page 598 · click to enlarge
Page 598

[MEMO]

Page 599 of the NEC PD78076Y user manual — APPENDIX B DEVELOPMENT TOOLS
Page 599 · click to enlarge
Page 599

APPENDIX B DEVELOPMENT TOOLS

The following development tools are available for the development of systems which employ the µPD78078 and

78078Y Subseries. Figure B-1 shows the configuration example of the tools.

Page 600 of the NEC PD78076Y user manual — APPENDIX B DEVELOPMENT TOOLS
Page 600 · click to enlarge
Page 600

APPENDIX B DEVELOPMENT TOOLS

Figure B-1. Development Tool Configuration (1/2)

(1) When using in-circuit emulator IE-78K0-NS

  • Assembler package
  • C compiler package
  • C library source file
  • Device file
  • System simulator
  • Integrated debugger
  • Device file
  • PG-1500 controller
  • Real-time OS
  • OS

Interface adapter, PC card interface, etc.

Show 19 more labels / short text on this page
Language processing software · Debugging tool · PROM programming tool · Embedded software · Host machine (PC) · PROM programming · In-circuit emulator · environment · PROM programmer · Emulation board · Power supply unit · Programmer · adapter · Emulation probe · PROM-contained · version · Conversion socket · or conversion adapter · Target system
Page 601 of the NEC PD78076Y user manual — APPENDIX B DEVELOPMENT TOOLS
Page 601 · click to enlarge
Page 601

APPENDIX B DEVELOPMENT TOOLS

Figure B-1. Development Tool Configuration (2/2)

(2) When using in-circuit emulator IE-78001-R-A

  • Assembler package
  • C compiler package
  • C library source file
  • Device file
  • System simulator
  • Integrated debugger
  • Device file
  • PG-1500 controller
  • Real-time OS
  • OS

Host machine (PC or EWS)

Emulation probe conversion board

Remark The parts shown within broken lines differ depending on the developing environment. Refer to

B.3.1 Hardware.

Show 21 more labels / short text on this page
Language processing software · Debugging tool · PROM programming tool · Embedded software · Interface board · PROM programming · In-circuit emulator · environment · Interface adapter · PROM programmer · Emulation board · I/O board · Programmer · Probe board · adapter · PROM-contained · version · Emulation probe · Conversion socket · or conversion adapter · Target system
Page 602 of the NEC PD78076Y user manual — APPENDIX B DEVELOPMENT TOOLS
Page 602 · click to enlarge
Page 602

APPENDIX B DEVELOPMENT TOOLS

B.1 Language Processing Software

RA78K/0 A program that converts a program written in mnemonic into object

Assembler Package codes that microcomputers can process.

Provided with functions to automatically perform generation of

symbol table, optimizing processing of branch instructions, etc.

Used in combination with separately available Device File (DF78078).

Although Assembler Package is a DOS-based application, it can be

used in a Windows environment through the use of Project Manager

(included in Assembler Package) on Windows.

Part numberµ SxxxxRA78K0

CC78K/0 A program which converts a program written in C language into

C Compiler Package object codes that microcomputers can process.

Used in combination with separately available Assembler Package

and Device File.

Although C Compiler Package is a DOS-based application, it can

be used in Windows environment through the use of Project Manager

(included in Assembler Package) on Windows.

Part numberµ SxxxxCC78K0

DF78078Note A file which contains information peculiar to the device.

Device File Used in combination with separately available tools (RA78K/0,

CC78K/0, SM78K0, ID78K0-NS, ID78K0).

Supporting OS and host machines are dependent on the tool to be

combined with.

Part numberµ SxxxxDF78078

CC78K/0-L A source file of functions which configure the object library included

C Library Source File in C Compiler package.

Required when modifying the object library included in C Compiler

Package for customization.

Since this is a source file, its operation environment is independent

from OS.

Part numberµ SxxxxCC78K0-L

and ID78K0.

Page 603 of the NEC PD78076Y user manual — APPENDIX B DEVELOPMENT TOOLS
Page 603 · click to enlarge
Page 603

APPENDIX B DEVELOPMENT TOOLS

Remark xxxx in the part number differs depending on the host machine and OS used.

µSxxxx CC78K0 µSxxxx DF78078

xxxx Host Machine OS Supply Media

AA13 PC-9800 series Japanese WindowsNotes 1, 2 3.5-inch 2HD FD

AB13 IBM PC/AT™ and Japanese WindowsNotes 1, 2 3.5-inch 2HC FD

BB13 compatibles English WindowsNotes 1, 2

3P16 HP9000 series 700™ HP-UX™ (rel. 9.05) DAT (DDS)

3K13 SPARCstation™ SunOS™ (rel. 4.1.4) 3.5-inch 2HC FD

3R13 NEWS™ (RISC) NEWS-OS™ (rel. 6.1) 3.5-inch 2HC FD

2. Does not support WindowsNT™

µSxxxx RA78K0 · µSxxxx CC78K0-L · 3K15 1/4-inch CGMT

Page 604 of the NEC PD78076Y user manual — B.2.2 Software
Page 604 · click to enlarge
Page 604

APPENDIX B DEVELOPMENT TOOLS

B.2 PROM Writing Tools

B.2.1 Hardware

PG-1500

A PROM programmer that, by connecting the attached board and separately

available PROM programmer adapter, is capable of programming single-

chip microcomputers incorporating a PROM on stand-alone basis or

through operation from the host machine.

Also capable of programming typical 256-Kbit to 4-Mbit PROM.

PA-78P078GC

A PROM programmer adapter for the µPD78P078 and µPD78P078Y.

PA-78P078GF

Used connected to the PG-1500.

PA-78P078KL-T

PA-78P078GC100-pin plastic QFP (GC-7EA, GC-8EU type)
PA-78P078GF100-pin plastic QFP (GF-3BA type)
PA-78P078KL-T100-pin ceramic WQFN (KL-T type)

B.2.2 Software

PG-1500 Controller Connects PG-1500 and the host machine with serial and parallel interface,

and controls the PG-1500 on the host machine.

The PG-1500 controller is a DOS-based application. Use it with the DOS

prompt on Windows.

Part numberµ SxxxxPG1500

Remark xxxx in the part number differs depending on the host machine and OS used.

xxxx Host Machine OS Supply Media

5A13 PC-9800 series MS-DOS 3.5-inch 2HD FD

(ver. 3.30 to ver. 6.2Note)

5B13 IBM PC/AT and Refer to B.4 3.5-inch 2HC FD

above software.

Show 4 more labels / short text on this page
PROM Programmer · PROM Programmer Adapter · µSxxxx PG1500 · compatibles
Page 605 of the NEC PD78076Y user manual — EV-9200GF-100
Page 605 · click to enlarge
Page 605

APPENDIX B DEVELOPMENT TOOLS

B.3 Debugging Tools

B.3.1 Hardware (1/2)

(1) When using in-circuit emulator IE-78K0-NS

An in-circuit emulator to debug hardware and software when developing

application systems that use the 78K/0 Series. Supports integrated

debugger (ID78K0-NS). Used in combination with a power supply unit,

emulation probe, and interface adapter to connect to the host machine.

IE-70000-MC-PS-B

An adapter to supply voltage from AC100 to 240-V outlet.

An adapter required for using a PC-9800 series computer (except notebook-

type personal computer) as the host machine for the IE-78K0-NS.

A PC card and an interface cable required for using PC-9800 series

NS.

An adapter required when using an IBM PC/AT and compatible as the host

machine for the IE-78K0-NS.

A board to emulate peripheral hardware peculiar to the device. Used in

combination with an in-circuit emulator.

NP-100GC

A probe to connect an in-circuit emulator and a target system.

For 100-pin plastic QFP (GC-7EA, GC-8EU type)

A conversion adapter to connect the board of a target system that is

designed to mount 100-pin plastic QFP (GC-7EA, GC-8EU type) and the

(refer to Figure B-2)

NP-100GC.

The µPD78P078KL-T and 78P078YKL-T (ceramic WQFN) can be mounted

instead of connecting NP-100GC.

NP-100GF

A probe to connect an in-circuit emulator and the target system.

For 100-pin plastic QFP (GF-3BA type).

EV-9200GF-100

A conversion socket to connect the board of a target system designed to

mount 100-pin plastic QFP (GF-3BA type) to the NP-100GF.

(refer to Figure B-3)

Remarks 1. The NP-100GC and NP-100GF are products of Naito Densei

Machidaseisakusho Co., Ltd.

ContactNaito Densei Machidaseisakusho Co., Ltd (Tel: (044)822-3813)
2. The TGC-100SDW is a product of TOKYO ELETECH Corporation.

Contact: Daimaru Kogyo Co., Ltd.

Tokyo Electronic Component Department (Tel: (03)3820-7112)

Osaka Electronic Component Department (Tel: (06)244-6672)

3. The TGC-100SDW is sold singly.
4. The EV-9200GF-100 is sold in a set of five.
Show 16 more labels / short text on this page
IE-78K0-NSNote · In-circuit Emulator · Power Supply Adapter · IE-70000-98-IF-CNote · Interface Adapter · IE-70000-CD-IFNote · PC Card Interface · IE-70000-PC-IF-CNote · Interface Adapter · IE-78078-NS-EM1Note · Emulation Board · Emulation Probe · TGC-100SDW Conversion · Adapter · Emulation Probe · Conversion Socket
Page 606 of the NEC PD78076Y user manual — EV-9200GF-100
Page 606 · click to enlarge
Page 606

APPENDIX B DEVELOPMENT TOOLS

B.3.1 Hardware (2/2)

(2) When using in-circuit emulator IE-78001-R-A

An in-circuit emulator to debug hardware and software when developing

application systems that use the 78K/0 Series. Supports integrated

debugger (ID78K0). Used in combination with an interface adapter to

connect to an emulation probe and the host machine.

An adapter required for using a PC-9800 series (except notebook-type

personal computer) as the host machine for the IE-78001-R-A.

An adapter required for using an IBM PC/AT or compatible as the host

machine for the IE-78001-R-A.

IE-78000-R-SV3

An adapter and a cable required for using EWS as the host machine for

the IE-78001-R-A. Used connected to the board in the IE-78001-R-A.

Supports 10Base-5 for EthernetTM. A separately available adapter required

for other systems.

A board to emulate peripheral hardware peculiar to the device. Used in

combination with an in-circuit emulator and emulation probe conversion

board.

A board required for using the IE-78078-NS-EM1 with the IE-78001-R-A

IE-78078-R-EM

A board to emulate peripheral hardware peculiar to the device (supports

3.0 to 5.5 V). Used in combination with the IE-78001-R-A.

EP-78064GC-R

A probe to connect an in-circuit emulator and the target system.

For 100-pin plastic QFP (GC-7EA, GC-8EU type).

TGC-100SDW

A conversion adapter to connect the board of a target system designed

to mount 100-pin plastic QFP (GC-7EA, GC-8EU type) and the EP-

(refer to Figure B-2)

78064GC-R.

The µPD78P078KL-T or 78P078YKL-T (ceramic WQFN) can be mounted

instead of connecting the EP-78064GC-R.

EP-78064GF-R

A probe to connect an in-circuit emulator and the target system.

For 100-pin plastic QFP (GF-3BA type).

EV-9200GF-100

A conversion socket to connect the board of a target system designed to

mount 100-pin plastic QFP (GF-3BA type) to the EP-78064GF-R.

(refer to Figure B-3)

Remarks 1. The TGK-100SDW is a product of TOKYO ELETECH Corporation.

Contact: Daimaru Kogyo Co., Ltd.

Tokyo Electronic Component Department (Tel: (03)3820-7112)

Osaka Electronic Component Department (Tel: (06)244-6672)

2. The TGC-100SDW is sold singly.
3. The EV-9200GF-100 is sold in a set of five.
Show 19 more labels / short text on this page
IE-78001-R-ANote · In-circuit Emulator · IE-70000-98-IF-B or IE-70000-98- · IF-CNote · Interface Adapter · IE-70000-PC-IF-B or IE-70000-PC- · IF-CNote · Interface adapter · Interface Adapter · IE-78078-NS-EM1Note · Emulation Board · IE-78K0-R-EX1Note · Emulation Probe Conversion · Board · Emulation board · Emulation Probe · Conversion Adapter · Emulation Probe · Conversion Socket
Page 607 of the NEC PD78076Y user manual — APPENDIX B DEVELOPMENT TOOLS
Page 607 · click to enlarge
Page 607

APPENDIX B DEVELOPMENT TOOLS

B.3.2 Software (1/2)

SM78K0 Capable of debugging in C source level or assembler level while simulating

System Simulator the operation of the target system on the host machine.

The SM78K0 operates on Windows.

The use of the SM78K0 enables the verification of logic and performance

of applications independently from hardware development without using

in-circuit emulator and improves the development efficiency and the

software quality.

Used in combination with separately available Device File (DF78078).

Part numberµ SxxxxSM78K0

Remark xxxx in the part number differs depending on the host machine and OS used.

xxxx Host Machine OS Supply Media

AA13 PC-9800 series Japanese WindowsNotes 1, 2 3.5-inch 2HD FD

AB13 IBM PC/AT and Japanese WindowsNotes 1, 2 3.5-inch 2HC FD

BB13 compatible English WindowsNote

µSxxxx SM78K0

Page 608 of the NEC PD78076Y user manual — IE-78001-R-A)
Page 608 · click to enlarge
Page 608

APPENDIX B DEVELOPMENT TOOLS

B.3.2 Software (2/2)

A control program to debug the 78K/0 Series.

Adopting Windows on personal computers and OSF/Motif™ on EWS as

graphical user interface, presents the appearance and the operability

IE-78K0-NS)

conforming to them. Enhancing the debugging function that supports C

ID78K0

language, the trace result can be displayed in the C language level by

using window integration function which correlates the source program,

disassembly display, and memory display to the trace result. In addition,

IE-78001-R-A)

the debugging efficiency of programs using real-time OS can be improved

by integrating function extension modules such as task debuggers and

system performance analyzers.

Used in combination with separately available Device File (DF78078).

Part number: µSxxxxID78K0-NS, µSxxxxID78K0.

Remark xxxx in the part number differs depending on the host machine and OS used.

xxxx Host Machine OS Supply Media

AA13 PC-9800 series Japanese WindowsNote 3.5-inch 2HD FD

AB13 IBM PC/AT and Japanese WindowsNote 3.5-inch 2HC FD

BB13 compatible English WindowsNote

xxxx Host Machine OS Supply Media

AA13 PC-9800 series Japanese WindowsNote 3.5-inch 2HD FD

AB13 IBM PC/AT and Japanese WindowsNote 3.5-inch 2HC FD

BB13 compatible English WindowsNote

3P16 HP9000 series 700 HP-UX (Rel. 9.05) DAT (DDS)

3K13 SPARCstation SunOS (Rel. 4.1.4) 3.5-inch 2HC FD

3R13 NEWS (RISC) NEWS-OS (Rel. 6.1) 3.5-inch 2HC FD

Show 8 more labels / short text on this page
ID78K0-NSNote · Integrated debugger · (supporting in-circuit emulator · Integrated Debugger · (supporting in-circuit emulator · µSxxxx ID78K0-NS · µSxxxx ID78K0 · 3K15 1/4-inch CGMT
Page 609 of the NEC PD78076Y user manual — B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-A
Page 609 · click to enlarge
Page 609

APPENDIX B DEVELOPMENT TOOLS

B.4 OS for IBM PC

The following OSs are supported for IBM PC.

Table B-1. OS for IBM PC

PC DOS Ver. 5.02 to Ver. 6.3

J6.1/VNote to J6.3/VNote

IBM DOS™ J5.02/VNote

MS-DOS Ver. 5.0 to Ver. 6.22

5.0/VNote to 6.2/VNote

with the above software.

B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-A

If the user already owns a former-type in-circuit emulator for the 78K/0 Series (IE-78000-R or IE-78000-R-A),

it can be used in the same manner as the IE-78001-R-A by replacing the break board inside the main unit with the

IE-78001-R-BK (under development).

Table B-2. System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-A

In-circuit Unit Owned System Upgrading of EnclosureNote Board to be Purchased

OS Version · IE-78000-R Required IE-78001-R-BK · IE-78000-R-A Not required

Page 610 of the NEC PD78076Y user manual — APPENDIX B DEVELOPMENT TOOLS
Page 610 · click to enlarge
Page 610

APPENDIX B DEVELOPMENT TOOLS

Drawing for Conversion Adapter (TGC-100SDW)

Figure B-2. TGC-100SDW Drawing (For Reference Only)

TGC-100SDW (TQPACK100SD + TQSOCKET100SDW) Package dimension (unit: mm)

NEC PD78076Y — APPENDIX B DEVELOPMENT TOOLS diagram (page 610)
Fig. 25
Page 611 of the NEC PD78076Y user manual — EV-9200GF-100-G0
Page 611 · click to enlarge
Page 611

APPENDIX B DEVELOPMENT TOOLS

Socket Drawing and Recommended Footprints (EV-9200GF-100)

Figure B-3. EV-9200GF-100 Drawing (For Reference Only)

A

NEC PD78076Y — APPENDIX B DEVELOPMENT TOOLS diagram (page 611)
Fig. 26
NEC PD78076Y — APPENDIX B DEVELOPMENT TOOLS diagram (page 611)
Fig. 27

EV-9200GF-100-G0

NEC PD78076Y — EV-9200GF-100-G0 diagram (page 611)
Fig. 28
Page 612 of the NEC PD78076Y user manual — Caution
Page 612 · click to enlarge
Page 612

APPENDIX B DEVELOPMENT TOOLS

Figure B-4. EV-9200GF-100 Recommended Footprints (For Reference Only)

Based on EV-9200GF-100 (2) Pad drawing (in mm)

G

J

K

F

E

D

H

A B

EV-9200GF-100-P1

ITEM MILLIMETERS INCHES

A

B

0.65 ± 0.02 x 29 = 18.85 ± 0.05

0.026 x 1.142 = 0.742

+0.001 –0.002

+0.002 –0.002

D

0.65 ± 0.02 x 19 = 12.35 ± 0.05

0.026 x 0.748 = 0.486

+0.001 –0.002

+0.003 –0.002

E

F

12 ± 0.05

+0.003 –0.002

G

H

6 ± 0.05

+0.003 –0.002

0.35 ± 0.02

+0.001 –0.001

J

2.36±0.03

+0.001 –0.002

K

1.57 ± 0.03

+0.001 –0.002

Caution

Dimensions of mount pad for EV-9200 and that for target device (QFP) may be different in some parts. For the recommended mount pad dimensions for QFP, refer to “SEMICONDUCTOR DEVICE MOUNTING TECHNOLOGY MANUAL” (C10535E).

Show 6 more labels / short text on this page
φ · φ · φ · φ · φ · φ
Page 613 of the NEC PD78076Y user manual — 001M 1,000,000
Page 613 · click to enlarge
Page 613

APPENDIX C EMBEDDED SOFTWARE

For efficient program development and maintenance of the µPD78078, 78078Y Subseries, the following

embedded software is available.

Real-time OS (1/2)

RX78K/0 A real-time OS conforming to µITRON specifications.

Real-time OS Added with the tool (configurator) to create the RX78K/0 nucleus and multiple information table.

Used in combination with separately available Assembler Package (RA78K/0) and Device File

(DF78078).

<Precautions for the use in PC environment>

Real-time OS is a DOS-based application. Use it with DOS prompt on Windows.

Part numberµ SxxxxRX78013- ∆∆∆∆

License Agreement.

Remark xxxx and ∆∆∆∆ in the part number differs depending on the host machine and OS used.

∆∆∆∆ Product Outline Max. No. for Use in Mass Production

001 Evaluation object Do not use for mass production.

100K Mass-production object 100,000

001M 1,000,000

010M 10,000,000

S01 Source program Source program for mass-production object

xxxx Host Machine OS Supply Media

AA13 PC-9800 series Japanese Windows Notes1, 2 3.5-inch 2HD FD

AB13 IBM PC/AT and Japanese Windows Notes1, 2 3.5-inch 2HC FD

BB13 compatibles English WindowsNotes1, 2

3P16 HP9000 series 700 HP-UX (Rel. 9.05) DAT (DDS)

3K13 SPARCstation SunOS (Rel. 4.1.4) 3.5-inch 2HC FD

3R13 NEWS (RISC) NEWS-OS (Rel. 6.1) 3.5-inch 2HC FD

2. Does not support WindowsNT.

µSxxxxRX78013-∆∆∆∆ · 3K15 1/4-inch CGMT · 3R15 1/4-inch CGMT

Page 614 of the NEC PD78076Y user manual — <Precautions for the use in PC environment>
Page 614 · click to enlarge
Page 614

APPENDIX C EMBEDDED SOFTWARE

Real-time OS (2/2)

MX78K0 A µITRON specification subset OS. Added with MX78K0 nucleus.

OS Performs task management, event management, and time management. In task management,

controls the execution order of tasks and performs processing to change the task to the one

executed next.

<Precautions for the use in PC environment>

The MX78K0 is a DOS-based application. Use it with DOS prompt on Windows.

Part numberµ SxxxxMX78K0- ∆∆∆

Remark xxxx and ∆∆∆ in the part number differs depending on the host machine and OS used.

∆∆∆ Product outline Max. No. for Use in Mass Production

001 Evaluation object Use for preproduction.

xx Mass-production object Use for mass production.

S01 Source program Can be purchased only when purchasing

mass-produced object.

xxxx Host Machine OS Supply Media

AA13 PC-9800 series Japanese Windows Notes1, 2 3.5-inch 2HD FD

AB13 IBM PC/AT and Japanese Windows Notes1, 2 3.5-inch 2HC FD

BB13 compatibles English WindowsNotes1, 2

3P16 HP9000 series 700 HP-UX (Rel. 9.05) DAT (DOS)

3K13 SPARCstation SunOS (Rel. 4.1.4) 3.5-inch 2HC FD

3R13 NEWS (RISC) NEWS-OS (Rel. 6.1) 3.5-inch 2HC FD

2. Does not support WindowsNT.

µSxxxxMX78K0-∆∆∆ · 3K15 1/4-inch CGMT

Page 615 of the NEC PD78076Y user manual — Table of contents
Page 615 · click to enlarge
Page 615

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 616 of the NEC PD78076Y user manual — Table of contents
Page 616 · click to enlarge
Page 616

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 617 of the NEC PD78076Y user manual — Table of contents
Page 617 · click to enlarge
Page 617

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 618 of the NEC PD78076Y user manual — Table of contents
Page 618 · click to enlarge
Page 618

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 619 of the NEC PD78076Y user manual — Table of contents
Page 619 · click to enlarge
Page 619

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 620 of the NEC PD78076Y user manual — Table of contents
Page 620 · click to enlarge
Page 620

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 621 of the NEC PD78076Y user manual — Table of contents
Page 621 · click to enlarge
Page 621

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 622 of the NEC PD78076Y user manual — Table of contents
Page 622 · click to enlarge
Page 622

Table of contents

COVERp.1Major Revisions in This Editionp.6INTRODUCTIONp.7CHAPTER 1 OUTLINE (uPD78078 SUBSERIES)p.331.1 Featuresp.331.2 Application Fieldsp.341.3 Ordering Informationp.341.4 Quality Gradep.351.5 Pin Configuration (Top View)p.361.6 78K/0 Series Expansionp.421.7 Block Diagramp.441.8 Outline of Functionp.451.9 Mask Optionsp.471.10 Differences with uPD78054 Subseriesp.47CHAPTER 2 OUTLINE (uPD78078Y SUBSERIES)p.492.1 Featuresp.492.2 Application Fieldsp.502.3 Ordering Informationp.502.4 Quality Gradep.512.5 Pin Configuration (Top View)p.522.6 78K/0 Series Expansionp.582.7 Block Diagramp.602.8 Outline of Functionp.612.9 Mask Optionsp.632.10 Differences with uPD78054Y Subseriesp.63CHAPTER 3 PIN FUNCTION (uPD78078 SUBSERIES)p.653.1 Pin Function Listp.653.1.1 Normal operating mode pinsp.653.1.2 PROM programming mode pins (uPD78P078 only)p.693.2 Description of Pin Functionsp.703.2.1 P00 to P07 (Port 0)p.703.2.2 P10 to P17 (Port 1)p.703.2.3 P20 to P27 (Port 2)p.713.2.4 P30 to P37 (Port 3)p.723.2.5 P40 to P47 (Port 4)p.723.2.6 P50 to P57 (Port 5)p.733.2.7 P60 to P67 (Port 6)p.733.2.8 P70 to P72 (Port 7)p.743.2.9 P80 to P87 (Port 8)p.743.2.10 P90 to P96 (Port 9)p.753.2.11 P100 to P103 (Port 10)p.753.2.12 P120 to P127 (Port 12)p.753.2.13 P130 and P131 (Port 13)p.763.2.14 AVREF0p.763.2.15 AVREF1p.763.2.16 AVDDp.763.2.17 AVSSp.763.2.18 RESET#p.763.2.19 X1 and X2p.763.2.20 XT1 and XT2p.763.2.21 VDDp.773.2.22 VSSp.773.2.23 VPP (uPD78P078 only)p.773.2.24 IC (Mask ROM version only)p.773.3 Input/output Circuits and Recommended Connection of Unused Pinsp.78CHAPTER 4 PIN FUNCTION (uPD78078Y SUBSERIES)p.834.1 Pin Function Listp.834.1.1 Normal operating mode pinsp.834.1.2 PROM programming mode pins (uPD78P078Y only)p.874.2 Description of Pin Functionsp.884.2.1 P00 to P07 (Port 0)p.884.2.2 P10 to P17 (Port 1)p.884.2.3 P20 to P27 (Port 2)p.894.2.4 P30 to P37 (Port 3)p.904.2.5 P40 to P47 (Port 4)p.904.2.6 P50 to P57 (Port 5)p.914.2.7 P60 to P67 (Port 6)p.914.2.8 P70 to P72 (Port 7)p.924.2.9 P80 to P87 (Port 8)p.924.2.10 P90 to P96 (Port 9)p.934.2.11 P100 to P103 (Port 10)p.934.2.12 P120 to P127 (Port 12)p.934.2.13 P130 and P131 (Port 13)p.944.2.14 AVREF0p.944.2.15 AVREF1p.944.2.16 AVDDp.944.2.17 AVSSp.944.2.18 RESET#p.944.2.19 X1 and X2p.944.2.20 XT1 and XT2p.944.2.21 VDDp.954.2.22 VSSp.954.2.23 VPP (uPD78P078Y only)p.954.2.24 IC (Mask ROM version only)p.954.3 Input/output Circuits and Recommended Connection of Unused Pinsp.96CHAPTER 5 CPU ARCHITECTUREp.1015.1 Memory Spacesp.1015.1.1 Internal program memory spacep.1045.1.2 Internal data memory spacep.1065.1.3 Special function register (SFR) areap.1065.1.4 External memory spacep.1065.1.5 Data memory addressingp.1075.2 Processor Registersp.1105.2.1 Control registersp.1105.2.2 General registersp.1135.2.3 Special function register (SFR)p.1145.3 Instruction Address Addressingp.1185.3.1 Relative addressingp.1185.3.2 Immediate addressingp.1195.3.3 Table indirect addressingp.1205.3.4 Register addressingp.1215.4 Operand Address Addressingp.1225.4.1 Implied addressingp.1225.4.2 Register addressingp.1235.4.3 Direct addressingp.1245.4.4 Short direct addressingp.1255.4.5 Special function register (SFR) addressingp.1265.4.6 Register indirect addressingp.1275.4.7 Based addressingp.1285.4.8 Based indexed addressingp.1295.4.9 Stack addressingp.129CHAPTER 6 PORT FUNCTIONSp.1316.1 Port Functionsp.1316.2 Port Configurationp.1366.2.1 Port 0p.1366.2.2 Port 1p.1386.2.3 Port 2 (uPD78078 Subseries)p.1396.2.4 Port 2 (uPD78078Y Subseries)p.1416.2.5 Port 3p.1436.2.6 Port 4p.1446.2.7 Port 5p.1456.2.8 Port 6p.1466.2.9 Port 7p.1486.2.10 Port 8p.1506.2.11 Port 9p.1516.2.12 Port 10p.1536.2.13 Port 12p.1556.2.14 Port 13p.1566.3 Port Function Control Registersp.1576.4 Port Function Operationsp.1636.4.1 Writing to input/output portp.1636.4.2 Reading from input/output portp.1636.4.3 Operations on input/output portp.1636.5 Selection of Mask Optionp.164CHAPTER 7 CLOCK GENERATORp.1657.1 Clock Generator Functionsp.1657.2 Clock Generator Configurationp.1667.3 Clock Generator Control Registerp.1677.4 System Clock Oscillatorp.1717.4.1 Main system clock oscillatorp.1717.4.2 Subsystem clock oscillatorp.1727.4.3 Dividerp.1747.4.4 When no subsystem clocks are usedp.1747.5 Clock Generator Operationsp.1757.5.1 Main system clock operationsp.1767.5.2 Subsystem clock operationsp.1777.6 Changing System Clock and CPU Clock Settingsp.1787.6.1 Time required for switchover between system clock and CPU clockp.1787.6.2 System clock and CPU clock switching procedurep.179CHAPTER 8 16-BIT TIMER/EVENT COUNTERp.1818.1 Outline of Timers Incorporated into uPD78078, 78078Y Subseriesp.1818.2 16-Bit Timer/Event Counter Functionsp.1838.3 16-Bit Timer/Event Counter Configurationp.1858.4 16-Bit Timer/Event Counter Control Registersp.1908.5 16-Bit Timer/Event Counter Operationsp.1988.5.1 Interval timer operationsp.1988.5.2 PWM output operationsp.2008.5.3 PPG output operationsp.2038.5.4 Pulse width measurement operationsp.2048.5.5 External event counter operationp.2118.5.6 Square-wave output operationp.2138.5.7 One-shot pulse output operationp.2158.6 16-Bit Timer/Event Counter Operating Precautionsp.219CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2p.2239.1 8-Bit Timer/Event Counters 1 and 2 Functionsp.2239.1.1 8-bit timer/event counter modep.2239.1.2 16-bit timer/event counter modep.2269.2 8-Bit Timer/Event Counters 1 and 2 Configurationsp.2289.3 8-Bit Timer/Event Counters 1 and 2 Control Registersp.2319.4 8-Bit Timer/Event Counters 1 and 2 Operationsp.2369.4.1 8-bit timer/event counter modep.2369.4.2 16-bit timer/event counter modep.2429.5 8-Bit Timer/Event Counters 1 and 2 Precautionsp.246CHAPTER 10 8-BIT TIMER/EVENT COUNTERS 5 AND 6p.24910.1 8-Bit Timer/Event Counters 5 and 6 Functionsp.24910.2 8-Bit Timer/Event Counters 5 and 6 Configurationsp.25210.3 8-Bit Timer/Event Counters 5 and 6 Control Registersp.25410.4 8-Bit Timer/Event Counters 5 and 6 Operationsp.25910.4.1 Interval timer operationsp.25910.4.2 External event counter operationp.26110.4.3 Square-wave outputp.26210.4.4 PWM output operationsp.26410.5 8-Bit Timer/Event Counters 5 and 6 Precautionsp.267CHAPTER 11 WATCH TIMERp.26911.1 Watch Timer Functionsp.26911.2 Watch Timer Configurationp.27011.3 Watch Timer Control Registersp.27111.4 Watch Timer Operationsp.27411.4.1 Watch timer operationp.27411.4.2 Interval timer operationp.274CHAPTER 12 WATCHDOG TIMERp.27512.1 Watchdog Timer Functionsp.27512.2 Watchdog Timer Configurationp.27712.3 Watchdog Timer Control Registersp.27812.4 Watchdog Timer Operationsp.28112.4.1 Watchdog timer operationp.28112.4.2 Interval timer operationp.282CHAPTER 13 CLOCK OUTPUT CONTROL CIRCUITp.28313.1 Clock Output Control Circuit Functionsp.28313.2 Clock Output Control Circuit Configurationp.28413.3 Clock Output Function Control Registersp.285CHAPTER 14 BUZZER OUTPUT CONTROL CIRCUITp.28914.1 Buzzer Output Control Circuit Functionsp.28914.2 Buzzer Output Control Circuit Configurationp.28914.3 Buzzer Output Function Control Registersp.290CHAPTER 15 A/D CONVERTERp.29315.1 A/D Converter Functionsp.29315.2 A/D Converter Configurationp.29315.3 A/D Converter Control Registersp.29615.4 A/D Converter Operationsp.30015.4.1 Basic operations of A/D converterp.30015.4.2 Input voltage and conversion resultsp.30215.4.3 A/D converter operating modep.30315.5 A/D Converter Cautionsp.305CHAPTER 16 D/A CONVERTERp.30916.1 D/A Converter Functionsp.30916.2 D/A Converter Configurationp.31016.3 D/A Converter Control Registersp.31216.4 D/A Converter Operationsp.31316.5 D/A Converter Cautionsp.314CHAPTER 17 SERIAL INTERFACE CHANNEL 0 (uPD78078 SUBSERIES)p.31517.1 Serial Interface Channel 0 Functionsp.31617.2 Serial Interface Channel 0 Configurationp.31817.3 Serial Interface Channel 0 Control Registersp.32117.4 Serial Interface Channel 0 Operationsp.32817.4.1 Operation stop modep.32817.4.2 3-wire serial I/O mode operationp.32917.4.3 SBI mode operationp.33317.4.4 2-wire serial I/O mode operationp.35717.4.5 SCK0#/P27 pin output manipulationp.363CHAPTER 18 SERIAL INTERFACE CHANNEL 0 (uPD78078Y Subseries)p.36518.1 Serial Interface Channel 0 Functionsp.36618.2 Serial Interface Channel 0 Configurationp.36818.3 Serial Interface Channel 0 Control Registersp.37218.4 Serial Interface Channel 0 Operationsp.38018.4.1 Operation stop modep.38018.4.2 3-wire serial I/O mode operationp.38118.4.3 2-wire serial I/O mode operationp.38518.4.4 I2C bus mode operationp.39018.4.5 Cautions on use of I2C bus modep.40818.4.6 Restrictions in I2C bus modep.41118.4.7 SCK0#/SCL/P27 pin output manipulationp.413CHAPTER 19 SERIAL INTERFACE CHANNEL 1p.41519.1 Serial Interface Channel 1 Functionsp.41519.2 Serial Interface Channel 1 Configurationp.41619.3 Serial Interface Channel 1 Control Registersp.41819.4 Serial Interface Channel 1 Operationsp.42519.4.1 Operation stop modep.42519.4.2 3-wire serial I/O mode operationp.42619.4.3 3-wire serial I/O mode operation with automatic transmit/receive functionp.429CHAPTER 20 SERIAL INTERFACE CHANNEL 2p.45720.1 Serial Interface Channel 2 Functionsp.45720.2 Serial Interface Channel 2 Configurationp.45820.3 Serial Interface Channel 2 Control Registersp.46120.4 Serial Interface Channel 2 Operationp.46920.4.1 Operation stop modep.46920.4.2 Asynchronous serial interface (UART) modep.47120.4.3 3-wire serial I/O modep.48420.4.4 Restrictions on using UART modep.491CHAPTER 21 REAL-TIME OUTPUT PORTp.49521.1 Real-Time Output Port Functionsp.49521.2 Real-Time Output Port Configurationp.49521.3 Real-Time Output Port Control Registersp.497CHAPTER 22 INTERRUPT FUNCTIONSp.49922.1 Interrupt Function Typesp.49922.2 Interrupt Sources and Configurationp.50022.3 Interrupt Function Control Registersp.50422.4 Interrupt Servicing Operationsp.51322.4.1 Non-maskable interrupt request acknowledge operationp.51322.4.2 Maskable interrupt request acknowledge operationp.51622.4.3 Software interrupt request acknowledge operationp.51822.4.4 Multiple interrupt servicingp.51922.4.5 Interrupt request reservep.52222.5 Test Functionsp.52322.5.1 Registers controlling the test functionp.52322.5.2 Test input signal acknowledge operationp.525CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTIONp.52723.1 External Device Expansion Functionsp.52723.2 External Device Expansion Function Control Registerp.53123.3 External Device Expansion Function Timingp.53423.3.1 Timings in multiplexed bus modep.53423.3.2 Timings in separate bus modep.539CHAPTER 24 STANDBY FUNCTIONp.54524.1 Standby Function and Configurationp.54524.1.1 Standby functionp.54524.1.2 Standby function control registerp.54624.2 Standby Function Operationsp.54724.2.1 HALT modep.54724.2.2 STOP modep.550CHAPTER 25 RESET FUNCTIONp.55325.1 Reset Functionp.553CHAPTER 26 ROM CORRECTIONp.55926.1 ROM Correction Functionsp.55926.2 ROM Correction Configurationp.55926.3 ROM Correction Control Registersp.56126.4 ROM Correction Applicationp.56226.5 ROM Correction Examplep.56526.6 Program Execution Flowp.56626.7 Cautions on ROM Correctionp.568CHAPTER 27 uPD78P078, 78P078Yp.56927.1 Internal Memory Size Switching Registerp.57027.2 Internal Extension RAM Size Switching Registerp.57127.3 PROM Programmingp.57227.3.1 Operating modesp.57227.3.2 PROM write procedurep.57427.3.3 PROM reading procedurep.57827.4 Erasure Procedure (uPD78P078KL-T and 78P078YKL-T Only)p.57927.5 Opaque Film Masking Window (uPD78P078KL-T and 78P078YKL-T Only)p.57927.6 Screening of One-Time PROM Versionsp.579CHAPTER 28 INSTRUCTION SETp.58128.1 Legends Used in Operation Listp.58228.1.1 Operand identifiers and descriptionp.58228.1.2 Description of "operation" columnp.58323.1.3 Description of "flag operation" columnp.58328.2 Operation Listp.58428.3 Instructions Listed by Addressing Typep.592APPENDIX A DIFFERENCES BETWEEN uPD78078, 78075B SUBSERIES, AND uPD78070Ap.597APPENDIX B DEVELOPMENT TOOLSp.599B.1 Language Processing Softwarep.602B.2 PROM Writing Toolsp.604B.2.1 Hardwarep.604B.2.2 Softwarep.604B.3 Debugging Toolsp.605B.3.1 Hardwarep.605B.3.2 Softwarep.607B.4 OS for IBM PCp.609B.5 System Upgrading from Former-type In-circuit Emulator for 78K/0 Series to IE-78001-R-Ap.609APPENDIX C EMBEDDED SOFTWAREp.613APPENDIX D REGISTER INDEXp.615D.1 Register Name Indexp.615D.2 Register Symbol Indexp.619APPENDIX E REVISION HISTORYp.623
Page 623 of the NEC PD78076Y user manual — EXPANSION FUNCTION
Page 623 · click to enlarge
Page 623

APPENDIX E REVISION HISTORY

The revision history is shown below. The chapters appearing in the chapter column indicate those of the

corresponding edition.

Version Major revisions from previous version Chapter

Second µPD78076, 78078, 78P078:

Under development → Developed

µPD78074, 78075, 78074Y, 78075Y, 78076Y, 78078Y, 78P078Y

have been added as new members of this subseries.

Supply voltage (VDD) range has been changed:

2.0 to 6.0 V → 1.8 to 5.5 V

1.9 Mask Options has been added.

CHAPTER 1 OUTLINE

(µPD78078 SUBSERIES)

1.10 Differences with µPD78054 Subseries has been added.

CHAPTER 3 PIN FUNCTION

been added.

(µPD78078 SUBSERIES)

CHAPTER 6 PORT FUNCTIONS

CHAPTER 16 D/A CONVERTER

Change has been made to recommended connection of unused

CHAPTER 3 PIN FUNCTION

pins.

(µPD78078 SUBSERIES)

Change has been made to recommended connection of unused

pins for P130/ANO0 and P131/ANO1 pins.

CHAPTER 6 PORT FUNCTIONS

added.

CHAPTER 7

Selection Register Format.

CLOCK GENERATER

clock source has been corrected.

CHAPTER 24 STANDBY FUNCTION

The count clocks of 8-bit timer/event counters 5 and 6 have

CHAPTER 10 8-BIT TIMER/

been corrected.

EVENT COUNTERS 5 AND 6

A/D converter mode register format has been modified.

CHAPTER 15 A/D CONVERTER

15.5 (7) AV DD pin has been modified, and Figure 15-12. Handling

of AVDD Pin has been added.

Serial operating mode register 0 format has been modified.

CHAPTER 17 SERIAL INTERFACE

Figure 17-34. SCK0/P27 Pin Configuration has been corrected.

CHANNEL 0 (µPD78078 SUBSERIES)

The baud rate transmit/receive clock range that can be generated

CHAPTER 20

using the main system clock has been modified:

SERIAL INTERFACE CHANNEL 2

75 bps to 38400 → 75 bps to 76800 bps

CHAPTER 23 EXTERNAL DEVICE EXPANSION FUNCTION

CHAPTER 23

has been re-arranged so that the multiplexed bus mode and

EXTERNAL DEVICE

the separate bus mode are explained separately.

EXPANSION FUNCTION

23.4 Example of Connection with Memory has been modified.

Throughout this document

Page 624 of the NEC PD78076Y user manual — EMBEDDED SOFTWARE
Page 624 · click to enlarge
Page 624

APPENDIX E REVISION HISTORY

Version Major revisions from previous version Chapter

Second Table 24-1. HALT Mode Operating Status has been modified.

CHAPTER 24

Table 24-3. STOP Mode Operating Status has been modified.

STANDBY FUNCTION

CHAPTER 26 ROM CORRECTION has been added.

The development statuses for the following products have been

APPENDIX A

changed from “Under Development” to “Developed”.

DEVELOPMENT TOOLS

PA-78P078GC, PA-78P078GF, PA-78P078KL-T,

IE-78078-R-EM, DF78078

The following products have been defined as products for

maintenance purposes only.

IE-75000-R, IE-78230-R, IE-78240-R, IE-78320-R, IE-78330-R

A system simulator (SM78K0) has been added.

A.4 Operating Systems for IBM PC has been added.

HP9000 Series 700 has been added as a host machine on

APPENDIX B

which the software can run.

EMBEDDED SOFTWARE

An operating system (MX78K0) has been added.

Third The µPD78074 and 78075 have been deleted.

The following package has been added to the µPD78078 subseries.

100-pin plastic LQFP (fine pitch) (14 x 14 mm, resin thickness

1.4 mm) (planned)

Description has been added to the caution of Figure 8-6. 16-

CHAPTER 8 16-BIT TIMER/

Bit Timer Output Control Register Format.

EVENT COUNTER

Figure 12-3. Watchdog Timer Mode Register Format has

CHAPTER 12

been changed, and caution has been added.

WATCHDOG TIMER

CHAPTER 18

µPD78078Y subseries.

SERIAL INTERFACE CHANNEL 0

(µPD78078Y SUBSERIES)

Figure 18-22. Example of Communication from Master to Slave

(with 9-clock wait selected for both master and slave) has

been corrected.

Figure 18-23. Example of Communication from Slave to Master

(with 9-clock wait selected for both master and slave) has

been corrected.

18.4.6 Restrictions in I2C bus mode has been added.

CHAPTER 19

Transmit/Receive Interval Specify Register Format.

SERIAL INTERFACE CHANNEL 1

Description related to the port mode register 12 (PM12) has

CHAPTER 21

been added.

REAL-TIME OUTPUT PORT

The following products have been added.

APPENDIX A

IE-78000-R-A, IE-70000-98-IF-B, IE-70000-98N-IF-B,

DEVELOPMENT TOOLS,

IE-70000-PC-IF-B, IE-78000-R-SV3, ID78K0

APPENDIX B

The versions of the supported OS have been changed.

EMBEDDED SOFTWARE

Throughout this document

Page 625 of the NEC PD78076Y user manual — EMBEDDED SOFTWARE
Page 625 · click to enlarge
Page 625

APPENDIX E REVISION HISTORY

Edition Major revisions from previous edition Chapter

Fourth The following products have been changed from “under

development” to “already developed”.

µ PD78078Y Subseriesµ PD78076Y, 78078Y, 78P078Y

The following package has been added to the µPD78078Y

Subseries.

100-pin plastic LQFP (Fine pitch)

(14 x 14 mm, resin thickness 1.4 mm)

Block diagrams of ports have been changed.

CHAPTER 6 PORT FUNCTION

Figure 6-5. Block Diagram of P20, P21, P23 to P26,

Figure 6-6. Block Diagram of P22 and P27,

Figure 6-7. Block Diagram of P20, P21, P23 to P26,

Figure 6-8. Block Diagram of P22 and P27,

Figure 6-9. Block Diagram of P30 to P37,

Figure 6-16. Block Diagram of P71 and P72,

Figure 6-20. Block Diagram of P100 and P101

Table 7-2. Relationship between CPU clock and Minimum

CHAPTER 7

Instruction Execution Time has been added.

CLOCK GENERATION CIRCUIT

Precautions for changing the operation mode of the serial

CHAPTER 17

interface channel 0 have been added.

SERIAL INTERFACE CHANNEL 0

(µPD78078 SUBSERIES),

CHAPTER 18

SERIAL INTERFACE CHANNEL 0

(µPD78078Y SUBSERIES)

Release conditions of busy mode of the serial interface channel

CHAPTER 17

0 (in SBI mode) have been changed.

SERIAL INTERFACE CHANNEL 0

(µPD78078 SUBSERIES)

signal (CMD) are misrecognized due to the bus line changing

timing has been added.

Conditions and timings for the generation of interrupt request

CHAPTER 20

(INTSR, INTSER) when a reception error is generated have

SERIAL INTERFACE CHANNEL 2

been corrected.

Precautions for using UART mode have been added.

Precautions for replacing PROM versions with mask ROM versions

CHAPTER 27

have been added.

APPENDIX A DIFFERENCES BETWEEN µ PD78078,

APPENDIX A DIFFERENCES

78075B SUBSERIES and µPD78070A has been added.

BETWEEN µPD78078, 78075B

SUBSERIES AND µPD78070A

Entirely revisedSupports in-circuit emulator IE-78K0-NS

APPENDIX B

DEVELOPMENT TOOLS

Entirely revisedFuzzy inference developing support system

APPENDIX C

has been deleted.

EMBEDDED SOFTWARE

Throughout · µPD78P078, 78P078Y

Page 626 of the NEC PD78076Y user manual — [MEMO]
Page 626 · click to enlarge
Page 626

[MEMO]

Page 627 of the NEC PD78076Y user manual — CS 97.8
Page 627 · click to enlarge
Page 627

Facsimile Message

Although NEC has taken all possible steps to ensure that the documentation supplied to our customers is complete, bug free and up-to-date, we readily accept that errors may occur. Despite all the care and precautions we've taken, you may encounter problems in the documentation. Please complete this form whenever you'd like to report errors or suggest improvements to us.

From:

Tel. FAX

Thank you for your kind support.

North America NEC Electronics Inc. Corporate Communications Dept. Fax: 1-800-729-9288

Hong Kong, Philippines, Oceania NEC Electronics Hong Kong Ltd. Fax: +852-2886-9022/9044

Asian Nations except Philippines NEC Electronics Singapore Pte. Ltd. Fax: +65-250-3583

Korea NEC Electronics Hong Kong Ltd. Seoul Branch Fax: 02-528-4411

Japan NEC Corporation Semiconductor Solution Engineering Division Technical Information Support Dept. Fax: 044-548-7900

Europe NEC Electronics (Europe) GmbH Technical Documentation Dept. Fax: +49-211-6503-274

South America NEC do Brasil S.A. Fax: +55-11-6465-6829

Taiwan NEC Electronics Taiwan Ltd. Fax: 02-719-5951

I would like to report the following error/make the following suggestion:

Document title:

Document number: Page number:

If possible, please fax the referenced page or drawing.

Excellent Good Acceptable Poor Document Rating

Clarity

Technical Accuracy

Organization

CS 97.8

Show 4 more labels / short text on this page
Name · Company · Address · 1-408-588-6130

Ask about the NEC PD78076Y

Owners and our team usually reply within a day — and your question helps the next person too.

Add your email to get notified when it’s answered — no spam, ever.

0 questions
No questions yet about the NEC PD78076Y

Be the first to ask — other owners or our team will answer.

Original document

NEC PD78076Y manual PDF

627 pages·2.4 MB·Network Card·PDF
Click any page above to open it here
Page 1 / …
100%
Loading pages…