I'm confused here Tomas.
Theres some basic things wrong here from what I can gather.
Your create a 64 byte array called data1. But then you incorrectly address that array with the statement...
data1=ADRESL.
Why have you got a 64 byte array and then save ONE byte. isn't that kinda wasteful? Notwithstanding that, you should have addressed data1 in the correct form...
data1[x]=ADRESL
where x is the location (0-63) of the byte in the array in which to store the data.
Let's have a look at your GetAD subroutine. I think we've a heap of problems to address first before we get to saving and reading our EEPROM pages.




Bookmarks