Programming Manual
PHYTEC Messtechnik GmbH 2008 L-720e_0
141
P
ro
g
ra
m
m
in
g
M
a
n
u
a
l
Using Internal EEPROM
The pciGrabber-4x4 has per decoder an internal non-volatile memory.
This memory is intended for the storage of parameters.
A total of 252 Bytes is available to the user.
Note:
Since the predecessor models to the pciGrabber-4x4 do not include
internal memory, the following functions are not compatible.
BYTE I2C_ReadEEProm (WORD nDevNo, BYTE bSubAddress,
BYTE *bByteRead)
bSubAddress: Memory address to be read (0x00 … 0xFB)
*bByteRead:
Pointer points to the Byte variable. The result
is written into the Byte variable.
return value:
error code = SUCCESS, NOACK
Reads a Byte value from the EEPROM. Specified by calling the
memory address that is to be read. The result is returned in a Byte
variable form that must be pre-defined.
The function returns an error code as a return value
(
see I²C_ReadByte
).
BYTE I2C_WriteEEProm (WORD nDevNo, BYTE bSubAddres,
BYTE bData)
bSubAddress: memory address written to (0x00…0xFB)
bData:
Data byte that is written
return value:
Error code = SUCCESS, NOACK, WRITE_FAILED
Writes a Byte into the internal EEPROM. Specifies the desired
memory address and the stored Byte to be written to.
The function returns an error code (
see
I2C_WriteByte)
.
Note:
The life span of the internal EEPROM memory is 1 million write
accesses. The number of read accesses is unlimited