4-16 Chapter 4 I/O Ports
MB89190/190A series
4.3 Port 3
4.3.2 Explanation of Port 3 Operation
The operation of port 3 is explained.
T Operation of port 3
Output port operation
– When the corresponding bit of the DDR3 register is set to 1, the port becomes an output port.
– For the output port, operation of the output transistor is enabled, data of the output latch is output
to the pin.
– When data is written to the PDR3 register, data is retained at the output latch and is output to the
pin as is.
– When the PDR3 register is read, the value of the pin can be read.
Input port operation
– When the corresponding bit of the DDR3 register is set to 0, the port becomes an input port.
– For the input port, the output transistor is set to OFF, and the pin becomes high impedance.
– When data is written to the PDR3 register, data is retained at the output latch, but is not output to
the pin.
– When the PDR3 register is read, the value of the pin can be read.
External interrupt input operation
– The bit of the DDR3 register that corresponds to the external interrupt input pin is set to 0 to set
that pin to an input port.
– When the PDR3 register is read, the value of the pin can be read irrespective of whether the
external interrupt input and the interrupt request output are enabled or disabled.
Resource output operation
– When the output enable bit of the resource is set to Enable, the corresponding pin becomes a
resource output.
– Even when the resource output is enabled, the resource output value can be read because the
value of the pin can be read using the PDR3 register.
Resource input operation
– The bit of the DDR3 register that corresponds to the input pin of the resource is set to “0” to set that
pin to an input port.
– The value of the pin is always input to the input of the resource (during other than the stop mode).
– When the PDR3 register is read, the value of the pin can be read irrespective of whether the
resource uses the input pin.
Reset operation
– When the CPU is reset, the value of the DDR3 register is initialized to 0, so the output transistors
are all set to FF (input port), and the pin becomes high impedance.
– The PDR3 register cannot be initialized by reset, so when using a pin as an output port, set output
data to the PDR3 register, and then set the corresponding DDR3 register to an output port.