Skip navigation
TechXchange
Digi-Key TechXchange Communities > Projects and Designs > Discussions
8162 Views 4 Replies Latest reply: Apr 17, 2013 2:38 PM by MicrochipRTCfr RSS
Currently Being Moderated

Feb 15, 2012 10:34 AM

SMBus

Trying to use a MLX90614 which is a noncontact sensor that digikey sells which uses an SMBus.  I never heared of this peripheral before I read this data sheet and am confused with this issue.  I have a PIC32 bit processor that uses an I2C bus.  The SMBus seems to be very similar to I2C except for a slow throughput.  Could one use an I2C instead of a Smbus.  If not is there a way of using a PIC 32 with this sensor?  I have heared the term bit bash before for adding a spi bus to processor that doesn't have one could some one bit bash a SMBus?



  • JimHarrison Apprentice 70 posts since
    Sep 9, 2011
    Currently Being Moderated
    Feb 16, 2012 2:00 PM (in response to AllieCat)
    SMBus

    This article from Maxim should help:

     

    http://www.maxim-ic.com/app-notes/index.mvp/id/476

  • EwenF Novice 1 posts since
    May 14, 2012
    Currently Being Moderated
    May 14, 2012 4:22 AM (in response to AllieCat)
    SMBus

    Indeed you can bit-bash SMBus just as you would I2C. the main things to watch are the longer setup times  (4.0 or 4.7 us) compared with I2C.

    Unless your PIC has an open drain port pin that you can use for the SDA signal then best way to bit-bash is to configure an i/o pin as an input (TRISx bit = 1) pulled high by external pullup and you configure the corresponding bit in the PORTx data register as 0. Then you either set or clear the TRISx bit to selct either input (high) or output (low) on SDA line. For the SCL signal you just set up a regular output since clock doesn't have to be open drain if the PIC is the only bus master.

    The built in I2C function can probably be made to work with suitable adjustment to bit rate and that means the pins automatically are open drain.

  • adriano_p Novice 1 posts since
    Apr 17, 2013
    Currently Being Moderated
    Apr 17, 2013 1:12 PM (in response to AllieCat)
    SMBus

    I have a similar need with a PIC32 but nothing works.

    Have you solved the MLX90614 interfacing problem? Have any source code to share?

    Thanks in advance,

    adriano

  • MicrochipRTCfr Novice 40 posts since
    Sep 4, 2012
    Currently Being Moderated
    Apr 17, 2013 2:38 PM (in response to AllieCat)
    Re: SMBus

    Hi,

     

    You can start with a good appnote from Maxim comparing I2C and SMbus.

     

    Then, look at the Familry Reference Manual Section 24 of PIC32 I2C if you search for SMbus in this pdf document there are several references to SMBus so it seems there is provision to use SMbus in the I2C unit of some PIC32 devices.

     

    There is also an appnote for PIC32 & PMBus from Linear which may be helpful

     

    Regards

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 3 points