![](http://datasheet.mmic.net.cn/330000/MB90F562_datasheet_16437954/MB90F562_220.png)
196
CHAPTER 8 I/O PORTS
MB90560 series
8.6
8.6.1 Port 3 Registers (PDR3 and DDR3)
Port 3
This section describes the port 3 registers.
I
Functions of Port 3 Registers
G
Port 3 data register (PDR3)
The PDR3 register indicates the state of each pin of port 3.
G
Port 3 data direction register (DDR3)
The DDR3 register specifies the direction of a data flow (input or output) at each pin (bit) of port
3. When a DDR3 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.
<Check>
When a peripheral function having output pins is used, the port functions as peripheral
function output pins regardless of the value in the DDR3 register as long as the peripheral
function output enable bit corresponding to the pins is set.
To use a peripheral function having input pins, reset the DDR3 register bit corresponding
to each peripheral function input pin to “0” to place the port in input mode.
Table 8.6-3 lists the functions of the port 3 registers.
Table 8.6-3 Port 3 register functions
R/W : Read/write enabled
X
: Undefined
Register
Data
During
reading
During writing
Read/
Write
Address
Initial value
Port 3 data
register (PDR3)
0
The pin is at
the low level.
The output latch is loaded with “0”. When
the pin functions as an output port, the pin
is set to the low level.
R/W
000003H
XXXXXXXXB
1
The pin is at
the high
level.
The output latch is loaded with “1”. When
the pin functions as an output port, the pin
is set to the high level.
Port 3 data
direction register
(DDR3)
0
The direction
latch is “0”.
The output buffer is turned off to place the
port in input mode.
R/W
000013H
00000000B
1
The direction
latch is “1”.
The output buffer is turned on to place the
port in output mode.