CHAPTER 5 INTERRUPT/EXCEPTION PROCESSING FUNCTION
User’s Manual U13850EJ4V0UM
156
5.9 Key Interrupt Function
Key interrupt can be generated by inputting a falling edge to key input pins (KR0 to KR7) by means of setting the
key return mode register (KRM). The key return mode register (KRM) includes 5 bits. The KRM0 bit controls the KR0
to KR3 signals in 4-bit units and the KRM4 to KRM7 bits control corresponding signals from KR4 to KR7 (arbitrary
setting from 4 to 8 bits is possible).
This register can be read/written in 8- or 1-bit units.
Figure 5-23. Key Return Mode Register (KRM)
After reset:
00H
R/W
Address: FFFFF3D0H
<7>
<6>
<5>
<4>
3
2
1
<0>
KRM
KRM7
KRM6
KRM5
KRM4
0
0
0
KRM0
KRMn
Key return mode control
0
Does not detect key return signal
1
Detects key return signal
Caution
If the key return mode register (KRM) is changed, an interrupt request flag may be set. To avoid
this flag to be set, change the KRM register after disabling interrupts, and then, permit
interrupts after clearing the interrupt request flag.
Table 5-4. Description of Key Return Detection Pin
Flag
Pin Description
KRM0
Controls KR0 to KR3 signals in 4-bit units
KRM4
Controls KR4 signal in 1-bit units
KRM5
Controls KR5 signal in 1-bit units
KRM6
Controls KR6 signal in 1-bit units
KRM7
Controls KR7 signal in 1-bit units