Maker Pro
Maker Pro

Lin communication

electronicsLearner77

Jul 2, 2015
306
Joined
Jul 2, 2015
Messages
306
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?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,725
Joined
Nov 17, 2011
Messages
13,725
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.
 

electronicsLearner77

Jul 2, 2015
306
Joined
Jul 2, 2015
Messages
306
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?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,725
Joined
Nov 17, 2011
Messages
13,725
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.
 
Top