Quick question reguarding the eeprom write / read
grasshopper
Posts: 438
I noticed that the BS2 Object contains 3 types of write / reads. Could someone clarify the differences that each one offers.
From what I see Write just starts storing data from the top. Is this so that one wont over write the stack?
The other 2 methods I am not clear on. Currently I am using the Write_HighMem and it seems to work. I just want to learn more.
Write(Addr,Value, size) Write to EEPROM in code space, from top (32767) to bottom (0) where 0 = top of memory Write_HighMem(Addr,Value, size) Write to upper 32K of 64K EEPROM Write_HighMem(0,myVal,2) ' write byte variable myVal to upper 32K lowest address Write_CodeMem(Addr,Value, size) Write to direct code memory Useful in having a variable survive a reset
From what I see Write just starts storing data from the top. Is this so that one wont over write the stack?
The other 2 methods I am not clear on. Currently I am using the Write_HighMem and it seems to work. I just want to learn more.
Comments
The stack only exists in the hub ram, not in the EEPROM, so the area in the EEPROM beyond the end of the program is not really used although it's cleared to zero when a new program is downloaded (to the end of the 1st 32K if the EEPROM is larger than 32K).