Port 4 - NEC mPD780024AS Series Preliminary User's Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

4.2.5 Port 4

Port 4 is an 8-bit I/O port with output latch. The P40 to P47 pins can specify the input mode/output mode in 1-
bit units with port mode register 4 (PM4). An on-chip pull-up resistor of P40 to P47 pins can be used for them in 1-
bit units with pull-up resistor option register 4 (PU4).
The interrupt request flag (KRIF) can be set to 1 by detecting falling edges.
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 falling edge detector, respectively.
Caution
When using the falling edge detection interrupt (INTKR), be sure to set the memory expansion
mode register (MEM) to 01H.
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
P44
P45
P46
P47
CHAPTER 4 PORT FUNCTIONS
Figure 4-8. Block Diagram of P40 to P47
PU40 to PU47
Output latch
Selector
(P40 to P47)
Memory expansion
mode register
(MEM)
PM40 to PM47
Figure 4-9. Block Diagram of Falling Edge Detector
"1" when MEM = 01H
Preliminary User's Manual U16035EJ1V0UM
Selector
Falling edge detector
V
DD0
P-ch
P40/AD0 to
P47/AD7
INTKR
81

Advertisement

Table of Contents
loading

Table of Contents