Waveform distor tion due to input noise or a reflected wave may cause malfunction. If the input of the
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.
IL (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.
User’s Manual U15331EJ4V1UD 3
EEPROM and FIP 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.
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.
4 User’s Manual U15331EJ4V1UD
•
The information in this document is current as of July, 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":
"Special":
"Specific":
Computers, office equipment, communications equipment, test and measurement equipment, audio
and visual equipment, home electronic appliances, machine tools, personal electronic equipment
and industrial robots.
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).
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
User’s Manual U15331EJ4V1UD 5
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.
CHAPTER 4 PORT FUNCTIONS ...........................................................................................................75
4.1 Port Functions............................................................................................................................75
4.2 Port Configuration .....................................................................................................................76
4.2.1 Port 0 ............................................................................................................................................77
4.2.2 Port 1 ............................................................................................................................................78
4.2.3 Port 2 ............................................................................................................................................79
4.2.4 Port 3 ............................................................................................................................................84
4.2.5 Port 5 ............................................................................................................................................86
4.2.6 Port 6 ............................................................................................................................................87
4.2.7 Port 7 ............................................................................................................................................89
4.2.8 Port 8 ............................................................................................................................................90
4.3 Registers Controlling Port Function ........................................................................................91
4.4 Port Function Operation............................................................................................................94
4.4.1 Writing to I/O port ..........................................................................................................................94
4.4.2 Reading from I/O port.................................................................................................................... 94
4.4.3 Arithmetic operation of I/O port .....................................................................................................94
3-9 Program Counter Configuration ...................................................................................................................58
3-10 Program Status Word Configuration ............................................................................................................58
4-1 Port Types....................................................................................................................................................75
4-2 Block Diagram of P00 to P07 .......................................................................................................................77
4-3 Block Diagram of P10 and P11 ....................................................................................................................78
4-4 Block Diagram of P20 ..................................................................................................................................79
4-5 Block Diagram of P21 ..................................................................................................................................80
4-6 Block Diagram of P22 and P25 ....................................................................................................................81
4-7 Block Diagram of P23 ..................................................................................................................................82
4-8 Block Diagram of P24 ..................................................................................................................................83
4-9 Block Diagram of P30 to P33 .......................................................................................................................84
4-10 Block Diagram of P34 ..................................................................................................................................85
4-11 Block Diagram of P50 to P53.......................................................................................................................86
4-12 Block Diagram of P60 to P67.......................................................................................................................87
4-13 Block Diagram of P70 to P73.......................................................................................................................89
4-14 Block Diagram of P80 to P87.......................................................................................................................90
4-15 Port Mode Register Format..........................................................................................................................91
4-16 Format of Pull-Up Resistor Option Registers ...............................................................................................93
4-17 Port Function Register Format .....................................................................................................................93
5-1 Clock Generator Block Diagram (
5-2 Clock Generator Block Diagram (
5-3 Format of Processor Clock Control Register................................................................................................98
5-4 Format of Subclock Oscillation Mode Register.............................................................................................99
5-5 Format of Subclock Control Register............................................................................................................99
5-6 Subclock Selection Register Format ..........................................................................................................100
5-7 External Circuit of Main System Clock Oscillator........................................................................................101
5-8 External Circuit of Subsystem Clock Oscillator...........................................................................................102
5-9 Examples of Incorrect Resonator Connection ............................................................................................103
5-10 Switching Between System Clock and CPU Clock.....................................................................................107
6-1 Block Diagram of 16-Bit Timer 20 ..............................................................................................................109
6-2 Format of 16-Bit Timer Mode Control Register 20......................................................................................111
6-3 Format of Port Mode Register 3 .................................................................................................................112
6-4 Settings of 16-Bit Timer Mode Control Register 20 for Timer Interrupt Operation......................................113
6-5 Timing of Timer Interrupt Operation ...........................................................................................................114
6-6 Settings of 16-Bit Timer Mode Control Register 20 for Timer Output Operation ........................................115
7-1 Block Diagram of 24-Bit Event Counter......................................................................................................121
7-2 Block Diagram of Timer 50.........................................................................................................................123
7-3 Block Diagram of Timer 60.........................................................................................................................124
7-4 Block Diagram of Timer 61.........................................................................................................................125
7-5 Block Diagram of Output Controller (Timer 60) ..........................................................................................126
7-6 Format of 8-Bit Timer Mode Control Register 50 .......................................................................................128
7-7 Format of 8-Bit Timer Mode Control Register 60........................................................................................130
7-8 Format of Carrier Generator Output Control Register 60 ...........................................................................131
7-9 Format of 8-Bit Timer Mode Control Register 61........................................................................................132
7-10 Format of Port Mode Register 3.................................................................................................................133
7-11 Timing of Interval Timer Operation with 8-Bit Resolution (Basic Operation)...............................................136
7-12 Timing of Interval Timer Operation with 8-Bit Resolution (When CRnm Is Set to 00H)..............................136
7-13 Timing of Interval Timer Operation with 8-Bit Resolution (When CRnm Is Set to FFH)..............................137
7-14 Timing of Interval Timer Operation with 8-Bit Resolution (When CRnm Changes from N to M (N < M))....137
7-15 Timing of Interval Timer Operation with 8-Bit Resolution (When CRnm Changes from N to M (N > M))....138
7-16 Timing of Interval Timer Operation with 8-Bit Resolution (When Timer 60 Match Signal Is Selected
for Timer 50 Count Clock) ..........................................................................................................................139
7-17 Timing of Operation of External Event Counter with 8-Bit Resolution ........................................................140
7-18 Timing of Square-Wave Output with 8-Bit Resolution ................................................................................142
7-19 Timing of Interval Timer Operation with 16-Bit Resolution .........................................................................145
7-20 Timing of External Event Counter Operation with 16-Bit Resolution ..........................................................147
18 User’s Manual U15331EJ4V1UD
LIST OF FIGURES (3/6)
Figure No. Title Page
7-21 Timing of Square-Wave Output with 16-Bit Resolution ..............................................................................149
7-22 Timing of Carrier Generator Operation (When CR60 = N, CRH60 = M (M > N))........................................151
7-23 Timing of Carrier Generator Operation (When CR60 = N, CRH60 = M (M < N))........................................152
10-7 How to Reduce Current Consumption in Standby Mode ............................................................................182
10-8 Conversion Result Read Timing (if Conversion Result Is Undefined) ........................................................183
10-9 Conversion Result Read Timing (if Conversion Result Is Normal).............................................................183
10-10 Analog Input Pin Handling..........................................................................................................................184
10-11 A/D Conversion End Interrupt Request Generation Timing........................................................................185
10-12 AV
11-1 Block Diagram of Serial Interface 20..........................................................................................................187
11-2 Bock Diagram of Baud Rate Generator 20.................................................................................................188
11-3 Format of Serial Operation Mode Register 20............................................................................................190
16-13 Interrupt Request Acknowledgment Program Algorithm.............................................................................303
16-14 Interrupt Request Acknowledgment Timing (Example: MOV A, r)..............................................................304
16-15 Interrupt Request Acknowledgment Timing (When Interrupt Request Flag Is Generated in Final
Clock Under Execution) .............................................................................................................................304
16-16 Example of Multiple Interrupt Servicing......................................................................................................305
17-1 Format of Oscillation Stabilization Time Selection Register .......................................................................308
17-2 Releasing HALT Mode by Interrupt ............................................................................................................310
User’s Manual U15331EJ4V1UD 21
LIST OF FIGURES (6/6)
Figure No. Title Page
17-3 Releasing HALT Mode by RESET Input.....................................................................................................311
17-4 Releasing STOP Mode by Interrupt............................................................................................................313
17-5 Releasing STOP Mode by RESET Input ....................................................................................................314
18-1 Block Diagram of Reset Function...............................................................................................................315
18-2 Reset Timing by RESET Input ...................................................................................................................316
18-3 Reset Timing by Overflow in Watchdog Timer ...........................................................................................316
18-4 Reset Timing by RESET Input in STOP Mode ...........................................................................................316
19-1 Environment for Writing Program to Flash Memory....................................................................................320
19-2 Communication Mode Selection Format ....................................................................................................321
19-3 Example of Connection with Dedicated Flash Programmer .......................................................................322
19-4 V
19-5 Signal Conflict (Input Pin of Serial Interface)..............................................................................................325
19-6 Abnormal Operation of Other Device .........................................................................................................325
19-7 Signal Conflict (RESET Pin).......................................................................................................................326
19-8 Wiring Example for Flash Writing Adapter with 3-Wire Serial I/O...............................................................327
19-9 Wiring Example for Flash Writing Adapter with 3-Wire Serial I/O with Handshake.....................................328
19-10 Wiring Example for Flash Writing Adapter with UART................................................................................329
A-1 Development Tools ....................................................................................................................................370
B-1 Distance Between In-Circuit Emulator and Conversion Socket (80GC) .....................................................375
B-2 Connection Conditions of Target System (When NP-80GC-TQ Is Used)...................................................376
B-3 Connection Conditions of Target System (When NP-H80GC-TQ Is Used) ................................................376
B-4 Distance Between In-Circuit Emulator and Conversion Adapter (80GK)....................................................377
B-5 Connection Conditions of Target System (When NP-80GK Is Used) .........................................................378
B-6 Connection Conditions of Target System (When NP-H80GK-TQ Is Used) ................................................378
PP Pin Connection Example .....................................................................................................................324
22 User’s Manual U15331EJ4V1UD
LIST OF TABLES (1/3)
Table No. Title Page
2-1 Types of Pin I/O Circuits ..............................................................................................................................45
3-1 Internal ROM Capacity.................................................................................................................................52
3-4 Special Function Registers .........................................................................................................................63
4-1 Port Functions..............................................................................................................................................76
4-2 Configuration of Port ....................................................................................................................................76
4-3 Port Mode Registers and Output Latch Settings When Using Alternate Functions ......................................92
5-1 Configuration of Clock Generator.................................................................................................................95
5-2 Maximum Time Required for Switching CPU Clock ...................................................................................106
6-2 Interval Time of 16-Bit Timer 20.................................................................................................................113
6-3 Settings of Capture Edge ...........................................................................................................................116
7-2 Configuration of 8-Bit Timers 50, 60, and 61..............................................................................................122
7-3 Interval Time of Timer 50 ...........................................................................................................................135
7-4 Interval Time of Timer 60 ...........................................................................................................................135
7-5 Interval Time of Timer 61 ...........................................................................................................................135
7-6 Square-Wave Output Range of Timer 50...................................................................................................141
7-7 Square-Wave Output Range of Timer 60...................................................................................................142
7-8 Square-Wave Output Range of Timer 61...................................................................................................142
7-9 Interval Time with 16-Bit Resolution...........................................................................................................144
7-10 Square-Wave Output Range with 16-Bit Resolution...................................................................................148
8-1 Interval Time of Interval Timer ...................................................................................................................162
8-2 Configuration of Watch Timer ....................................................................................................................162
8-3 Interval Time of Interval Timer ...................................................................................................................165
9-1 Watchdog Timer Program Loop Detection Time ........................................................................................167
9-2 Interval Time ..............................................................................................................................................167
9-3 Configuration of Watchdog Timer...............................................................................................................168
9-4 Watchdog Timer Program Loop Detection Time ........................................................................................171
9-5 Interval Time of Interval Timer ...................................................................................................................172
User’s Manual U15331EJ4V1UD 23
LIST OF TABLES (2/3)
Table No. Title Page
10-1 Configuration of 10-Bit A/D Converter ........................................................................................................173
11-1 Configuration of Serial Interface 20............................................................................................................186
11-2 Serial Interface 20 Operation Mode Settings..............................................................................................192
11-3 Example of Relationship Between System Clock and Baud Rate ..............................................................195
11-4 Relationship Between ASCK20 Pin Input Frequency and Baud Rate (When BRGC20 Is Set to 80H).......196
11-5 Example of Relationship Between System Clock and Baud Rate ..............................................................203
11-6 Relationship Between ASCK20 Pin Input Frequency and Baud Rate (When BRGC20 Is Set to 80H).......203
12-1 Configuration of Serial Interface 1A0..........................................................................................................217
12-2 Timing of Interrupt Request Signal Generation ..........................................................................................249
13-1 Maximum Number of Display Pixels...........................................................................................................250
13-2 Configuration of LCD Controller/Driver.......................................................................................................250
13-4 COM Signals ..............................................................................................................................................258
13-5 Select and Deselect Voltages (COM0 to COM2) .......................................................................................260
13-6 Select and Deselect Voltages (COM0 to COM3) .......................................................................................263
16-3 Flags Corresponding to Interrupt Request Signal Names ..........................................................................294
16-4 Time from Generation of Maskable Interrupt Request to Servicing............................................................303
17-1 Operation Statuses in HALT Mode.............................................................................................................309
17-2 Operation After Releasing HALT Mode ......................................................................................................311
17-3 Operation Statuses in STOP Mode ............................................................................................................312
17-4 Operation After Releasing STOP Mode .....................................................................................................314
18-1 Status of Hardware After Reset..................................................................................................................317
19-1 Differences Between
19-2 Communication Mode List..........................................................................................................................321
19-3 Pin Connection List ....................................................................................................................................323
LC0 to VLC2 Pins ..........................................................................................................265