In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Dunnsept wrote: OK, finally getting around to posting this. I got my DS2760 kits from parallax, spent quite a bit of time trying to reproduce the example BS2 code in SX/B and I'm not having any luck at all. The chip returns a 12bit value for the t/c at 15.625 uV per.. that much I've got. I'm embarrassed to post my code because it's so fubar at this point, but the important bits would be as follows (tempin = RB.0) : [code] owreset tempin,temp1 owwrbyte tempin,skipnet owwrbyte tempin,rdreg owwrbyte tempin,$0E owrdbyte tempin, tCuVB1 owrdbyte tempin, tcuvb [/code] the reset command returns a 2 so I've got a good connection to the ds2760. But I'm getting odd values returned. tcuvb1 is coming back as 0 while tcuvb is coming in as 152. I know that I need to shift right 3 to align correctly, but in just using a K type table it is putting the recorded temp in the 9 degree C range (shift 3 = 19, * 15.625 = 296 = just under 8 degrees).. In reading up on the pbasic versions of the one wire stuff, it says that the functions automatically generate a reset command. Do I need to make a call to reset more often? If I put a reset in there before the readbyte command I get tcuvb1 = 255. now to confuse things worse, if I do a readreg on $18 for the chip temperature, I'm getting something around 22C which should be about right for my office. I dont know if it's because I'm screwing things up trying to read the word back or if it's because of resets or something else. The rest of the code is just plain straight template and I'm using watch in the debugger to see what values are returned. any pointers? tips? I'm not looking for anybody to just write code for me but I sure would like it if someone could point me in the right direction ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=127447 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)