Port 2 - NEC UPD703116 User Manual

32-bit single-chip microcontrollers
Table of Contents

Advertisement

14.3.3 Port 2

Port 2 is an 8-bit I/O port in which input or output can be specified in 1-bit units.
7
6
P2
P27
P26
Bit position
Bit name
7 to 0
P2n
(n = 7 to 0)
Besides functioning as a port, in control mode, it also can operate as the timer/counter I/O and external interrupt
request input.
(1) Operation in control mode
Port
Port 2
P20
P21 to P24
P25
P26
P27
(2) Setting in I/O mode and control mode
Port 2 is set in I/O mode using the port 2 mode register (PM2). In control mode, it is set using the port 2
mode control register (PMC2) and port 2 function control register (PFC2).
(a) Port 2 mode register (PM2)
This register can be read/written in 8-bit or 1-bit units.
7
6
PM2
PM27
PM26
Bit position
Bit name
7 to 0
PM2n
(n = 7 to 0)
CHAPTER 14 PORT FUNCTIONS
5
4
3
P25
P24
P23
I/O port
Alternate Pin Name
TI2/INTP20
Timer/counter input or external interrupt request input
TO21/INTP21 to
Timer/counter output or external interrupt request
TO24/INTP24
input
TCLR2/INTP25
Timer/counter input or external interrupt request input
TI3/TCLR3/INTP30
TO3/INTP31
Timer/counter output or external interrupt request
input
5
4
3
PM25
PM24
PM23
Specifies input/output mode of P2n pin.
0: Output mode (output buffer on)
1: Input mode (output buffer off)
User's Manual U14492EJ5V0UD
2
1
0
P22
P21
P20
Function
Remarks
2
1
0
PM22
PM21
PM20
Function
Address
Initial value
FFFFF404H
Undefined
Block Type
B
N
B
N
Address
Initial value
FFFFF424H
FFH
693

Advertisement

Table of Contents
loading

Table of Contents