Port 2; Port 2 Data Direction Register (P2Ddr) - Renesas H8S/2158 User Manual

16-bit single-chip microcomputer h8s family/h8s/2100 series
Table of Contents

Advertisement

Section 9 I/O Ports
9.2

Port 2

Port 2 is an 8-bit I/O port. Port 2 pins also function as an address bus, PWM output pins, and
CompactFlash address output pins. Port 2 functions change according to the operating mode. Port
2 has the following registers.

• Port 2 data direction register (P2DDR)

• Port 2 data register (P2DR)
• Port 2 pull-up MOS control register (P2PCR)
9.2.1
Port 2 Data Direction Register (P2DDR)
The individual bits of P2DDR specify input or output for the pins of port 2.
Bit
Bit Name
7
P27DDR
6
P26DDR
5
P25DDR
4
P24DDR
3
P23DDR
2
P22DDR
1
P21DDR
0
P20DDR
Rev. 3.00 Jan 25, 2006 page 212 of 872
REJ09B0286-0300
Initial Value
R/W
0
W
0
W
0
W
0
W
0
W
0
W
0
W
0
W
Description
In extended mode:
The corresponding port 2 pins are address output
or CompactFlash address output ports when the
P2DDR bits are set to 1, and input ports when
cleared to 0.
Pins function as the address output port
depending on the setting of bits IOSE and
CS256E in SYSCR.
In single-chip mode:
The corresponding port 2 pins are output ports or
PWM outputs when the P2DDR bits are set to 1,
and input ports when cleared to 0.

Advertisement

Table of Contents
loading

Table of Contents