Melexis


Closed Thread
Results 1 to 5 of 5

Thread: Melexis

  1. #1
    Join Date
    Sep 2009
    Posts
    9

    Default Melexis

    I'm messin' with a MLX90614 IR sensor and wondered if anybody has any Picbasic code to interface with it? I guess any code that creates a SMBus communication format would work as well.

    It's a very interesting temperature sensor and Melexis actually provides assembly/C code but obviously I'd like to use PicBasic to do my development work...

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Looks like you should be able to use the I2C command.
    http://www.melexis.com/Asset/SMBus_c...Link_5207.aspx
    if you are careful
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Oct 2007
    Location
    The Netherlands
    Posts
    45


    Did you find this post helpful? Yes | No

    Default

    You can set up the sensor to output PWM and then measure pulse length. Only trouble is, to set up the sensor you need the EVB90614 evaluation board and their somewhat buggy software. I did it this way and it worked okay for me.

  4. #4
    Join Date
    Sep 2009
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Sensor

    They have a sample program posted on their website in assembler. I've reviewed it and it seems pretty straight forward. I'll try to write some code in PicBasic using the I2C commands and post it here if I'm successful

  5. #5
    Join Date
    Sep 2009
    Posts
    9


    Did you find this post helpful? Yes | No

    Default update on code

    Here's my subroutine. It worked like a charm!

    read_temp:
    sensortemp = 0
    reg = $07
    addr = 0
    I2CRead Tda, Tcl, addr, reg, [sensortemp.lowbyte, sensortemp.highbyte]
    Return

    I used a 18F6720 using a define of 4 mhz, with sensortemp defined as a word.
    reg and addr were defined as bytes. Tda and Tcl were pin assigments.
    reg $07 sets the sensor to send Object Temperature 1.
    Last edited by rtsandiego; - 20th September 2009 at 01:14.

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts