EasyManua.ls Logo

Microchip Technology dsPIC30F - Page 640

Microchip Technology dsPIC30F
738 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
dsPIC30F Family Reference Manual
DS70070B-page 23-42 © 2004 Microchip Technology Inc.
23.6.2 Message Acceptance Filters
The message acceptance filters and masks are used to determine if a message in the message
assembly buffer should be loaded into either of the receive buffers. Once a valid message has
been received into the Message Assembly Buffer (MAB), the identifier fields of the message are
compared to the filter values. If there is a match, that message will be loaded into the appropriate
receive buffer. The filter masks are used to determine which bits in the identifiers are examined
with the filters. A truthtable is shown in Table 23-3 that indicates how each bit in the identifier is
compared to the masks and filters to determine if the message should be loaded into a receive
buffer. The mask bit essentially determines which bits to apply the filter to. If any mask bit is set
to a zero, then that bit will automatically be accepted regardless of the filter bit.
Table 23-3: Filter/Mask Truth Table
23.6.2.1 Identifier Mode Selection
The EXIDE control bits (CiRXFnSID<0>) and the MIDE control bits (CiRXMnSID<0>) enable an
acceptance filter for standard or extended identifiers. The acceptance filters look at incoming
messages for the RXIDE bit to determine how to compare the identifiers. If the RXIDE bit is clear,
the message is a standard frame. If the RXIDE bit is set, the message is an extended frame.
If the MIDE control bit for the filter is set, then the identifier type for the filter is determined by the
EXIDE control bit for the filter. If the EXIDE control bit is cleared, then the filter will accept
standard identifiers. If the EXIDE bit is set, then the filter will accept extended identifiers. Most
CAN systems will use only standard identifiers or only extended identifiers.
If the MIDE control bit for the filter is cleared, the filter will accept both standard and extended
identifiers if a match occurs with the filter bits. This mode can be used in CAN systems that
support both standard and extended identifiers on the same bus.
23.6.2.2 FILHIT Status Bits
As shown in the Receive Buffers Block Diagram, Figure 23-8, RXF0 and RXF1 filters with the
RXM0 mask are associated with RXB0. The filters RXF2, RXF3, RXF4 and RXF5 and the mask
RXM1 are associated with RXB1. When a filter matches and a message is loaded into the
receive buffer, the number of the filter that enabled the message reception is indicated in the
CiRXnCON register via the FILHIT bits. The CiRX0CON register contains one FILHIT Status bit
to indicate whether the RXF0 or the RXF1 filter enabled the message reception. The CiRX1CON
register contains the FILHIT<2:0> bits. They are coded as shown in Table 23-4.
Mask Bit n Filter Bit n Message Identifier bit Accept or Reject bit n
0x x Accept
10 0 Accept
10 1 Reject
11 0 Reject
11 1 Accept
Legend: x = don’t care

Table of Contents

Other manuals for Microchip Technology dsPIC30F