CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 eepromAddress = $7000 ' Start address to w/r EEPROM BootPin = 28 ' I2C Boot EEPROM SCL Pin EEPROM = $A0 ' I2C EEPROM Device Address OBJ i2c : "Basic_I2C_Driver" tv : "TV_Text" PUB Start | i tv.start(12) writeIt repeat i from 0 to 15 tv.dec(cloudy_img[ i ]) tv.str(string(13, 13)) waitcnt (80_000_000 + cnt) readIt repeat i from 0 to 15 tv.dec(cloudy_img[ i ]) PRI writeIt | startTime if i2c.WritePage(i2c#BootPin, i2c#EEPROM, eepromAddress, @cloudy_img, 32) abort ' an error occured during the write startTime := cnt ' prepare to check for a timeout repeat while i2c.WriteWait(i2c#BootPin, i2c#EEPROM, eepromAddress) if cnt - startTime > clkfreq / 10 abort ' waited more than a 1/10 second for the write to finish PRI readIt if i2c.ReadPage(i2c#BootPin, i2c#EEPROM, eepromAddress, @cloudy_img, 32) abort ' an error occurred during the read DAT cloudy_img word byte 4,32,0,0 word %%00000000, %%00000000, %%00000000, %%00000000 word %%00000000, %%00000000, %%00000000, %%00000000