CHAPTER 5 INTERRUPT/EXCEPTION PROCESSING FUNCTION
User’s Manual U13850EJ6V0UD
180
5.10 Key Interrupt Function
Key interrupts can be generated by inputting a falling edge to the key input pins (KR0 to KR7) by 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-bit or 1-bit units.
(1) 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
Do not detect key return signal
1
Detect key return signal
Caution
If the key return mode register (KRM) is changed, an interrupt request flag may be set. To avoid
setting this flag, change the KRM register after disabling interrupts, and then enable 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
Содержание V850/SB1
Страница 2: ...User s Manual U13850EJ6V0UD 2 MEMO ...