Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
I do, quite simply, by waiting a certain period of time to allow the line to settle. In my case the network consists of 32 units, all talking asyncronously.
Take a look at SNAP protocol. It's free. https://www.hth.com/snap/
I use my own protocol but SNAP looks good.
I use 75N176 as the driver (though I shojuld have used LTC1482 since it has carrier detect).
The protocol that I use is extremely simple:
<heared><length><source address><destination address><message><CRC>.
Messages require different types of replies (OK, not OK, status reply etc.) using the same packet format.
Nodes first listen to the network. When a period of inactivity is found, a node that wishes to talk to the network starts preudo-random wait cycle (related to the node address) and then if the line is still free - send the packet and waits for a reply. If no reply received, the transmit routine repeats 3 times before giving up.
SNAP has a better implementation but heavier (as far as the code is concerned).