View previous topic :: View next topic |
Author |
Message |
deniska_gus
Joined: 11 Jul 2006 Posts: 42 Location: Minden, Germany
|
SM Bus and I2C Bus |
Posted: Wed Feb 21, 2007 4:03 am |
|
|
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
|
|
Posted: Wed Feb 21, 2007 5:16 am |
|
|
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
|
|
|
davidpk
Joined: 29 Apr 2004 Posts: 13 Location: Opelika, AL
|
|
Posted: Wed Feb 21, 2007 1:49 pm |
|
|
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
|
|
|
deniska_gus
Joined: 11 Jul 2006 Posts: 42 Location: Minden, Germany
|
|
Posted: Thu Feb 22, 2007 4:02 am |
|
|
Thank all of you. I will try this |
|
|
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 |
|
|
|