Maybe you could use another EEPROM location as a Flag, so that it only runs once.
P.S. You might need a Big pause at the beginning, to allow time to remove the power after programming.Code:READ 127,temp IF (temp <> 1) then I2CWRITE I2CDAT, I2CLCK,addr,[fmwrt1,fmwrt2,fmwrt3,fmwrt4,fmwrt5], NOGO Pause 200 I2CREAD I2CDAT, I2CLCK,addr,[fmred1,fmred2,fmred3,fmred4], NOGO WRITE 0,fmred1 WRITE 1,fmred2 WRITE 2,fmred3 WRITE 3,fmred4 temp = 1 WRITE 127, temp ENDIF
Bookmarks