Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

pec calculation with mlx90614

Status
Not open for further replies.

fizo741

Member level 1
Member level 1
Joined
Aug 10, 2012
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Tehran/Iran
Activity points
1,539
Hi everybody,
I’m doing a project with MLX90614 and I should start to write” C programming “ . At the first step , unfortunately I don’t understand pec calculation in application note because I don’t have the orginal message! The purpose of my project is to initiate this sensor. I write some of pseudo code example. An erasing of the eeprom address 0x0E( smbus address)
1. Send START bit
2. Send Slave Address (0x00* for example) + Rd\-Wr bit**
3. Send Command (0b001x_xxxx + 0b0000_1110 -> 0b0010_1110)
4. Send Low data 0x00
5. Send High data 0x00
6. Send PEC 0x6F

Can anyone help me? Its extremely emergency. I would appreciate.
regards
 

I cant belive !It means nobody dosent know?????!!!!!!!!!!
I really searched alot but i couldnt find any useful thing
 

The experience I have is not with mlx90614 but with mlx90615. But I think they should be quite similar.

Are you talking about coding for PEC calculation? For what reason do you need to know the PEC?

When I changed the adress of the MLX90615 that I am using I manually calculated the PEC by this website: http://smbus.org/faq/crc8Applet.htm.
Can't help with code for calculating PEC but maybe this information will help you?
 

yes.I should use pec because I want to read from RAM or EEPROM .
And its in the format of SMBus reading from EEPROM or RAM.
I couldnt open, **broken link removed** because I couldnt download java. I dont know why?!
 

You do not need to calculate the PEC when you are reading from the sensor, unless you are using it in a noisy area where you could get corrupt data.

As I said in the other thread you started, this should help: https://www.melexis.com/Assets/MLX906...-MCU-5229.aspx. Explains for both assembly and C-language.
If there is something more specific you have problem with please post code or schematics :)

Good luck!
 
Ok, does this link work for you? https://www.melexis.com/Assets/MLX90614-SMBus-implementation-in-PIC-MCU-5229.aspx

If not go to Melexis webpage and search for MLX90614, then click "applications". After that look for "MLX90614 SMBus implementation in PIC MCU" on the list of documents.

I think that you should read that document even though it is not the same processor as yours, I managed to "talk" with my MLX90615 sensors thanks to the information in that document.
 
Finally i could download from link.I had it actually.I use codes with small changes in codevision but when i debug to go to avrstudio4,I couldnt test my program because It stayed in 1 line and dont move.I dont know why because It wasnt in loop.
 

Simulate your code or test in the processor? Can you post the code? Dont know if I can help you but I can try =)
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top