![](http://datasheet.mmic.net.cn/330000/MB90F562_datasheet_16437954/MB90F562_238.png)
214
CHAPTER 8 I/O PORTS
MB90560 series
8.9
8.9.1 Port 6 Registers (PDR6 and DDR6)
Port 6
This section describes the port 6 registers.
I
Functions of Port 6 Registers
G
Port 6 data register (PDR6)
The PDR6 register indicates the state of each pin of port 6.
G
Port 6 data direction register (DDR6)
The DDR6 register specifies the direction of a data flow (input or output) at each pin (bit) of
port 6. When a DDR6 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:
To use a peripheral function having input pins, reset the DDR6 register bit corresponding to
each peripheral function input pin to “0” to place the port in input mode.
Table 8.9-3 lists the functions of the port 6 registers.
Table 8.9-3 Port 6 register functions
R/W : Read/write enabled
X
: Undefined
–
: Empty bit
Register
Data
During reading
During writing
Read/
Write
Address
Initial value
Port 6 data
register (PDR6)
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
000006H
----XXXXB
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 6 data
direction register
(DDR6)
0
The direction
latch is “0”.
The output buffer is turned off to place
the port in input mode.
R/W
000016H
----0000B
1
The direction
latch is “1”.
The output buffer is turned on to place
the port in output mode.