Please help with code for DS18B20


Closed Thread
Results 1 to 40 of 110

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi,

    Code:
    count_remain, count_per_c
    DO NOT use that with DS 18B20 ....

    That's a first step.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default

    Anything code I write in thermo that I made, the temperatures are NOT similar with those measured with other devices (mentioned). I try to change the sensor (I use three !) but nothing change. I don't know what to believe : which of temperature is - more- accurate ?

  3. #3
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default

    I found this on forum :
    "OSCCON = %01100000 'Internal clock set to 4-MHz (MUST DO THIS!!!)"
    I added in my code, but PBP say "Error : Undefined Symbol 'OSCCON'.
    Maybe this is the error that shows different temperatures ?

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Have you checked your PICs DATASHEET to see if it has an OSCCON register?

  5. #5
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default

    My mistake...mea culpa...

  6. #6
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default

    Based on the book mentioned at post #21, I re-write the code for this project. I implement a new procedure for initializing the sensors. The results are verry good. Want somebody to improve this ? I wish You all the best !
    Thanks again for Your support !
    Attached Files Attached Files

  7. #7
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by fratello View Post
    Based on the book mentioned at post #21, I re-write the code for this project. I implement a new procedure for initializing the sensors. The results are verry good. Want somebody to improve this ? I wish You all the best !
    Thanks again for Your support !
    @Fratello,
    is your latest software working in the range 0 to 100 deg Celsius at least?
    When I tried for that and with one sensor, it shows -0.06 Celsius. and the sensor would not respond for variation
    We have presently temperatures around 33.5 Celsius, as we entered summer season in India.
    Last edited by mvs_sarma; - 3rd April 2009 at 17:17.
    Regards,
    Sarma

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 17:23

Members who have read this thread : 3

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