Registers For Port 0 (Pdr0, Ddr0) - Fujitsu MB90420/5 (A) Series Hardware Manual

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

Advertisement

MB90420/5 (A) SERIES F

8.3.1 Registers for port 0 (PDR0, DDR0)

The registers for port 0 are explained.
n Function of registers for port 0
• Port 0 data register (PDR0)
The PDR0 register indicates the state of the pins.
• Port 0 direction register (DDR0)
The DDR0 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.
• When using a resource with an output pin when the output enable bit of each resource that
Note:
corresponds to the pin is set, the pin is forcibly set as an output pin of the resource, irrespective of
the value of the DDR0 register.
• When using a resource with input pins, write 0 to the bits of the DDR0 register that correspond to
the input pins of each resource, to set those input pins as input ports.
Register
Data
Name
0
Port 0 data
register
(PDR0)
1
0
Port 0
direction
register
(DDR0)
1
R/W : Both read and write
X : Undefined
2
MC-16LX FAMILY 16-BIT MICROCONTROLLERS HARDWARE MANUAL
Table 8-5 Function of Registers for Port 0
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.
Read/
At Write
Write
8-8
Address
Initial Value
R/W
000000
XXXXXXXX
H
R/W
000010
00000000
H
B
B

Advertisement

Table of Contents
loading

Table of Contents