Datasheet

CHAPTER 4 PORT FUNCTIONS
User’s Manual U18698EJ1V0UD
85
4.2.4 Port 4
Port 4 is a 1-bit I/O port with an output latch. Port 4 can be set to the input mode or output mode in 1-bit units
using port mode register 4 (PM4). When the P40 pin is used as an input port, use of an on-chip pull-up resistor can
be specified in 1-bit units by pull-up resistor option register 4 (PU4).
This port can also be used for power supply voltage pins for driving the LCD and key interrupt input pin.
Reset signal generation sets port 4 to input mode.
Figures 4-7 show a block diagram of port 4.
Figure 4-7. Block Diagram of P40
P40/V
LC3
/KR0
WR
PU
RD
WR
PORT
WR
PM
PU40
Alternate
function
Output latch
(P40)
PM40
V
DD
P-ch
Selector
Internal bus
PU4
PM4
P4
Selector
V
LC3
LCDM
LCDM0 to LCDM2
P4: Port register 4
PU4: Pull-up resistor option register 4
PM4: Port mode register 4
LCDM: LCD display mode register
RD: Read signal
WR××: Write signal