118
CHAPTER 4 PORT FUNCTIONS
User
’
s Manual U14701EJ3V0UD
(3) Memory expansion mode register (MEM)
This register is used to set the mode of port 4.
MEM is set by a 1-bit or 8-bit memory manipulation instruction.
RESET input sets the value of this register to 00H.
Figure 4-22. Memory Expansion Mode Register (MEM) Format
MM2
MM1
MM0
Single-chip/key return mode selection
0
0
0
Single-chip mode (used as port pin)
0
0
1
Key return mode (used as key input pin
Note
)
Other than above
Setting prohibited
Note
P44 to P47 pins can be used as port pins if bit 0 (KRSEL0) of key return switching register (KRSEL) is
set to 1. At this time, key return function cannot be evaluated with in-circuit emulator.
Caution Be sure to set MM1 and MM2 to 0.
(4) Key return switching register (KRSEL)
This register is used to set the pins used as key return signals (port 4 falling edge detection).
KRSEL is set by a 1-bit or 8-bit memory manipulation instruction.
RESET input sets the value of this register to 00H.
Figure 4-23. Key Return Switching Register (KRSEL) Format
KRSEL0
Setting the pin used for port 4 falling edge detection
0
P40 to P47 are used as key return signal (port 4 falling edge detection)
1
P40 to P43 are used as key return signal (port 4 falling edge detection)
Note 2
Notes 1.
KRSEL can be accessed but its read value is not guaranteed.
2.
P44 to P47 can be used as port pins.
Caution KRSEL0 can only be set once after reset. To change the value, reset the register.
7
0
Symbol
MEM
6
0
5
0
4
0
3
0
2
MM2
1
MM1
0
MM0
Address: FF47H After reset: 00H R/W
7
0
Symbol
KRSEL
6
0
5
0
4
0
3
0
2
0
1
0
0
KRSEL0
Address: FF8FH After reset: 00H R/W
Note 1