| ??? 07/18/01 20:19 Read: times |
#13313 - Handling multiple interrupts with Keil C |
I am working on a project that uses 3 interrupts on an Atmel 89LV51:
Serial INT0 Timer0 The Serial interrupt occurs when data is comming in from the serial port, and I use the interrupt to store the incomming data into a small FIFO buffer. INT0 occurrs independant of the Serial Port and during INT0, I setup Timer0 to interrupt the INT0 interrupt. This code also works as long as I do not enable the Serial Interrupt. I can get INT0 and Timer0 to work just fine together, but if I enable the SErial interrupt, somewhere it crashes. I've tried disabling outside interrupts from inside the interupt service routines, and I've also tried playing with the priority of the interrupts without luck. The only option I have gotten to work is if (some condition is true) { IE = 0x90; // turn on serial interrupts while(1); // do nothing else } if (some other condition is true) { IE = 0x83; // enable INT0 and timer0 while(1); // do nothing else } I've tried to use IE = 0x93; // enable all the interrupts I want while (1); // let the interrupts work but this does not work. Any ideas? adam |
| Topic | Author | Date |
| Handling multiple interrupts with Keil C | 01/01/70 00:00 | |
| RE: Handling multiple interrupts with Keil C | 01/01/70 00:00 | |
| RE: Handling multiple interrupts with Keil C | 01/01/70 00:00 | |
| RE: Handling multiple interrupts with Keil C | 01/01/70 00:00 | |
| RE: Handling multiple interrupts with Keil C | 01/01/70 00:00 | |
RE: Handling multiple interrupts with Keil C | 01/01/70 00:00 |



