In SX Microcontrollers, SX/B Compiler and SX-Key Tool, johncouture wrote: Jon, I'm stuck. I'm not having any luck with porting your program so I figured I try and reduce a SearchROM routine to something where I can at least get something from the AAG WS. So far I'm only getting zeroes, even right after the RESET which implies a short. AAG WS is connected to GND and to RB.2 (DQ constant). The DS2450 does show +5 for the HIGH DQ command (one second) and ground on the AAG WS seems to be good. Main: tris_b=%00000000 ' Set pin direction 0=Output, 1=input HIGH DQ ' Charge the AAG capacitor (DQ is RB.2) wait_ms 250,4 ' for one second MyCount = 0 ' Initialize all my counters Result = 0 ROMidx = 0 NextBit = 0 Main2: LCDPos 20 ' using 4x20 LCD, position cur at beg of line 2 TX_Out " " ' clear the line with spaces LCDPos 20 ' position again at beginning of line TX_HEX2 MyCount ' display # of tries TX_Out "-" ' display a dash OWRESET DQ,Result ' Reset bus and read result Result = Result + $30 ' Convert Result into ASCII TX_OUT Result ' Display Result on LCD OWWRByte DQ,SearchROM ' Now send command to search Result = 0 ' Clear ReadBit: OWRDBit DQ,Result.1 ' Read a bit OWRDBit DQ,Result.0 ' Read another bit Result = Result + $30 ' Convert Result into ASCII TX_Out Result ' Display Result on LCD Result = 0 ' Clear Result for next read WriteNextBit: inc ROMidx ' increment the bit position I'm using OWWRBit DQ,NextBit.0 ' write a zero (eventually this will flip-flop) if ROMidx < 64 then ReadBit ' later this will be changed to 64 bits PackupAndStartAgain: wait_ms 250,10 ' wait about 2.5 seconds ROMidx = 0 ' try again inc MyCount goto Main2 ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=102897#m105302 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)