Port 4 Registers (Pdr4 And Ddr4) - Fujitsu MB90460 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 9 I/O PORT
9.7.1

Port 4 Registers (PDR4 and DDR4)

This section describes the port 4 registers.
■ Functions of Port 4 Registers
Port 4 data register (PDR4)
The PDR4 register indicates the state of each pin of port 4.
Port 4 data direction register (DDR4)
The DDR4 register specifies the direction of a data flow (input or output) at each pin (bit) of port 4. When
a DDR4 register bit is "1", the corresponding port (pin) is set as an output port. When the bit is "0", the
port (pin) is set as an input port.
References:
• When a resource having output pins is used, the port functions as resource output pins regardless
of the value in the DDR4 register as long as the resource output enable bit corresponding to the
pins is set.
• To use a resource having input pins, reset the DDR4 register bit corresponding to each resource
input pin to "0" to place the port in input mode.
Table 9.7-3 lists the functions of the port 4 registers.
Table 9.7-3 Port 4 Register Functions
Register
Data
0
Port 4 data
register (PDR4)
1
0
Port 4 data
direction register
(DDR4)
1
R/W: Read/write enabled
X
: Undefined
-
: Empty bit
190
During
reading
Setting an DDR5 bit to "0" enables the
The pin is at
pin for a high-impedance.
the low
Setting an DDR5 bit to "1" enables the
level.
pin functions as an output port, and the
pin is set to the low level.
Setting an DDR5 bit to "0" enables the
The pin is at
pin for a high-impedance.
the high
Setting an DDR5 bit to "1" enables the
level.
pin functions as an output port, and the
pin is set to the high level.
The
The output buffer is turned off to place
direction
the port in input mode.
latch is "0".
The
The output buffer is turned on to place
direction
the port in output mode.
latch is "1".
During writing
Read/
Address
Initial value
Write
000004
–XXXXXXX
R/W
H
000014
–0000000
R/W
H
B
B

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90465 series

Table of Contents