In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote: in do_I2C_W: you have sb I2CM_lost_arb ; if arbitration was lost then wait a while and try again jmp @:Ive_lost_arb ;IF I COMMENT OUT THIS LINE AND THE LINE BEFORE IT (IN THE READ AND WRITE PARTS OF THE ;PROGRAM, IT READS AND WRITES JUST FINE, IF NOT, I MUST PHYSICALLY DISCONNECT THE ;PULL UP RESISTOR ON THE SDA LINE AND RECONNECT IT FOR THE PROGRAM TO WORK. Arbitration is lost if I2CM_lost_arb is set, so it should be: snb I2CM_lost_arb ; if arbitration was lost then wait a while and try again jmp @:Ive_lost_arb ;(jump if I2CM_arb_lost set) IF I COMMENT OUT THIS LINE AND THE LINE BEFORE IT (IN THE READ AND WRITE PARTS OF THE ;PROGRAM, IT READS AND WRITES JUST FINE, IF NOT, I MUST PHYSICALLY DISCONNECT THE ;PULL UP RESISTOR ON THE SDA LINE AND RECONNECT IT FOR THE PROGRAM TO WORK. regards peter ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=85672#m86658 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)