CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug Reports on this forum. Send them to support@ccsinfo.com

5V PIC to 3.3V PIC I2C bus

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Chad.Klippert



Joined: 06 May 2005
Posts: 4

View user's profile Send private message

5V PIC to 3.3V PIC I2C bus
PostPosted: Fri May 06, 2005 2:01 pm     Reply with quote

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: 20782

View user's profile Send private message

PostPosted: Fri May 06, 2005 2:37 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri May 06, 2005 2:45 pm     Reply with quote

Ahh yes, thanks
libor



Joined: 14 Dec 2004
Posts: 288
Location: Hungary

View user's profile Send private message

PostPosted: Sat May 07, 2005 4:04 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 8:45 am     Reply with quote

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: 14728

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 11:20 am     Reply with quote

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: 20782

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 11:45 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Aug 04, 2013 1:33 pm     Reply with quote

Sorry, I corrected my post above
_________________
Eduardo Guilherme Brandt
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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