383
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
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
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 "Platform-dependent
Programming Information" topic inside your platform specifications section). By
setting the stor.base to 1 you are allowing access to the special configuration area.
With Tibbo Basic release
V2
, this method had to be renamed from .set
to .setdata. This is because the period (".") separating "stor" from
"setdata" is now a "true" part of the language, i.e. it is recognized as a
syntax unit, not just part of identifier. Hence, Tibbo Basic sees "stor"
and "set" as separate entities and "set" is a reserved word that can't be
used.
8.3.8.4
.Size R/O Property
Function:
Returns total EEPROM memory capacity (in bytes) for the
current device.
Type:
Word
Value Range:
Platform-dependent
See Also:
Details
Certain amount of EEPROM memory is occupied by the special configuration
section (for details see "Platform-dependent Programming Information" topic inside
your platform specifications section).
By default, special configuration area is not accessible to the application and is
excluded from memory capacity reported by the stor.size. For example, if the
EEPROM IC used by this platform has 2048 bytes of data, and the size of the
special configuration memory is 8 bytes, then the stor.size will return 2040 by
default. At the same time, the default value of
property will be 9,
which means that the EEPROM locations 1-8 are occupied by the special
configuration area.
If you set the stor.base to 1 (for instance, to edit the MAC address), the stor.size
will show the capacity of 2048. In other words, the number this property returns is
actual_EEPROM_capacity-stor.base+1.
381
380
381