If this is your first visit, be sure to check out the FAQ. You must register before you can post. Your first post will be checked for appropriate content
(SPAM) - please allow a bit of time for that. After that, you'll be able to post at will!
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.
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)
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.
Comment