Key-Input Interrupt
M30240 Group
Rev.1.00 Sep 24, 2003 Page 274 of 360
Figure 2.123: Set-up procedure of key-input interrupt
Setting interrupt control register
Key input interrupt control register [Address 004D 16]
KUPIC
b7 b0
Interrupt priority level select bit
0 0 0 : Level 0 (interrupt disabled)
0 0 1 : Level 1
0 1 0 : Level 2
0 1 1 : Level 3
1 0 0 : Level 4
1 0 1 : Level 5
1 1 0 : Level 6
1 1 1 : Level 7
b2 b1 b0
Interrupt request bit
0 : Interrupt not requested
Setting port Pi
direction register
Port Pi direction register
[Address 03E216, 03E316]
PDi (i = 0,1)
0 : Input mode (Functions as an input port)
1 : Output mode (Functions as an output port)
b7 b0
Setting pull-up control register 0
Pull-up control register 0 [Address 03FC 16]
PUR0
b7 b0
0
P0
0
to P0
3
0 : Not pulled high
1 : Pulled high
P0
4
to P0
7
0 : Not pulled high
1 : Pulled high
P1
0
to P1
3
0 : Not pulled high
1 : Pulled high
P1
4
to P1
7
0 : Not pulled high
1 : Pulled high