View previous topic :: View next topic |
Author |
Message |
Chad.Klippert
Joined: 06 May 2005 Posts: 4
|
5V PIC to 3.3V PIC I2C bus |
Posted: Fri May 06, 2005 2:01 pm |
|
|
I have a system utilizing two PICS operating at 5V and 3.3V. The master device is powered at 3.3V. Since I2C pins are open drain, is it sufficient to simply tie the SDA and SCL lines between the two PICs with no conditioning other than 3.3V pullups? Anybody dealt with this? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri May 06, 2005 2:37 pm |
|
|
If you use hardware i2c on the slave, which you probably need to do,
then the SDA and SCL pins will be on the MSSP pins. These are
special Schmitt Trigger inputs which have Vih input levels of 0.7 x Vdd.
This means the Vih is +3.5v on a PIC running at +5v, so it won't work
with +3.3v pullups. |
|
|
Chad.Klippert
Joined: 06 May 2005 Posts: 4
|
|
Posted: Fri May 06, 2005 2:45 pm |
|
|
Ahh yes, thanks |
|
|
libor
Joined: 14 Dec 2004 Posts: 288 Location: Hungary
|
|
Posted: Sat May 07, 2005 4:04 am |
|
|
Read this: Philips Application Note on level shifting
or google for 'bidirectional level shifters' (you'll find many for 3.3V and 5V SIM card translating, I think these do the same) |
|
|
Eduardo__
Joined: 23 Nov 2011 Posts: 197 Location: Brazil
|
|
Posted: Sun Aug 04, 2013 8:45 am |
|
|
Using #use I2C(master, I2C1, FORCE_HW, fast=100000, SMBUS) //PIC678A, PIC supplied at 5V and the peripheral(and Pull up resistors) supplied at 3.3V works very Well.
I´ve worked very well with this configurations.
I can confirm this! Good Luck! _________________ Eduardo Guilherme Brandt
Last edited by Eduardo__ on Sun Aug 04, 2013 1:31 pm; edited 1 time in total |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Sun Aug 04, 2013 11:20 am |
|
|
With the caveat 'only on chips with hardware SMBUS support'.
The SMBUS input levels are lower than I2C, and happily accept signals from a 3.3v device, but probably 50%+ of 5v PIC's do not have this option.
Best Wishes |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Aug 04, 2013 11:45 am |
|
|
Quote: | Using #use i2c( Stream=BAT1, Master, sda=PIN_D6, scl=PIN_D7, SMBUS ), |
Also, the SMBUS option (if available) can only be selected for the pins
that are connected to the hardware MSSP module. Only a few PICs have
an MSSP module on pins D6 and D7. Most PICs use pins C3 and C4, or
maybe some other pins. |
|
|
Eduardo__
Joined: 23 Nov 2011 Posts: 197 Location: Brazil
|
|
Posted: Sun Aug 04, 2013 1:33 pm |
|
|
Sorry, I corrected my post above _________________ Eduardo Guilherme Brandt |
|
|
|