1
\$\begingroup\$

I am looking to interface a Melexis IR sensor to a AVR micro(ATmega2560). The sensor has an SMBus interface. The datasheet of the micro does not explicitly state that it supports SMBus. But it has a TWI interface which is compatible with I2C.
1. Has anyone achieved this?
2. If yes, what is the maximum frequency of communication
3. Have anyone interfaced the sensor with a different micro which does not explicitly state that they support SMBus?

Related links

Maxim app note
Question at Stack exchange

\$\endgroup\$
1
  • \$\begingroup\$ The Maxim link you provided shows a good comparison. Wikipedia on SMBus also shows a more detailed comparison. It at least answers Q2. Note that there are protocol differences too. Have you tried debugging the communication with a oscilloscope or signal analyzer? It's unlikely that you get help with such a general question (and a general answer already included). Consider clearly asking for interfacing the Melexis sensor with the AVR micro, providing some debug infos (edit your post). Please also read the Wikipedia article and specs. \$\endgroup\$ Commented Mar 30, 2017 at 5:07

1 Answer 1

1
\$\begingroup\$

You need to read two specifications:
The NXP I2C spec.
The SMBUS 2.0 spec is the one you need to study (see below).

There is a new SMBUS 3.0 spec, but I'd suggest you will not need this at all.

I assume you are using something like the MLX90615 which is SMBUS 2.0 compliant and the simple Read/Write commands will work without problems on an I2C bus. . You will need to support SMBusRequest to mode shift the chip. The SMBus timeout/reset works for both clock low and high, so again should be no problem to generate for you.

The maximum I2C clock for the MLX90615 is 100 kHz.

You might find it's easier to debug your solution using an Arduino Mega 2560 and the Wire library.

\$\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.