
37
MB90670/675 Series
(2) Open-drain Port
Ports 5 and 9 are general-purpose I/O ports with an open-drain output. Port 5 also can serve as an analog input;
when port 5 is used as a general-purpose port, always be sure to set the corresponding bits in ADER to “0”.
Port 9 also serve as an I
2
C I/O; when port 9 is used as a general-purpose port, be sure to stop I
2
C operations.
When ports 5 and 9 are used as input ports, it is necessary set the output port data register value to “1” in order
to turn off the open drain output transistor; it is also necessary to connect a pull-up resistor to the external pins.
In addition, depending on the instruction used to read these bits, one of the following two operations is performed:
When read by a read-modify-write instruction:
The contents of the output port data register are read. Even if pins are forcibly set to “0” externally, the contents
of the bits not specified by the instruction do not change.
When read by any other instruction:
The pin level can be read.
When used as output ports, the pin values can be changed by writing the desired value to the corresponding
output port data register.
In addition, a “0” is always read when reading pins corresponding to bits for which a “1” is set in the ADER.
Port dat
Analog input enable
register
Port data register read
Port data register write
ADER register write
ADER register read
Pin
RMW
(Read-modify-write
instruction)
Fixed to “1”
in port 9
I
Block Diagram