In SX Microcontrollers, SX/B Compiler and SX-Key Tool, johncouture wrote: Ok, fair enough. I do have a couple of questions about how to convert code from BS2P to SX/B that I hope the forum can help me with. For those that want to follow along, some background. 1-Wire Weather Station In Feb 2002 Jon Williams wrote an article "[url=http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv82.pdf]Weather on the Wire" [/url]on how to read the 1 wire data from an [url=http://www.aagelectronica.com/]AAG Weather Station [/url]. These nifty devices are about $80 and contain an anenometer along with wind direction and temperature sensors. The article referenced an Apr 2001 article entitled "[url=http://www.parallax.com/dl/docs/cols/nv/vol2/col/nv72.pdf]Searching the 1-Wire Bus[/url]" that showed how to search the 1-Wire network for all available nodes. That article was written for the BS2P. Updating to today's world For those of you that missed it, the Jan 2006 issue of Nuts & Volts has a great article by Jon Williams on generic input/output routines using SX/B (i.e. TX_OUT, RX_BYTE, etc). As you may have guessed by now, I got one of those weather stations for Christmas and am trying to get it working (I REALLY don't want to have to buy an BS2P when I have a drawerful of SX chips). Ok, down to business. The entire listing is attached for those interested. I updated the BS2P 1-Wire search code to the best of my ability. Some of the techniques in the BS2P code are foreign to me. Thus: '==================================== Question #1: Under the SearchDone: label it has: FOR offset = 0 TO 7 WRITE (addr + offset),tempROM(offset) ' write serial number to caller NEXT '===================================== SX/B does not have a WRITE command nor does it allow compound statements. Presumably this is supposed to update a memory location with a value. I was thinking something like: FOR offset = 0 to 7 temp4 = @addr + offset @temp4 = tempROM(offset) NEXT but the compiler didn't like that. How do you update a location in memory using an offset? ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=102897#m103208 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)