Problem with 1st MCC18 program?

Status
Not open for further replies.

Mike - K8LH

Well-Known Member
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:
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
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…