'************************************************************************************** '* BalloonSat Easy Memory Erase Code * '* Erases data stored in EEPROM memory * '* while keeping the user informed about the progress * '* * '* Must set memory chip type: Max_Record * '************************************************************************************** symbol record=W0 'symbol Max_Record = 2047 ' Using 24LC32 'symbol Max_Record = 4095 ' Using 24LC65 symbol Max_Record = 8191 ' Using 24LC128 'symbol Max_Record = 16383 ' Using 24LC256 'symbol Max_Record = 32767 ' Using 24LC512 Erase_Memory: pause 3000 sertxd ("Start") ' begin erasing i2cslave %10100000,i2cfast,i2cword ' set memory speed to 400 kHz and one word records for Record = 0 to Max_Record step 2 ' until the number of data records writei2c Record,(0,0) ' write the letter X into each memory sertxd (#Record,CR) next sertxd ("Finished") ' finished erasing