| ??? 01/21/00 14:10 Read: times |
#1270 - RE: using the external interrupt |
I had a very similar problem with a laser gun project I developed about eight years ago. The action of being shot by the laser triggered a time out (you were "dead" for 30 seconds), but if you were shot again, you were dead for another 30 seconds, immediately after you came back to life from the first shot !
The condition you describe would be A Very Bad Thing. Very soon you would run out of stack space and the whole program would fall over. During an ISR, the CPU applies certain, fairly simple rules to its behaviour. If the next interrupt is the same interrupt or a lower priority interrupt, it will NOT interrupt mid-service. If it is a higher priority interrupt it will. The interrupt request flags for other pending interrupts will STAY set, even if the interrupt is masked off by a current ISR. On INT0 and INT1 the action of the interrupt DOES reset the interrupt flag, so you don't need to worry about clearing them yourself. BE CAREFUL, because SOME int flags do need your personal intervention to clear them, particularly the ET2 and ES flags. In my project I used an 80C535 and an extra external interrupt which again did not reset its own flag. Watch out if you use level triggered INT0 and INT1. If you mask off the int just before and during its low level excursion, the interrupt WILL NOT trigger when you unmask the interrupt. Normally the masked off interrupts will trigger off in order of priority until they are all serviced. Hope this is clearer !!! Steve |
| Topic | Author | Date |
| using the external interrupt | 01/01/70 00:00 | |
| RE: using the external interrupt | 01/01/70 00:00 | |
| RE: using the external interrupt | 01/01/70 00:00 | |
| RE: using the external interrupt | 01/01/70 00:00 | |
| RE: using the external interrupt | 01/01/70 00:00 | |
| RE: using the external interrupt | 01/01/70 00:00 | |
| RE: using the external interrupt | 01/01/70 00:00 | |
RE: using the external interrupt | 01/01/70 00:00 |



