100
CHAPTER 4 PORT FUNCTIONS
User’s Manual U15798EJ2V0UD
4.2.5 Port 4
Port 4 is a 4-bit I/O port with an output latch. The P40 to P43 pins can be set to input mode/output mode in 1-
bit units using port mode register 4 (PM4).
At the falling edge of any of the P40 to P43 pins, the interrupt request flag (KRIF) can be set to 1.
RESET input sets port 4 to input mode.
Figure 4-11 shows a block diagram of port 4 and Figure 4-12 shows a block diagram of the falling edge detector,
respectively.
Cautions 1. When using the falling edge detection interrupt (INTKR), be sure to set the memory expansion
mode register (MEM) to 01H.
2. The falling edge can be detected only when a falling edge occurs while all the P40 to P43 pins
are high.
The falling edge of another pin cannot be detected while even one of the P40 to P43 pins is
low.
Figure 4-11. Block Diagram of P40 to P43
PU: Pull-up resistor option register
PM: Port mode register
RD: Port 4 read signal
WR: Port 4 write signal
Figure 4-12. Block Diagram of Falling Edge Detector
RD
P40 to P43
P-ch
WR
PU
WR
PORT
WR
PM
PU40 to PU43
Output latch
(P40 to P43)
PM40 to PM43
Selector
V
DD0
Internal bus
“1” when MEM = 01H
P43
P42
P41
P40
INTKR
Falling edge
detector
Содержание mPD780344 Series
Страница 2: ...2 User s Manual U15798EJ2V0UD MEMO...