ds18s20 reads incorectly


Closed Thread
Results 1 to 40 of 43

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Update

    Finally Got It Working Better
    Thanks For The Inputs
    Notice I Said Better Still Reads 10 F Deg Low
    But Better Really Dont Understand Why Mikroe Works Perfectly With The Same
    Hardware Using Pbp 5.0 And Mcsp 3.0
    Must Be Some Difference In The Complier No? Maybe?

  2. #2
    Join Date
    May 2008
    Location
    Florida
    Posts
    64


    Did you find this post helpful? Yes | No

    Default

    I posted a program that reads DS18S20s. I have 4 of them on onewire and I read them with no problem and I use PBP.
    I do not expect temps below zero so I have not made allowances for that.

    http://www.picbasic.co.uk/forum/showthread.php?t=9116

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Hi jcleaver,

    You might want to check Maxim forum at:

    http://discuss.dalsemi.com/index.php?

    They had rejects on DS1820 family showing wrong temperature and there is a fix for it.

    Nick

  4. #4


    Did you find this post helpful? Yes | No

    Default Still ?

    I Do Appreicate Your Inputs
    Manwolf Your Program Looks Great But Way Beyond My Knowledge
    And As For As The Ds18 Goes I Have Tried Several

    Again To Ask ?
    Why Does Mikro Work Where Pbp Does Not
    There Has To Be Some Difference In The Compliers

    Using Exactly The Same Hardware Easypic4
    Could It Be The Math Conversion Using Pbp

    Both Programs Use The Same Formula For C To F

  5. #5
    Join Date
    May 2008
    Location
    Florida
    Posts
    64


    Did you find this post helpful? Yes | No

    Default

    How are you reading the temp form the DS18S20 in PBP?
    Are you using one-wire or something else?

  6. #6


    Did you find this post helpful? Yes | No

    Default programs

    i have attached the 2 programs one in pbp which reads temperature incorectly
    the other mikroe which works no hardware changes are made really interested in the difference


    thanks

    jack
    Attached Files Attached Files
    Last edited by jcleaver; - 23rd July 2008 at 00:54.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jcleaver View Post
    i have attached the 2 programs one in pbp which reads temperature incorectly
    the other mikroe which works no hardware changes are made really interested in the difference


    thanks

    jack
    Speaking strictly about PBP....
    You know, just like it says in the manual, define's have to be in CAPS.
    Therefore, the
    define osc 20
    is ignored and the timing generated by the code is generated for an oscillator of 4mhz, but apparently you are running it at 20mhz, and therefore, probably far too fast.
    Did you write this code or copy/paste it? Why not use PBP's built-in OWIN/OWOUT commands?
    Last edited by skimask; - 23rd July 2008 at 02:41.

  8. #8
    Join Date
    May 2008
    Location
    Florida
    Posts
    64


    Did you find this post helpful? Yes | No

    Default

    maybe you should check the math.
    With a change to the math the program works correctly. Running on a EasyPIC5 board.

    Sorry I was sleeping that day in class, so I can't explain why PBP and MBasic work differently.

Similar Threads

  1. DS18B20 VS DS18S20 & multiple
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 7th February 2008, 22:43
  2. Using A Ds18s20 And Servo
    By CrazyCooter in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 12th September 2007, 09:41
  3. DS18S20 displays wrong temperatures
    By Shozo Kanamori in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th August 2007, 03:18
  4. DS18s20 - negative teperature
    By Ceug2005 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 2nd February 2005, 12:40
  5. 16F877, DS18S20 and Serial Comm Problem
    By YellowTang in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th April 2004, 10:36

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