Port 4 - NEC mPD780344 Series User Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

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.
WR
PU
RD
WR
PORT
WR
PM
PU: Pull-up resistor option register
PM: Port mode register
RD: Port 4 read signal
WR: Port 4 write signal
P40
P41
P42
P43
100
CHAPTER 4 PORT FUNCTIONS
Figure 4-11. Block Diagram of P40 to P43
PU40 to PU43
Output latch
(P40 to P43)
PM40 to PM43
Figure 4-12. Block Diagram of Falling Edge Detector
"1" when MEM = 01H
User's Manual U15798EJ2V0UD
Selector
Falling edge
detector
V
DD0
P-ch
P40 to P43
INTKR

Advertisement

Table of Contents
loading

Table of Contents