Is it possible to do I2C multi-master with propeller?
jazzed
Posts: 11,803
I say it is impossible to do with another propeller and non-propeller device. Prove me wrong.
Comments
With a small number of bus sharing masters, one trick that could help, is a width-modulation of start, so the Props can identify when a non-Prop (and even which other prop..) is in control of the start condition. Earliest arbitration is going to be easiest.
In case it's too tricky, can someone use a side channel for bus arbitration for your application? Or would you just choose another interface at that point?
KiethE, the subject comes up every now and then
Because of the Async nature of the signaling, and you want to avoid lock-outs, you would code this much like a quadrature counter.
ie
Sample for edges on both SDA and SCL and run a state engine / jump table from the 8 possible change-seen answers. (plus dummy branches on the 8 possible no-change values).
Start would always be visible, and would trump all other states.
At a guess 100KHz should be attainable, 400KHz probably less likely.
One nice detail with the Prop, is you could load up 8 instances of this, and have them chatter away as a stress test, and when that works, run two Props for 16 chatter points.