Announcement

Collapse
No announcement yet.

DS1820 low res temperature readings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    DS1820 low res temperature readings

    Hi Michael</SPAN>

    <O


    #2
    The resolution to be used is an mcsTempeature.ini file edit. I think I updated the manual to show this, but I don't recall if the manual with the updates are in the updater. My recollection is that the default is full resolution for the device. I did a search on this board but it did not pop out. I'm traveling so I dont have access to the manual. The [Devices] group in mcsTempertaure has a Key/Value for each sensor. The properties contained in the Value include the resolution parameter as the last comma-separated entry. I think 3 is minimum resolution and 0 is max. This is from memory so it may not be totally correct.

    Comment


      #3
      All the temperature devices appear to be set to high res.

      [Devices]
      6B00000020887481S="R1,97,0,0,0"
      6B00000020887481Y="deleted"
      230000000E57C910="[1,97,,5,0"
      F0000000072E6212S="deleted"
      F0000000072E6212S1="deleted"
      F0000000072E6212Y="\1,97,0,6,0"
      F0000000072E6212Y1="\2,97,0,0,0"
      A000000013BD6228="[2,97,,198,0"
      BA0000001550F726H="[41,97,,2,0"
      BA0000001550F726="[3,97,,0,0"
      BA0000001550F726V="[67,97,,0,0"
      BA0000001550F726V1="[68,97,,0,0"
      BA0000001550F726V2="[69,97,,0,0"
      Last edited by Dean.Bell; May 3, 2005, 01:37 PM.

      Comment


        #4

        Comment


          #5
          Hi Michael

          Below is an example of a system startup, then the 2nd set of readings from the network. The high res temperatures from the DS1820's is derived by math.
          The DS1820 has 'scratch pad' of 8-bytes that can be read back from the device. In the scratch pad are the temperature LSB and MSB and down the list are the count_remain and count_per_C. It is these two values which are used with the temperature LSB and MSB to produce the reading in a higher resolution.


          <TABLE border=1><CAPTION>ScratchPad</CAPTION><TBODY><TR><TH>Byte</TH><TH>Register</TH></TR><TR><TD>0</TD><TD>Temperature_LSB</TD></TR><TR><TD>1</TD><TD>Temperature_MSB</TD></TR><TR><TD>2</TD><TD>Temp Alarm High / User Byte 1</TD></TR><TR><TD>3</TD><TD>Temp Alarm Low / User Byte 2</TD></TR><TR><TD>4</TD><TD>Reserved</TD></TR><TR><TD>5</TD><TD>Reserved</TD></TR><TR><TD>6</TD><TD>Count_Remain</TD></TR><TR><TD>7</TD><TD>Count_per_C</TD></TR><TR><TD>8</TD><TD>CRC</TD></TR></TBODY></TABLE>Temperature = Temp_read - 0.25 + ((Count_per_C - Count_Remain)/Count_per_C)

          Where Temp_read = The value from the temp_MSB and temp_LSB with the least significant bit removed (the 0.5C bit)



          11:37:16 | Port=<COM5> Address=910000000E0F9810 Family=DS1920 Temperature=13.93519
          11:37:17 | Port=<COM5> Address=4D000000080E4C10 Family=DS1920 Temperature=17.23571
          11:37:19 | Port=<COM5> Address=71000000080CA510 Family=DS1920 Temperature=57.95
          11:37:20 | Port=<COM5> Address=7A000000080E4D10 Family=DS1920 Temperature=14.5669
          11:37:22 | Port=<COM5> Address=37000000080DDB10 Family=DS1920 Temperature=13.84722
          11:37:23 | Port=<COM5> Address=82000000080B3B10 Family=DS1920 Temperature=14.29054
          11:37:24 | Port=<COM5> Address=F2000000080C9710 Family=DS1920 Temperature=16.07
          11:37:26 | Port=<COM5> Address=B2000000080EF710 Family=DS1920 Temperature=18.59932
          11:37:27 | Port=<COM5> Address=1A000000080F2F10 Family=DS1920 Temperature=15.43
          11:37:29 | Port=<COM5> Address=A000000013BD6228 Family=DS18B20 Temperature=85
          11:37:31 | Port=<COM5> Address=00000000231A9928 Family=DS18B20 Temperature=20.375
          11:37:32 | Port=<COM5> Address=BA00000022FBA328 Family=DS18B20 Temperature=17.75
          11:37:33 | Port=<COM5> Address=B40000002302EB28 Family=DS18B20 Temperature=18.8125
          11:37:35 | Port=<COM5> Address=A300000023173728 Family=DS18B20 Temperature=16.5
          11:37:35 | Port=<COM5> Address=C300000007343612 Family=DS2406 State=False State=False
          11:37:35 | Port=<COM5> Address=9D0000000737AE12 Family=DS2406 State=False State=False
          11:37:36 | Port=<COM5> Address=17000000072E0D12 Family=DS2406 State=True State=False
          11:37:36 | Port=<COM5> Address=43000000011FB312 Family=DS2406 State=False State=False
          11:37:37 | Port=<COM5> Address=8D00000007362F12 Family=DS2406 State=False State=False
          11:37:41 | Port=<COM5> Address=DC00000015255026 Family=DS2438 Temperature=22.59375 Humidity=53 Voltage= 4.57 2.24 0
          11:37:41 | Port=<COM5> Address=D40000018A673409 Family=DS1982
          11:37:41 | [Sent False to C300000007343612 on <COM5>]
          11:37:41 | [Sent False to 8D00000007362F12 on <COM5>]
          11:37:41 | [Sent False to 8D00000007362F12 on <COM5>]
          11:37:42 | [Sent False to 9D0000000737AE12 on <COM5>]
          11:37:42 | [Sent False to 9D0000000737AE12 on <COM5>]
          11:37:42 | [Sent False to 7C0000000730BB12 on ]
          11:37:42 | [Sent False to 7C0000000730BB12 on ]
          11:38:40 | Port=<COM5> Address=910000000E0F9810 Family=DS1920 Temperature=14
          11:38:41 | Port=<COM5> Address=4D000000080E4C10 Family=DS1920 Temperature=17
          11:38:42 | Port=<COM5> Address=71000000080CA510 Family=DS1920 Temperature=58
          11:38:43 | Port=<COM5> Address=7A000000080E4D10 Family=DS1920 Temperature=14.5
          11:38:44 | Port=<COM5> Address=37000000080DDB10 Family=DS1920 Temperature=14
          11:38:46 | Port=<COM5> Address=82000000080B3B10 Family=DS1920 Temperature=14.5

          Comment


            #6
            I'm aware of the scratchpad, but I use owapi to provide the interface between VB and the hardware and owapi does not provide a method to access these elements of the state array. I've gone directly to the adapter to push bits for the the 1-wire LCD text interface, but I prefer to keep it at the functional level rather than the bit level.

            I made an attempt to direclty access the byte array scratchpad elements returned by owapi, but I do not know if it will generate a run time error or if the owapi com interface maps into 8, 16, or 32 bit boundries for the 8 element array.

            Give the attached a try and see what happens. I'm on the road so I cannot try it myself right now.
            Attached Files

            Comment


              #7
              Hi Michael


              Thank you for your effects, it is not there yet. It may be better waiting till you get back home where you will have more resources at hand.

              <O

              Dean.<O</O

              Comment

              Working...
              X