#pragma code InterruptVectorHigh = 0x08 void InterruptVectorHigh(void) { _asm goto InterruptHandlerHigh //jump to interrupt routine _endasm } //---------------------------------------------------------------------- ------ // High priority interrupt routine #pragma code #pragma interrupt InterruptHandlerHigh void InterruptHandlerHigh() { if(INTCONbits.TMR0IF) { //check for TMR0 overflow INTCONbits.TMR0IF = 0; //clear interrupt flag Flags.Bit.Timeout = 1; //indicate timeout LATBbits.LATB0 = !LATBbits.LATB0; //toggle LED on RB0 } } -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of James.Hyslop@BMWMC.COM Sent: Monday, August 05, 2002 11:45 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]:How to implement interrupt in Microchip C18 C I'm in the same boat as you. I've got some ASM software that uses interrupts, that i'm working on trying to implement in C18. Will let you know on my progress. -----Original Message----- From: Hu, Luhui [mailto:Luhui_Hu@PLUGPOWER.COM] Sent: Monday, August 05, 2002 11:16 AM To: PICLIST@MITVMA.MIT.EDU Subject: [PIC]:How to implement interrupt in Microchip C18 C Hi, I have the manual about C18 compiler but it is so terse. Could you please give me some suggestion how I can implement interrupt in PIC18F using C18 C. Thanks in advance! Luke -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately. This footnote also confirms that this email message has been swept by MIMEsweeper and Symantec Norton AntiVirus for the presence of computer viruses. ********************************************************************** -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads