Document No. U16896EJ2V0UD00 (2nd edition)
Date Published August 2006 N CP(K)
Printed in Japan
2004
Page 2
[MEMO]
2
User’s Manual U16896EJ2V0UD
Page 3
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 U16896EJ2V0UD
3
Page 4
Caution:
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.
Windows and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in
the United States and/or other countries.
SuperFlash is a registered trademark of Silicon Storage Technology, Inc. in several countries
including the United States and Japan.
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.
μ
PD70F3302 and 70F3302Y use SuperFlash® technology licensed from Silicon Storage
Technology, Inc.
4
User’s Manual U16896EJ2V0UD
Page 5
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.
•
The information in this document is current as of February, 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 U16896EJ2V0UD
5
Page 6
PREFACE
Readers This manual is intended for users who wish to understand the functions of the
V850ES/KE1+ and design application systems using these products.
PurposeThis manual is intended to give users an understanding of the hardware functions of the
V850ES/KE1+ shown in the Organization below.
Organization This manual is divided into two parts: Hardware (this manual) and Architecture (V850ES
Architecture User’s Manual).
Hardware Architecture
• Pin functions
• CPU function
• On-chip peripheral functions
• Flash memory programming
• Electrical specifications
How to Read This Manual It is assumed that the readers of this manual have general knowledge in the fields of
electrical engineering, logic circuits, and microcontrollers.
To find the details of a register where the name is known
→ Refer to APPENDIX C REGISTER INDEX.
To understand the details of an instruction function
→ Refer to the V850ES Architecture User’s Manual.
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 overall functions of the V850ES/KE1+
→ Read this manual according to the CONTENTS.
To know the electrical specifications of the V850ES/KE1+
→ Refer to 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 even 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.
• Data types
• Register set
• Instruction format and instruction set
• Interrupts and exceptions
• Pipeline operation
6
User’s Manual U16896EJ2V0UD
Page 7
ConventionsData 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
10
= 1,024
M (mega): 220 = 1,0242
G (giga): 2
30
= 1,0243
Related DocumentsThe related documents indicated in this publication may include preliminary versions.
However, preliminary versions are not marked as such.
Documents related to V850ES/KE1+
Document Name Document No.
V850ES Architecture User’s Manual U15943E
V850ES/KE1+ Hardware User’s Manual This manual
Documents related to development tools (user’s manuals)
3.4.4 Areas ............................................................................................................................................. 54
3.4.5 Recommended use of address space ........................................................................................... 56
3.4.7 Special registers ............................................................................................................................ 65
CHAPTER 4 PORT FUNCTIONS ............................................................................................................71
4.1 Features ...................................................................................................................................... 71
4.2 Basic Port Configuration........................................................................................................... 71
4.3 Port Configuration...................................................................................................................... 72
4.3.1 Port 0 ............................................................................................................................................. 78
4.3.2 Port 3 ............................................................................................................................................. 80
4.3.3 Port 4 ............................................................................................................................................. 85
4.3.4 Port 5 ............................................................................................................................................. 87
4.3.5 Port 7 ............................................................................................................................................. 90
4.3.6 Port 9 ............................................................................................................................................. 91
4.3.7 Port CM.......................................................................................................................................... 97
8
User’s Manual U16896EJ2V0UD
Page 9
4.3.8 Port DL ...........................................................................................................................................99
14.5.1 Data format...................................................................................................................................408
17.1.1 Features .......................................................................................................................................531
17.3.7 ID flag ........................................................................................................................................... 551
17.5.3 EP flag..........................................................................................................................................561
26.5.2 Features .......................................................................................................................................647
26.5.3 Standard self programming flow ................................................................................................... 648
Standby function HALT/IDLE/STOP/sub-IDLE mode
Operating ambient temperature TA = −40 to +85°C
Notes 1. Number of channels in parentheses indicates the number of pins for which the N-ch open-drain output
can be selected by software.
2. Only in products with an I
2
C bus (Y products). For the product name, refer to each user’s manual.
Note 2
User’s Manual U16896EJ2V0UD
19
Page 20
CHAPTER 1 INTRODUCTION
1.1.2 78K0/Kx1+, 78K0/Kx1 products lineup
30-pin SSOP (7.62 mm 0.65 mm pitch)
78K0/KB1
PD78F0103
μ
Two-power flash: 24 KB,
RAM: 768 B
44-pin LQFP (10 × 10 mm 0.8 mm pitch)
Mask ROM: 24 KB,
RAM: 768 B
Mask ROM: 16 KB,
RAM: 768 B
Mask ROM: 8 KB,
RAM: 512 B
78K0/KC1
μ
PD78F0114
Two-power flash: 32 KB,
RAM: 1 KB
Mask ROM: 32 KB,
RAM: 1 KB
Mask ROM: 24 KB,
RAM: 1 KB
Mask ROM: 16 KB,
RAM: 512 B
Mask ROM: 8 KB,
RAM: 512 B
52-pin LQFP (10 × 10 mm 0.65 mm pitch)
78K0/KD1
PD78F0124
μ
Two-power flash: 32 KB,
RAM: 1 KB
Mask ROM: 32 KB,
RAM: 1 KB
Mask ROM: 24 KB,
RAM: 1 KB
Mask ROM: 16 KB,
RAM: 512 B
Mask ROM: 8 KB,
RAM: 512 B
64-pin LQFP, TQFP (10 × 10 mm 0.5 mm pitch, 12 × 12 mm 0.65 mm pitch, 14 × 14 mm 0.8 mm pitch)
78K0/KE1
μ
PD78F0138
Flash memory: 60 KB,
RAM: 2 KB
μ
PD78F0134
Flash memory: 32 KB,
RAM: 1 KB
Mask ROM: 60 KB,
RAM: 2 KB
Mask ROM: 48 KB,
RAM: 2 KB
Mask ROM: 32 KB,
RAM: 1 KB
Mask ROM: 24 KB,
RAM: 1 KB
Mask ROM: 16 KB,
RAM: 512 B
Mask ROM: 8 KB,
RAM: 512 B
80-pin TQFP, QFP (12 × 12 mm 0.5 mm pitch, 14 × 14 mm 0.65 mm pitch)
78K0/KF1
PD78F0148
μ
Flash memory: 60 KB,
RAM: 2 KB
Mask ROM: 60 KB,
RAM: 2 KB
Mask ROM: 48 KB,
RAM: 2 KB
Mask ROM: 32 KB,
RAM: 1 KB
Mask ROM: 24 KB,
RAM: 1 KB
Note Products with an on-chip debug function
PD780103
μ
PD780102
μ
PD780101
μ
PD780114
μ
μ
PD780113
PD780112
μ
μ
PD780111
PD780124
μ
μ
PD780123
PD780122
μ
PD780121
μ
μ
PD780138
PD780136
μ
μ
PD780134
PD780133
μ
μ
PD780132
μ
PD780131
PD780148
μ
μ
PD780146
PD780144
μ
μ
PD780143
78K0/KB1+
PD78F0103H
μ
Single-power flash: 24 KB,
RAM: 768 B
μ
PD78F0102H
Single-power flash: 16 KB,
RAM: 768 B
μ
PD78F0101H
Single-power flash: 8 KB,
RAM: 512 B
78K0/KC1+
μ
PD78F0114H/HD
Single-power flash: 32 KB,
RAM: 1 KB
μ
PD78F0113H
Single-power flash: 24 KB,
RAM: 1 KB
PD78F0112H
μ
Single-power flash: 16 KB,
RAM: 512 B
Note
78K0/KD1+
PD78F0124H/HD
μ
Single-power flash: 32 KB,
RAM: 1 KB
μ
PD78F0123H
Single-power flash: 24 KB,
RAM: 1 KB
PD78F0122H
μ
Single-power flash: 16 KB,
RAM: 512 B
Note
78K0/KE1+
PD78F0138H/HD
μ
Single-power flash: 60 KB,
RAM: 2 KB
PD78F0136H
μ
Single-power flash: 48 KB,
RAM: 2 KB
PD78F0134H
μ
Single-power flash: 32 KB,
RAM: 1 KB
PD78F0133H
μ
Single-power flash: 24 KB,
RAM: 1 KB
μ
PD78F0132H
Single-power flash: 16 KB,
RAM: 512 B
Note
78K0/KF1+
μ
PD78F0148H/HD
Single-power flash: 60 KB,
RAM: 2 KB
Note
20
User’s Manual U16896EJ2V0UD
Page 21
CHAPTER 1 INTRODUCTION
The list of functions in the 78K0/Kx1 is shown below.
Part Number
78K0/KB1 78K0/KC1 78K0/KD1 78K0/KE1 78K0/KF1
Item
Number of pins 30 pins 44 pins 52 pins 64 pins 80 pins
Internal
memory
(KB)
Mask ROM 8
Flash memory
16/
− 8/
24
24
−
16
24/
− 8/
32
32
−
16
24/
− 8/
32
32
−
16
−
24/
32
− 48/
60
32
−
− 24/
60
32
48/
−
60
60
−
RAM 0.5 0.75 0.5 1 0.5 1 0.5 1 2 1 2
Power supply voltage VDD = 2.5 to 5.5 V
Minimum instruction execution time
μ
s (when 12 MHz, VDD =
0.166
4.0 to 5.5 V)
μ
s (when 10 MHz, VDD =
0.2
3.5 to 5.5 V)
μ
s (when 8.38 MHz, VDD
0.238
<Connect REGC pin to V
0.166
μ
s (when 12 MHz, VDD = 4.0 to 5.5 V)
μ
s (when 10 MHz, VDD = 3.5 to 5.5 V)
0.2
0.238
μ
s (when 8.38 MHz, VDD = 3.0 to 5.5 V)
μ
s (when 5 MHz, VDD = 2.5 to 5.5 V)
0.4
Notes 1, 2
DD>
= 3.0 to 5.5 V)
μ
s (when 5 MHz, VDD = 2.5
0.4
to 5.5 V)
Clock
X1 input 2 to 12 MHz
Subclock
−
32.768 kHz
Internal oscillator 240 kHz (TYP.)
Port
CMOS I/O 17 19 26 38 54
CMOS input 4 8
CMOS output 1
Timer
N-ch open-drain I/O
−
16 bits (TM0) 1 ch 2 ch 1 ch2 ch
4
8 bits (TM5) 1 ch 2 ch
8 bits (TMH) 2 ch
For watch
−
1 ch
WDT 1 ch
Serial
interface
3-wire CSI
Automatic transmit/
Note 3
1 ch 2 ch 1 ch2 ch
−
1 ch
receive 3-wire CSI
Note 3
UART
−
1 ch
UART supporting LIN-bus 1 ch
10-bit A/D converter 4 ch 8 ch
External 6 7 8 9 9 Interrupt
Internal 11 12 15 16 19 17 20
Key return input
Reset
RESET pin Provided
−
4 ch 8 ch
POC 2.85 V ±0.15 V/3.5 V ±0.20 V (selectable by mask option)
LVI 2.85 V/3.1 V/3.3 V ±0.15 V/3.5 V/3.7 V/3.9 V/4.1 V/4.3 V ±0.2 V (selectable by software)
Clock monitor Provided
WDT Provided
Clock output/buzzer output
− Clock output
Provided
only
Multiplier/divider
ROM correction
−
−
16 bits × 16 bits, 32 bits ÷ 16 bits
Provided
−
Standby function HALT/STOP mode
Operating ambient temperature
Standard and special (A) grade products: −40 to +85°C
Special (A1) grade products: −40 to +110°C (mask ROM version),
−40 to +105°C (flash memory version)
Special (A2) grade products: −40 to +125°C (mask ROM version)
Notes 1. If the POC circuit detection voltage (VPOC) is used with 2.85 V ±0.15 V, then use the products in the voltage
range of 3.0 to 5.5 V.
2. If the POC circuit detection voltage (V
POC) is used with 3.5 V ±0.2 V, then use the products in the voltage
range of 3.7 to 5.5 V.
3. Select either of the functions of these alternate-function pins.
User’s Manual U16896EJ2V0UD
21
Page 22
CHAPTER 1 INTRODUCTION
The list of functions in the 78K0/Kx1+ is shown below.
Part Number
Item
Number of pins 30 pins 44 pins 52 pins 64 pins 80 pins
The CPU uses five-stage pipeline control to enable single-clock execution of address calculations,
arithmetic logic operations, data transfers, and almost all other types of 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 consists of a 128 KB mask ROM or flash memory mapped to the address spaces from 0000000H to
001FFFFH.
ROM can be accessed by the CPU in one clock cycle during instruction fetch.
(d) RAM
This consists of a 4 KB RAM mapped to the address spaces from 3FFE000H to 3FFEFFFH.
RAM can be accessed by the CPU in one clock cycle during data access.
(e) 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.
(f) Clock generator (CG)
A main clock oscillator and subclock oscillator are provided and generate the main clock oscillation
frequency (f
There are two modes: In the clock-through mode, f
the PLL mode, fX is used multiplied by 4.
The CPU clock frequency (f
(g) Timer/counter
One 16-bit timer/event counter 0 channel, one 16-bit timer/event counter P channel, and two 8-bit
timer/event counter 5 channels are incorporated, enabling measurement of pulse intervals and frequency
as well as programmable pulse output.
Two 8-bit timer/event counter 5 channels can be connected in cascade to configure a 16-bit timer.
Two 8-bit timer H channels enabling programmable pulse output are provided on chip.
(h) Watch timer
This timer counts the reference time (0.5 seconds) for counting the clock from the subclock (32.768 kHz)
or f
BRG (32.768 kHz) from the clock generator. At the same time, the watch timer can be used as an
interval timer.
CHAPTER 1 INTRODUCTION
X) and subclock frequency (fXT), respectively.
X is used as the main clock frequency (fXX) as is. In
CPU) can be selected from among fXX, fXX/2, fXX/4, fXX/8, fXX/16, fXX/32, and fXT.
28
User’s Manual U16896EJ2V0UD
Page 29
CHAPTER 1 INTRODUCTION
(i) Watchdog timer
Two watchdog timer channels are provided on chip to detect program loops and system abnormalities.
Watchdog timer 1 can be used as an interval timer. When used as a watchdog timer, it generates a non-
maskable interrupt request signal (INTWDT1) or system reset signal (WDTRES1) after an overflow occurs.
When used as an interval timer, it generates a maskable interrupt request signal (INTWDTM1) after an
overflow occurs.
Watchdog timer 2 operates by default following reset release.
It generates a non-maskable interrupt request signal (INTWDT2) or system reset signal (WDTRES2) after
an overflow occurs.
(j) Serial interface (SIO)
The V850ES/KE1+ includes three kinds of serial interfaces: an asynchronous serial interface (UARTn)
(supporting 1-channel LIN), a clocked serial interface (CSI0n), and an I
2
C bus interface (I2C0), and can
simultaneously use up to five channels.
For UARTn, data is transferred via the TXDn and RXDn pins.
For CSI0n, data is transferred via the SO0n, SI0n, and SCK0n pins.
2
For I
C0, data is transferred via the SDA0 and SCL0 pins.
I2C0 is provided only in the μPD703302Y and 70F3302Y.
Remark n = 0, 1
(k) A/D converter
This high-speed, high-resolution 10-bit A/D converter includes 8 analog input pins. Conversion is
performed using the successive approximation method.
(l) ROM correction
This function is used to replace part of a program in the mask ROM with that contained in the internal
RAM. Up to four correction addresses can be specified.
(m) Key interrupt function
A key interrupt request signal (INTKR) can be generated by inputting a falling edge to the eight key input
pins.
(n) Real-time output function
This function transfers 6-bit data set beforehand to output latches upon occurrence of a timer compare
register match signal.
A 1-channel 6-bit data real-time output function is provided on chip.
(o) Clock monitor
The clock monitor samples the main clock (f
X) using the internal oscillation clock (fR), and generates a
reset request signal when the oscillation of the main clock is stopped.
(p) Low-voltage detector (LVI)
The low-voltage detector compares the supply voltage (V
an internal interrupt signal or internal reset signal when V
DD) and detection voltage (VLVI), and generates
DD < VLVI.
User’s Manual U16896EJ2V0UD
29
Page 30
CHAPTER 1 INTRODUCTION
(q) Power-on-clear (POC) circuit
The power-on-clear circuit generates an internal reset signal at power on.
The power-on-clear circuit compares the supply voltage (V
an internal reset signal when V
DD < VPOC.
DD) and detection voltage (VPOC), and generates
(r) Ports
As shown below, the following ports have general-purpose port functions and control pin functions.
{ Memory space Program (physical address) space: 64 MB linear
Data (logical address) space: 4 GB linear
{ General-purpose registers: 32 bits × 32
{ Internal 32-bit architecture
{ 5-stage pipeline control
{ Multiply/divide instructions
{ Saturated operation instructions
{ 32-bit shift instruction: 1 clock
{ Load/store instruction with long/short format
{ Four types of bit manipulation instructions
• SET1
• CLR1
• NOT1
• TST1
CHAPTER 3 CPU FUNCTIONS
40
User’s Manual U16896EJ2V0UD
Page 41
CHAPTER 3 CPU FUNCTIONS
3.2 CPU Register Set
The CPU registers of the V850ES/KE1+ can be classified into two categories: a general-purpose program register
set and a dedicated system register set. All the registers have 32-bit width.
For details, refer to the V850ES Architecture User’s Manual.
(1) Program register set (2) System register set
310310
r0
r1
r2
r3
r4
r5
r6
r7
r8
r9
r10
r11
r12
r13
r14
r15
r16
r17
r18
r19
r20
r21
r22
r23
r24
r25
r26
r27
r28
r29
r30
r31
(Zero register)
(Assembler-reserved register)
(Stack pointer (SP))
(Global pointer (GP))
(Text pointer (TP))
(Element pointer (EP))
(Link pointer (LP))
EIPC
EIPSW
FEPC
FEPSW
ECR(Interrupt source register)
PSW(Program status word)
CTPC
CTPSW
DBPC
DBPSW
CTBP(CALLT base pointer)
(Interrupt status saving register)
(Interrupt status saving register)
(NMI status saving register)
(NMI status saving register)
(CALLT execution status saving register)
(CALLT execution status saving register)
(Exception/debug trap status saving register)
(Exception/debug trap status saving register)
310
PC(Program counter)
User’s Manual U16896EJ2V0UD
41
Page 42
CHAPTER 3 CPU FUNCTIONS
3.2.1 Program register set
The program register set includes general-purpose registers and a program counter.
(1) General-purpose registers (r0 to r31)
Thirty-two general-purpose registers, r0 to r31, are available. All of these registers can be used as a data
variable or address variable.
However, r0 and r30 are implicitly used by instructions and care must be exercised when using these registers.
r0 always holds 0 and is used for operations that use 0 and offset 0 addressing. r30 is used as a base pointer
when performing memory access with the SLD and SST instructions.
Also, r1, r3 to r5, and r31 are implicitly used by the assembler and C compiler. Therefore, before using these
registers, their contents must be saved so that they are not lost, and they must be restored to the registers
after the registers have been used. There are cases when r2 is used by the real-time OS. If r2 is not used by
the real-time OS, r2 can be used as a variable register.
Table 3-1. Program Registers
Name Usage Operation
r0 Zero register Always holds 0
r1 Assembler-reserved register Working register for generating 32-bit immediate
r2 Address/data variable register (when r2 is not used by the real-time OS to be used)
r3 Stack pointer Used to generate stack frame when function is called
r4 Global pointer Used to access global variable in data area
r5 Text pointer Register to indicate the start of the text area (area for placing program code)
r6 to r29 Address/data variable register
r30 Element pointer Base pointer when memory is accessed
r31 Link pointer Used by compiler when calling function
PC Program counter Holds instruction address during program execution
(2) Program counter (PC)
This register holds the address of the instruction under execution. The lower 26 bits of this register are valid,
and bits 31 to 26 are fixed to 0. If a carry occurs from bit 25 to bit 26, it is ignored.
Bit 0 is fixed to 0, and branching to an odd address cannot be performed.
3126 251 0
PC
Fixed to 0Instruction address under execution0
After reset
00000000H
42
User’s Manual U16896EJ2V0UD
Page 43
CHAPTER 3 CPU FUNCTIONS
3.2.2 System register set
System registers control the status of the CPU and hold interrupt information.
Read from and write to system registers are performed by setting the system register numbers shown below with
the system register load/store instructions (LDSR, STSR instructions).
Table 3-2. System Register Numbers
<R>
System
Register No.
0 Interrupt status saving register (EIPC)
1 Interrupt status saving register (EIPSW)
2 NMI status saving register (FEPC)
3 NMI status saving register (FEPSW)
System Register Name
Note 1
Yes Yes
Note 1
Yes Yes
Note 1
Yes Yes
Note 1
Yes Yes
Operand Specification Enabled
LDSR
Instruction
STSR
Instruction
4 Interrupt source register (ECR) No Yes
5 Program status word (PSW) Yes Yes
6 to 15
Reserved numbers for future function expansion (The operation is not guaranteed
No No
if accessed.)
16 CALLT execution status saving register (CTPC) Yes Yes
17 CALLT execution status saving register (CTPSW) Yes Yes
18 Exception/debug trap status saving register (DBPC) Yes
19 Exception/debug trap status saving register (DBPSW) Yes
Note 2
Yes
Note 2
Yes
Note 2
Note 2
20 CALLT base pointer (CTBP) Yes Yes
21 to 31
Reserved numbers for future function expansion (The operation is not guaranteed
No No
if accessed.)
Notes 1. Since only one set of these registers is available, the contents of this register must be saved by the
program when multiple interrupt servicing is enabled.
2. These registers can be accessed only during the interval between the execution of the DBTRAP
instruction or illegal opcode and the DBRET instruction.
Caution Even if bit 0 of EIPC, FEPC, or CTPC is set (1) by the LDSR instruction, bit 0 is ignored during return
with the RETI instruction following interrupt servicing (because bit 0 of PC is fixed to 0). When
setting a value to EIPC, FEPC, and CTPC, set an even number (bit 0 = 0).
User’s Manual U16896EJ2V0UD
43
Page 44
CHAPTER 3 CPU FUNCTIONS
(1) Interrupt status saving registers (EIPC, EIPSW)
There are two interrupt status saving registers, EIPC and EIPSW.
Upon occurrence of a software exception or a maskable interrupt, the contents of the program counter (PC)
are saved to EIPC and the contents of the program status word (PSW) are saved to EIPSW (upon occurrence
of a non-maskable interrupt (NMI), the contents are saved to the NMI status saving registers (FEPC, FEPSW)).
The address of the next instruction following the instruction executed when a software exception or maskable
interrupt occurs is saved to EIPC, except for some instructions (refer to 17.9 Periods in Which Interrupts
Are Not Acknowledged by CPU).
The current PSW contents are saved to EIPSW.
Since there is only one set of interrupt status saving registers, the contents of these registers must be saved
by the program when multiple interrupt servicing is enabled.
Bits 31 to 26 of EIPC and bits 31 to 8 of EIPSW are reserved (fixed to 0) for future function expansion.
When the RETI instruction is executed, the values in EIPC and EIPSW are restored to the PC and PSW,
respectively.
310
EIPC
310
EIPSW
26 25
0 0 0 0
0 0 0 0000 0 0 0000 0 0 0000 0 0 0
(PC contents saved)00
7
8
(PSW contents saved)00
After reset
0xxxxxxxH
(x: Undefined)
After reset
000000xxH
(x: Undefined)
44
User’s Manual U16896EJ2V0UD
Page 45
CHAPTER 3 CPU FUNCTIONS
(2) NMI status saving registers (FEPC, FEPSW)
There are two NMI status saving registers, FEPC and FEPSW.
Upon occurrence of a non-maskable interrupt (NMI), the contents of the program counter (PC) are saved to
FEPC and the contents of the program status word (PSW) are saved to FEPSW.
The address of the next instruction following the instruction executed when a non-maskable interrupt occurs is
saved to FEPC, except for some instructions.
The current PSW contents are saved to FEPSW.
Since there is only one set of NMI status saving registers, the contents of these registers must be saved by the
program when multiple interrupt servicing is performed.
Bits 31 to 26 of FEPC and bits 31 to 8 of FEPSW are reserved (fixed to 0) for future function expansion.
FEPC
FEPSW
310
310
00
26 25
0 0 0 0
0 0 0 0000 0 0 0000 0 0 0000 0 0 0
(PC contents saved)00
8
7
(PSW contents saved)
After reset
0xxxxxxxH
(x: Undefined)
After reset
000000xxH
(x: Undefined)
(3) Interrupt source register (ECR)
Upon occurrence of an interrupt or an exception, the interrupt source register (ECR) holds the source of an
interrupt or an exception. The value held by ECR is the exception code coded for each interrupt source. This
register is a read-only register, and thus data cannot be written to it using the LDSR instruction.
ECR
310
FECCEICC
16 15
After reset
00000000H
Bit position Bit name Description
31 to 16 FECC Non-maskable interrupt (NMI) exception code
15 to 0 EICC Exception, maskable interrupt exception code
User’s Manual U16896EJ2V0UD
45
Page 46
(4) Program status word (PSW)
The program status word (PSW) is a collection of flags that indicate the program status (instruction execution
result) and the CPU status.
When the contents of this register are changed using the LDSR instruction, the new contents become valid
immediately following completion of LDSR instruction execution. Interrupt request acknowledgment is held
pending while a write to the PSW is being executed by the LDSR instruction.
Bits 31 to 8 are reserved (fixed to 0) for future function expansion.
CHAPTER 3 CPU FUNCTIONS
(1/2)
310
PSW
RFU
Bit position Flag name Description
31 to 8 RFU Reserved field. Fixed to 0.
7 NP
6 EP
5 ID
4 SAT
3 CY
2 OV
1 S
0 Z
Note
Note
Note
Indicates that non-maskable interrupt (NMI) servicing is in progress. This flag is set to 1 when
an NMI request is acknowledged, and disables multiple interrupts.
0: NMI servicing not in progress
1: NMI servicing in progress
Indicates that exception processing is in progress. This flag is set to 1 when an exception
occurs. Moreover, interrupt requests can be acknowledged even when this bit is set.
0: Exception processing not in progress
1: Exception processing in progress
Indicates whether maskable interrupt request acknowledgment is enabled.
0: Interrupt enabled
1: Interrupt disabled
Indicates that the result of executing a saturated operation instruction has overflowed and that
the calculation result is saturated. Since this is a cumulative flag, it is set to 1 when the result of
a saturated operation instruction becomes saturated, and it is not cleared to 0 even if the
operation results of successive instructions do not become saturated. This flag is neither set
nor cleared when arithmetic operation instructions are executed.
0: Not saturated
1: Saturated
Indicates whether carry or borrow occurred as the result of an operation.
0: No carry or borrow occurred
1: Carry or borrow occurred
Indicates whether overflow occurred during an operation.
0: No overflow occurred
1: Overflow occurred.
Indicates whether the result of an operation is negative.
0: Operation result is positive or 0.
1: Operation result is negative.
Indicates whether operation result is 0.
0: Operation result is not 0.
1: Operation result is 0.
RemarkNote is explained on the following page.
87NP6EP5ID4
SAT3CY2OV
1
SZ
After reset
00000020H
46
User’s Manual U16896EJ2V0UD
Page 47
CHAPTER 3 CPU FUNCTIONS
Note During saturated operation, the saturated operation results are determined by the contents of the OV
flag and S flag. The SAT flag is set (to 1) only when the OV flag is set (to 1) during saturated operation.
(2/2)
Flag status
Maximum positive value exceeded 1 1 0 7FFFFFFFH
Maximum negative value exceeded 1 1 1 80000000H
Positive (maximum value not exceeded) 0
Negative (maximum value not exceeded)
Operation result status
SAT OV S
Holds value
before operation
0
1
Saturated
operation result
Actual operation
result
(5) CALLT execution status saving registers (CTPC, CTPSW)
There are two CALLT execution status saving registers, CTPC and CTPSW.
When the CALLT instruction is executed, the contents of the program counter (PC) are saved to CTPC, and
the program status word (PSW) contents are saved to CTPSW.
The contents saved to CTPC consist of the address of the next instruction after the CALLT instruction.
The current PSW contents are saved to CTPSW.
Bits 31 to 26 of CTPC and bits 31 to 8 of CTPSW are reserved (fixed to 0) for future function expansion.
CTPC
CTPSW
310
310
00
26 25
0 0 0 0
0 0 0 0000 0 0 0000 0 0 0000 0 0 0
(PC contents saved)00
8
7
(PSW contents saved)
After reset
0xxxxxxxH
(x: Undefined)
After reset
000000xxH
(x: Undefined)
User’s Manual U16896EJ2V0UD
47
Page 48
CHAPTER 3 CPU FUNCTIONS
(6) Exception/debug trap status saving registers (DBPC, DBPSW)
There are two exception/debug trap status saving registers, DBPC and DBPSW.
Upon occurrence of an exception trap or debug trap, the contents of the program counter (PC) are saved to
DBPC, and the program status word (PSW) contents are saved to DBPSW.
The contents saved to DBPC consist of the address of the next instruction after the instruction executed when
an exception trap or debug trap occurs.
The current PSW contents are saved to DBPSW.
Bits 31 to 26 of DBPC and bits 31 to 8 of DBPSW are reserved (fixed to 0) for future function expansion.
DBPC
DBPSW
310
310
00
26 25
0 0 0 0
0 0 0 0000 0 0 0000 0 0 0000 0 0 0
(PC contents saved) 00
(7) CALLT base pointer (CTBP)
The CALLT base pointer (CTBP) is used to specify table addresses and generate target addresses (bit 0 is
fixed to 0).
Bits 31 to 26 are reserved (fixed to 0) for future function expansion.
310
CTBP
26 25
0 0 0 00
(Base address) 00
8
7
(PSW contents saved)
After reset
0xxxxxxxH
(x: Undefined)
After reset
000000xxH
(x: Undefined)
After reset
0xxxxxxxH
(x: Undefined)
48
User’s Manual U16896EJ2V0UD
Page 49
CHAPTER 3 CPU FUNCTIONS
3.3 Operating Modes
The V850ES/KE1+ has the following operating modes.
(1) Normal operating mode
After the system has been released from the reset state, the pins related to the bus interface are set to the port
mode, execution branches to the reset entry address of the internal ROM, and instruction processing is started.
(2) Flash memory programming mode
This mode is valid only in flash memory versions (
When this mode is specified, the internal flash memory can be programmed by using a flash programmer.
(a) Specifying operating mode
The operating mode is specified according to the status (input level) of the FLMD0 and FLMD1 pins.
In the normal operating mode, input a low level to the FLMD0 pin during the reset period.
A high level is input to the FLMD0 pin by the flash programmer in the flash memory programming mode if
a flash programmer is connected. In the self-programming mode, input a high level to this pin from an
external circuit.
Fix the specification of these pins in the application system and do not change the setting of these pins
during operation.
FLMD0 FLMD1 Operating Mode
L
H L Flash memory programming mode
H H Setting prohibited
×
Remark H: High level
L: Low level
×: don’t care
Normal operating mode
μ
PD70F3302 and 70F3302Y).
User’s Manual U16896EJ2V0UD
49
Page 50
CHAPTER 3 CPU FUNCTIONS
3.4 Address Space
3.4.1 CPU address space
For instruction addressing, an internal ROM area of up to 1 MB, and an internal RAM area are supported in a linear
address space (program space) of up to 64 MB. For operand addressing (data access), up to 4 GB of a linear
address space (data space) is supported. The 4 GB address space, however, is viewed as 64 images of a 64 MB
physical address space. This means that the same 64 MB physical address space is accessed regardless of the
value of bits 31 to 26.
Figure 3-1. Address Space Image
Image 63
Program space
Use-prohibited area
Internal RAM area
Use-prohibited area
4 GB
64 MB
•
•
•
Image 1
Image 0
Data space
On-chip peripheral I/O area
Internal RAM area
64 MB
Use-prohibited area
Internal ROM area
(external memory area)
50
1 MB
Internal ROM area
(external memory area)
User’s Manual U16896EJ2V0UD
Page 51
CHAPTER 3 CPU FUNCTIONS
3.4.2 Wraparound of CPU address space
(1) Program space
Of the 32 bits of the program counter (PC), the higher 6 bits are fixed to 0 and only the lower 26 bits are valid.
Even if a carry or borrow occurs from bit 25 to bit 26 as a result of branch address calculation, the higher 6 bits
ignore this and remain 0.
Therefore, the lower-limit address of the program space, 00000000H, and the upper-limit address,
03FFFFFFH, are contiguous addresses, and the program space is wrapped around at the boundary of these
addresses.
Caution No instructions can be fetched from the 4 KB area of 03FFF000H to 03FFFFFFH because this
area is an on-chip peripheral I/O area. Therefore, do not execute any branch operation
instructions in which the destination address will reside in any part of this area.
(2) Data space
The result of an operand address calculation that exceeds 32 bits is ignored.
Therefore, the lower-limit address of the data space, address 00000000H, and the upper-limit address,
FFFFFFFFH, are contiguous addresses, and the data space is wrapped around at the boundary of these
addresses.
00000001H
00000000H
03FFFFFFH
03FFFFFEH
00000001H
Program space
(+) direction(–) direction
Program space
Data space
00000000H
FFFFFFFFH
FFFFFFFEH
Data space
(+) direction(–) direction
User’s Manual U16896EJ2V0UD
51
Page 52
CHAPTER 3 CPU FUNCTIONS
3.4.3 Memory map
The V850ES/KE1+ has reserved areas as shown below.
Figure 3-2. Data Memory Map (Physical Addresses)
3FFFFFFH
(80 KB)
3FEC000H
3FEBFFFH
On-chip peripheral I/O area
(4 KB)
Internal RAM area
(60 KB)
Use-prohibited area
3FFFFFFH
3FFF000H
3FFEFFFH
3FFF000H
3FFEFFFH
3FEC000H
Use-prohibited area
0100000H
00FFFFFH
0000000H
Internal ROM area
(1 MB)
52
User’s Manual U16896EJ2V0UD
Page 53
CHAPTER 3 CPU FUNCTIONS
Figure 3-3. Program Memory Map
03FFFFFFH
03FFF000H
03FFEFFFH
03FF0000H
03FEFFFFH
Use-prohibited area
(Program fetch disabled area)
Internal RAM area (60 KB)
Use-prohibited area
(Program fetch disabled area)
00100000H
000FFFFFH
00000000H
Internal ROM area
(1 MB)
User’s Manual U16896EJ2V0UD
53
Page 54
3.4.4 Areas
(1) Internal ROM area
An area of 1 MB from 0000000H to 00FFFFFH is reserved for the internal ROM area.
(a) Internal ROM (128 KB)
A 128 KB area from 0000000H to 001FFFFH is provided in the V850ES/KE1+.
Addresses 0020000H to 00FFFFFH are an access-prohibited area.
CHAPTER 3 CPU FUNCTIONS
Figure 3-4. Internal ROM Area (128 KB)
00FFFFFH
Access-prohibited
area
(2) Internal RAM area
An area of 60 KB maximum from 3FF0000H to 3FFEFFFH is reserved for the internal RAM area.
(a) Internal RAM (4 KB)
A 4 KB area from 3FFE000H to 3FFEFFFH is provided as physical internal RAM in the V850ES/KE1+.
Addresses 3FF0000H to 3FFDFFFH are an access-prohibited area.
Physical address space
3FFEFFFH
3FFE000H
3FFDFFFH
0020000H
001FFFFH
Internal ROM area
(128 KB)
0000000H
Figure 3-5. Internal RAM Area (4 KB)
Internal RAM area (4 KB)
Logical address space
FFFEFFFH
FFFE000H
FFFDFFFH
54
3FF0000H
Access-prohibited area
FFF0000H
User’s Manual U16896EJ2V0UD
Page 55
(3) On-chip peripheral I/O area
A 4 KB area from 3FFF000H to 3FFFFFFH is reserved as the on-chip peripheral I/O area.
Physical address space
CHAPTER 3 CPU FUNCTIONS
Figure 3-6. On-Chip Peripheral I/O Area
Logical address space
3FFFFFFH
On-chip peripheral I/O area
(4 KB)
3FFF000H
FFFFFFFH
FFFF000H
Peripheral I/O registers assigned with functions such as on-chip peripheral I/O operation mode specification
and state monitoring are mapped to the on-chip peripheral I/O area. Program fetches are not allowed in this
area.
Cautions 1. If word access of a register is attempted, halfword access to the word area is performed
twice, first for the lower bits, then for the higher bits, ignoring the lower 2 address bits.
2. If a register that can be accessed in byte units is accessed in halfword units, the higher 8
bits become undefined if the access is a read operation. If a write access is performed,
only the data in the lower 8 bits is written to the register.
3. Addresses that are not defined as registers are reserved for future expansion. If these
addresses are accessed, the operation is undefined and not guaranteed.
(4) Number of clocks for access
The following table shows the number of base clocks required for accessing each resource.
Area (Bus Width)
Bus Cycle Type
Instruction fetch (normal access) 1 1
Instruction fetch (branch) 2 2
Operand data access 3 1 3
Internal ROM
(32 Bits)
Internal RAM
(32 Bits)
Note 1
Note 1
On-Chip Peripheral I/O
Notes 1. If the access conflicts with a data access, the number of clock is incremented by 1.
2. This value varies depending on the setting of the VSWC register.
Remark Unit: Clocks/access
(16 Bits)
−
−
Note 2
User’s Manual U16896EJ2V0UD
55
Page 56
CHAPTER 3 CPU FUNCTIONS
3.4.5 Recommended use of address space
The architecture of the V850ES/KE1+ requires that a register that serves as a pointer be secured for address
generation when operand data in the data space is accessed. The address stored in this pointer ±32 KB can be
directly accessed by an instruction for operand data. Because the number of general-purpose registers that can be
used as a pointer is limited, however, by keeping the performance from dropping during address calculation when a
pointer value is changed, as many general-purpose registers as possible can be secured for variables, and the
program size can be reduced.
(1) Program space
Of the 32 bits of the PC (program counter), the higher 6 bits are fixed to 0, and only the lower 26 bits are valid.
Regarding the program space, therefore, a 64 MB space of contiguous addresses starting from 00000000H
unconditionally corresponds to the memory map.
To use the internal RAM area as the program space, access the addresses 3FFE000H to 3FFEFFFH (4 KB).
(2) Data space
With the V850ES/KE1+, it seems that there are sixty-four 64 MB address spaces on the 4 GB CPU address
space. Therefore, the least significant bit (bit 25) of a 26-bit address is sign-extended to 32 bits and allocated
as an address.
(a) Application example of wraparound
If R = r0 (zero register) is specified for the LD/ST disp16 [R] instruction, a range of addresses 00000000H
±32 KB can be addressed by sign-extended disp16. All the resources, including the internal hardware,
can be addressed by one pointer.
The zero register (r0) is a register fixed to 0 by hardware, and practically eliminates the need for registers
dedicated to pointers.
Example:
μ
PD703302, 703302Y
0001FFFFH
56
00007FFFH
(R = )
00000000H
FFFFF000H
FFFFEFFFH
FFFFE000H
FFFFDFFFH
FFFF8000H
Internal ROM area
On-chip peripheral
I/O area
Internal RAM
area
Access-prohibited
area
User’s Manual U16896EJ2V0UD
32 KB
4 KB
4 KB
24 KB
Page 57
CHAPTER 3 CPU FUNCTIONS
Figure 3-7. Recommended Memory Map
FFFFFFFFH
FFFFF000H
FFFFEFFFH
FFFFC000H
FFFEFFFFH
04000000H
03FFFFFFH
03FFF000H
03FFEFFFH
03FFE000H
03FFDFFFH
03FF0000H
03FEFFFFH
On-chip
peripheral I/O
Internal RAM
Note
Data spaceProgram space
On-chip
peripheral I/O
Internal RAM
On-chip
peripheral I/O
Internal RAM
Use prohibited
xFFFFFFFH
xFFFF000H
xFFFEFFFH
xFFFE000H
xFFFDFFFH
xFFE0000H
xFFEFFFFH
Program space
64 MB
00100000H
000FFFFFH
00020000H
0001FFFFH
00000000H
Use prohibited
Internal ROM
x0100000H
x00FFFFFH
Internal ROM
x0000000H
Internal ROM
Note Access to this area is prohibited. To access the on-chip peripheral I/O in this area, specify addresses
FFFF000H to FFFFFFFH.
Remarks 1.
indicates the recommended area.
2. This figure is the recommended memory map of the μPD703302 and 703302Y.
User’s Manual U16896EJ2V0UD
57
Page 58
CHAPTER 3 CPU FUNCTIONS
3.4.6 Peripheral I/O registers
Operable Bit Unit Address Function Register Name Symbol R/W
1 8 16
FFFFF004H Port DL register PDL R/W
FFFFF00CH Port CM register PCM R/W
FFFFF024H Port DL mode register PMDL R/W
FFFFF02CH Port CM mode register PMCM R/W
FFFFF04CH Port CM mode control register PMCCM R/W
FFFFF06EH System wait control register VSWC R/W
√ √
√ √
√ √
√ √
√ √
√ √
FFFFF100H Interrupt mask register 0 IMR0 R/W
FFFFF100H Interrupt mask register 0L IMR0L R/W
FFFFF101H Interrupt mask register 0H IMR0H R/W
√ √
√ √
FFFFF102H Interrupt mask register 1 IMR1 R/W
FFFFF102H Interrupt mask register 1L IMR1L R/W
FFFFF103H Interrupt mask register 1H IMR1H R/W
√ √
√ √
FFFFF106H Interrupt mask register 3 IMR3 R/W
FFFFF106H Interrupt mask register 3L IMR3L R/W
FFFFF110H Interrupt control register WDT1IC R/W
FFFFF112H Interrupt control register PIC0 R/W
FFFFF114H Interrupt control register PIC1 R/W
FFFFF116H Interrupt control register PIC2 R/W
FFFFF118H Interrupt control register PIC3 R/W
FFFFF11AH Interrupt control register PIC4 R/W
FFFFF11CH Interrupt control register PIC5 R/W
FFFFF11EH Interrupt control register PIC6 R/W
FFFFF124H Interrupt control register TM0IC10 R/W
FFFFF126H Interrupt control register TM0IC11 R/W
FFFFF128H Interrupt control register TM5IC0 R/W
FFFFF12AH Interrupt control register TM5IC1 R/W
FFFFF12CH Interrupt control register CSI0IC0 R/W
FFFFF12EH Interrupt control register CSI0IC1 R/W
FFFFF130H Interrupt control register SREIC0 R/W
FFFFF132H Interrupt control register SRIC0 R/W
FFFFF134H Interrupt control register STIC0 R/W
FFFFF136H Interrupt control register SREIC1 R/W
FFFFF138H Interrupt control register SRIC1 R/W
FFFFF13AH Interrupt control register STIC1 R/W
FFFFF13CH Interrupt control register TMHIC0 R/W
FFFFF13EH Interrupt control register TMHIC1 R/W
FFFFF142H Interrupt control register IICIC0
Note 2
R/W
FFFFF144H Interrupt control register ADIC R/W
FFFFF146H Interrupt control register KRIC R/W
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
Notes 1. The output latch is 00H. When input, the pin status is read.
2. Only in the
μ
PD703302Y, 70F3302Y
After Reset
Note 1
00H
Note 1
00H
FFH
FFH
00H
77H
FFFFH
√
FFH
FFH
FFFFH
√
FFH
FFH
FFFFH
√
FFH
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
47H
(1/7)
58
User’s Manual U16896EJ2V0UD
Page 59
CHAPTER 3 CPU FUNCTIONS
Operable Bit UnitAddress Function Register Name Symbol R/W
1 8 16
FFFFF148H Interrupt control register WTIIC R/W
FFFFF14AH Interrupt control register WTIC R/W
FFFFF14CH Interrupt control register BRGIC R/W
FFFFF170H Interrupt control register LVIIC R/W
FFFFF172H Interrupt control register PIC7 R/W
FFFFF174H Interrupt control register TP0OVIC R/W
FFFFF176H Interrupt control register TP0CCIC0 R/W
FFFFF178H Interrupt control register TP0CCIC1 R/W
FFFFF1FAH In-service priority register ISPR R
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
√ √
FFFFF1FCH Command register PRCMD W
FFFFF1FEH Power save control register PSC R/W
FFFFF200H A/D converter mode register ADM R/W
FFFFF201H Analog input channel specification register ADS R/W
FFFFF202H Power fail comparison mode register PFM R/W
√ √
√ √
√ √
√ √
FFFFF203H Power fail comparison threshold register PFT R/W
FFFFF204H A/D conversion result register ADCR R
FFFFF205H A/D conversion result register H ADCRH R
FFFFF300H Key return mode register KRM R/W
FFFFF308H Selector operation control register 0 SELCNT0 R/W
FFFFF30AH Selector operation control register 1 SELCNT1 R/W
FFFFF318H Digital noise elimination control register NFC R/W
FFFFF400H Port 0 register P0 R/W
√ √
√ √
√ √
√ √
√ √
FFFFF406H Port 3 register P3 R/W
FFFFF406H Port 3 register L P3L R/W
FFFFF407H Port 3 register H P3H R/W
FFFFF408H Port 4 register P4 R/W
FFFFF40AH Port 5 register P5 R/W
√ √
√ √
√ √
√ √
FFFFF40EH Port 7 register P7 R
FFFFF412H Port 9 register P9 R/W
FFFFF412H Port 9 register L P9L R/W
FFFFF413H Port 9 register H P9H R/W
FFFFF420H Port 0 mode register PM0 R/W
√ √
√ √
√ √
FFFFF426H Port 3 mode register PM3 R/W
FFFFF426H Port 3 mode register L PM3L R/W
FFFFF427H Port 3 mode register H PM3H R/W
FFFFF428H Port 4 mode register PM4 R/W
FFFFF42AH Port 5 mode register PM5 R/W
√ √
√ √
√ √
√ √
FFFFF432H Port 9 mode register PM9 R/W
FFFFF432H Port 9 mode register L PM9L R/W
FFFFF433H Port 9 mode register H PM9H R/W
FFFFF440H Port 0 mode control register PMC0 R/W
√ √
√ √
√ √
Note The output latch is 00H or 0000H. When input, the pin status is read.
47H
47H
47H
47H
47H
47H
47H
47H
00H
Undefined
√
00H
00H
00H
00H
00H
√
√
Undefined
√
00H
00H
00H
00H
00H
√
00H
00H
00H
00H
Undefined
√
√
00H
00H
FFH
√
FFH
FFH
FFH
FFH
√
FFH
FFH
00H
(2/7)
After Reset
Undefined
Note
Note
0000H
Note
Note
Note
Note
Note
0000H
Note
Note
FFFFH
FFFFH
User’s Manual U16896EJ2V0UD
59
Page 60
CHAPTER 3 CPU FUNCTIONS
Operable Bit Unit Address Function Register Name Symbol R/W
1 8 16
FFFFF446H Port 3 mode control register PMC3 R/W
FFFFF446H Port 3 mode control register L PMC3L R/W
FFFFF447H Port 3 mode control register H PMC3H R/W
FFFFF448H Port 4 mode control register PMC4 R/W
FFFFF44AH Port 5 mode control register PMC5 R/W
FFFFF452H Port 9 mode control register PMC9 R/W
FFFFF452H Port 9 mode control register L PMC9L R/W
FFFFF453H Port 9 mode control register H PMC9H R/W
FFFFF466H Port 3 function control register PFC3 R/W
FFFFF46AH Port 5 function control register PFC5 R/W
FFFFF472H Port 9 function control register PFC9 R/W
FFFFF472H Port 9 function control register L PFC9L R/W
FFFFF473H Port 9 function control register H PFC9H R/W
FFFFF580H 8-bit timer H mode register 0 TMHMD0 R/W
FFFFF581H 8-bit timer H carrier control register 0 TMCYC0 R/W
FFFFF582H 8-bit timer H compare register 00 CMP00 R/W
FFFFF583H 8-bit timer H compare register 01 CMP01 R/W
FFFFF590H 8-bit timer H mode register 1 TMHMD1 R/W
FFFFF591H 8-bit timer H carrier control register 1 TMCYC1 R/W
FFFFF592H 8-bit timer H compare register 10 CMP10 R/W
FFFFF593H 8-bit timer H compare register 11 CMP11 R/W
PFn is a register that specifies normal output/N-ch open-drain output.
Each bit of the PFn register corresponds to one pin of port n and can be specified in 1-bit units.
After reset: 00HR/W
CHAPTER 4 PORT FUNCTIONS
PFn
PFn7PFn6PFn5PFn4PFn3PFn2PFn1PFn0
Note
PFnm
0
Normal output (CMOS output)
1
N-ch open-drain output
Control of normal output/N-ch open-drain output
Note The PFnm bit is valid only when the PMn.PMnm bit is 0 (output mode) regardless of the setting of the
PMCn register. When the PMnm bit is 1 (input mode), the set value in the PFn register is invalid.
Example <1> When the value of the PFn register is valid
PFnm bit = 1 … N-ch open-drain output is specified.
PMnm bit = 0 … Output mode is specified.
PMCnm bit = 0 or 1
<2> When the value of the PFn register is invalid
PFnm bit = 0 … N-ch open-drain output is specified.
PMnm bit = 1 … Input mode is specified.
PMCnm bit = 0 or 1
(7) Pull-up resistor option register (PUn)
PUn is a register that specifies the connection of an on-chip pull-up resistor.
Each bit of the PUn register corresponds to one pin of port n and can be specified in 1-bit units.
After reset: 00HR/W
76
PUn
PUn7PUn6PUn5PUn4PUn3PUn2PUn1PUn0
PUnm
0
1
Not connected
Connected
Control of on-chip pull-up resistor connection
User’s Manual U16896EJ2V0UD
Page 77
(8) Port settings
Set the ports as follows.
Port mode
CHAPTER 4 PORT FUNCTIONS
Figure 4-1. Register Settings and Pin Functions
Output mode
Input mode
Alternate function
(when two alternate
functions are available)
Alternate function 1
Alternate function 2
Alternate function
(when three or more alternate
functions are available)
Alternate function 1
Alternate function 2
Alternate function 3
Alternate function 4
(a)
(b)
(c)
(d)
“0”
“1”
“0”
“1”
PMn register
PFCn register
PFCn register
PFCEn register
“0”
“1”
(a)
(b)
(c)
(d)
PMCn register
PFCEnm
0
0
1
1
PFCnm
0
1
0
1
Remark Switch to the alternate function using the following procedure.
<1> Set the PFCn and PFCEn registers.
<2> Set the PMCn register.
<3> Set the INTRn or INTFn register (to specify an external interrupt pin).
If the PMCn register is set first, an unintended function may be set while the PFCn and PFCEn
registers are being set.
User’s Manual U16896EJ2V0UD
77
Page 78
CHAPTER 4 PORT FUNCTIONS
4.3.1 Port 0
Port 0 is a 7-bit I/O port for which I/O settings can be controlled in 1-bit units.
Port 0 includes the following alternate functions.
Table 4-4. Alternate-Function Pins of Port 0
Yes
Note 1
Analog noise elimination
Analog/digital noise
elimination
Remark Block Type
–
D0-U
D1-SUIL
D1-SUIL
Pin No. Pin Name Alternate Function I/O PULL
12 P00
13 P01 TOH1 Output
14 P02 NMI Input D1-SUIL
15 P03 INTP0 Input D1-SUIL
16 P04 INTP1 Input D1-SUIL
17 P05 INTP2 Input
18 P06 INTP3 Input
Note 2
TOH0 Output D0-U
Notes1. Software pull-up function
2. Only the P00 pin outputs a low level after reset (other port pins are in input mode).
Therefore, the low-level output from the P00 pin after reset can be used as a dummy reset signal from
the CPU.
Caution P02 to P06 have hysteresis characteristics when the alternate function is input, but not in the
port mode.
(1) Port 0 register (P0)
After reset: 00H (output latch) R/W Address: FFFFF400H
P0P06P05P04P03P02P01P00
0
P0n
0
1
(2) Port 0 mode register (PM0)
After reset: FFH R/W Address: FFFFF420H
PM0PM06PM05PM04PM03PM02PM01PM00
1
PM0n
0
1
78
0 is output
1 is output
Output mode
Input mode
Control of output data (in output mode) (n = 0 to 6)
Control of I/O mode (n = 0 to 6)
User’s Manual U16896EJ2V0UD
Page 79
(3) Port 0 mode control register (PMC0)
After reset: 00H R/W Address: FFFFF440H
CHAPTER 4 PORT FUNCTIONS
0PMC0PMC06
PMC06
0
1
PMC05
0
1
PMC04
0
1
PMC03
0
1
PMC02
0
1
PMC01
0
1
I/O port
INTP3 input
I/O port
INTP2 input
I/O port
INTP1 input
I/O port
INTP0 input
I/O port
NMI input
I/O port
TOH1 output
PMC05
PMC04PMC03PMC02PMC01PMC00
Specification of P06 pin operation mode
Specification of P05 pin operation mode
Specification of P04 pin operation mode
Specification of P03 pin operation mode
Specification of P02 pin operation mode
Specification of P01 pin operation mode
PMC00
0
I/O port
TOH0 output
1
(4) Pull-up resistor option register 0 (PU0)
After reset: 00H R/W Address: FFFFFC40H
PU0PU06PU05PU04PU03PU02PU01PU00
0
PU0n
0
1
Not connected
Connected
Specification of P00 pin operation mode
Control of on-chip pull-up resistor connection (n = 0 to 6)
User’s Manual U16896EJ2V0UD
79
Page 80
CHAPTER 4 PORT FUNCTIONS
4.3.2 Port 3
Port 3 is an 8-bit I/O port for which I/O settings can be controlled in 1-bit units.
Port 3 includes the following alternate functions.
Table 4-5. Alternate-Function Pins of Port 3
Pin No. Pin Name Alternate Function I/O PULL
22 P30 TXD0 Output D-U
23 P31 RXD0/INTP7 Input D1-SUIHL
24 P32 ASCK0/ADTRG/TO01 I/O E10-SUL
25 P33 TIP00/TOP00 I/O Gxx10-SUL
26 P34 TIP01/TOP01 I/O Gxx10-SUL
27 P35 TI010/TO01 I/O
55 P38 SDA0
56 P39 SCL0
Note 2
I/O D2-SNMUFH
Note 2
I/O
Note 1
Remark Block Type
Yes –
E10-SUL
Note 3
No
N-ch open-drain output
D2-SNMUFH
Notes 1. Software pull-up function
2. Only in the
μ
PD703302Y, 70F3302Y
3. An on-chip pull-up resistor can be provided by a mask option (only in the μPD703302, 703302Y).
Caution P31 to P35, P38, and P39 have hysteresis characteristics when the alternate function is input, but
not in the port mode.
80
User’s Manual U16896EJ2V0UD
Page 81
(1) Port 3 register (P3)
After reset: 00H (output latch) R/W Address: P3 FFFFF406H,
P3 (P3H
Note
CHAPTER 4 PORT FUNCTIONS
P3L FFFFF406H, P3H FFFFF407H
89101112131415
)
000000P39P38
(P3L)
Note When reading from or writing to bits 8 to 15 of the P3 register in 8-bit or 1-bit units,
specify these bits as bits 0 to 7 of the P3H register.
Remark The P3 register can be read or written in 16-bit units.
However, when the higher 8 bits and the lower 8 bits of the P3 register are used as
the P3H register and as the P3L register, respectively, this register can be read or
written in 8-bit or 1-bit units.
(2) Port 3 mode register (PM3)
After reset: FFFFH R/W Address: PM3 FFFFF426H,
Note
)11111PM39PM38
00P35P34P33P32P31P30
P3n
0
1
0 is output
1 is output
1PM3 (PM3H
Control of output data (in output mode) (n = 0 to 5, 8, 9)
PM3L FFFFF426H, PM3H FFFFF427H
89101112131415
(PM3L)
1
PM3n
0
1
1PM35PM34PM33PM32PM31PM30
Control of I/O mode (n = 0 to 5, 8, 9)
Output mode
Input mode
Note When reading from or writing to bits 8 to 15 of the PM3 register in 8-bit or 1-bit units,
specify these bits as bits 0 to 7 of the PM3H register.
Remark The PM3 register can be read or written in 16-bit units.
When the higher 8 bits and the lower 8 bits of the PM3 register are used as the PM3H
register and as the PM3L register, respectively, this register can be read or written in
8-bit or 1-bit units.
User’s Manual U16896EJ2V0UD
81
Page 82
CHAPTER 4 PORT FUNCTIONS
(3) Port 3 mode control register (PMC3)
After reset: 0000H R/W Address: PMC3 FFFFF446H,
PMC3L FFFFF446H, PMC3H FFFFF447H
89101112131415
PMC3 (PMC3H
(PMC3L)
Note 1
)
00 00 00
00PMC35 PMC34PMC33 PMC32PMC31PMC30
PMC39
0
1
PMC38
0
1
PMC35
0
1
PMC34
0
1
I/O port
SCL0 I/O
I/O port
SDA0 I/O
I/O port
TI010 input/TO01 output
I/O port
TIP01 input/TOP01 output
Specification of P39 pin operation mode
Specification of P38 pin operation mode
Specification of P35 pin operation mode
Specification of P34 pin operation mode
PMC39
Note 2
PMC38
Note 2
PMC33
0
1
PMC32
0
1
PMC31
0
1
PMC30
0
1
I/O port
TIP00 input/TOP00 output
I/O port
ASCK0 input/ADTRG input/TO01 output
I/O port
RXD0 input/INTP7 input
I/O port
TXD0 output
Specification of P33 pin operation mode
Specification of P32 pin operation mode
Specification of P31 pin operation mode
Note 3
Specification of P30 pin operation mode
Notes 1. When reading from or writing to bits 8 to 15 of the PMC3 register in 8-bit or 1-bit units,
specify these bits as bits 0 to 7 of the PMC3H register.
2. Valid only in the μPD703302Y and 70F3302Y. In all other products, set this bit to 0.
3. The INTP7 and RXD0 pins are alternate-function pins. When using the pin as the
RXD0 pin, disable edge detection of the alternate-function INTP7 pin (clear the
INTF3.INTF31 and INTR3.INTR31 bits to 0). When using the pin as the INTP7 pin,
stop the UART0 receive operation (clear the ASIM0.RXE0 bit to 0).
Remark The PMC3 register can be read or written in 16-bit units.
When the higher 8 bits and the lower 8 bits of the PMC3 register are used as the
PMC3H register and as the PMC3L register, respectively, this register can be read or
written in 8-bit or 1-bit units.
82
User’s Manual U16896EJ2V0UD
Page 83
(4) Port 3 function register H (PF3H)
After reset: 00H R/W Address: FFFFFC67H
CHAPTER 4 PORT FUNCTIONS
PF3H00000PF39PF38
0
PF3n
0
1
Specification of normal port/alternate function (n = 8, 9)
When used as normal port (N-ch open-drain output)
When used as alternate-function (N-ch open-drain output)
CautionWhen using P38 and P39 as N-ch open-drain-output alternate-function pins, set in
the following sequence.
Be sure to set the port latch to 1 before setting the pin to N-ch open-drain output.
P3n bit = 1 → PF3n bit
= 1 → PMC3n bit = 1
(5) Port 3 function control register (PFC3)
After reset: 00H R/W Address: FFFFF466H
PFC3
00PFC35PFC34PFC33PFC3200
Remark For details of specification of alternate-function pins, refer to 4.3.2 (7) Specifying
alternate-function pins of port 3.
(6) Port 3 function control expansion register (PFCE3)
After reset: 00H R/W Address: FFFFF706H
PFCE3
000PFCE34 PFCE33000
Remark For details of specification of alternate-function pins, refer to 4.3.2 (7) Specifying
alternate-function pins of port 3.
User’s Manual U16896EJ2V0UD
83
Page 84
CHAPTER 4 PORT FUNCTIONS
(7) Specifying alternate-function pins of port 3
PFC35 Specification of Alternate-Function Pin of P35 Pin
0 TI010 input
1 TO01 output
PFCE34 PFC34 Specification of Alternate-Function Pin of P34 Pin
0 0 Setting prohibited
0 1 Setting prohibited
1 0 TIP01 input
1 1 TOP01 output
PFCE33 PFC33 Specification of Alternate-Function Pin of P33 Pin
0 0 Setting prohibited
0 1 Setting prohibited
1 0 TIP00 input
1 1 TOP00 output
PFC32 Specification of Alternate-Function Pin of P32 Pin
0 ASCK0/ADTRG
1 TO01 output
Note
input
Note The ASCK0 and ADTRG pins are alternate-function pins. When using the pin as the ASCK0 pin, disable
the trigger input of the alternate-function ADTRG pin (clear the ADS.TRG bit to 0 or set the ADS.ADTMD bit
to 1). When using the pin as the ADTRG pin, do not set the UART0 operation clock to external input (set
the CKSR0.TPS03 to CKSR0.TPS00 bits to other than 1011).
Caution When the P3n pin is specified as an alternate function by the PMC3.PMC3n bit with the PFC3n
and PFCE3n bits maintaining the initial value (0), output becomes undefined. Therefore, to
specify the P3n pin as an alternate function, set the PFC3n and PFCE3n bits to 1 first and then
set the PMC3n bit to 1 (n = 3, 4).
(8) Pull-up resistor option register 3 (PU3)
After reset: 00H R/W Address: FFFFFC46H
84
PU30PU35PU34PU33PU32PU31PU30
0
PU3n
0
1
Control of on-chip pull-up resistor connection (n = 0 to 5)
Not connected
Connected
Caution An on-chip pull-up resistor can be provided for P38 and P39 by a mask option
μ
(only in the
PD703302, 703302Y).
User’s Manual U16896EJ2V0UD
Page 85
CHAPTER 4 PORT FUNCTIONS
4.3.3 Port 4
Port 4 is a 3-bit I/O port for which I/O settings can be controlled in 1-bit units.
Port 4 includes the following alternate functions.
Table 4-6. Alternate-Function Pins of Port 4
Yes
Note
Remark Block Type
N-ch open-drain output can
be selected.
D2-SUFL
Pin No. Pin Name Alternate Function I/O PULL
19 P40 SI00 Input – D1-SUL
20 P41 SO00 Output D0-UF
21 P42 SCK00 I/O
Note Software pull-up function
Caution P40 and P42 have hysteresis characteristics when the alternate function is input, but not in the
port mode.
(1) Port 4 register (P4)
After reset: 00H (output latch) R/W Address: FFFFF408H
P40000P42P41P40
0
P4n
0
1
(2) Port 4 mode register (PM4)
After reset: FFH R/W Address: FFFFF428H
PM41111PM42PM41PM40
1
PM4n
0
1
0 is output
1 is output
Output mode
Input mode
Control of output data (in output mode) (n = 0 to 2)
Control of I/O mode (n = 0 to 2)
User’s Manual U16896EJ2V0UD
85
Page 86
(3) Port 4 mode control register (PMC4)
After reset: 00H R/W Address: FFFFF448H
0PMC40000PMC42PMC41PMC40
CHAPTER 4 PORT FUNCTIONS
PMC42
0
I/O port
1
SCK00 I/O
PMC41
0
I/O port
1
SO00 output
PMC40
0
I/O port
1
SI00 input
(4) Port 4 function register (PF4)
After reset: 00H R/W Address: FFFFFC68H
PF40000PF42PF410
0
PF4n
0
1
Control of normal output/N-ch open-drain output (n = 1, 2)
Normal output
N-ch open-drain output
Caution When using P41 and P42 as N-ch open-drain-output alternate-function pins, set in
the following sequence.
Be sure to set the port latch to 1 before setting the pin to N-ch open-drain output.
P4n bit = 1 → PF4n bit = 1 → PMC4n bit = 1
(5) Pull-up resistor option register 4 (PU4)
After reset: 00H R/W Address: FFFFFC48H
Specification of P42 pin operation mode
Specification of P41 pin operation mode
Specification of P40 pin operation mode
86
PU40000PU42PU410
0
PU4n
0
1
Control of on-chip pull-up resistor connection (n = 1, 2)
Not connected
Connected
User’s Manual U16896EJ2V0UD
Page 87
CHAPTER 4 PORT FUNCTIONS
4.3.4 Port 5
Port 5 is a 6-bit I/O port for which I/O settings can be controlled in 1-bit units.
Port 5 includes the following alternate functions.
Table 4-7. Alternate-Function Pins of Port 5
Pin No. Pin Name Alternate Function I/O PULL
28 P50 TI011/RTP00/KR0 I/O E10-SULT
29 P51 TI50/RTP01/KR1 I/O E10-SULT
30 P52 TO50/RTP02/KR2 I/O E00-SUT
31 P53 RTP03/KR3 I/O Ex0-SUT
34 P54 RTP04/KR4 I/O Ex0-SUT
35 P55 RTP05/KR5 I/O
Note
Remark Block Type
Yes –
Ex0-SUT
Note Software pull-up function
(1) Port 5 register (P5)
After reset: 00H (output latch) R/W Address: FFFFF40AH
P5
00P55P54P53P52P51P50
P5n
0
1
(2) Port 5 mode register (PM5)
After reset: FFH R/W Address: FFFFF42AH
PM5
1
PM5n
0
1
Control of output data (in output mode) (n = 0 to 5)
0 is output
1 is output
1PM55PM54PM53PM52PM51PM50
Control of I/O mode (n = 0 to 5)
Output mode
Input mode
User’s Manual U16896EJ2V0UD
87
Page 88
(3) Port 5 mode control register (PMC5)
After reset: 00H R/W Address: FFFFF44AH
CHAPTER 4 PORT FUNCTIONS
PMC5
00PMC55PMC54PMC53PMC52PMC51PMC50
PMC55
0
1
PMC54
0
1
PMC53
0
1
PMC52
0
1
PMC51
0
1
PMC50
0
1
I/O port/KR5 input
RTP05 output
I/O port/KR4 input
RTP04 output
I/O port/KR3 input
RTP03 output
I/O port/KR2 input
TO50 output/RTP02 output
I/O port/KR1 input
TI50 input/RTP01 output
I/O port/KR0 input
TI011 input/RTP00 output
Specification of P55 pin operation mode
Specification of P54 pin operation mode
Specification of P53 pin operation mode
Specification of P52 pin operation mode
Specification of P51 pin operation mode
Specification of P50 pin operation mode
88
User’s Manual U16896EJ2V0UD
Page 89
(4) Port 5 function control register (PFC5)
Caution When the P5n pin is specified as an alternate function by the PMC5.PMC5n bit with the
PFC5n bit maintaining the initial value (0), output becomes undefined. Therefore, to specify
the P5n pin as alternate function 2, set the PFC5n bit to 1 first and then set the PMC5n bit to
1 (n = 3 to 5).
After reset: 00H R/W Address: FFFFF46AH
CHAPTER 4 PORT FUNCTIONS
PFC5
00PFC55PFC54PFC53PFC52PFC51PFC50
PFC55
1
RTP05 output
PFC54
1
RTP04 output
PFC53
1
RTP03 output
PFC52
0
TO50 output
1
RTP02 output
PFC51
0
TI50 input
1
RTP01 output
PFC50
0
TI011 input
1
RTP00 output
(5) Pull-up resistor option register 5 (PU5)
After reset: 00H R/W Address: FFFFFC4AH
Specification of alternate-function pin of P55 pin
Specification of alternate-function pin of P54 pin
Specification of alternate-function pin of P53 pin
Specification of alternate-function pin of P52 pin
Specification of alternate-function pin of P51 pin
Specification of alternate-function pin of P50 pin
PU5
0
PU5n
0
1
0PU55PU54PU53PU52PU51PU50
Control of on-chip pull-up resistor connection (n = 0 to 5)
Not connected
Connected
User’s Manual U16896EJ2V0UD
89
Page 90
CHAPTER 4 PORT FUNCTIONS
4.3.5 Port 7
Port 7 is an 8-bit input-only port for which all the pins are fixed to input.
Port 7 includes the following alternate functions.
Table 4-8. Alternate-Function Pins of Port 7
Pin No. Pin Name Alternate Function I/O PULL
64 P70 ANI0 Input A-A
63 P71 ANI1 Input A-A
62 P72 ANI2 Input A-A
61 P73 ANI3 Input A-A
60 P74 ANI4 Input A-A
59 P75 ANI5 Input A-A
58 P76 ANI6 Input A-A
57 P77 ANI7 Input
Note
Remark Block Type
No –
A-A
Note Software pull-up function
(1) Port 7 register (P7)
After reset: Undefined R Address: FFFFF40EH
P7
P77P76P75P74P73P72P71P70
P7n
0
1
Input low level
Input high level
Input data read (n = 0 to 7)
90
User’s Manual U16896EJ2V0UD
Page 91
CHAPTER 4 PORT FUNCTIONS
4.3.6 Port 9
Port 9 is a 9-bit I/O port for which I/O settings can be controlled in 1-bit units.
Port 9 includes the following alternate functions.
Table 4-9. Alternate-Function Pins of Port 9
Yes
Note
Remark Block Type
–
Ex1-SUL
N-ch open-drain output can
be specified.
Analog noise elimination
Ex2-SUFL
Ex1-SUIL
Pin No. Pin Name Alternate Function I/O PULL
36 P90 TXD1/KR6 I/O Ex0-SUT
37 P91 RXD1/KR7 Input Ex1-SUHT
38 P96 TI51/TO51 I/O Ex0-SUT
39 P97 SI01 Input
40 P98 SO01 Output Ex0-UF
41 P99 SCK01 I/O
42 P913 INTP4 Input Ex1-SUIL
43 P914 INTP5 Input Ex1-SUIL
44 P915 INTP6 Input
Note Software pull-up function
Caution P97, P99, and P913 to P915 have hysteresis characteristics when the alternate function is input,
but not in the port mode.
User’s Manual U16896EJ2V0UD
91
Page 92
(1) Port 9 register (P9)
After reset: 00H (output latch) R/W Address: P9 FFFFF412H,
CHAPTER 4 PORT FUNCTIONS
P9L FFFFF412H, P9H FFFFF413H
Note
P915P9 (P9H
)P914P913000P99P98
89101112131415
(P9L)
Note When reading from or writing to bits 8 to 15 of the P9 register in 8-bit or 1-bit units,
specify these bits as bits 0 to 7 of the P9H register.
Remark The P9 register can be read or written in 16-bit units.
However, when the higher 8 bits and the lower 8 bits of the P9 register are used as
the P9H register and as the P9L register, respectively, these registers can be read or
written in 8-bit or 1-bit units.
(2) Port 9 mode register (PM9)
After reset: FFFFH R/W Address: PM9 FFFFF432H,
Note
)PM914PM913111PM99PM98
P97P960000P91P90
P9n
0
1
PM915PM9 (PM9H
Control of output data (in output mode) (n = 0, 1, 6 to 9, 13 to 15)
0 is output
1 is output
PM9L FFFFF432H, PM9H FFFFF433H
89101112131415
92
(PM9L)
PM97
PM9n
0
1
PM961111PM91PM90
Control of I/O mode (n = 0, 1, 6 to 9, 13 to 15)
Output mode
Input mode
Note When reading from or writing to bits 8 to 15 of the PM9 register in 8-bit or 1-bit units,
specify these bits as bits 0 to 7 of the PM9H register.
Remark The PM9 register can be read or written in 16-bit units.
However, when the higher 8 bits and the lower 8 bits of the PM9 register are used as
the PM9H register and as the PM9L register, respectively, this register can be read or
written in 8-bit or 1-bit units.
User’s Manual U16896EJ2V0UD
Page 93
(3) Port 9 mode control register (PMC9)
After reset: 0000H R/W Address: PMC9 FFFFF452H,
CHAPTER 4 PORT FUNCTIONS
PMC9L FFFFF452H, PMC9H FFFFF453H
Note
PMC915PMC9 (PMC9H
)PMC914 PMC913000PMC99PMC98
(PMC9L)
PMC97 PMC960000PMC91PMC90
PMC915
0
1
PMC914
0
1
PMC913
0
1
PMC99
0
1
PMC98
0
1
I/O port
INTP6 input
I/O port
INTP5 input
I/O port
INTP4 input
I/O port
SCK01 I/O
I/O port
SO01 output
Specification of P915 pin operation mode
Specification of P914 pin operation mode
Specification of P913 pin operation mode
Specification of P99 pin operation mode
Specification of P98 pin operation mode
89101112131415
PMC97
0
1
PMC96
0
1
PMC91
0
1
PMC90
0
1
I/O port
SI01 input
I/O port/TI51 input
TO51 output
I/O port/KR7 input
RXD1 input
I/O port/KR6 input
TXD1 output
Specification of P97 pin operation mode
Specification of P96 pin operation mode
Specification of P91 pin operation mode
Specification of P90 pin operation mode
Note When reading from or writing to bits 8 to 15 of the PMC9 register in 8-bit or 1-bit units,
specify these bits as bits 0 to 7 of the PMC9H register.
Remark The PMC9 register can be read or written in 16-bit units.
However, when the higher 8 bits and the lower 8 bits of the PMC9 register are used
as the PMC9H register and as the PMC9L register, respectively, these registers can
be read or written in 8-bit or 1-bit units.
User’s Manual U16896EJ2V0UD
93
Page 94
(4) Port 9 function register H (PF9H)
After reset: 00H R/W Address: FFFFFC73H
CHAPTER 4 PORT FUNCTIONS
PF9H00000PF99PF98
0
PF9n
0
1
Control of normal output/N-ch open-drain output (n = 8, 9)
Normal output
N-ch open-drain output
Caution When using P98 and P99 as N-ch open-drain-output alternate-function pins, set
in the following sequence.
Be sure to set the port latch to 1 before setting the pin to N-ch open-drain
output.
P9n bit = 1 → PFC9n bit = 0/1 → PF9n bit = 1 → PMC9n bit = 1
94
User’s Manual U16896EJ2V0UD
Page 95
CHAPTER 4 PORT FUNCTIONS
(5) Port 9 function control register (PFC9)
Caution When port 9 is specified as an alternate function by the PMC9.PMC9n bit with the PFC9n bit
maintaining the initial value (0), output becomes undefined. Therefore, to specify port 9 as
alternate function 2, set the PFC9n bit to 1 first and then set the PMC9n bit to 1 (n = 0, 1, 6 to
9, 13 to 15).
After reset: 0000H R/W Address: PFC9 FFFFF472H,
PFC9L FFFFF472H, PFC9H FFFFF473H
89101112131415
PFC9 (PFC9H
Note
)
PFC915 PFC914 PFC913000PFC99PFC98
(PFC9L)
PFC97PFC960000PFC91PFC90
PFC915
1
PFC914
1
PFC913
1
PFC99
1
PFC98
1
PFC97
1
PFC96
1
INTP6 input
INTP5 input
INTP4 input
SCK01 I/O
SO01 output
SI01 input
TO51 output
Specification of alternate-function pin of P915 pin
Specification of alternate-function pin of P914 pin
Specification of alternate-function pin of P913 pin
Specification of alternate-function pin of P99 pin
Specification of alternate-function pin of P98 pin
Specification of alternate-function pin of P97 pin
Specification of alternate-function pin of P96 pin
PFC91
1
PFC90
1
RXD1 input
TXD1 output
Specification of alternate-function pin of P91 pin
Specification of alternate-function pin of P90 pin
Note When reading from or writing to bits 8 to 15 of the PFC9 register in 8-bit or 1-bit units,
specify these bits as bits 0 to 7 of the PFC9H register.
Remark The PFC9 register can be read or written in 16-bit units.
However, when the higher 8 bits and the lower 8 bits of the PFC9 register are used as
the PFC9H register and as the PFC9L register, respectively, these registers can be
read or written in 8-bit or 1-bit units.
User’s Manual U16896EJ2V0UD
95
Page 96
(6) Pull-up resistor option register 9 (PU9)
After reset: 0000H R/W Address: PU9 FFFFFC52H,
PU9 (PU9H
Note
PU915PU914PU913000PU99PU98
)
CHAPTER 4 PORT FUNCTIONS
PU9L FFFFFC52H, PU9H FFFFFC53H
89101112131415
(PU9L)
PU97PU960000PU91PU90
PU9n
Control of on-chip pull-up resistor connection (n = 0, 1, 6 to 9, 13 to 15)
0
Not connected
1
Connected
Note When reading from or writing to bits 8 to 15 of the PU9 register in 8-bit or 1-bit units,
specify these bits as bits 0 to 7 of the PU9H register.
Remark The PU9 register can be read or written in 16-bit units.
However, when the higher 8 bits and the lower 8 bits of the PU9 register are used as
the PU9H register and as the PU9L register, respectively, these registers can be read
or written in 8-bit or 1-bit units.
96
User’s Manual U16896EJ2V0UD
Page 97
CHAPTER 4 PORT FUNCTIONS
4.3.7 Port CM
Port CM is a 2-bit I/O port for which I/O settings can be controlled in 1-bit units.
Port CM includes the following alternate functions.
Table 4-10. Alternate-Function Pins of Port CM
Pin No. Pin Name Alternate Function I/O PULL
45 PCM0
46 PCM1 CLKOUT Output
−−
Note
Remark Block Type
Yes –
Note Software pull-up function
(1) Port CM register (PCM)
After reset: 00H (output latch) R/W Address: FFFFF00CH
0PCM00000PCM1PCM0
C-U
D0-U
PCMn
0
0 is output
1
1 is output
(2) Port CM mode register (PMCM)
After reset: FFH R/W Address: FFFFF02CH
1PMCM11111PMCM1 PMCM0
PMCMn
0
Output mode
1
Input mode
(3) Port CM mode control register (PMCCM)
After reset: 00H R/W Address: FFFFF04CH
Control of output data (in output mode) (n = 0, 1)
Control of I/O mode (n = 0, 1)
0PMCCM00000PMCCM10
PMCCM1
0
1
I/O port
CLKOUT output
Specification of PCM1 pin operation mode
User’s Manual U16896EJ2V0UD
97
Page 98
CHAPTER 4 PORT FUNCTIONS
(4) Pull-up resistor option register CM (PUCM)
After reset: 00H R/W Address: FFFFFF4CH
0PUCM00000PUCM1PUCM0
PUCMn
0
1
Not connected
Connected
Control of on-chip pull-up resistor connection (n = 0, 1)
98
User’s Manual U16896EJ2V0UD
Page 99
CHAPTER 4 PORT FUNCTIONS
4.3.8 Port DL
Port DL is an 8-bit I/O port for which I/O settings can be controlled in 1-bit units.
Port DL includes the following alternate functions.
Table 4-11. Alternate-Function Pins of Port DL
Pin No. Pin Name Alternate Function I/O PULL
47 PDL0
48 PDL1
49 PDL2
50 PDL3
51 PDL4
52 PDL5
53 PDL6
54 PDL7
− −
− −
− −
− −
− −
− −
− −
− −
Note
Remark Block Type
Yes –
Note Software pull-up function
C-U
C-U
C-U
C-U
C-U
C-U
C-U
C-U
User’s Manual U16896EJ2V0UD
99
Page 100
(1) Port DL register (PDL)
After reset: 00H (output latch) R/W Address: FFFFF004H
CHAPTER 4 PORT FUNCTIONS
PDL
PDL7PDL6PDL5PDL4PDL3PDL2PDL1PDL0
PDLn
0
1
0 is output
1 is output
Control of output data (in output mode) (n = 0 to 7)
(2) Port DL mode register (PMDL)
After reset: FFH R/W Address: FFFFF024H
PMDL
PMDL7
PMDLn
0
1
PMDL6PMDL5PMDL4PMDL3PMDL2PMDL1PMDL0
Output mode
Input mode
(3) Pull-up resistor option register DL (PUDL)
After reset: 00H R/W Address: FFFFFF44H
Control of I/O mode (n = 0 to 7)
100
PUDL
PUDL7PUDL6PUDL5PUDL4PUDL3PUDL2PUDL1PUDL0
PUDLn
0
1
Not connected
Connected
Control of on-chip pull-up resistor connection (n = 0 to 7)
User’s Manual U16896EJ2V0UD
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.