EEWRITE - Write to EEPROM

Language reference ›› Built-in procedures ›› EE memory write ››
Parent Previous Next

EEWRITE procedure

eewrite-procedure = EEWRITE "(" address-expression "," expression { "," size } ")" .
size = BYTE | CHAR | SHORTINT | WORD | INTEGER | LONGWORD | LONGINT | size-expression .

Write an integer value to the EEPROM memory at a direct address; it uses standard EEPROM processor  registers.


<size>:

Optional parameter which specifies the write length (number of bytes); in that case <expression> is truncated or expanded to match the specified size.


If <address-expression> or <expression> evaluates to a width greater than the specified size (defaults to BYTE), a truncation occurs and a warning is produced.


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


<size-expression>:

May be used to specify the size with a constant expression returning the value 1, 2 or 4; in that case <expression> is truncated or expanded to match the specified size.