CHAPTER 4 I/O PORT
4.7.1
Registers for Port 5 (PDR5, DDR5, ADER)
The registers for port 5 are explained.
I Function of Registers for Port 5
G
Port 5 data register (PDR5)
• Port 5 data register indicates the state of the pins.
G
Port 5 direction register (DDR5)
• The port 5 direction register sets the input/output directions.
• When the bit corresponding to the pin is set to "1", port 1 functions as an output port. When the bit is set
to "0", port 1 functions as an input port.
G
Analog input enable register (ADER)
• The analog input enable register (ADER) sets the general-purpose I/O ports and analog input pin in unit
of ports.
• When the ADE bit corresponding to the analog input pin is set to "1", port 5 functions as an analog input
pin. When the bit is set to "0", port 5 functions as a general-purpose I/O port.
Table 4.7-3 shows functions of the registers for port 5.
Note:
When a middle-level signal is input with port 5 set as an input port, input leakage current
flows. Therefore, when inputting an analog signal, set the corresponding ADE bit in the
ADER to analog input enabled.
186