Hello to all, I'm using some PICs (18f4680) with 2551 transceivers on a CAN network. I'm using the Microchip ECAN 'C' library (with some bug corrections) compiling with MPLAB C18. I'm having some problems filtering some messages on my CAN network. To make a long story short: I have a pack of messages with IDs 0x40 to 0x43 that should be accepted by RXB0 and another pack with ID = 0x206 that should be accepted by RXB1. The main problem is that the messages with ID = 0x206 are never accepted. I'm sure that is not a hardware issue, since I re-checked everything and the hole system (except the filtering) is working smooth. Below it's a simplified code of my RunTimeInitialization function (I put the register equivalency on the comments for those who doesn't use ECAN 'C' library). void RunTimeInitialization(void) { // Enter Config mode to be able to change settings. ECANSetOperationMode(ECAN_OP_MODE_CONFIG); // Select Functional Mode 1 ECANSetFunctionalMode(ECAN_MODE_1); // Besides selecting mode, enable the filters: RXFCON0 = 0x03; // Link RXF0 to RXB0 and RXF1 to RXB1 ECANLinkRXF0F1ToBuffer(RXB0, RXB1); //RXFBCON0 = 0x10; ECANLinkRXF0Thru3ToMask(ECAN_RXM0, ECAN_RXM1, ECAN_RXM0, ECAN_RXM0); // MSEL0 = 0x04 // **** Set filters and masks **** // RXB0 should accept IDs from 0x040 to 0x043 ECANSetRXF0Value(0x040, ECAN_MSG_STD); // RXF0SIDH = 0x08; RXF0SIDL =0x00; ECANSetRXM0Value(0x7FC, ECAN_MSG_STD); // RXM0SIDH = 0xFF; RXF0SIDL =0x80; // RXB1 should accept ONLY ID 0x204 ECANSetRXF1Value(0x204, ECAN_MSG_STD); // RXF1SIDH = 0x40; RXF1SIDL =0x80; ECANSetRXM1Value(0x3FF, ECAN_MSG_STD); // RXM1SIDH = 0x7F; RXF1SIDL =0xE0; // ******************************** // Set 125kbps @ 18MHz ECANSetBaudRate(2, 4, 7, 7, 2); // Return to Normal mode to communicate. ECANSetOperationMode(ECAN_OP_MODE_NORMAL); } I'm sure there's a lot of people here that already worked with CAN. Any ideas? Regards, *PTav* *Computer Engineer* -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist