Shop OBEX P1 Docs P2 Docs Learn Events
using the DS18B20 temperature sensor — Parallax Forums

using the DS18B20 temperature sensor

BrandonBrandon Posts: 3
edited 2005-02-02 17:51 in BASIC Stamp
I bought some DS18B20's and I didn't get quite what I thought but I want to use them anyways if possible.· How can I use them with a bs2?· Is that not possible and I'm forced to spend more money on a bs2p?· All I need to know is how to get a temperature value back into a variable on my stamp.· Maybe I need to by another type of temperature sensor.· Any help will be muchly appreciated!!

Thanks

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-02-01 23:52
    The DS18B20 is a 1-Wire device, and the 1-Wire protocol is not supported on the BS2 -- it is supported on the BS2p and BS2pe (which were introduced after the 1-Wire protocol was released). You can still use your BS2, but you'll need a bridge: DS2480 serial-to-1-wire protocol adapter.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • BrandonBrandon Posts: 3
    edited 2005-02-02 00:16
    If I purchase a DS2480 will I be able to use 1 DS2480 for multiple DS18b20s?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-02-02 01:06
    Yes, I believe so. What you should do is download and read the documentation for the DS2480.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • GadgetmanGadgetman Posts: 2,436
    edited 2005-02-02 17:51
    You can connect as many 1-Wire devices as you want to theDS2480, but...

    If you have more than one device which accepts the same commands you must use their 64bit adresses. If there's only one, you can use theSkip-ROM command instead.(Faster and easier)
    The exception is of course when you want all the devices to execute the same command.
    (For example, you can send a Skip-ROM and the command for temperature measuring, to start them all, thenadress each one individually to read out the temperature)

    I suggest surfing over to http://www.maxim-ic.com/appnotes10.cfm/ac_pk/1 and check out the appnotes.
    Particularly:
    App Note 192: Using the DS2480B Serial 1-Wire Line Driver
    Book of iButton Standards
    Overview of 1-Wire Technology and Its Use
Sign In or Register to comment.