| ??? 06/15/03 14:59 Read: times |
#48416 - RE: What\'s SP? Responding to: ???'s previous message |
Hi,
Well, your problem seems to be this: once the light sensor interrupt (INTO) is fired, you follow some algorithm in the INT service routine. During the execution of this, you expect some other interrupts and you cannot service the other interrupts because in the ISR, no other interrupts are allowed. This solution is simple. You should use flags, and should NOT write the whole algorthm in the ISR.(agrees with micheal's idea). You can use flags that are modified in the ISR and check it in the main program. You may also specify the priority of the interrupts. you can include the sensor identification algorithm also in the main program.A small keil C program to make it clear: bit light_flag = 0; void main() { - - if(light_flag) { light_flag = 0; //here you write the routine for light sensor interrupt - //here you can interrupt again - } - - } void light_int interrupt # { light_flag = 1; // only command in the ISR } regards, kodi |
| Topic | Author | Date |
| What's SP? | 01/01/70 00:00 | |
| RE: What's SP? | 01/01/70 00:00 | |
| RE: What's SP? | 01/01/70 00:00 | |
| RE: What's SP? | 01/01/70 00:00 | |
| RE: What's SP? | 01/01/70 00:00 | |
| RE: What's SP? | 01/01/70 00:00 | |
| RE: What's SP? | 01/01/70 00:00 | |
| RE: What\'s SP? | 01/01/70 00:00 | |
| RE: What\'s SP? | 01/01/70 00:00 | |
| RE: What's SP? | 01/01/70 00:00 | |
| RE: What's SP? | 01/01/70 00:00 | |
| RE: What's SP? | 01/01/70 00:00 | |
RE: What's SP? | 01/01/70 00:00 |



