PICmicro & dsPIC >> PICmicro & dsPIC

Pages: 1
Ruediger Orschiedt



Reged: Oct 16 2003
Posts: 1
i2c multi-master with SSP 16F876
      #9085 - Tue Sep 23 2003 10:30 AM

Hi,
How can I realice a comunication between two i2c-Master ?
Does anyone have a sample.

cheers

Ruediger


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mike Rigby-Jones

****

Reged: Oct 16 2003
Posts: 141
Re:i2c multi-master with SSP 16F876
      #9086 - Wed Sep 24 2003 06:49 AM

>Hi,
>How can I realice a comunication between two i2c-Master ?
>Does anyone have a sample.
>
>cheers
>
>Ruediger

You cannot make two masters communicate, I2C communication always takes place between a slave and a master.


Post Extras: Print Post   Remind Me!   Notify Moderator  
JanErik Bertram

*

Reged: Oct 16 2003
Posts: 83
Loc: Germany, Bochum
Re:i2c multi-master with SSP 16F876
      #9087 - Wed Sep 24 2003 08:32 AM

>You cannot make two masters communicate, I2C communication always takes place between a slave and a master.

Sorry, but you are wrong.
Look at http://www.esacademy.com/faq/i2c/ and you will see that I2C is a Multi-Master Bus.

I don't try it to build a multimaste I2C bus with the 16F876,
but i assume you can use a standard single-master mode driver, and extend it only too recognize
the Bus collision Interrupt. 
And too wait for the Bus free signal.

Ciao
Jan Erik Bertram


Post Extras: Print Post   Remind Me!   Notify Moderator  
Stephen Landamore

****

Reged: Oct 16 2003
Posts: 124
Loc: Cambridge, UK
Re:i2c multi-master with SSP 16F876
      #9088 - Wed Sep 24 2003 09:30 AM

>>You cannot make two masters communicate, I2C communication always takes place between a slave and a master.
>
>Sorry, but you are wrong.
>Look at http://www.esacademy.com/faq/i2c/ and you will see that I2C is a Multi-Master Bus.

A master is a device which is capable of initiating a comms transfer; a slave is a device which is capable of receiving a comms transfer.

If you are bit-bashing the comms, it is trivial to be a master device; it is generally very hard to be a slave device, even at slow (125kbit/s) rates.  Hardware i2c support is generally recommended if you have to act as a slave :-)

i2c does indeed support multiple masters; in this case ALl the masters will ALSO need to handle slave functionality.  Hardware support is DEFINATELY recommended :-)

6 or so years ago I worked on a project which has multiple i2c masters.  We used a pic16c65; the datasheet claimed hardware support for multi-master i2c, but it was lying.  There were bugs, errata, workarounds... and in some corner cases it simply did not work as advertised.  We were led to believe Microchip got their act together, and fixed the problems on newer chips, but it was too late and the damage had already been done.  These days, I avoid i2c like the plague.  Sorry I don't recall the details, and I no longer have the code.

best regards,
stephen


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mike Rigby-Jones

****

Reged: Oct 16 2003
Posts: 141
Re:i2c multi-master with SSP 16F876
      #9089 - Thu Sep 25 2003 03:05 AM

>>You cannot make two masters communicate, I2C communication always takes place between a slave and a master.
>
>Sorry, but you are wrong.
>Look at http://www.esacademy.com/faq/i2c/ and you will see that I2C is a Multi-Master Bus.

Sorry, but that makes no difference.  Two masters cannot initiate data transfer.  I2C can be used in a multi-master configuration, but the masters also need to support slave functionality if another master needs to communicate with it.

I stand by my statement: You cannot make two masters communicate.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Freddy4



Reged: Oct 16 2003
Posts: 1
Re:i2c multi-master with SSP 16F876
      #9090 - Sat Sep 27 2003 02:25 AM

Mike, please re-read the original statement.

He was asking for a multi-master communication sample.

The commone sense says for everyone but you that he want to realize a bus where multiple devices are able to take control of the bus.

Mhhh... my PC has a bus-master disk controller and network card... you would say it cannot work, but I can assure it runs perfectly :-)

Next time be sure your brain is connected and switched on. :-)

Cheers

Freddy O.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mike Rigby-Jones

****

Reged: Oct 16 2003
Posts: 141
Re:i2c multi-master with SSP 16F876
      #9091 - Mon Sep 29 2003 04:18 AM

>Mike, please re-read the original statement.
>
>He was asking for a multi-master communication sample.
>
>The commone sense says for everyone but you that he want to realize a bus where multiple devices are able to take control of the bus.
>

I have re-read it, I suggest you do the same.  The OP asked: "How can I realice a comunication between two i2c-Master"

The correct answer which I have already given is that you cannot have communication between two I2C masters.  What don't you understand about that?


Post Extras: Print Post   Remind Me!   Notify Moderator  
Freddy4



Reged: Oct 16 2003
Posts: 1
Re:i2c multi-master with SSP 16F876
      #9092 - Mon Sep 29 2003 01:35 PM


>I have re-read it, I suggest you do the same.  The OP asked: "How can I realice a comunication between two i2c-Master"

Don't forget to read the message title, too.
"i2c multi-master with SSP 16F876"

In multimaster environment, as in real life, two masters cannot coexist, this is clear for everyone.
Thanks for pointing out this. :-)

But for everybody also (but you) was clear what our friend was looking for. 

Ciao
     Freddy 




Post Extras: Print Post   Remind Me!   Notify Moderator  
Dan HenryModerator
Guru
****

Reged: Oct 16 2003
Posts: 4218
Loc: Colorado
Re:i2c multi-master with SSP 16F876
      #9093 - Tue Sep 30 2003 03:20 PM

>But for everybody also (but you) was clear what our friend was looking for. 

Oops, not everybody!  You can include me in your list of imbeciles and add me to your mental kill file -- "mental", since our Forum does not have that facility.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
1 registered and 29 anonymous users are browsing this forum.

Moderator:  mikerj, jtemples, jeff, Dan Henry, Andrew L 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is enabled
      UBBCode is enabled

Rating:
Topic views: 3259

Rate this topic

Jump to

Contact Us | Privacy statement HI-TECH Software

Powered by UBB.threads™ 6.5.5