Key Interrupt Function - NEC V850/SB1 User Manual

32-bit single-chip microcontroller
Table of Contents

Advertisement

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)
00H
After reset:
<7>
KRM
KRM7
KRMn
0
1
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.
180
CHAPTER 5
INTERRUPT/EXCEPTION PROCESSING FUNCTION
R/W
Address: FFFFF3D0H
<6>
<5>
KRM6
KRM5
Do not detect key return signal
Detect key return signal
Table 5-4. Description of Key Return Detection Pin
Flag
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
User's Manual U13850EJ6V0UD
<4>
3
KRM4
0
Key return mode control
Pin Description
2
1
<0>
0
0
KRM0

Advertisement

Table of Contents
loading

This manual is also suitable for:

V850/sb2

Table of Contents