Registers For Port 4 (Pdr4, Ddr4) - Fujitsu MB90420/5 (A) Series Hardware Manual

F2mc-16lx family 16-bit microcontrollers
Table of Contents

Advertisement

8.6.1 Registers for Port 4 (PDR4, DDR4)

The registers for port 4 are explained.
n Function of registers for port 4
• Port 4 data register (PDR4)
The PDR4 register indicates the state of the pins.
• Port 4 direction register (DDR4)
The DDR4 register sets the I/O direction of the pins for each bit. When the bit corresponding to a port pin
is set to 1, the port pin becomes an output port pin; when the bit corresponding to a port pin is set to 0, the
port pin becomes an input port pin.
Note:
When using a resource with an output pin when the output enable bit of each resource that
corresponds to the pin is set, the pin is forcibly set as an output pin of each resource, irrespective of
the value of the DDR4 register.
Register
Data
Name
0
Port 4 data
register
(PDR4)
1
0
Port 4
direction
register
(DDR4)
1
R/W : Both read and write
X : Undefined
Table 8-17 Function of Registers for Port 4
At Read
0 is set for the output latch, and
The pin state
when the pin is an output port pin,
is L level.
the L level is output to the pin.
1 is set for the output latch, and
The pin state
when the pin is an output port pin,
is H level.
the H level is output to the pin.
The output buffer is set to OFF,
The direction
and the pin becomes an input
latch is 0.
port pin.
The output buffer is set to ON,
The direction
and the pin becomes an output
latch is 1.
port pin.
I/O PORT
At Write
8-23
Read/
Address
Initial Value
Write
R/W
000004
XXXXXXXX
H
R/W
000014
00000000
H
B
B

Advertisement

Table of Contents
loading

Table of Contents