In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Beau Schwabe wrote: JDOhio, The high resolution is in 1/16th Deg C units.... or 0.0625 that's the best resolution obtainable from the DS1620. Here is my revised "spin code" It basically follows the datasheet... [code] tc := ReadRegister(RdTmp,9) ' read temp in 0.5° C units if tc > 255 tc -= 512 tc >>= 1 'Strip LSB divide by 2 ' Scale 0.5° units to 1° units tc *= 100 ' Scale 1° units to 0.01° units tc -= 25 ' Offset adjustment for high resolution conversion cr := ReadRegister(RdCntr,9) ' read remaining counts cpd := ReadRegister(RdSlope,9) ' read counts per degree tc += ((cpd - cr)*100)/ cpd ' calculate high resolution temperature value Result := tc '' Note: In the New RevE DS1620 chips released (06/05/2003), the Slope register($A9) will always '' read a value of 16 so it would be unnecessary to read the slope. Simply hard code the '' 'cpd' value in the above code with a value of 16 instead. [/code] Note for the above code.... 'tc' returns a value in x100 notation ... in other words 25 Deg C returns 2500 ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=145582#m156731 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)