Port 2 - NEC 78K0S/KB1+ User Manual

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0S/KB1+:
Table of Contents

Advertisement

4.2.2

Port 2

Port 2 is a 4-bit I/O port with an output latch. Each bit of this port can be set to the input or output mode by using
port mode register 2 (PM2). When the P20 to P23 pins are used as an input port, an on-chip pull-up resistor can be
connected in 1-bit units by using pull-up resistor option register 2 (PU2).
This port is also used as the analog input pins of the internal A/D converter.
Generation of reset signal sets port 2 to the input mode.
Figure 4-2 shows the block diagram of port 2.
WR
PU
WR
PMC
PMC20 to PMC23
RD
WR
PORT
WR
PM
PU2:
Pull-up resistor option register 2
P2:
Port register 2
PM2:
Port mode register 2
PMC2: Port mode control register 2
RD:
Read signal
WR××: Write signal
CHAPTER 4 PORT FUNCTIONS
Figure 4-3. Block Diagram of P20 to P23
PU2
PU20 to PU23
PMC2
P2
Output latch
(P20 to P23)
PM2
PM20 to PM23
A/D converter
User's Manual U17446EJ3V1UD
V
DD
P-ch
P20/ANI0 to P23/ANI3
53

Advertisement

Table of Contents
loading

Table of Contents