??? 04/21/07 06:37 Read: times |
#137687 - Level driven? Responding to: ???'s previous message |
Yusuke Oshiro said:
When an interrupt signal (ex1) is received, I want to disable further events from ex1 completely until the ISR is finished. In other words, if another event was received on that port during its ISR, I want to ignore it.
I tried to do this by disabling it by simple: CLR EX1 But this doesnt really do. It runs the ISR again as soon as the first ISR is finished. I tried clearing the flag, IE1, on the exit of the ISR to see if this would work, but this again did not work. If you're running external interrupt 1, it won't trigger the ISR again until you exit the interrupt. That is, you're not going to start executing the ISR for external interrupt 1 and then have the ISR get interrupted by another external interrupt 1. If the external interrupt is edge-driven (high to low transition), the EX1 bit will automatically be cleared when you exit the interrupt. If the external interrupt is level driven (triggered whenever the external pin is low) then the interrupt will continually be triggered until the level goes high. Thus if it's low-level driven, if the line is still low when your interrupt is finished, it will execute again. But it won't execute again until the previous call to the ISR is done. Regards, Craig Steiner |
Topic | Author | Date |
Quick question on interrupts | 01/01/70 00:00 | |
What simulator? | 01/01/70 00:00 | |
Level driven? | 01/01/70 00:00 | |
level/edge is irrelevant in this case | 01/01/70 00:00 | |
It's possible![]() | 01/01/70 00:00 | |
ISR | 01/01/70 00:00 | |
Not quite | 01/01/70 00:00 |