Thank you bzznxlad.
I've written some time ago a code using the Microchip USB stack, this is a very simple task, just fill the processio function and the work is done, I've used the PICDEM FS USB demo board and to do it I've simply changed few line of code to adapt the code to my application (was a USB voltmeter), but as I've written, this will be a further step on the design, now the main goal is get a properly working CAN network and before to do this there are some aspects to define.
As you probably know CAN network is based upon messages is not a addressable protocol then we have to found a suitable way to address some command to the specific node.
As you probably know the CAN network is based upon messages, then is not a protocol based on the addresses philosophy. All the nodes inside the network, potentially, can read the messages travelling over the network. For this reason I have to found a suitable way to address some command to the specific node (e.g. when I will need to update the firmware on a determined node or when I've to read some data from a specific node).
For example, suppose to have two or more nodes able to read the temperature, I've to found a way to address messages to some node instead to another one. A first way may be to use the messages filtering feature that is available on the controller chip, hence only the messages related to the temperature aspect will be taken in consideration. But the problem is not solved completely because into the set of these messages we have to choose only the one that is related to a specified node.
Like into the DeviceNET approach we can use a dip-switch and then set with this one the node address, then into the message that will be send from the master over the bus, we will have to define a sort of "address strategy" or "address logic" to use.
I think that operating in this way only the message that is able to match the node function (achieved by the hardware filtering of the CAN engine) and the subsequent software filtering (based on the hardware address set by the dip-switch), will be accepted and all the others rejected: I'm thinking about a sort of post-filtering added to the one provided by the CAN engine implemented on the PIC microcontroller hardware.
Hope to have explained in a clear way my approach, but if you or anyone like to discuss about it I'm here, I think this is the main issue that has to to be defined before go into the next step.
Bye
Pow