Document No. U17716EJ2V0UD00 (2nd edition)
Date Published February 2008 N
Printed in Japan
2005
[MEMO]
2
User’s Manual U17716EJ2V0UD
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 U17716EJ2V0UD
3
•
The information in this document is current as of January, 2008. 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.
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 U17716EJ2V0UD
PREFACE
Readers This manual is intended for users who wish to understand the functions of the
V850ES/IE2 to design application systems using the V850ES/IE2.
Purpose This manual is intended to give users an understanding of the hardware functions.
Organization The V850ES/IE2 User’s Manual is divided into two parts: Hardware (this manual) and
Architecture (V850ES Architecture User’s Manual). The organization of each manual
is as follows:
Hardware Architecture
• Pin functions • Data type
• 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/IE2
→ Read this manual according to the CONTENTS.
• To find the details of a register where the name is known
→ See APPENDIX B REGISTER INDEX.
• How to interpret the register format
→ For a bit whose bit number is enclosed in angle brackets < >, its bit name 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.
• To know the electrical specifications of the V850ES/IE2
→ See CHAPTER 19 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.
User’s Manual U17716EJ2V0UD
5
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
Data type: Word ... 32 bits
Halfword ... 16 bits
Byte ... 8 bits
6
User’s Manual U17716EJ2V0UD
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/IE2
Document Name Document No.
V850ES Architecture User’s Manual U15943E
V850ES/IE2 Hardware User’s Manual This manual
Documents related to development tools (user’s manuals)
Document Name Document No.
QB-V850ESIX2 (in-circuit emulator) U17909E
QB-MINI2 (On-Chip Debug Emulator with Programming Function) U18371E
3.4.4 Areas ............................................................................................................................................43
3.4.5 Recommended use of address space...........................................................................................47
3.4.7 Special registers ...........................................................................................................................56
3.4.8 System wait control register (VSWC)............................................................................................61
CHAPTER 4 PORT FUNCTIONS ........................................................................................................... 62
4.1 Features .....................................................................................................................................62
4.2 Basic Port Configuration..........................................................................................................62
4.3 Port Configuration.....................................................................................................................63
4.3.1 Port 0 ............................................................................................................................................67
4.3.2 Port 1 ............................................................................................................................................73
4.3.3 Port 2 ............................................................................................................................................85
4.3.4 Port 3 ............................................................................................................................................91
4.3.5 Port 4 ............................................................................................................................................98
4.3.6 Port DL........................................................................................................................................105
4.4 Output Data and Read Value of Port for Each Setting ....................................................... 108
4.5 Port Register Settings When Alternate Function Is Used.................................................. 113
12.5.1 Data format................................................................................................................................. 483
18.5.2 Features .....................................................................................................................................628
18.5.3 Standard self programming flow ................................................................................................. 629
Remark Products with -A at the end of the part number are lead-free products.
XX =
16
User’s Manual U17716EJ2V0UD
1.5 Pin Configuration
• 64-pin plastic LQFP (14 × 14)
μ
PD70F3713GC-8BS-A
μ
PD70F3714GC-8BS-A
CHAPTER 1 INTRODUCTION
Top View
P25/TOQ1B3
P24/TOQ1T3
P23/TOQ1B2
P22/TOQ1T2
P21/TOQ1B1
P20/TOQ1T1
ANI13
ANI12
ANI11
ANI10
AV
REF1
AV
DD1
AV
SS1
AV
SS0
AV
DD0
AV
REF0
EVSSEVDDP26/TOQ10
484746454443424140393837363534
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
1
2
P27/TOP31
3
4
P30/RXDA0
P31/TXDA0
P32/RXDA1
5
6
7
P33/TXDA1
P40/SIB0
P41/SOB0
P42/SCKB0
8
9
10111213141516
P43/TOP00/TIP00
P44/TOP01/TIP01
PDL0
PDL1
PDL2
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
PDL3
PDL4
PDL5/FLMD1
PDL6
PDL7
EV
SS
EV
DD
FLMD0
P10/TOQH01/TIQ01/TOQ01
P11/TIQ02/TOQ02
P12/TOQH02/TIQ03/TOQ03
P13/TIQ00
P14/TOQH03/EVTQ0
P16(CLMER)
P17/TOP21/TIP21
P00/INTP0/TOQH0OFF
Note
/TOQ00(CLMER)
Note
/TIP20
SS
X2
DD
V
V
REGC
P06/INTP6
P05/INTP5/ADTRG1
P04/INTP4/ADTRG0
P03/INTP3/TOP3OFF
P02/INTP2/TOP2OFF
P01/INTP1/TOQ1OFF
ANI00
ANI01
ANI02
ANI03
X1
RESET
Note The CLMER signal is enabled only when P16 is specified as an output port or the output function of
TOQ00. When an error (oscillator stop) is detected by the clock monitor, a low level is forcibly output.
Low-level output is released by reset signal. For details, see Table 4-5 Alternate-Function Pins of
Port 1.
User’s Manual U17716EJ2V0UD
17
CHAPTER 1 INTRODUCTION
Pin Identification
ADTRG0, ADTRG1: A/D trigger input SCKB0: Serial clock
ANI00 to ANI03, SIB0: Serial input
ANI10 to ANI13: Analog input SOB0: Serial output
AV
DD0, AVDD1: Analog power supply TIP00, TIP01,
AV
REF0, AVREF1: Analog reference voltage TIP20, TIP21,
AV
SS0, AVSS1: Analog ground TIQ00 to TIQ03: Timer trigger input
EVDD: Power supply for port TOP00, TOP01,
EV
SS: Ground for port TOP21, TOP31,
EVTQ0: Timer event count input TOQ1B1 to TOQ1B3,
FLMD0, FLMD1: Flash programming mode TOQ1T1 to TOQ1T3,
INTP0 to INTP6: External interrupt input TOQ00 to TOQ03,
P00 to P06: Port 0 TOQ10,
P10 to P14, P16, P17: Port 1 TOQH01 to TOQH03: Timer output
P20 to P27: Port 2 TOP2OFF, TOP3OFF,
P30 to P33: Port 3 TOQ1OFF, TOQH0OFF: Timer output off
P40 to P44: Port 4 TXDA0, TXDA1: Transmit data
PDL0 to PDL7: Port DL V
REGC: Regulator control V
DD: Power supply
SS: Ground
RESET: Reset X1, X2: Clock oscillator pin
RXDA0, RXDA1: Receive data
18
User’s Manual U17716EJ2V0UD
1.6 Function Blocks
(1) Internal block diagram
INTP0 to INTP6
TIQ00 to TIQ03, EVTQ0,
TOQ1OFF, TOQH0OFF
TOQ00 to TOQ03, TOQ10,
TOQH01 to TOQH03,
TOQ1T1 to TOQ1T3,
TOQ1B1 to TOQ1B3
TIP00, TIP01, TIP20,TIP21,
TOP2OFF, TOP3OFF
TOP00, TOP01,
TOP21,TOP31
CHAPTER 1 INTRODUCTION
INTC
TMM
× 1 ch
TMQ
× 2 ch
TMP
× 4 ch
WDT
ROM
Note
RAM
6 KB
PC
32-bit
barrel shifter
System
registers
Generalpurpose
registers
(32 bits
×
32)
CPU
Multiplier
(16 × 16 → 32)
ALU
BCU
Instruction
queue
TXDA0, TXDA1
RXDA0, RXDA1
SOB0
SIB0
SCKB0
ANI00 to ANI03
ADTRG0
AV
REF0
AV
DD0
AV
SS0
ANI10 to ANI13
ADTRG1
AV
REF1
AV
DD1
AV
SS1
UARTA
× 2 ch
CSIB
ADC0
ADC1
Port
P00 to P06
P20 to P27
P30 to P33
P40 to P44
PDL0 to PDL7
P10 to P14, P16, P17
CG
PLL
RG
Regulator
CLM
POC/LVI
X1
X2
RESET
FLMD0
FLMD1
EV
DD
EV
SS
V
DD
V
SS
REGC
Note
μ
PD70F3713: 64 KB (flash memory)
μ
PD70F3714: 128 KB (flash memory)
User’s Manual U17716EJ2V0UD
19
(2) Internal units
(a) 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), help accelerate complex processing.
(b) Bus control unit (BCU)
The BCU controls the internal bus.
(c) ROM
This is flash memory that is mapped from address 00000000H.
During instruction fetch, ROM/flash memory can be accessed from the CPU in 1-clock cycles. The
internal ROM capacity and area differ as follows depending on the product.
μ
PD70F3713 64 KB (flash memory) xn000000H to xn00FFFFH
μ
PD70F3714 128 KB (flash memory) xn000000H to xn01FFFFH
CHAPTER 1 INTRODUCTION
Part Number Internal ROM Capacity Internal ROM Area
Remark n = xx11B
(d) RAM
This is a 6 KB internal RAM that is mapped to the addresses xnFFD800H to xnFFEFFFH.
During instruction fetch or data access, data can be accessed from the CPU in 1-clock cycles.
Remark n = xx11B
(e) Interrupt controller (INTC)
This controller handles hardware interrupt requests (INTP0 to INTP6) from on-chip peripheral hardware
and external hardware. Eight levels of interrupt priorities can be specified for these interrupt requests, and
multiple-interrupt servicing control can be performed.
(f) Clock generator (CG)
The clock generator includes two basic operation modes: PLL mode (fixed to multiplication by eight) and
clock-through mode. It generates four types of clocks (f
the operating clock for the CPU (f
(g) Timer/counter
This unit incorporates one 16-bit interval timer M (TMM) channel, two 16-bit timer/event counter Q (TMQ)
channels, and four 16-bit timer/event counter P (TMP) channels, and can measure pulse interval widths or
frequency, enable an inverter function for motor control, and output a programmable pulse.
(h) Watchdog timer (WDT)
A watchdog timer is equipped to detect program loops, system abnormalities, etc.
It generates a non-maskable interrupt request signal (INTWDT) or internal reset signal (WDTRES) after an
overflow occurs.
XX, fXX/2, fXX/4, fXX/8), and supplies one of them as
CPU).
20
User’s Manual U17716EJ2V0UD
CHAPTER 1 INTRODUCTION
(i) Serial interface
The V850ES/IE2 includes two asynchronous serial interface A (UARTA) channels and one 3-wire variable
length serial I/O (CSIB) channel as the serial interface.
For UARTA, data is transferred via the TXDAn and RXDAn pins (n = 0, 1).
For CSIB, data is transferred via the SOB0, SIB0, and SCKB0 pins.
(j) A/D converter (ADC)
The V850ES/IE2 includes two-channel 10-bit A/D converters (ADC0 and ADC1) with four analog input
pins.
(k) Ports
As shown below, the following ports have general-purpose port functions and control pin functions.
Port I/O Alternate Function
Port 0 7-bit I/O Timer/counter input, external interrupt input, external trigger input of A/D converter
Port 1 7-bit I/O Timer/counter I/O
Port 2 8-bit I/O Timer/counter output
Port 3 4-bit I/O Serial interface I/O
Port 4 5-bit I/O Serial interface I/O, timer/counter I/O
Port DL 8-bit I/O
−
User’s Manual U17716EJ2V0UD
21
CHAPTER 2 PIN FUNCTIONS
2.1 List of Pin Functions
The names and functions of the pins in the V850ES/IE2 are listed below. These pins can be divided into port pins
and non-port pins according to their function.
There are two power supplies for the I/O buffer of a pin: power supply for A/D converter (AV
power supply for external pin (EVDD). The relationship between each power supply and the pins is shown below.
Table 2-1. I/O Buffer Power Supplies for Each Pin
Power Supply Corresponding Pins
AVDD0, AVDD1ANI00 to ANI03, ANI10 to ANI13
EVDDPorts 0 to 4, port DL, RESET
(1) Port pins
Pin Name Pin No. I/O Function Alternate Function
P00 17 INTP0/TOQH0OFF
P01 16 INTP1/TOQ1OFF
P02 15 INTP2/TOP2OFF
P03 14 INTP3/TOP3OFF
P04 13 INTP4/ADTRG0
P05 12 INTP5/ADTRG1
P06 11
P10 24 TOQH01/TIQ01/TOQ01
P11 23 TIQ02/TOQ02
P12 22 TOQH02/TIQ03/TOQ03
P13 21 TIQ00
P14 20 TOQH03/EVTQ0
P16
(CLMER)
P17 18
Note
19 TOQ00 (CLMER)
I/O Port 0
7-bit I/O port
Input data read/output data write is enabled in 1-bit units.
Use of an on-chip pull-up resistor can be specified in 1-bit
units (the on-chip pull-up resistor can be connected only in
the input mode of the port mode and when the alternate
function of the pin is used).
I/O Port 1
7-bit I/O port
Input data read/output data write is enabled in 1-bit units.
Use of an on-chip pull-up resistor can be specified in 1-bit
units (the on-chip pull-up resistor can be connected only in
the input mode of the port mode, when the input mode of
alternate function of the pin is used, and when TOP21 and
TOQH01 to TOQH03 pins, which function as output pins
when their alternate function is used, go into a highimpedance state).
INTP6
TOP21/TIP21
DD0 and AVDD1) and
Note
/TIP20
(1/2)
Note The CLMER signal is enabled only when P16 is specified as an output port or the output function of
TOQ00. When an error (oscillator stop) is detected by the clock monitor, a low level is forcibly output.
Low-level output is released by reset signal. For details, see Table 4-5 Alternate-Function Pins of Port
1.
22
User’s Manual U17716EJ2V0UD
<R>
CHAPTER 2 PIN FUNCTIONS
Pin Name Pin No. I/O Function Alternate Function
P20 54 TOQ1T1
P21 53 TOQ1B1
P22 52 TOQ1T2
P23 51 TOQ1B2
P24 50 TOQ1T3
P25 49 TOQ1B3
P26 46 TOQ10
P27 45
P30 44 RXDA0
P31 43 TXDA0
P32 42 RXDA1
P33 41
P40 40 SIB0
P41 39 SOB0
P42 38 SCKB0
P43 37 TOP00/TIP00
P44 36
PDL0 35
PDL1 34
PDL2 33
PDL3 32
PDL4 31
PDL5 30 FLMD1
PDL6 29
PDL7 28
I/O Port 2
8-bit I/O port
Input data read/output data write is enabled in 1-bit units.
Use of an on-chip pull-up resistor can be specified in 1-bit
units (the on-chip pull-up resistor can be connected only in
the input mode of the port mode, or when TOQ1T1 to
TOQ1T3 and TOQ1B1 to TOQ1B3 and TOP31 pins, which
function as output pins when their alternate function is used,
go into a high-impedance state).
I/O Port 3
4-bit I/O port
Input data read/output data write is enabled in 1-bit units.
Use of an on-chip pull-up resistor can be specified in 1-bit
units (the on-chip pull-up resistor can be connected only in
the input mode of the port mode and when the input mode of
the alternate function of the pin is used).
I/O Port 4
5-bit I/O port
Input data read/output data write is enabled in 1-bit units.
An on-chip pull-up resistor can be specified in 1-bit units (the
on-chip pull-up resistor can be connected only in the input
mode of the port mode, including the case where the SCKB0
pin in the slave mode, and when the alternate function of the
pin is used in the input mode).
I/O Port DL
8-bit I/O port
Input data read/output data write is enabled in 1-bit units.
An on-chip pull-up resistor can be specified in 1-bit units
(the on-chip pull-up resistor can be connected when the
pins are in the port mode and input mode).
TOP31
TXDA1
TOP01/TIP01
−
−
−
−
−
−
−
(2/2)
User’s Manual U17716EJ2V0UD
23
CHAPTER 2 PIN FUNCTIONS
(2) Non-port pins
(1/2)
Pin Name Pin No. I/O Function Alternate Function
ADTRG0 13 Input INTP4/P04
ADTRG1 12 Input
ANI00
ANI01
ANI02
ANI03
ANI10
ANI11
ANI12
ANI13
AVDD0
AVDD1
AVREF0
AVREF1
AVSS0
AVSS1
EVDD
EVSS
1
2
3
4
58
57
56
55
63
60
64
59
62
61
26, 47
27, 48
Input
Input
Input
Input
Input
Input
Input
Input
External trigger input for A/D converters 0, 1
INTP5/P05
Analog input to A/D converters 0, 1
−−
Positive power supply for A/D converters 0, 1 (same
potential as V
−
− −
Reference voltage input for A/D converters 0, 1 (same
potential as AV
−
− −
Ground potential for A/D converters 0, 1 (same potential
SS)
as V
−
−
Positive power supply for external pin
Ground potential for external pin
−
DD)
DD0 and AVDD1)
−
−
−
−
−
−
−
−
−
−
−
−
−
EVTQ0 20 Input External event count input of TMQ0 TOQH03/P14