Still getting the same with the following code:
Code:Value Var BYTE Addr Var byte Loc Var Byte '--------------------------------------------------------- Pause 500 DEBUG "Start......",13,10 Value=0 Loc=0 Main: High Led : Pause 500: Low Led : PAUSE 500 Addr=$36 I2CWRITE SDA,SCL,ADDR,[LOC],Fail1 Addr=$37 : pause 10 ' Sometimes it is failing, leaving pause 10 makes it better. I2CREAD SDA,SCL,ADDR,[VALUE] ,Fail2 PAUSE 25 DEBUG Value,13,10 PAUSE 250 DEBUG "Done....",13,10 WHILE 1 : WEND Goto Main Fail1: while 1: toggle portc.2 : pause 50 : wend goto main Fail2: WHILE 1 High Portc.2 : Pause 250 : Low PortC.2 : Pause 250 WEND




Bookmarks