Don't forget, the timeout label OF I2CWRITE perform a GOTO not a GOSUB, maybe why you have odd results.... stack underflow.
What happen if you loop within the INIT section?
Code:
init:
pause 1000 'Hold here for a bit while things IPL......
LCDOUT $FE,1,"I'm alive!"
heart=1 'Turns off HEARTBEAT led
fault=1 'Turns off FAULT led
for i2c_addr=0 to 7
i2cwrite idata,iclock,$06,i2c_addr,[$00,$FF] 'Sets GP0.0-GP0.7 as OUTPUTS
pause 20
i2cwrite idata,iclock,$07,i2c_addr,[$FF,$00] 'Sets GP1.0-GP1.7 as INPUTS
pause 20
next
GOTO init
Bookmarks