PDA

View Full Version : I2C two master on one I2C display



Kmt
- 22nd September 2014, 19:44
Is it possible to have 2 master I2C on one I2c display?

Like this Master1 Line 1 on the display
Master2 Line 2.

I found this on the net

Arbitration
As the I2C bus is a multi-master bus it is possible that two devices initiate a transfer at the exact same
time (e.g. RTC tick). When this happens the first device attempting to transmit a logical 1 while another
device transmits a logical 0 will lose arbitration. The device attempting to transmit 1 will detect that the
line is low when it should actually be high so assumes that another master is active and immediately
stops its transfer. This device will then wait until the next STOP condition before trying to transmit again.

Or do I have to use a 2 to 1 master selector like PCA9541.

Kent

aerostar
- 22nd September 2014, 20:44
I have used two pics to access DS1307 some years ago, I put 470ohm resistors in line on each of the pics and used a similar connection between the 2 pics as a busy line. ( probably not the correct way - but it worked fine)

Then some simple programming of setting and reading the busy line, always making sure that when not busy, the line on each is set to an input.