Can identifier mask




















Forgot Your Password? Forgot your Username? Haven't received registration validation E-mail? User Control Panel Log out.

Forums Posts Latest Posts. View More. Recent Blog Posts. Unread PMs. Forum Themes Elegant Mobile. Essentials Only Full Version. New Member. For Master to 7 nodes i am broadcasting my message but while receiving data from 7 nodes i have confusion in setting Mask and Filter values. If you have a related question, please click the " Ask a related question " button in the top right corner.

The newly created question will be automatically linked to this question. When reading reference manual of CAN communication, I am very confused about the meaning of mask.

I think literally speaking, "mask" means something covered and cannot be seen. So if we set those corresponding mask bits to "1", "mask" should take effect and we cannot really see those bits, eg: identifier. But when looking at the register description, it seems different. So I wonder if I set the ID mask bits to "0", do those ID still be used for acceptance filtering comparing or ignored anything can pass?

And in the example code, masks are set to "0", do we want to use ID or not? If you set an ID mask bit to zero, that ID bit in the address will be ignored.

Either value of that ID bit will be accepted. In C, the filter would look like this:. The example code doesn't use the mask -- all ID bits are compared. To use the mask, you would need to change this line:. Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search.

I would like to know how can we calculate the software acceptance filter mask for some set of standard CAN id. It would be great if some one can explain this with example. First compare the 0th bits of all the IDs, if its same then the corresponding bit for mask register will be "1" else it will be "0". Then compare the 1st bits, then 2nd bits and so on In our case only the 5th and 6th bits differ in all the IDs.

This explains how we got "Mask Register" value. For Acceptance register value, take any of the allowed message IDs and that will be the value of the Acceptance register value. In our case it could be 0x81 or 0x83 or 0x85 or 0x Since this filtering is done in hardware it is fairly primitive. The reasoning behind this bit shifting is best understood by having a look at the referenced manual on p.

Whereas High and Low are the higher and lower indices of the filter registers respectively.



0コメント

  • 1000 / 1000