Login  



advanced search

Knowledge Base Menu

Knowledge Base Home Most Recent Topics Most Active Topics
Topic: SMBus Communication with MLX90614

Subscribe Subscribe to Topic

Reply | New Topic

Author Message « Previous Topic | Next Topic »

Eric Sirois

Posted 3 September at 5:30PM  Edit      Reject because  



Joined: 3 September 2008
Location: CA
Posts: 1

Back to Top

I’m presently programming my circuit to use the MLX90614. The sensor responds to the address 0x00, but will not respond when interrogated with its default address. With the 0x00 address the responses are ok. It gives the right object temperature, the address at which it is located and so on. For now I will use only one sensor per unit and if I don’t find any solution, I will use address 0x00. But for the next project the same two lines will be used with up to 25 sensors on the same bus. So being unable to communicate with the sensors at a specific address is very problematic.


Luc Buydens

Posted 4 September at 8:30AM  Edit      Reject because  

Melexis  Moderator

Joined: 7 December 2005
Location: BE
Posts: 83

Back to Top

Hi Eric,

Try to read EEPROM cell 0x0E. The LSByte of this cell contains the slave address of the module.
By default it should be 0x5A. Don't forget that when this address is send by SMBus it occupy the 7 MSbits of the byte.
So on the bus it should be send as 0xB4 ( 10110100) where the 7 MSbits are address and the LSbit is bit R/-W. For MLX90614 this bit has no meaning , i keep it zero usualy.

If you still have problems with the communication send me if is possible oscillograms.

Regards
Dimo Petkov
application engineer


Nino Penkov

Posted 12 November at 11:55AM  Edit      Reject because  



Joined: 10 November 2008
Location: DE
Posts: 2

Back to Top

Hello,
I have a problem writing to the allowed for writing EEPROM registers of the MLX90614. I have read the application data, I am reading all the EEPROM registers correctly, but I am not able to write. I use for writing 0xB4 as slave address.
Regards
Nino Penkov


Luc Buydens

Posted 12 November at 10:39PM  Edit      Reject because  

Melexis  Moderator

Joined: 7 December 2005
Location: BE
Posts: 83

Back to Top

Hi,

You should use 0xA5 for slave address. first write 0000 to the EEPROm address you want to change, then the new values. Then power down the device for the values to take effect.

luc


Nino Penkov

Posted 13 November at 12:06AM  Edit      Reject because  



Joined: 10 November 2008
Location: DE
Posts: 2

Back to Top

Hi Luc,
thanks for the immediate response. I actually tried this already... but I think that the writing address must have 0 for LSB. Anyway, I am almost sure that my problem lies in the PAC byte. Do you have examples for C code for calculation of the PAC byte?
And one more question: If I write 0000 to the EEPROM address without writing anything else afterwards, will the cell value be then read as 0000?
Regards
Nino Penkov


Alexander Gargavelov

Posted 15 November at 8:11AM  Edit      Reject because  

Melexis  Moderator

Joined: 26 October 2008
Location: BG
Posts: 13

Back to Top

Hello Nino,

Here is basic rules that will assure that your writing into EEPROM will be successful:
1. Before write down new value first you should write 0000h (you can check if this writing is successful by reading the same address -> you should read 0000)
2. Make sure that you wait at least 4ms after each EERPROM write command.
3. Not to confuse to which address the device respond you can use 0x00h - to this address all devices should respond no matter what address is programmed into EEPROM (this is for debug purposes of course - if you have more devices on the bus you'll have problems).
4. Concerning the PEC calculation you can use following on line PEC calculator:

http://smbus.org/faq/faq.htm

If you still have problems I would like to see some scope pictures of your communication to our device in order to find out what is wrong -> you may contact me at aga@melexis.com.
Regards,
Alex


Felipe Nobre

Posted 16 December at 4:13PM  Edit      Reject because  



Joined: 16 December 2008
Location: BR
Posts: 3

Back to Top

Hi,

I'm having the same problem of some people here: I can't write the slave address on the sensor. The read went fine, I could read the Ta and To. But I can't write. You guys said that I could read the slave address that is in the address 0x0E, but how can I change if I'm reading RAM or EEPROM?

Also, maybe the problem I'm having is due to the PEC value. I used the library you guys have here on the PEC calculation and I didn't understood two things. Here is the code:

arr[5]=SlaveAddress; //
arr[4]=command; //
arr[3]=SlaveAddress; //Load array arr
arr[2]=DataL; //
arr[1]=DataH; //
arr[0]=0; //
PecReg=PEC_calculation(arr);//Calculate CRC

Why you don't send the mode of operation(read or write) and what is that arr[0] = 0? On the datasheet there is no information of that last 0. And maybe thats the problem I'm having, I don't know if i should it or not on the write proccess.


Hoang Lee

Posted 6 January at 2:44PM  Edit      Reject because  



Joined: 25 May 2008
Location: VN
Posts: 4

Back to Top

I can get three MLX90614 's acknowledge (low bit) with default slave address 0x5A by sending serial bytes: 0x84 , 0x07, 0x85 ( read RAM T object) but I only read three bytes 0xFF ( low Byte, Hi Byte, PEC) . The reading data bit code from slave is the same code with reading previous slave acknowledge, but I always read unchanged High bit. I changed timing from 10kHz to 100kHz, to add some more delay time between slave acknowdge bit and slave respond byte, but without success.

When I changed the slave address which is different with 0x5A, I will not get acknowledge from slave. It means MLX90614 does not damaged but I cannot get its proper respond. I want to get crazy with it. Please help!

PS: my code is based on C language for PSoC. Data sent to PC via RS232


Alexander Gargavelov

Posted 7 January at 8:53AM  Edit      Reject because  

Melexis  Moderator

Joined: 26 October 2008
Location: BG
Posts: 13

Back to Top

Hello Mr. Hoang Lee,

If you manage to get three ACK and then suddenly the SDA line become FFFF this means that for some reason MLX90614 cancel the communication and release the line and since there are PU resistors you get "1".
Possible reasons for canceling the communications are:
1. Time out of SCL line - occur if you hold SCL line "high" for more than app 50us and "low" for more than 32ms.
2. A "STOP condition" occur - rise SDA line while SCL is high
3. It is possible that you don't send "Repeated Start" (RS) after 0x07

I guess you meant 0xB4 and 0XB5?

Please see picture with two communications (please note that the SA = 00h)
Best regards,
Alex


You must be logged in to reply to this post.
If you already have a Melexis Member account, click here to log in.
If you do not have a Melexis Member account, click here to creat an account.

Melexis Semiconductors: Home | Company Profile | Semiconductor /IC Products | Knowledge Base | Careers
Terms Of Use
| Terms Of Sale | Company Data | Privacy Policy
Copyright©1998 - 2009 Melexis Microelectronic Systems All Rights Reserved Certified ISO/ TS 16949, ISO 14001
Melexis Microelectronic Systems 41 Locke Rd, Concord NH, 03301 USA Rozendaalstraat 12, B-8900 Ieper, Belgium