NEC 78K0S/KU1+ User Manual page 60

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

Advertisement

(2) Port registers (P2 to P4)
These registers are used to write data to be output from the corresponding port pin to an external device
connected to the chip.
When a port register is read, the pin level is read in the input mode, and the value of the output latch of the
port is read in the output mode.
P20 to P23, P32, P40 and P43 are set by using a 1-bit or 8-bit memory manipulation instruction.
Reset signal generation sets these registers to 00H.
Address: FF02H, After reset: 00H (Output latch) R/W
Symbol
7
P2
0
Address: FF03H, After reset: 00H
Symbol
7
P3
0
Address: FF04H, After reset: 00H (Output latch) R/W
Symbol
7
P4
0
Pmn
0
Output 0
1
Output 1
Note Because P34 is read-only, its reset value is undefined.
(3) Port mode control register 2 (PMC2)
This register specifies the port/alternate function (except the A/D converter function) mode or the A/D
converter mode.
Each bit of the PMC2 register corresponds to each pin of port 2 and can be specified in 1-bit units.
PMC2 is set by using a 1-bit or 8-bit memory manipulation instruction.
Reset signal generation sets PMC2 to 00H.
60
CHAPTER 4 PORT FUNCTIONS
Figure 4-9. Format of Port Register
6
5
0
0
Note
Note
(Output latch) R/W
6
5
0
0
P34
6
5
0
0
Controls of output data (in output mode)
User's Manual U18172EJ2V0UD
4
3
2
0
P23
P22
4
3
2
0
P32
4
3
2
0
P43
0
m = 2 to 4; n = 0 to 4
Input data read (in input mode)
Input low level
Input high level
1
0
P21
P20
1
0
0
0
1
0
0
P40

Advertisement

Table of Contents
loading

Table of Contents