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 CCS Technical Support

SM Bus and I2C Bus

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



Joined: 11 Jul 2006
Posts: 42
Location: Minden, Germany

View user's profile Send private message

SM Bus and I2C Bus
PostPosted: Wed Feb 21, 2007 4:03 am     Reply with quote

Hi guys,

i have just one question. I have to read out one IC ( BQ2085), that has a SM Bus interface. Can i use I2C commands? Is SM Bus and I2C Bus the same?

Regards. Dennis
PICoHolic



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

PostPosted: Wed Feb 21, 2007 5:16 am     Reply with quote

An I2C bus running at 3.3V is called "SMBus". You can either run the PIC with a 3.3V supply, and use the I2C peripheral normally, or you can run the PIC at 5V and configure the bus for SMBus levels. This will change the input characteristics of the SDA and SCL pins such that 3.3V signals are still considered "high" inputs. Do not forget to make this change if your setup uses the PIC at 5V, as the normal input threshold is 4.0V or 3.5V. The result is it will probably work – for the most part, but fail randomly due to being out of spec.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 21, 2007 1:02 pm     Reply with quote

Maxim has a really nice appnote which compares i2c and smbus.
http://www.maxim-ic.com/appnotes.cfm/appnote_number/476
davidpk



Joined: 29 Apr 2004
Posts: 13
Location: Opelika, AL

View user's profile Send private message Yahoo Messenger

PostPosted: Wed Feb 21, 2007 1:49 pm     Reply with quote

At my request, CCS recently added a delay to satisfy a start condition hold time. You need to include an SMBus declaration in your #use i2c line:

#use i2c( Stream=BAT1, Master, sda=PIN_D6, scl=PIN_D7, SMBUS )

I've been using it for years. It works well.

BTW, the voltage doesn't matter, the TI parts that use SMBus can take 5V without a problem. In fact, the SMBus specification demonstrates 3V and 5V devices sharing the bus.

David
PICoHolic



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

PostPosted: Thu Feb 22, 2007 1:30 am     Reply with quote

The information listed in my previous reply was taken from microchip itself!!

3V design center:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2530&pageId=64
deniska_gus



Joined: 11 Jul 2006
Posts: 42
Location: Minden, Germany

View user's profile Send private message

PostPosted: Thu Feb 22, 2007 4:02 am     Reply with quote

Thank all of you. I will try this
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
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