I2C on Arduino ... Adding a brordcast packet / protacol

Thread Starter

Dyslexicbloke

Joined Sep 4, 2010
566
I have decided to use I2C for a project. I am going to use buffers to extend the range to some 10's of meters.
I will be using its multi-master implemtation so that nodes can transmit status updates when they need to, in response to changes in the world.

Now I could have every node keep track of everything that is on the bus and transmit a copy of its data everything that is present but doing that is only slightly better than having a single master poll everything and then update everything else.

What I would like to do is have anything that is talking transmit blind, unacknolligaed, and everything else listen.
Obviously I appriciate that this will probably involve some high level code to craft a responce, in some circumstances when confirming an instruction has been acted on but that is not so hard.

MY understanding, limmited as it is so far, is that I2C has many possible modes, most of which I do not understand yet.
Only a couple of those modes are implemented by the wire library.
In slave mode the hardware is asssigned an address causing it to ignore anything not directly sent to it.
Slaves only get one address.

Is there a way to get everything, but the current master, to listen, IE fill its RX buffer with the bus traffic.

I would be happy to use simple TX messages at all times and never to require a restart which avoids all the multi master issues as far as I am aware.
I am also keen to research this stuff myself but so far I do not know enough to even start looking properly...
If someone could give me a leg up RE I2C in general, its implimentation on ATmega32u4 hardware and the capabilities, or lack therof, of the Wire library I would be very greatful.

Thanks,
Al
 

Thread Starter

Dyslexicbloke

Joined Sep 4, 2010
566
Found the second whilst you were replying, not sure how I missed that, add 0 I mean as its is somwhat fundamental
Looking at the second link now.

Thanks for the quick responce.

I think it is easy to get blinkered by asumptions sometimes... Just go's to show how little I actually know.
That said if I had set out to read every serial comunication stamndard I could find, just to see what might work, then I would still be doing it several years later.

None the less I am feeling a little silly as it appears I2C actually supports everything I need, or at least it should.

Al
 

Thread Starter

Dyslexicbloke

Joined Sep 4, 2010
566
First link...
that all looks very interesting... if a little bewildering right now, but I get the gist.
The question is though is 'Wire' managing the onboard I2C device going to do all that or only the basic bits...
Off to look some documentation on Wire

Anyone tried multiple masters that always transmit to address 0 so that everything hears everything?

Dont get me wrong I am not asking about how to format the packets, I realise I have to define an instruction set and data transfer protacol to actually build read and decode all these massages, to make the system do anything.
I have a good idea how I will go about that but getting some basic traffic up first seems a better plan than mucking about with high level operations.

Great help thanks... Feeling a little silly right now, lack of prep before asking!
 
Top