Shop OBEX P1 Docs P2 Docs Learn Events
DS1822,1920 1 wire thermometer — Parallax Forums

DS1822,1920 1 wire thermometer

ArchiverArchiver Posts: 46,084
edited 2003-10-01 06:42 in General Discussion
I am relatively new to the basic stamp, and i have successfully been
able talk to my ds1822 dallas 1 wire thermometer, however they come
default for 12 bit, which is a slow conversion, I have tried several
different sequences to write to the configuration register of the
sensor to change it to 9 bit resolution which would be a faster
conversion, I am using a BS2P24 and the OWOUT command, from what i
understand by reading dallas docs that after i send the write
scratchpad command my pointer is set at location 2, 0 and 1 are read
only, and that I should be able to just send binary 00 to it for
resolution change, if anyone has a sample command that successfully
initializes the write scratchpad and then sends data to the config
registers, would be greatly appreciated.
-christopher

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-10-01 06:42
    Hello,

    Make sure you are using the correct mode for OWOUT.

    mode 1 resets the bus then sends data a byte at a time.
    mode 2 sends data a byte at a time THEN resets the bus.

    'reset bus then send skip rom
    OWOUT OWpin, 1, [noparse][[/noparse]$CC]

    'send write scratchpad command and 3 bytes of data then reset the bus
    OWOUT OWpin, 2, [noparse][[/noparse]$4E, $00, $00, $00]

    Chuck Chargin Jr.

    At 06:46 PM 9/30/2003 +0000, you wrote:
    >I am relatively new to the basic stamp, and i have successfully been
    >able talk to my ds1822 dallas 1 wire thermometer, however they come
    >default for 12 bit, which is a slow conversion, I have tried several
    >different sequences to write to the configuration register of the
    >sensor to change it to 9 bit resolution which would be a faster
    >conversion, I am using a BS2P24 and the OWOUT command, from what i
    >understand by reading dallas docs that after i send the write
    >scratchpad command my pointer is set at location 2, 0 and 1 are read
    >only, and that I should be able to just send binary 00 to it for
    >resolution change, if anyone has a sample command that successfully
    >initializes the write scratchpad and then sends data to the config
    >registers, would be greatly appreciated.
    >-christopher
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the Subject and
    >Body of the message will be ignored.
    >
    >
    >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Sign In or Register to comment.