Stor.Setdata Method (previously .Set)
|Top Previous Next|
The operation has completed successfully if the value returned by this method equaled the length of the datatoset string. If this is not the case then the write has (partially) failed and there may be two reasons for this: physical EEPROM failure or invalid startaddr (too close to the end of memory to save the entire string).
Notice that when the stor.setdata executes, an offset equal to the value of stor.base is added to the startaddr. For example, if the stor.base returns 9 and you do stor.setdata("ABC",1) then you will actually be reading the data starting from physical EEPROM location 9. If you set the stor.base to 1 you will be able to access the EEPROM right from the physical address 1.
By default, the stor.base is set in such a way as to allow access to the EEPROM starting from the address just above the special configuration area of your device — for details on what this area actually stores see your device's platform documentation (for example, EM1000's is here). By setting the stor.base to 1 you are allowing access to the special configuration area.