IR temp sensor


Closed Thread
Results 1 to 6 of 6

Thread: IR temp sensor

Hybrid View

  1. #1
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: IR temp sensor

    Quote Originally Posted by HenrikOlsson View Post
    Yeah, when you do x= y // 50 it will do a divide by 50 and then give you the remainder which can't be more than 49, right?

    If you first multiply the raw value by 2 it means you can then divide by 100 (instead of 50) and do modulo 100 (that's the // operator) to give you two digits after the decimal point. This won't increase the resolution, you'll still have 50 "steps" to the right of the decimal point but they will range from 0 to 98 instead of from 0 to 49.
    Thanks Henrik,

    i will try it out now.

    In the mean time i was playing with the ERPROM registers in order to assign the sign bit. I will leave that on a side and try your advice.

  2. #2
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: IR temp sensor

    Henrik,

    it worked!!!

    i did the following.

    Code:
    remainder = (TEMPIR*2)//100
    It looks like it worked as expeced.

    Now i'm focusing to get the sign bit.

Similar Threads

  1. Dodge temp sensor
    By Art in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 19th August 2015, 15:18
  2. TMP05 Temp Sensor
    By RichG in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th February 2009, 03:33
  3. Using WDT as a Temp Sensor?
    By modifyit in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 20th June 2006, 17:55
  4. RH/Temp Sensor Example Code
    By Bruce in forum Code Examples
    Replies: 7
    Last Post: - 15th June 2006, 15:55
  5. Temp sensor problem
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 14th June 2006, 14:49

Members who have read this thread : 0

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

Posting Permissions

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