74
CHAPTER 4 PORT FUNCTIONS
User’s Manual U15104EJ2V0UD
4.2.4 Port 4
Port 4 is an 8-bit I/O port with an output latch. Input or output mode can be specified for port 4 in 1-bit units using
port mode register 4 (PM4). Connection of pull-up resistors can be specified in 1-bit units using pull-up resistor option
register 4 (PU4).
The interrupt request flag (KYIF) can be set to 1 by detecting key inputs. When using this function, be sure to
set the MEM register to 01H.
Reset input sets port 4 to input mode.
Figures 4-8 and 4-9 show a block diagram of port 4 and block diagram of the key input detector, respectively.
Figure 4-8. Block Diagram of P40 to P47
PU:
Pull-up resistor option register
PM:
Port mode register
RD:
Port 4 read signal
WR: Port 4 write signal
RD
P40 to P47
P-ch
WR
PU
WR
PORT
WR
PM
PU40 to PU47
Output latch
(P40 to P47)
PM40 to PM47
Selector
V
DD
Internal bus
Содержание mPD178053
Страница 2: ...2 User s Manual U15104EJ2V0UD MEMO ...