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

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



Joined: 31 Jan 2013
Posts: 63

View user's profile Send private message

mlx90614
PostPosted: Thu Jan 31, 2013 5:51 am     Reply with quote

hi to all
I want config mlx90614 in pwm mode:
1) how programing mlx90614 in first program (via 12c or no?)?
2) how write data on eeprom mlx90614 for config pwm mode?
3) can you help me with a sample code?
Notice! I read datasheet and application note carefully.
hardware: pic16f877a
software: ccs compiler
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Thu Jan 31, 2013 1:27 pm     Reply with quote

try a search on this site for mlx90* as a start point

have you TRIED to write code for it?

do you have a CIRCUIT that uses it ?

Proteus/Isis or hardware?

school project or real product?
hamid9543



Joined: 31 Jan 2013
Posts: 63

View user's profile Send private message

PostPosted: Fri Feb 01, 2013 12:36 am     Reply with quote

hi
1) I write code for i2c
Code:

#Include <16f877a.H>
#use delay (clock = 20000000)
#Use I2C (master, sda = PIN_C3, scl = PIN_C4)

int8 result1 =0;
int8 result2 =0;
int8 CRC =0;
int16 tempk =0;
float tempC =0.0;

void main (void)
{
   while (TRUE)
   {
      i2c_start ();       
      if (i2c_write (0xB4)==0)    // Melexis Sensor address to send command
      {
          i2c_write (0x07);        // ask sensor data
          i2c_start ();
          i2c_write (0xB5);        // address to read Melexis Sensor
          result1 = i2c_read(1);
          result2 = i2c_read(1);
          tempk = make16 (result2, result1); 
          CRC = i2c_read(0);
      }
      i2c_stop ();
      tempC =(tempk * 0.02)-273;
      delay_ms (500);
   }
}


Hardware is very simple 2 wire & pullup resistor. No model in proteus
and school project
2) I have 4 sensor. I do not know how to set address for 4 sensors.
3) I can not config and write sample code for pwm config.
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