Mike - K8LH Well-Known Member Jul 27, 2006 #1 Hi guys, Anyone familiar with Microchip C18 who can tell me why I'm getting a syntax error on the line below; TIA, Mike Code: #include <p18f2320.h> #pragma config OSC = INTIO1 #pragma config BOR = ON, BORV = 45 #pragma config WDT = OFF #pragma config MCLRE = OFF #pragma config CCP2MX = C1 #pragma config LVP = OFF #pragma code rx_interrupt = 0x08 void rx_int (void) { _asm GOTO rx_handler _endasm { #pragma code #pragma interrupt rx_handler void rx_handler (void) /* <--- compiler syntax error { PIR1bits.CCP1IF=0 } <added> looks like the paren' is pointing the wrong way. Doh! Last edited: Jul 27, 2006
Hi guys, Anyone familiar with Microchip C18 who can tell me why I'm getting a syntax error on the line below; TIA, Mike Code: #include <p18f2320.h> #pragma config OSC = INTIO1 #pragma config BOR = ON, BORV = 45 #pragma config WDT = OFF #pragma config MCLRE = OFF #pragma config CCP2MX = C1 #pragma config LVP = OFF #pragma code rx_interrupt = 0x08 void rx_int (void) { _asm GOTO rx_handler _endasm { #pragma code #pragma interrupt rx_handler void rx_handler (void) /* <--- compiler syntax error { PIR1bits.CCP1IF=0 } <added> looks like the paren' is pointing the wrong way. Doh!
Mike - K8LH Well-Known Member Jul 27, 2006 #2 Hey guys, I figured it out. Seems MCC18 is very picky about having function prototypes defined somewhere and then there's those missing semi-colons to contend with (grin). This is going to be quite an adventure (grin). Regards, Mike
Hey guys, I figured it out. Seems MCC18 is very picky about having function prototypes defined somewhere and then there's those missing semi-colons to contend with (grin). This is going to be quite an adventure (grin). Regards, Mike