I'm getting tired handle_chars_gps(); //go handle port 1 chars should read handle_chars_gps(); //go handle port 2 chars Phillip Things should be as simple as possible but no simpler Phillip Coiner CTO, GPS Source, Inc. Your source for quality GNSS Networking Solutions and Design Services, Now! -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Phillip Sent: Monday, September 18, 2006 8:21 PM To: 'Microcontroller discussion list - Public.' Subject: RE: FW: [PIC] Trouble getting my ISR high Hi John I would do it like this. // High priority interrupt routine #pragma code InterruptVectorHigh = 0x08 void InterruptVectorHigh (void) { // Inline assembly that will jump to the ISR. _asm GOTO InterruptHandlerHigh _endasm } #pragma code #pragma interrupt InterruptHandlerHigh void InterruptHandlerHigh () { if (PIR1bits.RC1IF) { handle_chars_cntrl(); //go handle port 1 chars } //I plan on putting the second serial port's ISR here if (PIR3bits.RC2IF) { handle_chars_gps(); //go handle port 1 chars } return; } Of course I'd have to set the IPR bit for the device to high priority. So what you are saying is that if I'm in a high priority interrupt and another one happens I'm toast???? Seems I'd be okay if things were pushed on the stack and I could get back later it later as long as I didn't fool around too long. Phillip Things should be as simple as possible but no simpler Phillip Coiner CTO, GPS Source, Inc. Your source for quality GNSS Networking Solutions and Design Services, Now! -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Phillip Sent: Monday, September 18, 2006 8:08 PM To: 'Microcontroller discussion list - Public.' Subject: RE: FW: [PIC] Trouble getting my ISR high Hi John My plan was to put one function there. It would check to see who the interruptee was (by looking at the PIRx flag bits) and then I would make yet another call the appropriate handler. This is the way I do my low level interrupts. When I'm in a level interrupt it can be interrupted by another low or a high .....me thinks. Are high interrupt ISRs not reentrant? Phillip Things should be as simple as possible but no simpler Phillip Coiner CTO, GPS Source, Inc. Your source for quality GNSS Networking Solutions and Design Services, Now! -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of John Temples Sent: Monday, September 18, 2006 7:53 PM To: Microcontroller discussion list - Public. Subject: Re: FW: [PIC] Trouble getting my ISR high On Mon, 18 Sep 2006, Phillip wrote: > The data sheet does not say you can't have more than one high priority ISR. It does say that there is one high priority interrupt vector. How are you going to place two ISRs in the same place? -- John W. Temples, III -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist