|
|
View previous topic :: View next topic |
Author |
Message |
newguy
Joined: 24 Jun 2004 Posts: 1907
|
Default state of I2C pins? |
Posted: Sat Mar 19, 2005 1:55 pm |
|
|
Logically, I'd assume that the default state of the I2C pins on a pic, whether using the h/w or s/w i2c mode, would be to configure both the SCL and SDA lines as inputs. That is, they'd both be inputs if there is no i2c activity.
Does anyone know for sure if this is true?
I have a couple of pics, each wired into an i2c serial EEPROM. For reasons too complicated to go into here, one of the pics will only read from the EEPROM, the other will only write to it. It is impossible for both pics to try and access the EEPROM at the same time.
Everything will be fine if the default state for the i2c lines are to be inputs. |
|
|
Guest
|
|
Posted: Sat Mar 19, 2005 3:07 pm |
|
|
Yes, this is true, because pull-up resistors will guarantee hige level on the I2C Bus ( idle state ,when no transfer ). If your device is Master and SCL & SDA are outputs when master is in idle state, we will violate I2C bus specifications. In this situation other masters ( if you have more that one ) can't get control of the bus. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
Re: Default state of I2C pins? |
Posted: Sat Mar 19, 2005 3:17 pm |
|
|
newguy wrote: | Logically, I'd assume that the default state of the I2C pins on a pic, whether using the h/w or s/w i2c mode, would be to configure both the SCL and SDA lines as inputs. That is, they'd both be inputs if there is no i2c activity.
Does anyone know for sure if this is true?
I have a couple of pics, each wired into an i2c serial EEPROM. For reasons too complicated to go into here, one of the pics will only read from the EEPROM, the other will only write to it. It is impossible for both pics to try and access the EEPROM at the same time.
Everything will be fine if the default state for the i2c lines are to be inputs. |
Yes, it's called multi-master mode. |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Sat Mar 19, 2005 3:30 pm |
|
|
Perfect! Thanks. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|