Using MS Bus with Picaxe

rogerm123

New Member
I want to use a MLX90614 infa red thermometer in a project but it requires some programming to set its output via SM Bus. Plenty examples with Arduino(not very familiar with) but none with Picaxe. The data sheet indicates a PWM/SDA pin can be programmed as a push-pull or open drain NMOS which can trigger an external device. I am a "Blank Slate" on how to even get started on this.
Any step by step advice would be helpful.
 
Hi,

I've not looked in detail at the Data Sheet, but it seems as if it might use a fairly "standard" I2C Bus, which PICaxe supports very easily. Some manufacturers (still) don't like to use the I2C name, either because they didn't want to pay license royalties to Philips (who invented it), or because they don't entirely comply with the published specification. ;)

Therefore, IMHO it's certainly worth trying to "talk" to the MLX90614 using the I2C Bus, but it's sometimes remarkably difficult to find the I2C Bus Slave Address (SA). Often the best way is to look at the Arduino Application and (usually) multiply the Quoted "7-bit" Address by 2. Alternatively, try a "Bus Search" program, which is available for the PICaxe to see if a connected MLX90614 answers back (ask again if you can't find the Program). For an I2C Bus, the two interface pins should be set to "Open Drain" (not push pull) and often you can just activate the two internal pullup resistors within the PICaxe, using the PULLUP %..... command.

If you want to try the "PWM" mode, then you probably need to use the push-pull Output mode. At its default Clock Frequency, a PICaxe can only resolve PWM with 10 us resolution using the PULSIN command, but you can improve that to 1.25 us by increasing the (M2) clock to 32 MHz (i.e. SETFREQ M32).

Cheers, Alan.
 
Last edited:
I had a look at the datasheet.
It uses a non standard "repeated start", so I doubt it will work with standard i2c.
As Alan says, it maybe worth trying a picaxe "Bus Search", it does need pullups.
 
I had a look at the datasheet.
It uses a non standard "repeated start", so I doubt it will work with standard i2c.
Hi,

I believe the "Repeated Start" is a/the method used by PICaxe. And BTW there do appear to be quite a few "hits" for MLX90614 on the PICaxe forum!

Cheers, Alan.
 
Thanks to all for great suggestions. After some digging around in above suggestions I realize the learning curve may be steeper than I want to tackle at this time. I think I will see if I can just use a thermistor to get what I need .
 
Back
Top