BAT32G1x9User Manual | Chapter 27 Key interrupt function
1067 / 1149
Rev.1.02
27.3 Control Registers of key interrupts
Interrupt function via the following registers control keys.
•
Key Return Mode Register (KRM).
•
Port Mode Register (PMx).
27.3.1
Key return mode register (KRM).
KRM0~KRM7 bit controls KR0~KR7 signal.
The KRM register is set by the 8-bit memory operation instruction.
After generating a reset signal, the value of this register changes to "00H".
Figure 27-2
format of the key return mode register (KRM).
Address: 40044B37H
after reset: 00H R/W
symbol
7
6
5
4
3
2
1
0
KRM
KRM7
KRM6
KRM5
KRM4
KRM3
KRM2
K RM1
KRM0
KRMn
Key interrupt mode control
0
Key interrupt signal is not detected.
1
Detects a key interrupt signal.
Note:
1. An internal pull-up resistor can be used by using the object position "1" of the pull-up resistor register
(PUx) of the input pin by interrupting the key.
2. If the object position bit of the KRM register is entered low on the input pin of the key interrupt, an interrupt
is generated. To ignore this interrupt, the KRM register must be set after interrupt processing is disabled
by the interrupt mask flag. The interrupt request flag must then be cleared after waiting for the key
interrupt input's low level width (t
KR
) (see data sheet) to allow interrupt processing.
3. Unused pins in key interrupt mode can be used as the usual port.
Note 1.n= 0~7