Okay let's fix that first.Checked it. It fails on the first write statement.
Put brackets around the Loc as shown in the PBP manual to see if that helps.
Code:Main: High Led : Pause 500: Low Led : PAUSE 500 Addr=$36 I2CWRITE SDA,SCL,ADDR,[LOC],Fail ' Test here first Addr=$37 ': pause 10 ' OR If SDA=1 then main I2CREAD SDA,SCL,ADDR,[LOC,VALUE] ',Fail PAUSE 25 DEBUG HEX Value,13,10 PAUSE 250 DEBUG "Done....",13,10 WHILE 1 : WEND Goto Main Fail: toggle portc.2 goto main
Bookmarks