![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
future_ Guest
|
OT: CAN (networks) |
Posted: Fri Oct 16, 2009 7:21 pm |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
andrewg
Joined: 17 Aug 2005 Posts: 316 Location: Perth, Western Australia
|
|
Posted: Sat Oct 17, 2009 12:19 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|