EEREAD - Read EEPROM

Language reference ›› Built-in functions ›› EE memory read ››
Parent Previous Next

eeread-function = EEREAD "(" address-expression [ "," size ] ")" .
size = BYTE | CHAR | SHORTINT | WORD | INTEGER | LONGWORD | LONGINT | size-expression .


Returns an EEPROM integer value from a direct address; it uses the standard EEPROM processor registers.


If the processor's EEPROM size is less or equal to 256 and if <address-expression> evaluates to a width greater than BYTE, a truncation occurs and a warning is produced.


If <address-expression> evaluates to a constant, a bounds check is made regarding to the real processor's EEPROM size.


The optional <size> parameter specifies the read length (number of bytes); in this case the returned value is in the specified size.

<size> may be also a constant expression returning the value 1, 2 or 4; in that case, according to this size, the returned value is BYTE, WORD or LONGWORD.