Datasheet

CHAPTER 4 PORT FUNCTIONS
User’s Manual U18172EJ3V0UD
66
4.2.3 Port 4
Port 4 is a 2-bit I/O port with an output latch. Each bit of this port can be set to the input or output mode by using
port mode register 4 (PM4)
Note
. When the P40 and P43 pins are used as an input port, an on-chip pull-up resistor can
be connected in 1-bit units by using pull-up resistor option register 4 (PU4).
Reset signal generation sets port 4 to the input mode.
Figures 4-11 shows the block diagram of port 4.
Note In
μ
PD78F920x, set PM41, PM42, and PM44 to PM47 to "0" at program initialization.
Figure 4-11. Block Diagram of P40 and P43
P40, P43
WR
PU
RD
WR
PORT
WR
PM
PU40, PU43
PM40, PM43
V
DD
P-ch
PU4
PM4
Internal bus
Output latch
(P40, P43)
Selector
P4
P4: Port register 4
PU4: Pull-up resistor option register 4
PM4: Port mode register 4
RD: Read signal
WR××: Write signal
4.3 Registers Controlling Port Functions
The ports are controlled by the following four types of registers.
Port mode registers (PM2 to PM4)
Port registers (P2 to P4)
Port mode control register 2 (PMC2) (
μ
PD78F920x only)
Pull-up resistor option registers (PU2 to PU4)
<R>