Oh yeah, no Constants.
Then give it to him straight!
Have you tried clearing the LOC and Value variables at the beginning of each loop just in case? Start with a clean slate every time.
Code:
Main:
Loc=0
Value=0
High Led : Pause 500: Low Led : PAUSE 500
I2CWRITE SDA,SCL,$36,[LOC],Fail1
I2CREAD SDA,SCL,$37,[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
You're so close, I can smell it!
Or was that someone in the room?
Bookmarks