I have Appnote AN738 and the CANbus lib that goes with it. As a first step to see if I can get the CANbus going, I am trying example18 in the pdf. It won't compile w/o errors in the initiation and since this is my first attempt at both C (MCC18) and CANbus I need some help to locate whats wrong. The compiler error msg is pasted below (line #24) in the source. TIA // EXAMPLE 18: SAMPLE APPLICATION PROGRAM 1 // From: AN00738b (PIC18C CAN Routines in C).pdf // The following is a portion of a sample application program // that requires all CAN Standard Identifier messages to be // accepted. // #include searches for file in std.libs first // #incluse "file" searches for file in project dir first //#include // p18cxxx.h must have current processor defined #include "p18F458.h" // for TRISB and PORTB etc -declarations //#include "can18xx8.c" // has the def. of BYTE etc #include "can18xx8.h" // include in each sourcefile that calls the CAN routines // Application specific variable declarations // CAN module related variables unsigned long NewMessage; BYTE NewMessageData[8]; BYTE MessageData[8]; BYTE NewMessageLen; CAN_RX_MSG_FLAGS NewMessageFlags; <<== AN738-EX18.c:24:Error: syntax error BYTE RxFilterMatch; // Application specific initialization code follows // Application specific initialization code follows // Application specific initialization code follows // Initialize CAN module with no message filtering CANInitialize(SJW, BRP, PHSEG1, PHSEG2, PROPSEG, config); // Main application loop while(1) { // Application specific logic here // Check for CAN message if ( CANIsRxReady() ) { CANReceiveMessage(&NewMessage, NewMessageData, &NewMessageLen, &NewMessageFlags); if ( NewMessageFlags & CAN_RX_OVERFLOW ) { // Rx overflow occurred; handle it } if ( NewMessageFlags & CAN_RX_INVALID_MSG ) { // Invalid message received; handle it } if ( NewMessageFlags & CAN_RX_XTD_FRAME ) { // Extended Identifier received; handle it } else { // Standard Identifier received. } if ( NewMessageFlags & CAN_RX_RTR_FRAME ) { // RTR frame received } else { // Regular frame received. } // Extract receiver filter match, if it is to be used RxFilterMatch = NewMessageFlags & CAN_RX_FILTER_BITS; } // Process received message // Process received message // Process received message // Transmit a message due to previously received message or // due to application logic itself. if ( CANIsTxReady() ) { MessageData[0] = 0x01; CANSendMessage( 0x02, MessageData, 1, CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME); } // Other application specific logic // Other application specific logic // Other application specific logic } // Do this forever -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.