This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CANBus Network with SN65HVD23

Hello,

I am new to the CANBus and i want to develop CANbus network for multiple nodes as per below.

I have an application in which I do have one master which send data to all 4 nodes individually.

1. I have one master node which send data to the slaves nodes and received data from those nodes.
2. I have more than 4 nodes which works as slave or master nodes.

Now the question is how slave 1, slave 2 and other slaves know the data send from master nodes is for that node only. does salve has to provide some hard code arbitration ID ??

more specific to say if i send data from the master to slave 1, then how slave 1 know that the broadcast data is for slave 1 only.

Please reply on this query.

Thanks

Rakesh

  • Hi Rakesh,

    You could use different identifiers for messages that are intended for each slave, and then configure a filter on each slave so that it only accepts messages intended for it. A typical approach is to configure a "mask" that would allow for only a few bits of the identifier to be compared against a given filter. For example, if you were using a standard 11-bit identifier field and wanted the three least significant bits to denote the slave number, each slave could have a mask configured for 00000000111, slave 1's filter could be 00000000000, slave 2's could be 00000000001, slave 3's could be 00000000010, etc. This would mean that any messages that end in the 3-bit "slave ID" would be received by that particular slave node.

    Max
  • Hello Max,

     This works no after giving the different identifier IDs to all four nodes. 

    Thanks for your help.

    Rakesh