Connect with us

Lin communication

Discussion in 'Microcontrollers, Programming and IoT' started by electronicsLearner77, Feb 13, 2017.

Scroll to continue with content
  1. electronicsLearner77

    electronicsLearner77

    73
    1
    Jul 2, 2015
    I read a statement in LIN communication saying by the nature of lin bus whatever the node is transmitting it also receives it. I am bit confused about this. What does it mean? Will i get both tx and rx interrupts at the same time?
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    9,908
    2,100
    Nov 17, 2011
    LIN is a single wire bus. Data is transmitted and received over the same wire. Therefore any transmitting partner on the bus will aso receive the same signal it is transmitting on its receiver input.
    It seems that the receiver will generate an interrupt upon reception of the transmitted byte.
     
  3. electronicsLearner77

    electronicsLearner77

    73
    1
    Jul 2, 2015
    So if a node wants to transmit it will enable tx interrupt and write the data in buffer. If the data is transmitted it will jump to isr clear the flag and come back to main and again will be interrupted with rx isr for the same data. Am i correct?
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    9,908
    2,100
    Nov 17, 2011
    It depends on your system setup and programming. The rx interrupt may also interrupt the isr of the tx interrupt without waiting for a return to main from the tx isr.
    Or you may disable the rx interrupt while transmitting because you know that the received data will be the same as the sent data. In that case, the tx isr would enable the rx isr to re-establish reception of data form another party on the bus.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-