dsPIC33/PIC24 Family Reference Manual
DS70005340A-page 84 2018 Microchip Technology Inc.
8.2.3 FILTERING ON DATA BYTES
When the filter is configured to receive standard frames, the EID part of the filter and mask
object can be selected to filter the data bytes. The DNCNT<4:0> bits in the C1CONL register
are used to select how many bits in the data bytes are compared. Table 8-1 explains how many
data bits are compared, and which filter bits and data bits are compared.
If DNCNTx is:
•‘0’, then data byte filtering is disabled.
• Non-zero, the filtering will commence on as many data bits as specified in DNCNT.x A filter
hit will require matching of the SID bits and a match of n data bits with the filter’s EID<0:17>
bits. Data Byte 0<7> is always compared to EID<0>, Data Byte 0<6> to EID<1>,
Data Byte 2<6> to EID<17>.
• Greater than 18, indicating that the user-selected number of bits is greater than the total
number of EID bits. The filter comparison will terminate with the 18th bit of the data.
• Greater than 16, and the received message has DLC = 2, indicating a payload of two data
bytes. The filter comparison will terminate with the 16th bit of the data.
• Greater than 8, and the received message has DLC = 1, indicating a payload of one data
byte. The filter comparison will terminate with the 8th bit of the data.
• Greater than 0, and the received message has DLC = 0, indicating no data payload. The
filter comparison will terminate with the identifier.
8.2.4 12-BIT STANDARD ID
Setting SID11EN (C1TDCH<8>) allows the use of RRS as bit 12 of the SID (LSB). 12-Bit SID
mode is only available for CAN FD base frames. The filter is extended by SID11 and MSID11.
Data bytes can also be filtered in this mode.
Table 8-1: Data Byte Filter Configuration
DNCNT<4:0>
Received Message Data Bits to be
Compared Byte <bits>
EID Bits Used for
Acceptance Filter
00000 No Comparison No Comparison
00001 Data Byte 0<7> EID<0>
00010 Data Byte 0<7:6> EID<0:1>
00011 Data Byte 0<7:5> EID<0:2>
00100 Data Byte 0<7:4> EID<0:3>
00101 Data Byte 0<7:3> EID<0:4>
00110 Data Byte 0<7:2> EID<0:5>
00111 Data Byte 0<7:1> EID<0:6>
01000 Data Byte 0<7:0> EID<0:7>
01001 Data Byte 0<7:0> and Data Byte 1<7> EID<0:8>
01010 Data Byte 0<7:0> and Data Byte 1<7:6> EID<0:9>
01011 Data Byte 0<7:0> and Data Byte 1<7:5> EID<0:10>
01100 Data Byte 0<7:0> and Data Byte 1<7:4> EID<0:11>
01101 Data Byte 0<7:0> and Data Byte 1<7:3> EID<0:12>
01110 Data Byte 0<7:0> and Data Byte 1<7:2> EID<0:13>
01111 Data Byte 0<7:0> and Data Byte 1<7:1> EID<0:14>
10000 Data Byte 0<7:0> and Data Byte 1<7:0> EID<0:15>
10001 Byte 0<7:0> and Byte 1<7:0> and Byte 2<7> EID<0:16>
10010 to 11111 Byte 0<7:0> and Byte 1<7:0> and Byte 2<7:6> EID<0:17>