|
|
View previous topic :: View next topic |
Author |
Message |
DougW
Joined: 11 Jan 2008 Posts: 4
|
Can Mask? |
Posted: Wed Jun 08, 2011 11:53 am |
|
|
Can someone show me the correct format to create a Mask and filter mask for an ID 1819 ? I have read the forum, datasheet, example file and driver but just need to see what it should be then I can go from there.
I have tried many combinations from 0x0000 to FFFF but 2 different messages get through with an ID of 1090 & 1819 just want to see 1819.
Code: |
can_set_id(&C1RXM0,1819,false);
can_set_id(&C1RXF0,1819,false);
can_set_id(&C1RXF1,1819,false);
|
Thanks Doug W |
|
|
DougW
Joined: 11 Jan 2008 Posts: 4
|
Got it |
Posted: Wed Jun 08, 2011 12:56 pm |
|
|
FYI need to add the can set mode and can set mode normal line.
This is for a DSPic30F6012A.
Code: |
int32 Can_ID=1819;
can_set_mode(CAN_OP_CONFIG);
can_set_id(&C1RXM0,Can_ID,0);//1819
can_set_id(&C1RXM1,Can_ID,0);
can_set_id(&C1RXF0,Can_ID,0);
can_set_id(&C1RXF1,Can_ID,0);
can_set_id(&C1RXF2,Can_ID,0);
can_set_id(&C1RXF3,Can_ID,0);
can_set_id(&C1RXF4,Can_ID,0);
can_set_id(&C1RXF5,Can_ID,0);
can_set_mode(CAN_OP_NORMAL); |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|