INTERRUPTS
KS57C2308/P2308/C2316/P2316
7-8
+
+
PROGRAMMING TIP — Setting the INT Interrupt Priority
The following instruction sequence sets the INT1 interrupt to high priority:
BITS
EMB
SMB
15
DI
; IPR.3 (IME)
←
0
LD
A,#3H
LD
IPR,A
EI
; IPR.3 (IME)
←
1
EXTERNAL INTERRUPT 0 AND 1 MODE REGISTERS (IMOD0 and IMOD1)
The following components are used to process external interrupts at the INT0 and INT1 pins:
— Noise filtering circuit for INT0
— Edge detection circuit
— Two mode registers, IMOD0 and IMOD1
The mode registers are used to control the triggering edge of the input signal. IMOD0 and IMOD1 settings let you
choose either the rising or falling edge of the incoming signal as the interrupt request trigger. The INT4 interrupt
is an exception since its input signal generates an interrupt request on both rising and falling edges. Since INT2 is
a qusi-interrupt, the interrupt request flag (IRQ2) must be cleared by software.
FB4H
IMOD0.3
"0"
IMOD0.1
IMOD0.0
FB5H
"0"
"0"
"0"
IMOD1.0
FB6H
"0"
IMOD2.2
IMOD2.1
IMOD2.0
IMOD0, IMOD1 and IMOD2 are addressable by 4-bit write instructions.
RESET
clears all IMOD values to logic
zero, selecting rising edges as the trigger for incoming interrupt requests.
Table 7-5. IMOD0 and IMOD1 Register Organization
IMOD0
IMOD0.3
0
IMOD0.1
IMOD0.0
Effect of IMOD0 Settings
0
Select CPU clock for sampling
1
Select fxx/64 sampling clock
0
0
Rising edge detection
0
1
Falling edge detection
1
0
Both rising and falling edge detection
1
1
IRQ0 flag cannot be set to "1"
IMOD1
0
0
0
IMOD1.0
Effect of IMOD1 and IMOD2 Settings
0
Rising edge detection
1
Falling edge detection
Summary of Contents for KS57C2308
Page 30: ...ADDRESS SPACES KS57C2308 P2308 C2316 P2316 2 22 NOTES ...
Page 168: ...SAM47 INSTRUCTION SET KS57C2308 P2308 C2316 P2316 5 94 NOTES ...
Page 170: ......
Page 206: ...POWER DOWN KS57C2308 P2308 C2316 P2316 8 8 NOTES ...
Page 210: ...RESET KS57C2308 P2308 C2316 P2316 9 4 NOTES ...
Page 222: ...I O PORTS KS57C2308 P2308 C2316 P2316 10 12 NOTES ...
Page 272: ...LCD CONTROLLER DRIVER KS57C2308 P2308 C2316 P2316 12 24 NOTES ...
Page 280: ...SERIAL I O INTERFACE KS57C2308 P2308 C2316 P2316 13 8 NOTES ...
Page 294: ...MECHANICAL DATA KS57C2308 P2308 C2316 P2316 15 2 NOTES ...
Page 310: ...KS57P2308 P2316 OTP KS57C2308 P2308 C2316 P2316 16 16 NOTES ...
Page 318: ......
Page 320: ......
Page 322: ......
Page 325: ......
Page 327: ......