Port 1 Registers (Pdr1, Ddr1 And Rdr1) - Fujitsu MB90460 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

9.4.1

Port 1 Registers (PDR1, DDR1 and RDR1)

This section describes the port 1 registers.
■ Functions of Port 1 Registers
Port 1 data register (PDR1)
The PDR1 register indicates the state of each pin of port 1.
Port 1 data direction register (DDR1)
The DDR1 register specifies the direction of a data flow (input or output) at each pin (bit) of port 1. When
a DDR1 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.
Port 1 pull-up resistor setting register (RDR1)
The RDR1 register specifies the selection of a pull-up resistor at each pin (bit) of port 1. When a RDR1
register bit is "1", a pull-up resistor is selected for the corresponding port (pin). When the bit is "0", the
pull-up resistor is deselected.
Notes:
• When a resource having output pins is used, the port functions as resource output pins regardless
of the value in the DDR1 register as long as the resource output enable bit corresponding to the
pins is set.
• To use a resource having input pins, reset the port direction register bit corresponding to each
resource input pin to "0" to place the port in input mode.
Table 9.4-3 lists the functions of the port 1 registers.
Table 9.4-3 Port 1 Register Functions
Register
Data During reading
0
Port 1 data register
(PDR1)
1
0
Port 1 data
direction register
(DDR1)
1
0
Port 1 pull-up
resistor setting
register (RDR1)
1
R/W: Read/write enabled
X
: Undefined
The output latch is loaded with 0. When
The pin is at the
the pin functions as an output port, the pin
low level.
is set to the low level.
The output latch is loaded with 1. When
The pin is at the
the pin functions as an output port, the pin
high level.
is set to the high level.
The direction
The output buffer is turned off to place the
latch is "0".
port in input mode.
The direction
The output buffer is turned on to place the
latch is "1".
port in output mode.
The setting latch
The pull-up resistor is cut and the port is
is "0".
placed in the Hi-Z state in input mode.
The setting latch
The pull-up resistor is selected and the port
is "1".
is held at the high level in input mode.
During writing
CHAPTER 9 I/O PORT
Read/Write
Address
000001
R/W
H
000011
R/W
H
00001D
R/W
H
Initial value
XXXXXXXX
B
00000000
B
00000000
B
175

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90465 series

Table of Contents