Registers For Port 6 (Pdr6, Ddr6) - Fujitsu MB90420/5 (A) Series Hardware Manual

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

Advertisement

8.8.1 Registers for Port 6 (PDR6, DDR6, ADER)
The registers for port 6 are explained.
n Function of port-6 registers
• Port 6 data register (PDR6)
The PDR6 register indicates the state of the pins.
• Port 6 direction register (DDR6)
The DDR6 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.
• ADER register (ADER)
The ADER register determines whether to use pins as ports or analog input pins by the bit. When the bit
that corresponds to a pin is set to 1, the pin becomes an analog input pin. When the bit is set to 0, the pin
becomes an I/O port.
Note:
When a middle-level signal is input at the port I/O mode, the input leakage current flows. So, when
using a pin as an analog input pin, always set the corresponding bit of ADER to analog input.
Remark:
At a reset, DDR6 is initialized to 0 and the ADER register is initialized to 1, and the analog input
mode occurs.
Register
Data
Name
0
Port 6 data
register
(PDR6)
1
0
Port 6
direction
register
(DDR6)
1
Analog
0
input
enable
1
register
(ADER)
R/W : Both read and write
X : Undefined
Table 8-25 Function of Registers for Port 6
At Read
When DDR6 is set to 0, the high
impedance state occurs.
The pin state
is L level.
When DDR6 is set to 1, the L
level is output.
When DDR6 is set to 0, the high
impedance state occurs.
The pin state
is H level.
When DDR6 is set to 1, the H
level is output.
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.
Port I/O mode
Analog input mode
I/O PORT
At Write
8-33
Read/
Address
Initial Value
Write
R/W
000006
XXXXXXXX
H
R/W
000016
00000000
H
R/W
000017
11111111
H
B
B
B

Advertisement

Table of Contents
loading

Table of Contents