
The CAN module uses message acceptance filters and masks to determine if a
message in the MAB should be loaded into a receive buffer. Once a valid message is
received by the MAB, the identifier field of the message is compared to the filter
values. If there is a match, that message is loaded into the appropriate receive buffer.
The filter masks determine which bits in the identifier are examined with the filters.
The truth table in Table 9.3 shows how each bit in the identifier is compared against
Message Assembly Buffer
Identifier
Data and
Identifier
Data and
Identifier
Identifier
RXB0 RXB1
Acceptance Filter
RXF1
Acceptance Filter
RXF4
Acceptance Filter
RXF5
Acceptance Filter
RXF0
Acceptance Filter
RXF3
Acceptance Filter
RXM2
Acceptance Mask
RXM0
Acceptance Mask
RXM1
Accept
Accept
Figure 9.13: Receive buffer block diagram
Table 9.3: Filter/mask truth table
Mask bit n Filter bit n Message identifier bit n001 Accept or reject bit n
0 Accept
1 0 0 Accept
1 0 1 Reject
1 1 0 Reject
1 1 1 Accept
www.newnespress.com
495Advanced PIC18 Projects—CAN Bus Projects
Commentaires sur ces manuels