First off, let me say I have no idea the technical terms, so I do this stuff in my spare time for fun.
Ok, Im playing around with the canbus shield, and have a few issues because I just know little about it. Ive read every forum post about it, and then some.
Im wanting to set a filter mask so I only see certain traffic on it, and I can show that data on screen. I have already located the parts that I need, just no idea how to set mask for those.
Say the can data is
ID: 122, Data 80 0 FF 5C 60 C5 C A
I would like to use data "80 and 0" on one and "FF" on another
How would I set that mask?
- set mask, set both the mask to 0x3ff <----Why 0x3ff?
*/
CAN.init_Mask(0, 0, 0x3ff); // there are 2 mask in mcp2515, you need to set both of them
CAN.init_Mask(1, 0, 0x3ff);
/*
- set filter, we can receive id from 0x04 ~ 0x09
*/
CAN.init_Filt(0, 0, 0x04); // there are 6 filter in mcp2515
CAN.init_Filt(1, 0, 0x05); // there are 6 filter in mcp2515
CAN.init_Filt(2, 0, 0x06); // there are 6 filter in mcp2515
CAN.init_Filt(3, 0, 0x07); // there are 6 filter in mcp2515
CAN.init_Filt(4, 0, 0x08); // there are 6 filter in mcp2515
CAN.init_Filt(5, 0, 0x09); // there are 6 filter in mcp2515