Electronic – SMBus with AVR


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?

Best Answer

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.

Related Topic