CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

mlx90614 address config

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mohammad_robotic



Joined: 10 Nov 2013
Posts: 4

View user's profile Send private message Send e-mail

mlx90614 address config
PostPosted: Mon Jun 01, 2015 5:29 am     Reply with quote

hi
I write code for mlx90614 in i2c mode and I can get data from a single sensor but I dont know how to set address for 4 sensors. Crying or Very sad
can you help me with a sample code?

Notice! I read datasheet and application note carefully.
hardware: pic16f877a
software: ccs compiler
RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

Re: mlx90614 address config
PostPosted: Mon Jun 01, 2015 6:49 am     Reply with quote

mohammad_robotic wrote:

Notice! I read datasheet and application note carefully.


In that case you'll already have seen on page 14 and elsewhere that these devices have a programmable address. They all come with the same default address, and you have to program them with the required address. You cannot do this in a system with multiple sensors as they would clash and get confused. You have to do it one by one before fitting them to the final system.
Ttelmah



Joined: 11 Mar 2010
Posts: 19496

View user's profile Send private message

PostPosted: Mon Jun 01, 2015 7:33 am     Reply with quote

Opcode 0x2E.

Ideally you need a separate little programmer unit, into which you can plug the chips, and then write to this location (0xE in the EEPROM). Be careful to choose 'legal' addresses. Avoid addresses starting with 0, and with 0xF.
mohammad_robotic



Joined: 10 Nov 2013
Posts: 4

View user's profile Send private message Send e-mail

PostPosted: Mon Jun 01, 2015 1:08 pm     Reply with quote

so i should change address
but what should i write in a blank address like 0xB7???
Ttelmah



Joined: 11 Mar 2010
Posts: 19496

View user's profile Send private message

PostPosted: Mon Jun 01, 2015 1:22 pm     Reply with quote

8bit addresses, are always a 'pair', on an even address. Even address = write. Odd address = read. You cannot use B7, the base must be even.

What you use is dependent on what else is on the bus. Draw a little table listing what you have on the bus. If there is nothing else, then use the default address already programmed as the first, and then use default+2, default+4 & default+6, as logical places to put the other chips.
mohammad_robotic



Joined: 10 Nov 2013
Posts: 4

View user's profile Send private message Send e-mail

PostPosted: Wed Jun 03, 2015 5:43 am     Reply with quote

thanks a lot
I did the change and I got result
with the best wishes for all of the members
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group