![NEC 78K0S/K 1+ Series Application Note Download Page 25](http://html.mh-extra.com/html/nec/78k0s-k-1-series/78k0s-k-1-series_application-note_249252025.webp)
CHAPTER 4 SETTING METHODS
[Example 2]
•
Setting P40 and P43 as input ports
•
Setting internal pull-up resistors to be connected to P40 and P43
(Same as in the sample program setting)
PM4
•
78K0S/KB1+, 78K0S/KY1+
Note
Bits 7 and 6 are set to 1 after reset release. They must be set to 0 in the initial settings.
Note
Bits 7 to 4, 2, and 1 are set to 1 after reset release. They must be set to 0 in the initial settings.
Caution Bits 7 and 6 must be set to 0.
Caution Bits 7 to 4, 2, and 1 must be set to 0.
The PM4 register setting value is “
xxxx1xx1
(x: don’t care)” with the 78K0S/KB1+ and 78K0S/KY1+, “
00xx1xx1
(x: don’t care)” with the 78K0S/KA1+, and “
00001001
” with the 78K0S/KU1+. The PU4 register setting value is
“
xxxx1xx1
(x: don’t care)” with the 78K0S/KB1+ and 78K0S/KY1+, “00
xx1xx1
(x: don’t care)” with the
78K0S/KA1+, and “0000
1
00
1
” with the 78K0S/KU1+. (In the example below, “x” in the PM4 and PU4 register
values is set to 0.)
x x x x 1 x x
1
Selection of the P40 and P43 pin I/O modes
1 Input
mode
•
78K0S/KA1+
0
Note
0
Note
x x 1 x x
1
Selection of the P40 and P43 pin I/O modes
1 Input
mode
•
78K0S/KU1+
0
Note
0
Note
0
Note
0
Note
1 0
Note
Note
0
1
Selection of the P40 and P43 pin I/O modes
1 Input
mode
* In this sample program, P40 and P43 are used as switch
input ports, so P40 and P43 are set as input ports.
PU4
•
78K0S/KB1+, 78K0S/KY1+
x x x x 1 x x
1
Selection of connection of internal pull-up resistors to P40
and P43 pins
1
Internal pull-up resistor is connected.
•
78K0S/KA1+
0 0
x x 1 x x
1
Selection of connection of internal pull-up resistors to P40
and P43 pins
1
Internal pull-up resistor is connected.
• 78K0S/KU1+
0
0
0
0
1
0
0
1
Selection of connection of internal pull-up resistors to P40
and P43 pins
1
Internal pull-up resistor is connected.
* In this sample program, internal pull-up resistors are
connected to P40 and P43 to control the P40 and P43
input levels. (High-level input is selected when the switch
is off, and low-level input is selected when the switch is on
(refer to
).)
Application Note U18752EJ2V0AN
25