+ Post New Thread
Results 1 to 8 of 8
  1. #1
    Full Member level 2
    Points: 1,892, Level: 10
    Achievements:
    7 years registered
    dhakeparag81's Avatar
    Join Date
    Jun 2012
    Location
    INDIA
    Posts
    123
    Helped
    1 / 1
    Points
    1,892
    Level
    10

    How two nodes are communicating in CAN bus protocol?

    hello,

    I need some clarification or say some knowledge which i didnt able find out.
    Lets say there are two node in can bus having id 101 and 102, when node 101 communicating it sending its id 101 right? and same for the node 102. i mean unlike MODBUS, in modbus master sending the slave id for communication,there is no slave in CAN bus.
    now if node 101 having temperature data which is require by node 102, then when 101 is communicating it will send the id of its own 101 then DLC then data which contain temperature data then other stuff, in node 102 it received the data form 101 and act on it accordingly.
    Last edited by dhakeparag81; 12th October 2019 at 09:50.

    •   AltAdvertisement

        
       

  2. #2
    Advanced Member level 3
    Points: 6,174, Level: 18

    Join Date
    Feb 2014
    Posts
    888
    Helped
    292 / 292
    Points
    6,174
    Level
    18

    Re: how two nodes are communicating in CAN bus protocol?

    No I believe in this regard CAN is like I2C (also multi-master). Any node can be a master and to initiate a transaction it broadcasts the ID of the node it wants to talk too where the ID also doubles as the priority (technically the same in I2C though usually less relevant).



    •   AltAdvertisement

        
       

  3. #3
    Super Moderator
    Points: 78,516, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,932
    Helped
    3610 / 3610
    Points
    78,516
    Level
    68

    Re: How two nodes are communicating in CAN bus protocol?

    Hi,

    There are a lot of tutorials, as text and as videos.
    Many of them explain CAN bus communication very good.

    https://lmgtfy.com/?q=CAN+bus+basic+protocol

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 261,317, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,664
    Helped
    13881 / 13881
    Points
    261,317
    Level
    100

    Re: How two nodes are communicating in CAN bus protocol?

    Post #1 describes the basic CAN operation correctly.


    1 members found this post helpful.

  5. #5
    Full Member level 2
    Points: 1,892, Level: 10
    Achievements:
    7 years registered
    dhakeparag81's Avatar
    Join Date
    Jun 2012
    Location
    INDIA
    Posts
    123
    Helped
    1 / 1
    Points
    1,892
    Level
    10

    Re: How two nodes are communicating in CAN bus protocol?

    Thanks Klausst,

    yes there are so many but i didnt find the proper one i guess, where i get the detail explanation about talking/sharing info two nodes.

    - - - Updated - - -

    Thanks FvM, you mean i m explaining the situation correct?

    also if node 101 wants some information from lets say third node 103 it generate the Remote frame right?
    and can you please explain how that frame will be?

    what i understood is node 101 generate remote frame with 103 id, please correct me if im wrong.



  6. #6
    Advanced Member level 4
    Points: 7,568, Level: 20
    Achievements:
    7 years registered

    Join Date
    Jul 2010
    Location
    Sweden
    Posts
    1,013
    Helped
    387 / 387
    Points
    7,568
    Level
    20

    Re: How two nodes are communicating in CAN bus protocol?

    Quote Originally Posted by dhakeparag81 View Post
    also if node 101 wants some information from lets say third node 103 it generate the Remote frame right?
    and can you please explain how that frame will be?

    what i understood is node 101 generate remote frame with 103 id, please correct me if im wrong.
    That was the intention when the CAN bus was designed, but that functionality is normally handled by software, so you can design your system in other ways.
    There are several ways to use the CAN id bits. The only requirement is that two nodes never try to send data frames with the same id at the same time. Two nodes can send remote frames with the same id since all bits in the frames will be identical.

    For an example about how to use the CAN id bits, look at CANOpen.


    1 members found this post helpful.

  7. #7
    Full Member level 2
    Points: 1,892, Level: 10
    Achievements:
    7 years registered
    dhakeparag81's Avatar
    Join Date
    Jun 2012
    Location
    INDIA
    Posts
    123
    Helped
    1 / 1
    Points
    1,892
    Level
    10

    Re: How two nodes are communicating in CAN bus protocol?

    thanks std_match,

    im using MCP2515 module along with tja1050, i have read the datasheet of mcp2515, the configuration registers are so confusing.
    The module has 8Mhz crystal and i want to configure the CAN with 125kbps what will be the configuration and how do you calculate it.



    •   AltAdvertisement

        
       

  8. #8
    Advanced Member level 4
    Points: 7,568, Level: 20
    Achievements:
    7 years registered

    Join Date
    Jul 2010
    Location
    Sweden
    Posts
    1,013
    Helped
    387 / 387
    Points
    7,568
    Level
    20

    Re: How two nodes are communicating in CAN bus protocol?

    Quote Originally Posted by dhakeparag81 View Post
    thanks std_match,

    im using MCP2515 module along with tja1050, i have read the datasheet of mcp2515, the configuration registers are so confusing.
    The module has 8Mhz crystal and i want to configure the CAN with 125kbps what will be the configuration and how do you calculate it.
    Use a CAN bit timing calculator.
    Online: https://www.kvaser.com/support/calcu...ng-calculator/
    Windows program: https://www.intrepidcs.com/products/...me-calculator/
    More info:
    https://www.cnblogs.com/shangdawei/p/4716784.html
    http://www.bittiming.can-wiki.info/



--[[ ]]--