November, 2018 Rev.1.4
43
9. I/O PORTS
9.1 Introduction
The MC96FR364B has four I/O ports (P0, P1, P2, P3). Each port can be easily configured by software
whether to use internal pull up resistor or not, whether to use open drain output or not, or whether the
pin is input or output. Also P0 includes function that can generate interrupt when the state of P0
changes.
9.2 Register Description
9.2.1 Data Register (Px)
Data Register is a bidirectional I/O port. If ports are configured as output ports, data can be written to
the corresponding bit in the Px. If ports are configured as input ports, the port value can be read from
the corresponding bit in the Px.
9.2.2 Direction Register (PxIO)
The PxnIO bit in the PxIO register selects the direction of this pin. If PxnIO is written logic one, Pxn is
configured as an output pin. If PxnIO is written logic zero, Pxn is configured as an input pin. All bits
are cleared by a system reset.
9.2.3 Pull-up Resistor Selection Register (PxPU)
All ports P0, P1, P2, P3 have optional internal pull-ups. The PxnPU bit in the PxPU register allows the
use of pull-up resistor. If PxnPU is written logic one, the pull-up resistor is activated. If PxnPU is
written logic zero, the pull-up resistor is deactivated. When the port is configured as an input port,
internal pull-up is deactivated regardless of the PxnPU bit. After reset, all pull-up resistors are
switched off except those of P3[5:2]. According to PKG types, some of these ports are omitted, so to
maintain input status, the internal pull-ups for these ports are activated.
9.2.4 Open-drain Selection Register (PxOD)
The PxnOD bit in the PxOD register controls the port type when configured as an output port. If
PxnOD is written logic one, the port becomes open-drain type. If PxnOD is written logic zero, the port
becomes push-pull type. After reset, open-drain function is disabled.
Caution
: Port 0 has no open drain control register.
9.2.5 Pull-up Control Register (PxBPC)
When the external VDD drops below the V
BODOUT0
level, the ports can be selectively configured as
input ports with pull-up resistors activated regardless of the PxnIO. In this case, the port direction is
changed by hardware automatically. If PxnBPC is written logic one, this function is enabled. If
PxnBPC is written logic zero, the port maintain its status even if the device enters stop mode after the
external VDD is fallen below the V
BODOUT0
level. After reset, PxnBPC is set to 1 allowing automatic
port direction change due to voltage drop.
Summary of Contents for MC96FR364B
Page 17: ...MC96FR364B November 2018 Rev 1 4 17 4 PACKAGE DIMENSION...
Page 18: ...MC96FR364B 18 November 2018 Rev 1 4 Figure 4 1 PKG DIMENSION 28 TSSOP...
Page 23: ...MC96FR364B November 2018 Rev 1 4 23 6 3 REMOUT Port Data PAD VDD Figure 6 3 REMOUT port...
Page 69: ...November 2018 Rev 1 4 69 Initial value 00H BIT 7 0 BIT counter value...