CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Can Mask?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
DougW



Joined: 11 Jan 2008
Posts: 4

View user's profile Send private message

Can Mask?
PostPosted: Wed Jun 08, 2011 11:53 am     Reply with quote

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

View user's profile Send private message

Got it
PostPosted: Wed Jun 08, 2011 12:56 pm     Reply with quote

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);
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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