'Demonstrates the Data, Read, and Write commands 'Our Data commands. You can devide up the data to make it more readable. 'Day 1-4 Data @0, 12,26,3,32 'Day 5-8 Data @4,22,12,31,45 'Define some variable to use for loading the eeprom data day1 var byte day2 var byte day3 var byte day4 var byte day5 var byte day6 var byte day7 var byte day8 var byte clear 'Make sure we clear the variables '----------------------------------------------------------- ' Step 1 ' Lets load the eeprom data '----------------------------------------------------------- read 0,day1 read 1,day2 read 2,day3 read 3,day4 read 4,day5 read 5,day6 read 6,day7 read 7,day8 'Display the default data debug ["Day1 default=",dec day1,10,13] debug ["Day2 default=",dec day2,10,13] debug ["Day3 default=",dec day3,10,13] debug ["Day4 default=",dec day4,10,13] debug ["Day5 default=",dec day5,10,13] debug ["Day6 default=",dec day6,10,13] debug ["Day7 default=",dec day7,10,13] debug ["Day8 default=",dec day8,10,13] debug [10,13] '-------------------------------------------------------------- ' Step 2 ' Ok now lets overwrite day3 and day8 defaults. ' Remember the address is 0 based '-------------------------------------------------------------- write 2,day3+1 'Add one write 7,day8+2 'Add two '-------------------------------------------------------------- ' Step 3 ' Lets load the eeprom data again '-------------------------------------------------------------- read 0,day1 read 1,day2 read 2,day3 read 3,day4 read 4,day5 read 5,day6 read 6,day7 read 7,day8 'And display it one more time debug ["Day1 default=",dec day1,10,13] debug ["Day2 default=",dec day2,10,13] debug ["Day3 default=",dec day3,10,13] debug ["Day4 default=",dec day4,10,13] debug ["Day5 default=",dec day5,10,13] debug ["Day6 default=",dec day6,10,13] debug ["Day7 default=",dec day7,10,13] debug ["Day8 default=",dec day8,10,13] '------------------------------------------------------------ ' All done. Put the ATOM to sleep. Note the values and ' restart the chip. end