User’s Manual
PD789167, 789177, 789167Y,
8-Bit Single-Chip Microcontrollers
µ
PD789166
789177Y Subseries
µ
PD789166Y
µ
PD789166(A1)
µ
PD789167
µ
PD789176
µ
PD789177
µ
PD78F9177
µ
PD78F9177A
µ
PD789166(A)
µ
PD789167(A)
µ
PD789176(A)
µ
PD789177(A)
µ
PD78F9177A(A) µPD78F9177AY(A)
Document No. U14186EJ6V0UD00 (6th edition)
Date Published March 2005 NS CP(K)
µ
PD789167Y
µ
PD789176Y
µ
PD789177Y
µ
PD78F9177Y
µ
PD78F9177AY
µ
PD789166Y(A)
µ
PD789167Y(A)
µ
PD789176Y(A)
µ
PD789177Y(A)
µ
PD789167(A1)
µ
PD789176(A1)
µ
PD789177(A1)
µ
PD78F9177A(A1)
µ
PD789166(A2)
µ
PD789167(A2)
µ
PD789176(A2)
µ
PD789177(A2)
©
Printed in Japan
2003
[MEMO]
2
User’ s Manual U14186EJ6V0UD
NOTES FOR CMOS DEVICES
1
VOLTAGE APPLICATION WAVEFORM AT INPUT PIN
Waveform distortion due to input noise or a reflected wave may cause malfunction. If the input of the
IL
CMOS device stays in the area between V
malfunction. Take care to prevent chattering noise from entering the device when the input level is fixed,
and also in the transition period when the input level passes through the area between V
IH
(MIN).
V
HANDLING OF UNUSED INPUT PINS
2
Unconnected CMOS device inputs can be cause of malfunction. If an input pin is unconnected, it is
possible that an internal input level may be generated due to noise, etc., causing malfunction. CMOS
devices behave differently than Bipolar or NMOS devices. Input levels of CMOS devices must be fixed
high or low by using pull-up or pull-down circuitry. Each unused pin should be connected to V
via a resistor if there is a possibility that it will be an output pin. All handling related to unused pins must
be judged separately for each device and according to related specifications governing the device.
3
PRECAUTION AGAINST ESD
A 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 when it has occurred. Environmental control must be
adequate. When it is dry, a humidifier should be used. It is recommended to avoid using insulators that
easily build up 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
benches and floors should be grounded. The operator should be grounded using a wrist strap.
Semiconductor devices must not be touched with bare hands. Similar precautions need to be taken for
PW boards with mounted semiconductor devices.
(MAX) and VIH (MIN) due to noise, etc., the device may
IL
(MAX) and
DD
or GND
4
STATUS BEFORE INITIALIZATION
Power-on does not necessarily define the initial status of a MOS device. Immediately after the power
source is turned ON, devices with reset functions have not yet been initialized. Hence, power-on does
not guarantee output pin levels, I/O settings or contents of registers. A device is not initialized until the
reset signal is received. A reset operation must be executed immediately after power-on for devices
with reset functions.
5
POWER ON/OFF SEQUENCE
In the case of a device that uses different power supplies for the internal operation and external
interface, as a rule, switch on the external power supply after switching on the internal power supply.
When switching the power supply off, as a rule, switch off the external power supply and then the
internal power supply. Use of the reverse power on/off sequences may result in the application of an
overvoltage to the internal elements of the device, causing malfunction and degradation of internal
elements due to the passage of an abnormal current.
The correct power on/off sequence must be judged separately for each device and according to related
specifications governing the device.
6
INPUT OF SIGNAL DURING POWER OFF STATE
Do not input signals or an I/O pull-up power supply while the device is not powered. The current
injection that results from input of such a signal or I/O pull-up power supply may cause malfunction and
the abnormal current that passes in the device at this time may cause degradation of internal elements.
Input of signals during the power off state must be judged separately for each device and according to
related specifications governing the device.
FIP and EEPROM are trademarks of NEC Electronics Corporation.
Windows and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the
United States and/or other countries.
PC/AT is a trademark 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.
Solaris and SunOS are trademarks of Sun Microsystems, Inc.
User’ s Manual U14186EJ6V0UD
3
These commodities, technology or software, must be exported in accordance
with the export administration regulations of the exporting country.
Diversion contrary to the law of that country is prohibited.
Purchase of NEC Electronics I2C components conveys a license under the Philips I2C Patent Rights to use
these components in an I
defined by Philips.
2
C system, provided that the system conforms to the I2C Standard Specification as
•
The information in this document is current as of March, 2005. The information is subject to change
without notice. For actual design-in, refer to the latest publications of NEC Electronics data sheets or
data books, etc., for the most up-to-date specifications of NEC Electronics products. Not all
products and/or types are available in every country. Please check with an NEC Electronics sales
representative for availability and additional information.
No part of this document may be copied or reproduced in any form or by any means without the prior
•
written consent of NEC Electronics. NEC Electronics assumes no responsibility for any errors that may
appear in this document.
•
NEC Electronics does not assume any liability for infringement of patents, copyrights or other intellectual
property rights of third parties by or arising from the use of NEC Electronics products listed in this document
or any other liability arising from the use of such products. No license, express, implied or otherwise, is
granted under any patents, copyrights or other intellectual property rights of NEC Electronics or others.
Descriptions of circuits, software and other related information in this document are provided for illustrative
•
purposes in semiconductor product operation and application examples. The incorporation of these
circuits, software and information in the design of a customer's equipment shall be done under the full
responsibility of the customer. NEC Electronics assumes no responsibility for any losses incurred by
customers or third parties arising from the use of these circuits, software and information.
•
While NEC Electronics endeavors to enhance the quality, reliability and safety of NEC Electronics products,
customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely. To
minimize risks of damage to property or injury (including death) to persons arising from defects in NEC
Electronics products, customers must incorporate sufficient safety measures in their design, such as
redundancy, fire-containment and anti-failure features.
•
NEC Electronics products are classified into the following three quality grades: "Standard", "Special" and
"Specific".
The "Specific" quality grade applies only to NEC Electronics products developed based on a customerdesignated "quality assurance program" for a specific application. The recommended applications of an NEC
Electronics product depend on its quality grade, as indicated below. Customers must check the quality grade of
each NEC Electronics product before using it in a particular application.
"Standard":
Computers, 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":
Aircraft, aerospace equipment, submersible repeaters, nuclear reactor control systems, life
support systems and medical equipment for life support, etc.
The quality grade of NEC Electronics products is "Standard" unless otherwise expressly specified in NEC
Electronics data sheets or data books, etc. If customers wish to use NEC Electronics products in applications
not intended by NEC Electronics, they must contact an NEC Electronics sales representative in advance to
determine NEC Electronics' willingness to support a given application.
(Note)
(1)
"NEC Electronics" as used in this statement means NEC Electronics Corporation and also includes its
majority-owned subsidiaries.
(2)
"NEC Electronics products" means any product developed or manufactured by or for NEC Electronics (as
defined above).
M8E 02. 11-1
4
User’ s Manual U14186EJ6V0UD
Regional Information
Some information contained in this document may vary from country to country. Before using any NEC
Electronics product in your application, pIease contact the NEC Electronics 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.
[GLOBAL SUPPORT]
http://www.necel.com/en/support/support.html
NEC Electronics America, Inc. (U.S.)
Santa Clara, California
Tel: 408-588-6000
800-366-9782
N
EC Electronics (Europe) GmbH
Duesseldorf, Germany
Tel: 0211-65030
•
Sucursal en España
Madrid, Spain
Tel: 091-504 27 87
•
Succursale Française
Vélizy-Villacoublay, France
Tel: 01-30-67 58 00
•
Filiale Italiana
Milano, Italy
Tel: 02-66 75 41
•
Branch The Netherlands
Eindhoven, The Netherlands
Tel: 040-244 58 45
•
Tyskland Filial
Taeby, Sweden
Tel: 08-63 80 820
•
United Kingdom Branch
Milton Keynes, UK
Tel: 01908-691-133
NEC Electronics Hong Kong Ltd.
Hong Kong
Tel: 2886-9318
NEC Electronics Hong Kong Ltd.
Seoul Branch
Seoul, Korea
Tel: 02-558-3737
NEC Electronics Shanghai Ltd.
Shanghai, P.R. China
Tel: 021-5888-5400
NEC Electronics Taiwan Ltd.
Taipei, Taiwan
Tel: 02-2719-2377
NEC Electronics Singapore Pte. Ltd.
Novena Square, Singapore
Tel: 6253-8311
J04.1
User’ s Manual U14186EJ6V0UD
5
INTRODUCTION
Readers This manual is intended for user engineers who wish to understand the functions of
the
µ
PD789167, 789177, 789167Y, and 789177Y Subseries in order to design and
develop its application systems and programs.
Target products:
•
µ
PD789167 Subseries: µPD789166, 789167, 789166(A), 789167(A),
789166(A1), 789167(A1), 789166(A2), 789167(A2)
•
µ
PD789177 Subseries: µPD789176, 789177, 78F9177, 78F9177A,
789176(A), 789177(A), 78F9177A(A), 789176(A1),
789177(A1), 78F9177A(A1), 789176(A2),
789177(A2)
•
µ
PD789167Y Subseries: µPD789166Y, 789167Y, 789166Y(A), 789167Y(A)
•
µ
PD789177Y Subseries: µPD789176Y, 789177Y, 78F9177Y, 78F9177AY,
789176Y(A), 789177Y(A), 78F9177AY(A)
The
µ
PD789167, 789177, 789167Y, and 789177Y Subseries is a generic term for all
the target devices in this manual.
The generic terms used in this manual indicate the following products.
“Standard quality grade products”...
78F9177A, 789166Y, 789167Y, 789176Y, 789177Y, 78F9177Y, 78F9177AY
“(A) products”...
“(A1) products”...
“(A2) products”...
“Mask ROM versions”...
“Flash memory versions”...
Purpose This manual is intended to give users an understanding of the functions described in
the Organization below.
µ
PD789166(A), 789167(A), 789176(A), 789177(A),
78F9177A(A), 789166Y(A), 789167Y(A), 789176Y(A),
789177Y(A), 78F9177AY(A)
µ
PD789166(A1), 789167(A1), 789176(A1), 789177(A1),
78F9177A(A1)
µ
PD789166(A2), 789167(A2), 789176(A2), 789177(A2)
µ
PD789166, 789167, 789176, 789177, 78F9177,
µ
PD789166, 789167, 789176, 789177, 789166Y,
789167Y, 789176Y, 789177Y, 789166(A), 789167(A),
789176(A), 789177(A), 789166Y(A), 789167Y(A),
789176Y(A), 789177Y(A), 789166(A1), 789167(A1),
789176(A1), 789177(A1), 789166(A2), 789167(A2),
789176(A2), 789177(A2)
µ
PD78F9177, 78F9177A, 78F9177A(A),
78F9177A(A1), 78F9177Y, 78F9177AY,
78F9177AY(A)
6
User’ s Manual U14186EJ6V0UD
Organization The
µ
PD789167, 789177, 789167Y, 789177Y Subseries manual is divided into two
parts: this manual and the instruction manual (common to the 78K/0S Series).
µ
PD789167, 789177, 789167Y,
789177Y Subseries
User's Manual
(This manual)
78K/0S Series
Instruction
User's Manual
• Pin functions
• Internal block functions
• Interrupts
• Other internal peripheral functions
• Electrical specifications
How to Read This Manual It is assumed that the readers of this manual have general knowledge of electric
engineering, logic circuits, and microcontrollers.
◊ For users who use this document as the manual for the µPD789166(A), 789167(A),
789176(A), 789177(A), 789166Y(A), 789167Y(A), 789176Y(A), 789177Y(A),
789166(A1), 789167(A1), 789176(A1), 789177(A1), 789166(A2), 789167(A2),
789176(A2), 789177(A2), 78F9177A(A), 78F9177AY(A), and 78F9177A(A1)
→ The only differences between standard products and (A) products, (A1)
products, and (A2) products are quality grades, power supply voltage,
operating ambient temperature, minimum instruction execution time, and
electrical specifications. (Refer to 1.10 Differences Between Standard Quality
Grade Products and (A) Products, (A1) Products, and (A2) Products, and 2.10
Differences Between Standard Quality Grade Products and (A) Products.) For
(A) products, (A1) products, and (A2) products, read the part numbers
indicated in Chapters 3 to 22 in the following manner.
µ
PD789166 → µPD789166(A), 789166(A1), 789166(A2)
µ
PD789167 → µPD789167(A), 789167(A1), 789167(A2)
µ
PD789176 → µPD789176(A), 789176(A1), 789176(A2)
µ
PD789177 → µPD789177(A), 789177(A1), 789177(A2)
µ
PD789166Y → µPD789166Y(A)
µ
PD789167Y → µPD789167Y(A)
µ
PD789176Y → µPD789176Y(A)
µ
PD789177Y → µPD789177Y(A)
µ
PD78F9177A → µPD789177A(A), 78F9177A(A1)
µ
PD78F9177AY → µPD78F9177AY(A)
◊ To understand the overall functions of the
789177Y Subseries
→ Read this manual in the order of the CONTENTS .
◊ How to read register formats
→ The name of a bit whose number is enclosed with < > is reserved in the
assembler and is defined as an sfr variable by the #pragma sfr directive in the C
compiler.
◊ To learn the detailed functions of a register whose register name is known
→ See APPENDIX C REGISTER INDEX.
• CPU function
• Instruction set
• Instruction description
µ
PD789167, 789177, 789167Y, and
User’ s Manual U14186EJ6V0UD
7
◊ To learn the details of the instruction functions of the 78K/0S Series
→ Refer to 78K/0S Series Instructions User's Manual (U11047E) separately
available.
◊ To know the electrical specifications of the
789177Y Subseries
→ Refer to CHAPTER 23 ELECTRICAL SPECIFICATIONS (
16xY, 17xY, 16x(A), 17x(A), 16xY(A), 17xY(A)), CHAPTER 25
ELECTRICAL SPECIFICATIONS (
78917x(A2)), CHAPTER 27 ELECTRICAL SPECIFICATIONS
(
µ
PD78F9177A, 78F9177AY, 78F9177A(A), 78F9177AY(A)), CHAPTER 28
ELECTRICAL SPECIFICATIONS (
CHAPTER 30 ELECTRICAL SPECIFICATIONS (
Caution The application examples in this manual are created for “Standard”
quality grade products for general electric equipment. When using
the application examples in this manual for purposes which require
“Special” quality grades, thoroughly examine the quality grade of
each part and circuit actually used.
µ
PD789167, 789177, 789167Y, and
µ
PD78916x, 17x,
µ
PD78916x(A1), 78917x(A1), 78916x(A2),
µ
PD78F9177, 78F9177AY), and
µ
PD78F9177A(A1)).
8
User’ s Manual U14186EJ6V0UD
Differences between µPD789167, 789177, 789167Y, and 789177Y Subseries
The
µ
PD789167, 789177, 789167Y, and 789177Y Subseries differ in their package type, A/D converter resolution,
and serial interface configuration.
Subseries
Item
Package • 44-pin plastic LQFP • 44-pin plastic LQFP
IC2 pin Not provided Provided
A/D converter resolution 8 bits 10 bits 8 bits 10 bits
3-wire serial I/O mode 1 channel Serial interface
configuration
SMB0 Not provided 1 channel
µ
PD789167
µ
PD789177
µ
PD789167Y
• 48-pin plastic TQFP
µ
PD789177Y
Configuration of This Manual This manual uses separate chapters to describe the functions that vary between the
subseries. The chapters related to each subseries are listed below.
For information about a certain subseries, see only the chapters indicated by
checkmarks in that subseries’ column.
Chapter
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)
CHAPTER 2 GENERAL (µPD789167Y AND 789177Y SUBSERIES)
CHAPTER 3 PIN FUNCTIONS (µPD789167 AND 789177
SUBSERIES
CHAPTER 4 PIN FUNCTIONS (µPD789167Y AND 789177Y
SUBSERIES)
CHAPTER 5 CPU ARCHITECTURE
CHAPTER 6 PORT FUNCTIONS
CHAPTER 7 CLOCK GENERATOR
CHAPTER 8 16-BIT TIMER 90
CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 80 TO 82
CHAPTER 10 WATCH TIMER
CHAPTER 11 WATCHDOG TIMER
CHAPTER 12 8-BIT A/D CONVERTER (µPD789167 AND 789167Y
SUBSERIES)
CHAPTER 13 10-BIT A/D CONVERTER (µPD789177 AND 789177Y
SUBSERIES)
CHAPTER 14 SERIAL INTERFACE 20
CHAPTER 15 SMB0 (µPD789167Y AND 789177Y SUBSERIES)
CHAPTER 16 MULTIPLIER
CHAPTER 17 INTERRUPT FUNCTIONS
CHAPTER 18 STANDBY FUNCTION
CHAPTER 19 RESET FUNCTION
CHAPTER 20 FLASH MEMORY VERSION
CHAPTER 21 MASK OPTION
CHAPTER 22 INSTRUCTION SET
µ
PD789167
Subseries
√ √ − −
− − √ √
√ √ − −
− − √ √
√ √ √ √
√ √ √ √
√ √ √ √
√ √ √ √
√ √ √ √
√ √ √ √
√ √ √ √
√ − √ −
− √ − √
√ √ √ √
− − √ √
√ √ √ √
√ √ √ √
√ √ √ √
√ √ √ √
√ √ √ √
√ √ √ √
√ √ √ √
µ
PD789177
Subseries
µ
PD789167Y
Subseries
µ
PD789177Y
Subseries
User’ s Manual U14186EJ6V0UD
9
Conventions Data significance: Higher digits on the left and lower digits on the right
Active low representation: ××× (overscore over pin or signal name)
Note : Footnote for item marked with Note in the text
Caution : Information requiring particular attention
Remark : Supplementary information
Numerical representation: Binary ... ×××× or ×××× B
Decimal ... ××××
Hexadecimal ... ××××H
Related Documents The related documents indicated in this publication may include preliminary versions.
However, preliminary versions are not marked as such.
Documents Related to Devices
Document Name Document No.
µ
PD789167, 789177, 789167Y, 789177Y Subseries User's Manual This manual
78K/0S Series Instructions User's Manual U11047E
Documents Related to Development Tools (Software) (User's Manuals)
Document Name Document No.
RA78K0S Assembler Package
ID78K0S-NS Ver. 2.52 Integrated Debugger Operation U16584E
PM plus Ver. 5.10 U16569E
Operation U16656E
Language U14877E
Structured Assembly Language U11623E
Operation U16654E CC78K0S C Compiler
Language U14872E
Operation U16768E SM78K Series Ver. 2.52 System Simulator
External Parts User Open Interface Specifications U15802E
Caution The related documents listed above are subject to change without notice. Be sure to use the latest
version of each document for designing.
10
User’ s Manual U14186EJ6V0UD
Documents Related to Development Tools (Hardware) (User’s Manuals)
Document Name Document No.
IE-78K0S-NS In-Circuit Emulator U13549E
IE-78K0S-NS-A In-Circuit Emulator U15207E
IE-789177-NS-EM1 Emulation Board U14621E
Documents Related to Flash Memory Writing
Document Name Document No.
PG-FP3 Flash Memory Programmer User’s Manual U13502E
PG-FP4 Flash Memory Programmer User’s Manual U15260E
Other Related Documents
Document Name Document No.
SEMICONDUCTORS SELECTION GUIDE Product & Packages X13769X
Semiconductor Device Mount Manual Note
Quality Grades on NEC Semiconductor Device C11531E
NEC Semiconductor Device Reliability/Quality Control System C10983E
Guide to Prevent Damage for Semiconductor Devices by Electrostatic Discharge (ESD) C11892E
Note See the “Semiconductor Device Mount Manual” website (http://www.necel.com/pkg/en/mount/index.html)
Caution The related documents listed above are subject to change without notice. Be sure to use the latest
version of each document for designing.
User’ s Manual U14186EJ6V0UD
11
CONTENTS
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)....................................................19
1.1 Expanded-Specification Products and Conventional Products ...........................................19
1.2 Features ...................................................................................................................................... 20
1.3 Applications................................................................................................................................20
1.4 Ordering Information .................................................................................................................21
1.5 Quality Grades............................................................................................................................22
1.6 Pin Configuration (Top View)....................................................................................................23
1.7 78K/0S Series Lineup.................................................................................................................26
1.8 Block Diagram ............................................................................................................................29
1.9 Outline of Functions ..................................................................................................................30
1.10 Differences Between Standard Quality Grade Products and (A) Products,
(A1) Products, and (A2) Products ..........................................................................................32
CHAPTER 2 GENERAL (µPD789167Y AND 789177Y SUBSERIES) ...............................................33
2.1 Expanded-Specification Products and Conventional Products ...........................................33
2.2 Features ...................................................................................................................................... 34
2.3 Applications................................................................................................................................34
2.4 Ordering Information .................................................................................................................35
2.5 Quality Grades............................................................................................................................36
2.6 Pin Configuration (Top View)....................................................................................................37
2.7 78K/0S Series Lineup.................................................................................................................40
2.8 Block Diagram ............................................................................................................................42
2.9 Outline of Function ....................................................................................................................43
2.10 Differences Between Standard Quality Grade Products and (A) Products .........................45
CHAPTER 3 PIN FUNCTIONS (µPD789167 AND 789177 SUBSERIES) ........................................46
3.1 Pin Function List ........................................................................................................................46
3.2 Description of Pin Functions ....................................................................................................48
3.2.1 P00 to P05 (Port 0)....................................................................................................................... 48
3.2.2 P10, P11 (Port 1).......................................................................................................................... 48
3.2.3 P20 to P26 (Port 2)....................................................................................................................... 48
3.2.4 P30 to P33 (Port 3)....................................................................................................................... 49
3.2.5 P50 to P53 (Port 5)....................................................................................................................... 49
3.2.6 P60 to P67 (Port 6)....................................................................................................................... 50
3.2.7 RESET ......................................................................................................................................... 50
3.2.8 X1, X2........................................................................................................................................... 50
3.2.9 XT1, XT2 ......................................................................................................................................50
3.2.10 AVDD ............................................................................................................................................ 50
3.2.11 AVSS ............................................................................................................................................ 50
3.2.12 AVREF ........................................................................................................................................... 50
3.2.13 VDD0, V DD1 .................................................................................................................................... 50
3.2.14 VSS0, V SS1 ..................................................................................................................................... 50
12
User’ s Manual U14186EJ6V0UD
3.2.15 VPP (flash memory version only) ...................................................................................................51
3.2.16 IC0 (mask ROM version only).......................................................................................................51
3.2.17 IC3 ...............................................................................................................................................51
3.3 Pin I/O Circuits and Recommended Connection of Unused Pins.........................................52
CHAPTER 4 PIN FUNCTIONS (µPD789167Y AND 789177Y SUBSERIES)....................................54
4.1 Pin Function List ........................................................................................................................54
4.2 Description of Pin Functions ....................................................................................................56
4.2.1 P00 to P05 (Port 0)....................................................................................................................... 56
4.2.2 P10, P11 (Port 1).......................................................................................................................... 56
4.2.3 P20 to P26 (Port 2)....................................................................................................................... 56
4.2.4 P30 to P33 (Port 3)....................................................................................................................... 57
4.2.5 P50 to P53 (Port 5)....................................................................................................................... 57
4.2.6 P60 to P67 (Port 6)....................................................................................................................... 58
4.2.7 RESET.......................................................................................................................................... 58
4.2.8 X1, X2........................................................................................................................................... 58
4.2.9 XT1, XT2 ......................................................................................................................................58
4.2.10 AVDD ............................................................................................................................................58
4.2.11 AVSS .............................................................................................................................................58
4.2.12 AVREF ...........................................................................................................................................58
4.2.13 VDD0, V DD1 ....................................................................................................................................58
4.2.14 VSS0, V SS1 .....................................................................................................................................58
4.2.15 VPP (flash memory version only) ...................................................................................................59
4.2.16 IC0 (mask ROM version only).......................................................................................................59
4.2.17 IC2................................................................................................................................................ 59
4.3 Pin I/O Circuits and Recommended Connection of Unused Pins.........................................60
CHAPTER 5 CPU ARCHITECTURE ......................................................................................................62
5.1 Memory Space ............................................................................................................................62
5.1.1 Internal program memory space................................................................................................... 65
5.1.2 Internal data memory (internal high-speed RAM) space............................................................... 66
5.1.3 Special-function register (SFR) area............................................................................................. 66
5.1.4 Data memory addressing.............................................................................................................. 66
5.2 Processor Registers ..................................................................................................................69
5.2.1 Control registers ...........................................................................................................................69
5.2.2 General-purpose registers ............................................................................................................72
5.2.3 Special-function registers (SFR) ................................................................................................... 73
5.3 Instruction Address Addressing ..............................................................................................76
5.3.1 Relative addressing ......................................................................................................................76
5.3.2 Immediate addressing ..................................................................................................................77
5.3.3 Table indirect addressing.............................................................................................................. 78
5.3.4 Register addressing......................................................................................................................78
5.4 Operand Address Addressing ..................................................................................................79
5.4.1 Direct addressing.......................................................................................................................... 79
5.4.2 Short direct addressing.................................................................................................................80
User’ s Manual U14186EJ6V0UD
13
5.4.3 Special-function register (SFR) addressing .................................................................................. 81
5.4.4 Register addressing...................................................................................................................... 82
5.4.5 Register indirect addressing ......................................................................................................... 83
5.4.6 Based addressing......................................................................................................................... 84
5.4.7 Stack addressing .......................................................................................................................... 84
CHAPTER 6 PORT FUNCTIONS ...........................................................................................................85
6.1 Port Functions............................................................................................................................85
6.2 Port Configuration .....................................................................................................................87
6.2.1 Port 0............................................................................................................................................ 87
6.2.2 Port 1............................................................................................................................................ 88
6.2.3 Port 2............................................................................................................................................ 89
6.2.4 Port 3............................................................................................................................................ 94
6.2.5 Port 5............................................................................................................................................ 97
6.2.6 Port 6............................................................................................................................................ 98
6.3 Port Function Control Registers ..............................................................................................99
6.4 Operation of Port Functions ...................................................................................................102
6.4.1 Writing to I/O port .......................................................................................................................102
6.4.2 Reading from I/O port .................................................................................................................102
6.4.3 Arithmetic operation of I/O port................................................................................................... 102
CHAPTER 7 CLOCK GENERATOR ....................................................................................................103
7.1 Clock Generator Functions.....................................................................................................103
7.2 Clock Generator Configuration ..............................................................................................103
7.3 Registers Controlling Clock Generator .................................................................................105
7.4 System Clock Oscillators........................................................................................................108
7.4.1 Main system clock oscillator ....................................................................................................... 108
7.4.2 Subsystem clock oscillator.......................................................................................................... 109
7.4.3 Examples of incorrect oscillator connection................................................................................ 110
7.4.4 Scaler .........................................................................................................................................111
7.4.5 When no subsystem clocks are used .........................................................................................111
7.5 Clock Generator Operation .....................................................................................................112
7.6 Changing Setting of System Clock and CPU Clock .............................................................113
7.6.1 Time required for switching between system clock and CPU clock ............................................ 113
7.6.2 Switching between system clock and CPU clock........................................................................114
CHAPTER 8 16-BIT TIMER 90............................................................................................................115
8.1 16-Bit Timer 90 Functions .......................................................................................................115
8.2 16-Bit Timer 90 Configuration.................................................................................................116
8.3 Registers Controlling 16-Bit Timer 90....................................................................................119
8.4 Operation of 16-Bit Timer 90...................................................................................................123
8.4.1 Operation as timer interrupt ........................................................................................................ 123
8.4.2 Operation as timer output ........................................................................................................... 125
8.4.3 Capture operation....................................................................................................................... 126
8.4.4 16-bit timer counter 90 readout................................................................................................... 127
14
User’ s Manual U14186EJ6V0UD
8.4.5 Buzzer output operation.............................................................................................................. 128
8.5 Notes on 16-Bit Timer 90 .........................................................................................................129
8.5.1 Notes on using 16-bit timer 90.................................................................................................... 129
8.5.2 Restrictions on rewriting of 16-bit compare register 90............................................................... 131
CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 80 TO 82 .............................................................133
9.1 Functions of 8-Bit Timer/Event Counters 80 to 82 ...............................................................133
9.2 Configuration of 8-Bit Timer/Event Counters 80 to 82 .........................................................135
9.3 8-Bit Timer/Event Counters 80 to 82 Control Registers.......................................................138
9.4 Operation of 8-Bit Timer/Event Counters 80 to 82................................................................142
9.4.1 Operation as interval timer.......................................................................................................... 142
9.4.2 Operation as external event counter........................................................................................... 144
9.4.3 Operation as square wave output ............................................................................................... 145
9.4.4 PWM output operation ................................................................................................................ 147
9.5 Notes on Using 8-Bit Timer/Event Counters 80 to 82...........................................................149
CHAPTER 10 WATCH TIMER..............................................................................................................153
10.1 Watch Timer Functions ...........................................................................................................153
10.2 Watch Timer Configuration .....................................................................................................154
10.3 Watch Timer Control Register ................................................................................................155
10.4 Watch Timer Operation............................................................................................................156
10.4.1 Operation as watch timer ............................................................................................................ 156
10.4.2 Operation as interval timer.......................................................................................................... 156
CHAPTER 11 WATCHDOG TIMER .....................................................................................................158
11.1 Watchdog Timer Functions .....................................................................................................158
11.2 Watchdog Timer Configuration ..............................................................................................159
11.3 Watchdog Timer Control Registers........................................................................................160
11.4 Watchdog Timer Operation .....................................................................................................162
11.4.1 Operation as watchdog timer ...................................................................................................... 162
11.4.2 Operation as interval timer.......................................................................................................... 163
CHAPTER 12 8-BIT A/D CONVERTER (µPD789167 AND 789167Y SUBSERIES) .....................164
12.1 8-Bit A/D Converter Functions................................................................................................164
12.2 8-Bit A/D Converter Configuration .........................................................................................164
12.3 8-Bit A/D Converter Control Registers...................................................................................167
12.4 8-Bit A/D Converter Operation................................................................................................169
12.4.1 Basic operation of 8-bit A/D converter ........................................................................................ 169
12.4.2 Input voltage and conversion result ............................................................................................ 170
12.4.3 Operation mode of 8-bit A/D converter ....................................................................................... 172
12.5 Cautions Related to 8-Bit A/D Converter...............................................................................173
CHAPTER 13 10-BIT A/D CONVERTER (µPD789177 AND 789177Y SUBSERIES) ...................177
13.1 10-Bit A/D Converter Functions..............................................................................................177
13.2 10-Bit A/D Converter Configuration .......................................................................................177
User’ s Manual U14186EJ6V0UD
15
13.3 10-Bit A/D Converter Control Registers ................................................................................180
13.4 10-Bit A/D Converter Operation..............................................................................................182
13.4.1 Basic operation of 10-bit A/D converter ...................................................................................... 182
13.4.2 Input voltage and conversion result ............................................................................................ 183
13.4.3 Operation mode of 10-bit A/D converter ..................................................................................... 185
13.5 Cautions Related to 10-Bit A/D Converter.............................................................................186
CHAPTER 14 SERIAL INTERFACE 20 ..............................................................................................190
14.1 Functions of Serial Interface 20..............................................................................................190
14.2 Configuration of Serial Interface 20 .......................................................................................190
14.3 Control Registers of Serial Interface 20 ................................................................................194
14.4 Operation of Serial Interface 20 ..............................................................................................201
14.4.1 Operation stop mode .................................................................................................................. 201
14.4.2 Asynchronous serial interface (UART) mode.............................................................................. 203
14.4.3 3-wire serial I/O mode................................................................................................................. 217
CHAPTER 15 SMB0 (µPD789167Y AND 789177Y SUBSERIES)...................................................227
15.1 SMB0 Functions .......................................................................................................................227
15.2 SMB0 Configuration.................................................................................................................229
15.3 SMB0 Control Registers..........................................................................................................231
15.4 SMB0 Definition and Control Methods ..................................................................................245
15.4.1 Start condition............................................................................................................................. 245
15.4.2 Address ......................................................................................................................................246
15.4.3 Specification of transmission direction........................................................................................ 246
15.4.4 Acknowledge signal (ACK) .........................................................................................................247
15.4.5 Stop condition ............................................................................................................................. 248
15.4.6 Wait signal (WAIT)......................................................................................................................249
15.4.7 SMB0 interrupt (INTSMB0)......................................................................................................... 251
15.4.8 Interrupt request (INTSMB0) generation timing and wait control ................................................ 272
15.4.9 Matching address detection method ........................................................................................... 274
15.4.10 Error detection............................................................................................................................ 274
15.4.11 Extension code ........................................................................................................................... 274
15.4.12 Arbitration ................................................................................................................................... 275
15.4.13 Wakeup function......................................................................................................................... 276
15.4.14 Communication reservation ........................................................................................................ 277
15.4.15 Additional cautions...................................................................................................................... 279
15.4.16 Communication operation........................................................................................................... 280
15.5 Timing Charts ...........................................................................................................................282
CHAPTER 16 MULTIPLIER ..................................................................................................................289
16.1 Multiplier Function ...................................................................................................................289
16.2 Multiplier Configuration...........................................................................................................289
16.3 Multiplier Control Register......................................................................................................291
16.4 Multiplier Operation .................................................................................................................292
16
User’ s Manual U14186EJ6V0UD
CHAPTER 17 INTERRUPT FUNCTIONS ............................................................................................293
17.1 Interrupt Function Types.........................................................................................................293
17.2 Interrupt Sources and Configuration .....................................................................................293
17.3 Interrupt Function Control Registers .....................................................................................296
17.4 Interrupt Processing Operation..............................................................................................301
17.4.1 Non-maskable interrupt request acknowledgment operation......................................................301
17.4.2 Maskable interrupt request acknowledgment operation..............................................................303
17.4.3 Multiple interrupt processing ....................................................................................................... 305
17.4.4 Interrupt request hold.................................................................................................................. 307
CHAPTER 18 STANDBY FUNCTION ..................................................................................................308
18.1 Standby Function and Configuration.....................................................................................308
18.1.1 Standby function ......................................................................................................................... 308
18.1.2 Standby function control register ................................................................................................309
18.2 Operation of Standby Function ..............................................................................................310
18.2.1 HALT mode ................................................................................................................................310
18.2.2 STOP mode................................................................................................................................313
CHAPTER 19 RESET FUNCTION .......................................................................................................316
CHAPTER 20 FLASH MEMORY VERSION........................................................................................320
20.1 Flash Memory Characteristics ................................................................................................321
20.1.1 Programming environment .........................................................................................................321
20.1.2 Communication mode.................................................................................................................322
20.1.3 On-board pin processing ............................................................................................................ 326
20.1.4 Connection of adapter for flash writing .......................................................................................329
CHAPTER 21 MASK OPTION..............................................................................................................337
CHAPTER 22 INSTRUCTION SET ......................................................................................................338
22.1 Operation ..................................................................................................................................338
22.1.1 Operand identifiers and description methods.............................................................................. 338
22.1.2 Description of “Operation” column .............................................................................................. 339
22.1.3 Description of “Flag” column ....................................................................................................... 339
22.2 Operation List ...........................................................................................................................340
22.3 Instructions Listed by Addressing Type ...............................................................................345
CHAPTER 23 ELECTRICAL SPECIFICATIONS ( µPD78916x, 17x, 16xY, 17xY, 16x(A), 17x(A),
16xY(A), 17xY(A))...........................................................................................................348
CHAPTER 24 CHARACTERISTICS CURVES ( µPD78916x, 17x, 16xY, 17xY, 16x(A), 17x(A),
16xY(A), 17xY(A))...........................................................................................................367
User’ s Manual U14186EJ6V0UD
17
µ
CHAPTER 25 ELECTRICAL SPECIFICATIONS (
PD78916x(A1), 17x(A1), 16x(A2), 17x(A2)).......370
CHAPTER 26 CHARACTERISTICS CURVES (µPD78916x(A1), 17x(A1), 16x(A2), 17x(A2)) ..........384
CHAPTER 27 ELECTRICAL SPECIFICATIONS ( µPD78F9177A, 78F9177AY, 78F9177A(A),
78F9177AY(A)) ...............................................................................................................387
CHAPTER 28 ELECTRICAL SPECIFICATIONS (µPD78F9177, 78F9177Y) ......................................406
CHAPTER 29 CHARACTERISTICS CURVES (µPD78F9177, 78F9177Y)..........................................423
CHAPTER 30 ELECTRICAL SPECIFICATIONS (µPD78F9177A(A1)) ...............................................424
CHAPTER 31 PACKAGE DRAWINGS.................................................................................................439
CHAPTER 32 RECOMMENDED SOLDERING CONDITIONS.............................................................441
APPENDIX A DEVELOPMENT TOOLS...............................................................................................445
A.1 Software Package ....................................................................................................................447
A.2 Language Processing Software .............................................................................................447
A.3 Control Software ......................................................................................................................448
A.4 Flash Memory Writing Tools...................................................................................................448
A.5 Debugging Tools (Hardware)..................................................................................................449
A.6 Debugging Tools (Software)...................................................................................................450
APPENDIX B NOTES ON TARGET SYSTEM DESIGN ..................................................................451
APPENDIX C REGISTER INDEX ........................................................................................................455
C.1 Register Name Index................................................................................................................455
C.2 Register Symbol Index ............................................................................................................457
APPENDIX D REVISION HISTORY ....................................................................................................459
D.1 Major Revisions in This Edition..............................................................................................459
D.2 Revision History up to Previous Edition ...............................................................................460
18
User’ s Manual U14186EJ6V0UD
µ
CHAPTER 1 GENERAL (
PD789167 AND 789177 SUBSERIES)
1.1 Expanded-Specification Products and Conventional Products
The expanded-specification products and conventional products refer to the following products.
Expanded-specification product... Products with a rank
• Mask ROM versions for which orders were received after December 1, 2001 (except (A1) products and (A2)
products
•
µ
Conventional product... Products with rank
Note 2
).
PD78F9177A, 78F9177A(A)
Note 1
K
• Products other than the above expanded-specification products.
Notes 1. The rank is indicated by the 5th digit from the left in the lot number marked on the package.
Lot number × × × ×
Year
code
Week
code
2. For the (A1) products and (A2) products, refer to 1.10 Differences Between Standard Quality Grade
Products and (A) Products, (A1) Products, and (A2) Products.
Expanded-specification products and conventional products differ in operating frequency ratings. The differences
are shown in Table 1-1.
Table 1-1. Differences Between Expanded-Specification Products and Conventional Products
Guaranteed Operating Speed (Operating Frequency) Power Supply Voltage (VDD)
Conventional Products Expanded-Specification Products
Note 1
NEC Electronics
control code
Ran
other than K
4.5 to 5.5 V 5 MHz (0.4 µs) 10 MHz (0.2 µs)
3.0 to 5.5 V 5 MHz (0.4 µs) 6 MHz (0.33 µs)
2.7 to 5.5 V 5 MHz (0.4 µs) 5 MHz (0.4 µs)
1.8 to 5.5 V 1.25 MHz (1.6 µs) 1.25 MHz (1.6 µs)
Remark The values in parentheses indicate the minimum instruction execution time.
User’s Manual U14186EJ6V0UD
19
1.2 Features
• ROM and RAM capacity
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)
Item
Product Name
µ
PD789166, 789176, 789166(A), 789176(A), 789166(A1),
789176(A1), 789166(A2), 789176(A2)
µ
PD789167, 789177, 789167(A), 789177(A), 789167(A1),
789177(A1), 789167(A2), 789177(A2)
µ
PD78F9177, 78F9177A, 78F9177A(A), 78F9177A(A1) Flash memory 24 KB
Program Memory
Mask ROM
(ROM)
16 KB
24 KB
Data Memory
(Internal High-Speed RAM)
512 bytes
• Minimum instruction execution time changeable from high-speed (0.2 µs: Main system clock 10.0 MHz
operation
Note
) to ultra-low speed (122 µs: Subsystem clock 32.768 kHz operation)
• I/O port: 31
• Serial interface: 1 channel
• 3-wire serial I/O mode/UART mode: 1 channel
• 8-bit resolution A/D converter: 8 channels (
• 10-bit resolution A/D converter: 8 channels (
µ
PD789167 Subseries)
µ
PD789177 Subseries)
• Timer: 6 channels
• 16-bit timer: 1 channel
• 8-bit timer/event counter: 2 channels
• 8-bit timer: 1 channel
• Watch timer: 1 channel
• Watchdog timer: 1 channel
• Vectored interrupt sources: 15
• Power supply voltage
• VDD = 1.8 to 5.5 V (
• VDD = 4.5 to 5.5 V (
µ
PD78916x, 78917x, 78916x(A), 78917x(A), 78F9177A, 78F9177A(A))
µ
PD78916x(A1), 78917x(A1), 78916x(A2), 78917x(A2))
• Operating ambient temperature
• TA = −40 to 85°C (
• TA = −40 to 110°C (
• TA = −40 to 125°C (
µ
PD78916x, 78917x, 78916x(A), 78917x(A), 78F9177A, 78F9177A(A))
µ
PD78916x(A1), 78917x(A1), 789177A(A1))
µ
PD78916x(A2), 78917x(A2))
Note When V
DD = 4.5 to 5.5 V and the product is an expanded-specification product
1.3 Applications
Power windows, keyless entry, battery management units, side air bags, etc.
20
User’s Manual U14186EJ6V0UD
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)
1.4 Ordering Information
Part Number Package Internal ROM
µ
PD789166GB- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789166GA- ×××-9EU 48-pin plastic TQFP (fine pitch) (7 × 7) Mask ROM
µ
PD789167GB- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789167GA- ×××-9EU 48-pin plastic TQFP (fine pitch) (7 × 7) Mask ROM
µ
PD789176GB- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789176GA- ×××-9EU 48-pin plastic TQFP (fine pitch) (7 × 7) Mask ROM
µ
PD789177GB- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789177GA- ×××-9EU 48-pin plastic TQFP (fine pitch) (7 × 7) Mask ROM
µ
PD789166GB- ×××-8ES-A 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789166GA- ×××-9EU-A 48-pin plastic TQFP (fine pitch) (7 × 7) Mask ROM
µ
PD789167GB- ×××-8ES-A 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789167GA- ×××-9EU-A 48-pin plastic TQFP (fine pitch) (7 × 7) Mask ROM
µ
PD789176GB- ×××-8ES-A 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789176GA- ×××-9EU-A 48-pin plastic TQFP (fine pitch) (7 × 7) Mask ROM
µ
PD789177GB- ×××-8ES-A 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789177GA- ×××-9EU-A 48-pin plastic TQFP (fine pitch) (7 × 7) Mask ROM
µ
PD789166GB(A)- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789167GB(A)- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789176GB(A)- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789177GB(A)- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789166GB(A1)- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789167GB(A1)- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789176GB(A1)- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789177GB(A1)- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789166GB(A2)- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789167GB(A2)- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789176GB(A2)- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD789177GB(A2)- ×××-8ES 44-pin plastic LQFP (10 × 10) Mask ROM
µ
PD78F9177GB-8ES 44-pin plastic LQFP (10 × 10) Flash memory
µ
PD78F9177AGB-8ES 44-pin plastic LQFP (10 × 10) Flash memory
µ
PD78F9177AGA-9EU 48-pin plastic TQFP (fine pitch) (7 × 7) Flash memory
µ
PD78F9177GB-8ES-A 44-pin plastic LQFP (10 × 10) Flash memory
µ
PD78F9177AGB-8ES-A 44-pin plastic LQFP (10 × 10) Flash memory
µ
PD78F9177AGA-9EU-A 48-pin plastic TQFP (fine pitch) (7 × 7) Flash memory
µ
PD78F9177AGB(A)-8ES 44-pin plastic LQFP (10 × 10) Flash memory
µ
PD78F9177AGB(A1)-8ES 44-pin plastic LQFP (10 × 10) Flash memory
Remarks 1. ××× indicates ROM code suffix.
2. Products with additional order code “-A” are lead-free products.
User’s Manual U14186EJ6V0UD
21
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)
1.5 Quality Grades
Part Number Package Quality Grade
µ
PD789166GB- ×××-8ES 44-pin plastic LQFP (10 × 10) Standard
µ
PD789166GA- ×××-9EU 48-pin plastic TQFP (fine pitch) (7 × 7) Standard
µ
PD789167GB- ×××-8ES 44-pin plastic LQFP (10 × 10) Standard
µ
PD789167GA- ×××-9EU 48-pin plastic TQFP (fine pitch) (7 × 7) Standard
µ
PD789176GB- ×××-8ES 44-pin plastic LQFP (10 × 10) Standard
µ
PD789176GA- ×××-9EU 48-pin plastic TQFP (fine pitch) (7 × 7) Standard
µ
PD789177GB- ×××-8ES 44-pin plastic LQFP (10 × 10) Standard
µ
PD789177GA- ×××-9EU 48-pin plastic TQFP (fine pitch) (7 × 7) Standard
µ
PD789166GB- ×××-8ES-A 44-pin plastic LQFP (10 × 10) Standard
µ
PD789166GA- ×××-9EU-A 48-pin plastic TQFP (fine pitch) (7 × 7) Standard
µ
PD789167GB- ×××-8ES-A 44-pin plastic LQFP (10 × 10) Standard
µ
PD789167GA- ×××-9EU-A 48-pin plastic TQFP (fine pitch) (7 × 7) Standard
µ
PD789176GB- ×××-8ES-A 44-pin plastic LQFP (10 × 10) Standard
µ
PD789176GA- ×××-9EU-A 48-pin plastic TQFP (fine pitch) (7 × 7) Standard
µ
PD789177GB- ×××-8ES-A 44-pin plastic LQFP (10 × 10) Standard
µ
PD789177GA- ×××-9EU-A 48-pin plastic TQFP (fine pitch) (7 × 7) Standard
µ
PD789166GB(A)- ×××-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD789167GB(A)- ×××-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD789176GB(A)- ×××-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD789177GB(A)- ×××-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD789166GB(A1)- ×××-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD789167GB(A1)- ×××-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD789176GB(A1)- ×××-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD789177GB(A1)- ×××-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD789166GB(A2)- ×××-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD789167GB(A2)- ×××-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD789176GB(A2)- ×××-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD789177GB(A2)- ×××-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD78F9177GB-8ES 44-pin plastic LQFP (10 × 10) Standard
µ
PD78F9177AGB-8ES 44-pin plastic LQFP (10 × 10) Standard
µ
PD78F9177AGA-9EU 48-pin plastic TQFP (fine pitch) (7 × 7) Standard
µ
PD78F9177GB-8ES-A 44-pin plastic LQFP (10 × 10) Standard
µ
PD78F9177AGB-8ES-A 44-pin plastic LQFP (10 × 10) Standard
µ
PD78F9177AGA-9EU-A 48-pin plastic TQFP (fine pitch) (7 × 7) Standard
µ
PD78F9177AGB(A)-8ES 44-pin plastic LQFP (10 × 10) Special
µ
PD78F9177AGB(A1)-8ES 44-pin plastic LQFP (10 × 10) Special
Remarks 1. ××× indicates ROM code suffix.
2. Products with additional order code “-A” are lead-free products.
Please refer to Quality Grades on NEC Semiconductor Devices (C11531E) published by NEC Electronics
Corporation to know the specification of the quality grade on the devices and its recommended applications.
22
User’s Manual U14186EJ6V0UD
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)
1.6 Pin Configuration (Top View)
• 44-pin plastic LQFP (10 × 10)
µ
PD789166GB- ×××-8ES
µ
PD789167GB- ×××-8ES
µ
PD789176GB- ×××-8ES
µ
PD789177GB- ×××-8ES
µ
PD789166GB- ×××-8ES-A
µ
PD789167GB- ×××-8ES-A
µ
PD789176GB- ×××-8ES-A
µ
PD789177GB- ×××-8ES-A
µ
PD789166GB(A)- ×××-8ES
µ
PD789167GB(A)- ×××-8ES
µ
PD789176GB(A)- ×××-8ES
µ
PD789177GB(A)- ×××-8ES
µ
PD789166GB(A1)- ×××-8ES
µ
PD789167GB(A1)- ×××-8ES
µ
PD789176GB(A1)- ×××-8ES
µ
PD789177GB(A1)-××× -8ES
REFAVDD
AV
P53
P52
P51
P50
P05
SS1
V
µ
PD789166GB(A2)- ×××-8ES
µ
PD789167GB(A2)- ×××-8ES
µ
PD789176GB(A2)- ×××-8ES
µ
PD789177GB(A2)- ×××-8ES
µ
PD78F9177GB-8ES
µ
PD78F9177AGB-8ES
µ
PD78F9177GB-8ES-A
µ
PD78F9177AGB-8ES-A
µ
PD78F9177AGB(A)-8ES
µ
PD78F9177AGB(A1)-8ES
P04
P03
P02
P60/ANI0
P61/ANI1
P62/ANI2
P63/ANI3
P64/ANI4
P65/ANI5
P66/ANI6
P67/ANI7
AV
P10
P11
SS
44 43 42 41 40 39 38 37 36 35 34
1
2
3
4
5
6
7
8
9
10
11
12 13 14 15 16 17 18 19 20 21 22
DD1
V
P31/INTP1/TO81
P32/INTP2/TO90
P20/SCK20/ASCK20
P30/INTP0/TI81/CPT90
P33/INTP3/TO82/BZO90
P23
D20
D20
X
X
P22/SI20/R
P21/SO20/T
P24
33
32
31
30
29
28
27
26
25
24
23
)
PP
IC0 (V
Cautions 1. Connect the IC0 (internally connected) pin directly to the V
2. Connect the AV
3. Connect the AV
DD pin to the V DD0 pin.
SS pin to the V SS0 pin.
Remark Pin connections in parentheses are intended for the
µ
PD78F9177, 78F9177A, 78F9177A(A), and
78F9177A(A1).
P01
P00
P26/TO80
P25/TI80/SS20
DD0
V
V
SS0
X1
X2
RESET
XT1
XT2
SS0 or V SS1 pin.
User’s Manual U14186EJ6V0UD
23
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)
• 48-pin plastic TQFP (fine pitch) (7 × 7)
µ
PD789166GA- ×××-9EU
µ
PD789167GA- ×××-9EU
µ
PD789176GA- ×××-9EU
µ
PD789177GA-××× -9EU
P60/ANI0
P61/ANI1
P62/ANI2
P63/ANI3
P64/ANI4
P65/ANI5
P66/ANI6
P67/ANI7
AV
SS
P10
P11
IC3
µ
PD789166GA- ×××-9EU-A
µ
PD789167GA- ×××-9EU-A
µ
PD789176GA- ×××-9EU-A
µ
PD789177GA-××× -9EU-A
REFAVDD
AV
P53
P52
IC3
P51
48 47 46 45 44 43 4241 40 39 38 37
1
2
3
4
5
6
7
8
9
10
11
12
13 14 15 16 17 18 1920 21 22 23 24
P50
P05
SS1
V
P04
µ
PD78F9177AGA-9EU
µ
PD78F9177AGA-9EU-A
P03
P02
36
35
34
33
32
31
30
29
28
27
26
25
P01
P00
P26/TO80
P25/Tl80/SS20
V
DD0
IC3
V
SS0
X1
X2
RESET
XT1
XT2
)
DD1
IC3
V
P31/INTP1/TO81
P32/INTP2/TO90
P30/INTP0/Tl81/CPT90
P20/SCK20/ASCK20
P33/INTP3/TO82/BZO90
P21/SO20/TxD20
P22/Sl20/RxD20
P23
P24
PP
IC0 (V
Cautions 1. Connect the IC0 (internally connected) pin directly to the V
SS0 or V SS1 pin.
2. Leave the IC3 pin open.
3. Connect the AV
4. Connect the AV
DD pin to the V DD0 pin.
SS pin to the V SS0 pin.
5. The pin configuration of the 48-pin package for (A), (A1), and (A2) products is undefined.
Remark Pin connections in parentheses are intended for the
µ
PD78F9177A.
24
User’s Manual U14186EJ6V0UD
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)
ANI0 to ANI7: Analog input RESET: Reset
ASCK20: Asynchronous serial input RxD20: Receive data
AV
DD: Analog power supply SCK20: Serial clock
REF: Analog reference voltage SI20: Serial input
AV
AV
SS: Analog ground SO20: Serial output
BZO90: Buzzer output SS20: Chip select input
CPT90: Capture trigger input TI80, TI81: Timer input
IC0, IC3: Internally connected TO80 to TO82, TO90: Timer output
INTP0 to INTP3: Interrupt from peripherals TxD20: Transmit data
P00 to P05: Port 0 VDD0, V DD1 : Power supply
P10, P11: Port 1 VPP : Programming power supply
P20 to P26: Port 2 VSS0, V SS1 : Ground
P30 to P33: Port 3 X1, X2: Crystal (main system clock)
P50 to P53: Port 5 XT1, XT2: Crystal (subsystem clock)
P60 to P67: Port 6
User’s Manual U14186EJ6V0UD
25
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)
1.7 78K/0S Series Lineup
The 78K/0S Series products are shown below. The subseries names are indicated in frames.
Products under development
µ
µ
µ
µ
78K/0S
Series
44-pin
42-/44-pin
30-pin
30-pin
20-pin
20-pin
44-pin
44-pin
30-pin
30-pin
30-pin
30-pin
144-pin
88-pin
80-pin
80-pin
80-pin
80-pin
64-pin
64-pin
64-pin
64-pin
64-pin
64-pin
52-pin
52-pin
44-pin
44-pin
44-pin
30-pin
30-pin
20-pin
20-pin
Products in mass production
Y Subseries products support SMB.
Small-scale package, general-purpose applications
PD789074 with added subsystem clock
PD789046
µ
µ
PD789026
µ
PD789088
µ
PD789074
PD789062
µ
µ
PD789052
Small-scale package, general-purpose applications and A/D converter
µ
PD789177
µ
µ
PD789167
µ
PD789134A
µ
PD789124A
µ
PD789114A
µ
PD789104A
LCD drive
µ
PD789835B
µ
PD789830
µ
PD789489
µ
PD789479
PD789417A
µ
PD789407A
µ
PD789456
µ
µ
PD789446
µ
PD789436
PD789426
µ
µ
PD789316
PD789306
µ
µ
PD789467
µ
PD789327
USB
µ
PD789800
Inverter control
µ
PD789842
On-chip bus controller
PD789852
µ
PD789850A
µ
Keyless entry
PD789862
µ
µ
PD789861
PD789860
µ
PD789177Y
PD789167Y
µ
µ
On-chip UART and capable of low voltage (1.8 V) operation
PD789074 with enhanced timer and increased ROM, RAM capacity
µ
PD789026 with enhanced timer
µ
RC oscillation version of the PD789052
PD789860 without EEPROM, POC, and LVI
µ
µ
PD789167 with enhanced A/D converter (10 bits)
PD789104A with enhanced timer
µ
PD789124A with enhanced A/D converter (10 bits)
µ
RC oscillation version of the PD789104A
µ
PD789104A with enhanced A/D converter (10 bits)
µ
PD789026 with added 8-bit A/D converter and multiplier
UART, 8-bit A/D, and dot LCD (Total display output pins: 96)
UART and dot LCD (40 × 16)
SIO, 10-bit A/D converter, and on-chip voltage booster type LCD (28 × 4)
SIO, 8-bit A/D converter, and resistance division type LCD (28 × 4)
PD789407A with enhanced A/D converter (10 bits)
µ
SIO, 8-bit A/D converter, and resistance division type LCD (28 × 4)
PD789446 with enhanced A/D converter (10 bits)
µ
SIO, 8-bit A/D, and on-chip voltage booster type LCD (15 × 4)
PD789426 with enhanced A/D converter (10 bits)
µ
SIO, 8-bit A/D, and on-chip voltage booster type LCD (5 × 4)
RC oscillation version of the PD789306
SIO and on-chip voltage booster type LCD (24 × 4)
8-bit A/D and on-chip voltage booster type LCD (23 × 4)
SIO and resistance division type LCD (24 × 4)
For PC keyboard and on-chip USB function
On-chip inverter controller and UART
µ
PD789850A with enhanced functions such as timer and A/D converter
On-chip CAN controller
PD789860 with enhanced timer, added SIO, and increased ROM, RAM capacity
µ
RC oscillation version of the PD789860
On-chip POC and key return circuit
Sensor
µ
20-pin
20-pin
52-pin
64-pin
PD789864
PD789863
µ
VFD drive
µ
PD789871
Meter control
PD789881
µ
Remark VFD (Vacuum Fluorescent Display) is referred to as FIP
documents, but the functions of the two are the same.
26
User’s Manual U14186EJ6V0UD
On-chip analog macro for sensor
RC oscillation version of the PD789864
On-chip VFD controller (Total display output pins: 25)
UART and resistance division type LCD (26 × 4)
µ
TM
(Fluorescent Indicator Panel) in some
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)
The major functional differences between the subseries are listed below.
Series for General-purpose applications and LCD drive
ROM
Subseries Name
Small-scale
package,
general-
purpose
applications
µ
µ
µ
µ
µ
µ
Small-scale
package,
general-
purpose
applications
and A/D
converter
µ
µ
µ
µ
µ
µ
LCD drive
µ
µ
µ
µ
µ
µ
µ
µ
µ
µ
µ
µ
µ
µ
PD789046 16 KB 1 ch
PD789026 4 KB to 16 KB
PD789088 16 KB to
PD789074 2 KB to 8 KB 1 ch
PD789062 RC oscillation
PD789052
PD789177
PD789167
PD789134A
PD789124A 4 ch
PD789114A
PD789104A
PD789835B 24 KB to
PD789830 24 KB 1 ch
PD789489 32 KB to
PD789479 24 KB to
PD789417A
PD789407A
PD789456
PD789446 6 ch
PD789436
PD789426
PD789316 RC oscillation
PD789306
PD789467 1 ch
PD789327
Capacity
32 KB
4 KB 2 ch
16 KB to
24 KB
2 KB to 8 KB 1 ch
60 KB
48 KB
48 KB
12 KB to
24 KB
12 KB to
16 KB
8 KB to 16 KB
4 KB to 24 KB
Note Flash memory version: 3.0 V
8-Bit
Timer V
8-Bit 16-Bit Watch WDT
1 ch 1 ch
1 ch 34
3 ch
−
3 ch 1 ch
1 ch
6 ch
−
1 ch
3 ch
2 ch
−
1 ch
−
1 ch
−
1 ch 1 ch
10-Bit
A/D
A/D
− −
8 ch
−
8 ch
4 ch
3 ch 37 1.8 V
8 ch
7 ch
6 ch
−
4 ch
−
−
4 ch
−
−
−
−
8 ch
−
7 ch
−
−
6 ch
−
−
6 ch
−
−
−
−
Serial
Interface
(UART: 1 ch)
−
1 ch
(UART: 1 ch)
1 ch
(UART: 1 ch)
2 ch
(UART: 1 ch)
1 ch
(UART: 1 ch)
2 ch
(UART: 1 ch)
−
1 ch 21
I/O
24
14
31
20
30 2.7 V
45
43
30
40
23
18
DD Function
MIN.
Value
1.8 V
1.8 V
1.8 V
Remarks
version
RC oscillation
version
Note
Dot LCD
supported
version
−
−
−
−
−
−
User’s Manual U14186EJ6V0UD
27
Series for ASSP
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)
Subseries Name
USB
Inverter
control
µ
µ
µ
controller
µ
µ
entry
µ
µ
Sensor
µ
µ
ROM
Capacity
PD789800 8 KB 2 ch
PD789842 8 KB to 16 KB 3 ch
PD789852 24 KB to
32 KB
PD789850A 16 KB 1 ch
PD789861
PD789860
PD789862 16 KB 1 ch 2 ch
PD789864
PD789863
4 KB 2 ch
4 KB 1 ch
8-Bit 16-Bit Watch WDT
− −
Note 1
3 ch
1 ch
− −
Note 2
Timer V
1 ch 1 ch 8 ch
−
−
−
1 ch
1 ch
1 ch
1 ch
8-Bit
A/D
− −
−
4 ch
− −
−
10-Bit
A/D
2 ch
(USB: 1 ch)
1 ch
−
(UART: 1 ch)
8 ch 3 ch
(UART: 2 ch)
2 ch
−
(UART: 1 ch)
1 ch
(UART: 1 ch)
4 ch
Serial
Interface
−
I/O
Value
31 4.0 V
30 4.0 V
31 On-chip bus
4.0 V
18
1.8 V
14 Keyless
22
5 1.9 V
DD Function
MIN.
Remarks
−
−
−
RC oscillation
version, on-
chip EEPROM
On-chip
EEPROM
On-chip
EEPROM
RC oscillation
version, on-
chip EEPROM
VFD drive µPD789871 4 KB to 8 KB 3 ch
Meter
control
µ
PD789881 16 KB 2 ch 1 ch
Notes 1. 10-bit timer: 1 channel
2. 12-bit timer: 1 channel
3. Flash memory version: 3.0 V
−
1 ch 1 ch
1 ch
−
− −
− −
1 ch 33 2.7 V
1 ch
(UART: 1 ch)
28 2.7 V
Note 3
−
−
28
User’s Manual U14186EJ6V0UD
1.8 Block Diagram
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)
TI80/SS20/P25
TO80/P26
TI81/INTP0/CPT90/P30
TO81/INTP1/P31
TO82/INTP3/BZO90/P33
CPT90/INTP0/TI81/P30
TO90/INTP2/P32
BZO90/INTP3/TO82/P33
SCK20/ASCK20/P20
X
D20/P21
SO20/T
SI20/RXD20/P22
SS20/TI80/P25
ANI0/P60 to
ANI7/P67
AV
AV
AV
REF
DD
SS
8-bit timer/
event counter 80
8-bit timer/
event counter 81
8-bit timer 82
16-bit timer 90
Watch timer
Watchdog timer
SIO20
A/D
converter
78K/0S
CPU core
RAM
ROM
(flash
memory)
Port 0
Port 1
Port 2
Port 3
Port 5
Port 6
System
control
Interrupt
control
P00 to P05
P10, P11
P20 to P26
P30 to P33
P50 to P53
P60 to P67
RESET
X1
X2
XT1
XT2
INTP0/TI81/CPT90/P30
INTP1/TO81/P31
INTP2/TO90/P32
INTP3/TO82/BZO90/P33
Multiplier
V
DD0
V
SS0
IC0
V
SS1
PP
)
V
DD1
(V
Remarks 1. The size of the internal ROM varies depending on the product.
2. Pin connections in parentheses are intended for the
µ
PD78F9177, 78F9177A, 78F9177A(A), and
78F9177A(A1).
User’s Manual U14186EJ6V0UD
29
CHAPTER 1 GENERAL (µPD789167 AND 789177 SUBSERIES)
1.9 Outline of Functions
Part Number
Item
Internal memory
µ
PD789166, 789176,
789166(A), 789176(A),
789166(A1), 789176(A1),
789166(A2), 789176(A2)
Mask ROM Flash memory ROM
µ
PD789167, 789177,
789167(A), 789177(A),
789167(A1), 789177(A1),
789167(A2), 789177(A2)
µ
PD78F9177,
78F9177A,
78F9177A(A),
78F9177A(A1)
16 KB 24 KB 24 KB
High-speed RAM 512 bytes
Minimum instruction execution time Expanded-specification products of µPD78916x, 78917x, 78916x(A), 78917x(A),
78F9177A, 78F9177A(A)
0.2/0.8
µ
s (operation with main system clock operating at 10.0 MHz, VDD = 4.5 to 5.5
V)
• 122
µ
s (operation with subsystem clock operating at 32.768 kHz)
Other than above products
• 0.4/1.6
• 122
µ
s (operation with main system clock operating at 5.0 MHz)
µ
s (operation with subsystem clock operating at 32.768 kHz)
General-purpose registers 8 bits × 8 registers
Instruction set • 16-bit operations
• Bit manipulations (such as set, reset, and test)
Multiplier 8 bits × 8 bits = 16 bits
I/O ports Total: 31
• CMOS input: 8
• CMOS I/O: 17
• N-ch open-drain: 6
A/D converter • 8-bit resolution × 8 channels (µPD789167 Subseries)
• 10-bit resolution × 8 channels (
µ
PD789177 Subseries)
Serial interface • Switchable between 3-wire serial I/O and UART modes: 1 channel
Timers • 16-bit timer: 1 channel
• 8-bit timer/event counter: 2 channels
• 8-bit timer: 1 channel
• Watch timer: 1 channel
• Watchdog timer: 1 channel
Timer output Four outputs
Buzzer output One output
Maskable Internal: 10, external: 4 Vectored interrupt
sources
Non-maskable Internal: 1
Power supply voltage VDD = 1.8 to 5.5 V (µPD78916x, 78917x, 78916x(A), 78917x(A), 78F9177,
78F9177A, 78F9177A(A)
V
DD = 4.5 to 5.5 V (
µ
PD78916x(A1), 78917x(A1), 78916x(A2), 78917x(A2),
78F9177A(A1)
Operating ambient temperature TA = − 40°C to + 85°C (µPD78916x, 78917x, 78916x(A), 78917x(A), 78F9177,
78F9177A, 78F9177A(A)
T
A = −40°C to +110°C (
T
A = −40°C to +125°C (
Package • 44-pin plastic LQFP (10 × 10)
• 48-pin plastic TQFP (fine pitch) (7 × 7)
µ
PD78916x(A1), 78917x(A1), 78F9177A(A1)
µ
PD78916x(A2), 78917x(A2)
Note
µ
Note
PD789166, 789167, 789176, 789177, and 78F9177A only
30
User’s Manual U14186EJ6V0UD