Document No. U17715EJ2V0UD00 (2nd edition)
Date Published January 2007 N CP(K)
Printed in Japan
2005
[MEMO]
2
User’s Manual U17715EJ2V0UD
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
V
IH
(MIN).
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.
User’s Manual U17715EJ2V0UD
3
IECUBE is a registered trademark of NEC Electronics Corporation in Japan and Germany.
MINICUBE is a registered trademark of NEC Electronics Corporation in Japan and Germany or a trademark in
the United States of America.
EEPROM is a trademark of NEC Electronics Corporation
Applilet is a registered trademark of NEC Electronics in Japan, Germany, Hong Kong, China, the Republic of
Korea, the United Kingdom, and the United States of America.
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.
SPARCstation is a trademark of SPARC International, Inc.
Solaris and SunOS are trademarks of Sun Microsystems, Inc.
TRON is an abbreviation of The Realtime Operating System Nucleus.
ITRON is an abbreviation of Industrial TRON.
4
User’s Manual U17715EJ2V0UD
•
The information in this document is current as of August, 2006. 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 U17715EJ2V0UD
5
PREFACE
Readers This manual is intended for users who wish to understand the functions of the
V850ES/JG2 and design application systems using these products.
PurposeThis manual is intended to give users an understanding of the hardware functions of
the V850ES/JG2 shown in the Organization below.
OrganizationThis manual is divided into two parts: Hardware (this manual) and Architecture
(V850ES Architecture User’s Manual).
Hardware Architecture
• Pin functions • Data types
• CPU function • Register set
• On-chip peripheral functions • Instruction format and instruction set
• Flash memory programming • Interrupts and exceptions
• Electrical specifications • Pipeline operation
How to Read This ManualIt is assumed that the readers of this manual have general knowledge in the fields of
electrical engineering, logic circuits, and microcontrollers.
To understand the overall functions of the V850ES/JG2
→ Read this manual according to the CONTENTS.
To find the details of a register where the name is known
→ Use APPENDIX B REGISTER INDEX.
Register format
→ The name of the bit whose number is in angle brackets (<>) in the figure of the
register format of each register is defined as a reserved word in the device file.
To understand the details of an instruction function
→ Refer to the V850ES Architecture User’s Manual available separately.
To know the electrical specifications of the V850ES/JG2
→ See CHAPTER 28 ELECTRICAL SPECIFICATIONS.
The “yyy bit of the xxx register” is described as the “xxx.yyy bit” in this manual. Note
with caution that if “xxx.yyy” is described as is in a program, however, the
compiler/assembler cannot recognize it correctly.
The mark <R> shows major revised points. The revised points can be easily searched
by copying an “<R>” in the PDF file and specifying it in the “Find what:” field.
6
User’s Manual U17715EJ2V0UD
Conventions Data significance: Higher digits on the left and lower digits on the right
Active low representation: xxx (overscore over pin or signal name)
Memory map address: Higher addresses on the top and lower addresses on
the bottom
Note: Footnote for item marked with Note in the text
Caution: Information requiring particular attention
Remark: Supplementary information
Numeric representation: Binary ... xxxx or xxxxB
Decimal ... xxxx
Hexadecimal ... xxxxH
Prefix indicating power of 2 (address space, memory capacity):
K (kilo): 2
M (mega): 2
G (giga): 2
10
= 1,024
20
= 1,0242
30
= 1,0243
User’s Manual U17715EJ2V0UD
7
Related Documents The related documents indicated in this publication may include preliminary versions.
However, preliminary versions are not marked as such.
Documents related to V850ES/JG2
Document Name Document No.
V850ES Architecture User’s Manual U15943E
V850ES/JG2 Hardware User’s Manual This manual
Documents related to development tools
Document Name Document No.
QB-V850ESSX2 In-Circuit Emulator U17091E
QB-V850MINI On-Chip Debug Emulator U17638E
QB-MINI2 On-Chip Debug Emulator with Flash Programming Function To be prepared
3.4.4 Areas .........................................................................................................................................60
3.4.5 Recommended use of address space ....................................................................................... 67
4.2 Basic Port Configuration ........................................................................................................88
4.3 Port Configuration................................................................................................................... 89
4.3.1 Port 0 ......................................................................................................................................... 94
4.3.2 Port 1 ......................................................................................................................................... 97
4.3.3 Port 3 ......................................................................................................................................... 98
4.3.4 Port 4 ....................................................................................................................................... 104
4.3.5 Port 5 ....................................................................................................................................... 106
4.3.6 Port 7 ....................................................................................................................................... 110
4.3.7 Port 9 ....................................................................................................................................... 112
4.3.8 Port CM ................................................................................................................................... 120
4.3.9 Port CT ....................................................................................................................................122
User’s Manual U17715EJ2V0UD
9
4.3.10 Port DH....................................................................................................................................124
4.3.11 Port DL ....................................................................................................................................126
19.3.7 ID flag ...................................................................................................................................... 678
19.4.3 EP flag..................................................................................................................................... 681
Notes 1. Connect this pin to VSS in the normal mode.
2. Connect the REGC pin to V
SS via a 4.7
24
User’s Manual U17715EJ2V0UD
P39/RXDA2/SCL00
P50/TIQ01/KR0/TOQ01/RTP00
μ
P54/SOB2/KR4/RTP04/DCK
P51/TIQ02/KR1/TOQ02/RTP01
P52/TIQ03/KR2/TOQ03/RTP02/DDI
P53/SIB2/KR3/TIQ00/TOQ00/RTP03/DDO
F capacitor.
P92/A2/TIP41/TOP41
P93/A3/TIP40/TOP40
P90/A0/KR6/TXDA1/SDA02
P91/A1/KR7/RXDA1/SCL02
P55/SCKB2/KR5/RTP05/DMS
P94/A4/TIP31/TOP31
P95/A5/TIP30/TOP30
P96/A6/TIP21/TOP21
P97/A7/SIB1/TIP20/TOP20
Pin names
A0 to A21:
AD0 to AD15:
ADTRG:
ANI0 to ANI11:
ANO0, ANO1:
ASCKA0:
ASTB:
AV
REF0, AVREF1:
AV
SS:
BVDD:
BV
SS:
CLKOUT:
DCK:
DDI:
DDO:
DMS:
DRST:
EV
DD:
EVSS:
FLMD0, FLMD1:
HLDAK:
HLDRQ:
INTP0 to INTP7:
KR0 to KR7:
NMI:
P02 to P06:
P10, P11:
P30 to P39:
P40 to P42:
P50 to P55:
P70 to P711:
P90 to P915:
PCM0 to PCM3:
PCT0, PCT1,
PCT4, PCT6:
CHAPTER 1 INTRODUCTION
Address bus
Address/data bus
A/D trigger input
Analog input
Analog output
Asynchronous serial clock
Address strobe
Analog reference voltage
Analog V
SS
Power supply for bus interface
Ground for bus interface
Clock output
Debug clock
Debug data input
Debug data output
Debug mode select
Debug reset
Power supply for port
Ground for port
Flash programming mode
Hold acknowledge
Hold request
External interrupt input
Key return
Non-maskable interrupt request
Port 0
Port 1
Port 3
Port 4
Port 5
Port 7
Port 9
Port CM
Port CT
PDH0 to PDH5:
PDL0 to PDL15:
RD:
REGC:
RESET:
RTP00 to RTP05:
RXDA0 to RXDA2:
SCKB0 to SCKB4:
SCL00 to SCL02:
SDA00 to SDA02:
SIB0 to SIB4:
SOB0 to SOB4:
TIP00, TIP01,
TIP10, TIP11,
TIP20, TIP21,
TIP30, TIP31,
TIP40, TIP41,
TIP50, TIP51,
TIQ00 to TIQ03:
TOP00, TOP01,
TOP10, TOP11,
TOP20, TOP21,
TOP30, TOP31,
TOP40, TOP41,
TOP50, TOP51,
TOQ00 to TOQ03:
TXDA0 to TXDA2:
V
DD:
V
SS:
WAIT:
WR0:
WR1:
X1, X2:
XT1, XT2:
Port DH
Port DL
Read strobe
Regulator control
Reset
Real-time output port
Receive data
Serial clock
Serial clock
Serial data
Serial input
Serial output
Timer input
Timer output
Transmit data
Power supply
Ground
Wait
Lower byte write strobe
Upper byte write strobe
Crystal for main clock
Crystal for subclock
User’s Manual U17715EJ2V0UD
25
1.6 Function Block Configuration
1.6.1 Internal block diagram
NMI
INTP0 to INTP7
TIQ00 to TIQ03
TOQ00 to TOQ03
TIP00 to TIP50,
TIP01 to TIP51
TOP00 to TOP50,
TOP01 to TOP51
INTC
16-bit timer/
counter Q:
1 ch
16-bit timer/
counter P:
6 ch
16-bit interval
timer M:
1 ch
CHAPTER 1 INTRODUCTION
ROM
Note 1
RAM
Note 2
DMAC
PC
32-bit barrel
shifter
System
registers
General-purpose
registers 32 bits × 32
CPU
Multiplier
16 × 16 → 32
ALU
Instruction
queue
BCU
HLDRQ
HLDAK
ASTB
RD
WAIT
WR0, WR1
A0 to A21
AD0 to AD15
RTP00 to RTP05
RTO
Ports
SOB0/SCL01
SIB0/SDA01
SCKB0
SOB1
SIB1
SCKB1
SOB2
SIB2
SCKB2
SOB3
SIB3
SCKB3
TXDA0/SOB4
RXDA0/SIB4
ASCKA0/SCKB4
TXDA1/SDA02
RXDA1/SCL02
TXDA2/SDA00
RXDA2/SCL00
CSIB0 I2C01
CSIB1
CSIB2
CSIB3
UARTA0
CSIB4
I2C02
UARTA1
I2C00
UARTA2
P50 to P55
P90 to P915
P70 to P711
PDH0 to PDH5
PCM0 to PCM3
PDL0 to PDL15
PCT0, PCT1, PCT4, PCT6
A/D
converter
D/A
converter
Key return
function
Watchdog
timer 2
Watch timer
Notes 1. 128/256/384/512/640 KB (flash memory) (see Table 1-1)
2. 12/24/32/40/48 KB (see Table 1-1)
P10, P11
P40 to P42
P30 to P39
P02 to P06
ANI0 to ANI11
AV
SS
AV
REF0
ADTRG
AV
REF1
ANO0, ANO1
KR0 to KR7
Internal
oscillator
CLM
DCU
CG
PLL
LVI
Regulator
CLKOUT
XT1
XT2
X1
X2
RESET
V
DD
V
SS
REGC
FLMD0
FLMD1
DD
BV
BV
SS
EV
DD
EV
SS
DRST
DMS
DDI
DCK
DDO
26
User’s Manual U17715EJ2V0UD
CHAPTER 1 INTRODUCTION
1.6.2 Internal units
(1) CPU
The CPU uses five-stage pipeline control to enable single-clock execution of address calculations, arithmetic
logic operations, data transfers, and almost all other instruction processing.
Other dedicated on-chip hardware, such as a multiplier (16 bits × 16 bits → 32 bits) and a barrel shifter (32
bits) contribute to faster complex processing.
(2) Bus control unit (BCU)
The BCU starts a required external bus cycle based on the physical address obtained by the CPU. When an
instruction is fetched from external memory space and the CPU does not send a bus cycle start request, the
BCU generates a prefetch address and prefetches the instruction code. The prefetched instruction code is
stored in an instruction queue.
(3) ROM
This is a 640/512/384/256/128 KB flash memory mapped to addresses 0000000H to 009FFFFH/0000000H to
007FFFFH/0000000H to 005FFFFH/0000000H to 003FFFFH/0000000H to 001FFFFH.
It can be accessed from the CPU in one clock during instruction fetch.
(4) RAM
This is a 48/40/32/24/12 KB RAM mapped to addresses 3FF3000H to 3FFEFFFH/3FF5000H to
3FFEFFFH/3FF7000H to 3FFEFFFH/3FF9000H to 3FFEFFFH/3FFC000H to 3FFEFFFH. It can be accessed
from the CPU in one clock during data access.
(5) Interrupt controller (INTC)
This controller handles hardware interrupt requests (NMI, INTP0 to INTP7) from on-chip peripheral hardware
and external hardware. Eight levels of interrupt priorities can be specified for these interrupt requests, and
multiplexed servicing control can be performed.
(6) Clock generator (CG)
A main clock oscillator and subclock oscillator are provided and generate the main clock oscillation frequency
(f
X) and subclock frequency (fXT), respectively. There are two modes: In the clock-through mode, fX is used as
the main clock frequency (fXX) as is. In the PLL mode, fX is used multiplied by 4 or 8.
The CPU clock frequency (f
CPU) can be selected from among fXX, fXX/2, fXX/4, fXX/8, fXX/16, fXX/32, and fXT.
(7) Internal oscillator
An internal oscillator is provided on chip. The oscillation frequency is 200 kHz (TYP). The internal oscillator
supplies the clock for watchdog timer 2 and timer M.
(8) Timer/counter
Six-channel 16-bit timer/event counter P (TMP), one-channel 16-bit timer/event counter Q (TMQ), and one-
channel 16-bit interval timer M (TMM), are provided on chip.
(9) Watch timer
This timer counts the reference time period (0.5 s) for counting the clock (the 32.768 kHz subclock or the
32.768 kHz clock f
BRG from prescaler 3). The watch timer can also be used as an interval timer for the main
clock.
User’s Manual U17715EJ2V0UD
27
(10) Watchdog timer 2
A watchdog timer is provided on chip to detect inadvertent program loops, system abnormalities, etc.
The internal oscillation clock, the main clock, or the subclock can be selected as the source clock.
Watchdog timer 2 generates a non-maskable interrupt request signal (INTWDT2) or a system reset signal
(WDT2RES) after an overflow occurs.
(11) Serial interface
The V850ES/JG2 includes three kinds of serial interfaces: asynchronous serial interface A (UARTA), 3-wire
variable-length serial interface B (CSIB), and an I
In the case of UARTA, data is transferred via the TXDA0 to TXDA2 pins and RXDA0 to RXDA2 pins.
In the case of CSIB, data is transferred via the SOB0 to SOB4 pins, SIB0 to SIB4 pins, and SCKB0 to
SCKB4 pins.
In the case of I
2
C, data is transferred via the SDA00 to SDA02 and SCL00 to SCL02 pins.
(12) A/D converter
This 10-bit A/D converter includes 12 analog input pins. Conversion is performed using the successive
approximation method.
(13) D/A converter
A two-channel, 8-bit-resolution D/A converter that uses the R-2R ladder method is provided on chip.
(14) DMA controller
A 4-channel DMA controller is provided on chip. This controller transfers data between the internal RAM and
on-chip peripheral I/O devices in response to interrupt requests sent by on-chip peripheral I/O.
(15) Key interrupt function
A key interrupt request signal (INTKR) can be generated by inputting a falling edge to the key input pins (8
channels).
(16) Real-time output function
The real-time output function transfers preset 6-bit data to output latches upon the occurrence of a timer
compare register match signal.
(17) DCU (debug control unit)
An on-chip debug function that uses the JTAG (Joint Test Action Group) communication specifications is
provided. Switching between the normal port function and on-chip debugging function is done with the
control pin input level and the OCDM register.
CHAPTER 1 INTRODUCTION
2
C bus interface (I2C).
28
User’s Manual U17715EJ2V0UD
(18) Ports
CHAPTER 1 INTRODUCTION
The following general-purpose port functions and control pin functions are available.