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 CCS Technical Support

OT: CAN (networks)

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







OT: CAN (networks)
PostPosted: Fri Oct 16, 2009 7:21 pm     Reply with quote

Hi,

I am starting something that will become a networked system when it is done.
Sending and receiving packets works fine.

The question I ask you all is how are you structuring the data packets, I mean, do you divide ID's by function, command... variables? CANOpen?
I'd like to hear from more experienced people some advice to go the right direction.

Thank you.
andrewg



Joined: 17 Aug 2005
Posts: 316
Location: Perth, Western Australia

View user's profile Send private message Visit poster's website

PostPosted: Sat Oct 17, 2009 12:19 am     Reply with quote

All your suggested answers to structuring are correct. Which one is right for you depends on the question you're trying to answer.

One thing to note is that most CAN devices offer hardware ID masking and filtering. That is, you can set up your CAN device to only receive packets with an ID that matches a mask and filter value. Some (including PICs) support multiple masks/filters.

You can also set up a packet that will be transmitted in response to a data request (matching ID/mask/filter), put the PIC to sleep, and have the hardware send that response without waking up the PIC.

I've just finished a project where I needed a few more data bits per packet than available in the maximum eight bytes. So I used some ID bits to carry data.
_________________
Andrew
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