2
\$\begingroup\$

I'm looking at using some sensors that have an SMBus interface. The signaling looks an awful lot like I2C.

What are the main differences between I2C and SMBus? Can the TWI hardware of an AVR talk to SMBus peripherals? If the answer is "it depends" then what are the limitations?

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Wikipedia has a pretty good summary of the differences en.wikipedia.org/wiki/System_Management_Bus \$\endgroup\$
    – PeterJ
    Commented Feb 5, 2013 at 3:36
  • \$\begingroup\$ @PeterJ thanks that's a good reference; I'll have to sharpen my wiki-fu skills to complement my google-fu skills \$\endgroup\$
    – vicatcu
    Commented Feb 5, 2013 at 15:29
  • \$\begingroup\$ Now (2019), take a look at PackProbe: powercartel.com/projects/PackProbe A lot of info there and a nice util (available on GitHub). \$\endgroup\$
    – Codebeat
    Commented Aug 29, 2019 at 11:35

3 Answers 3

6
\$\begingroup\$

The SMBus protocol is usable with AVR microcontrollers, either by bit-banging the protocol, or through the I2C hardware support. Some SMBus devices apparently have had problems with the I2C protocol as implemented in earlier versions of the Arduino "wire.h" libraries, but since the question does not mention an Arduino, presumably that is not part of the problem. @vicatcu points out that this issue has been resulved in the current Arduino release.

See Peter Fleury's I2C Master Interface library for AVR-gcc as a starting point. This works with a couple of SMBus sensors I use.

Also, there are a couple of discussions on SMBus implementation at the AVR Freaks forum, that might help you navigate around specific pot-holes encountered along the SMBus road.

\$\endgroup\$
3
  • \$\begingroup\$ I'm interested in reading more about the issues with SMBus and Arduino if you wouldn't mind elaborating on that point... \$\endgroup\$
    – vicatcu
    Commented Feb 5, 2013 at 15:29
  • \$\begingroup\$ @vicatcu See this blog article, which mentions "the Wire library does not support the use of the repeated start function" and provides the alternative I mentioned. Also see this message on Arduino.cc, "I got it working using a different library. It appears wiring (sic) cannot do it". \$\endgroup\$ Commented Feb 5, 2013 at 15:41
  • \$\begingroup\$ Thanks for the references... that notion might be a bit outdated though. There was a lot of traffic on the developers mailing list about adding support for repeated starts last year. This thread seems to confirm... arduino.cc/forum/index.php?topic=137607.0 support was added to the endTransmission function and the requestFrom function, and the API docs agree \$\endgroup\$
    – vicatcu
    Commented Feb 5, 2013 at 16:49
1
\$\begingroup\$

I have further questions, but have located a document from TI that is specific in the differences between the two in both electrical terms and software terms.

Differences i2c and SMBus by TI

I have an i2c device and an SMBus device. They work separately, but not together. I think it's a software issue. The link is a good reference. :}

\$\endgroup\$
0
\$\begingroup\$

Now (2019), take a look at PackProbe: https://powercartel.com/projects/PackProbe/

A lot of info there and a nice Arduino util (available on GitHub).

@DaveTweed: This is not a goody or service, read carefully.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.