Comms auto init

Thread Starter

Torbek

Joined Apr 19, 2019
83
So, imagine for a minute, we have a base station, and we want to communicate with numerous periferals, each has a code that is yet to be defined by the base station...

So, we hook everything up via half-duplex 485...

The base station says "hello, anybody out there?"

And each peripheral says, hi, yes me. Can I be added to your group?

Now, if the periferals have no way of being identified initially, how does the system cope with multiple responses once the base station says hi?

Two things I was thinking...

If each periferal has a basic ID based on the job it does, then the base station can say anyone out there starting with address A1, wait predetermine time...

So this might reduce the number of stations to deal with, but we still have the same problem if each address has more than a single item.

SO could it be enough to monitor, in software data coming into the serial port a wait a pre-determine time for quiet time? Idea being that each oscillator is going to run slightly differently, so that the faster device will respond first, other devices would see this and not wait for quiet period... And maybe this time could be a random delay so that the next item to respond will most likely be quicker/slower than any others that have not been allocated an address...

I hope folks understand the concept I am trying to work out here!

I am not talking large numbers of items, but I would like to put a master unit into "Search mode" and have it find slave units without having to put slave units into some sort of Find mode or similar... They will know when they have no address of their own.

I suppose one simple way could be to have a manually switched address, but I want to limit controller pins, and would rather not have an MUX or similar to take up board space!

Thanks
 

atferrari

Joined Jan 6, 2004
5,011
A LAN network is simple to start because all components (Dallas temp sensors) have their unique own number asigned beforehand.

/Edit
I know I did not answered your request. Sorry.
/Edit
 
Last edited:

John P

Joined Oct 14, 2008
2,060
The easy way to do this is to ensure that each peripheral has a unique address. Then when the system starts up, the master polls each possible address in turn, and sees which ones respond. That assumes that the number of addresses isn't very large (limited to the possibilities in one byte, i.e. 256, for instance). And the peripherals have to be fast enough to respond before the master moves on to the next address.
 
Top