I have tried this, but when the interrupt occurs, its seems as though the actual IRS (__INT(void)) is not being executed. I know this because the watchdog keeps timing out. > -----Original Message----- > From: Richard Nowak [SMTP:nowak@EARTHLINK.NET] > Sent: Tuesday, April 14, 1998 2:38 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: MPLABC and Setting up an Interrupt. > > Using MPLAB-C version 1.21 and a `74 > try this ( every possible interrupt source is not covered) > > #pragma memory ROM[MAXROM - 0x04] @ 0x004; > void __INT(void) > { > > #ifdef SaveContext > /* ----- Save Registers and Flags > ------------------------------------- */ > SaveContext > #endif > > /* For every interrupt source, > calls its service routine and resets its flag */ > if (INTCON.INTF) > if (INTCON.INTE) > { /* External interrupt */ > /* INTCON.INTF = RESET; */ > /* INTIsr(); > */ > } > > if (PIR1.TXIF) > if (PIE1.TXIE) > { /* Serial transmission */ > /* The flag PIR1.TXIF cannot be reset by software */ > /* SCITxIsr(); > */ > } > > if (PIR1.RCIF) > if (PIE1.RCIE) > { /* Serial reception */ > /* The flag PIR1.RCIF cannot be reset by software */ > INTDisable(SCIRC_INTERRUPT); /* > Disable interrupt */ > SCIRcIsr(); > } > > #ifdef RestoreContext > /* ----- Restore Registers and Flags > ---------------------------------- */ > RestoreContext > #endif > } > > this should be the first code in your program which keeps it on page > one > > Rich > > At 02:13 PM 4/14/98 -0700, you wrote: > >I am trying to setup an interrupt using MPLABC. My interrupt is > labeled > >as void __INT(void). I have setup a vector as it is stated in the > help > >as follows: > > > >#pragma vector - __INT @ 0x0004; > > > >But I keep getting these errors. > > > >ERROR C:\PROGRA~1\MPLABC\acsr203.c 89:22:EXPECTED @ > >ERROR C:\PROGRA~1\MPLABC\acsr203.c 89:32:RAM ADDRESS OUT OF RANGE > Out > >of RAM space > > > >Anyone have any suggestions? > > > > > >Thank you, > >John Bellini > >http://jbellini@statpower.com > >