Shop OBEX P1 Docs P2 Docs Learn Events
DS18S20 code sample wanted — Parallax Forums

DS18S20 code sample wanted

stamptrolstamptrol Posts: 1,731
edited 2007-12-18 00:39 in BASIC Stamp
·Hello folks,

··· I'm changing a temperature monitoring system from the DS1620 (3 wire shiftin/shiftout) to the DS18S20 (1-wire).

··· I'm using the BS2px with 1-wire support.

··· I know I've seen a sample piece of code somewhere, just can't find it!

··· Can anyone point me in the right direction?

·Thanks,

·Tom

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk

http://www.siskconsult.com
·

Comments

  • phil kennyphil kenny Posts: 233
    edited 2007-12-17 14:33
    Is this it?

    http://forums.parallax.com/showthread.php?p=642254

    phil

    Post Edited (phil kenny) : 12/17/2007 2:40:24 PM GMT
  • stamptrolstamptrol Posts: 1,731
    edited 2007-12-17 15:30
    Phil,

    Thanks for that! It should work just fine.

    Regards,

    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-12-17 18:06
    Tom be carefull with the part numbers. Dallas Semi has a habit of using similar or even identical part numbers for devices that have important differences in programming. The difference between the DS1820, DS18S20 and the DS18B20 is a case in point. The most state of art device in the family is the DS18B20, which always returns the high resolution (12 bit signed) value while the earlier ones were 9 bits unless you went to extra trouble to read the high resolution registers. Code written for the "B" will not work on the "." and the "S" and vice versa.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • stamptrolstamptrol Posts: 1,731
    edited 2007-12-18 00:39
    Thanks Tracy,

    I had noticed the 9-bit vs 12-bit issue.

    I got the code working with the ds1820 after finding a damaged ds18s20.

    Regards,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
Sign In or Register to comment.