Library for interfacing NXP 24xx01x 1K I2C Serial EEPROM
This library supports up to four 24xx01x, each having to be connected to its own I2C interface.
The Microchip Technology Inc. 24xx01x is a 1 Kbit Electrically Erasable PROM. The device is organized as one block of 128 x 8-bit memory with a 2-wire serial interface. -) I2C interface with communication speed up to 1 MHz -) Page write time: maximum 5 ms -) 8-Byte internal page write buffer
Function for transferring a device handle of an specific EEPR24xx01x from the application to the library
Function for transferring a device handle of an specific EEPR24xx01x from the library to the application
typical I2C clock speed to be used
Available I2C address
The maximum page write cycle time of the EEPR24xx01x
The possible EEPR24xx01x handle states
Initializes communication with the EEPR24xx01x and prepares the EEPR24xx01x for use
First copies the I2C port, I2C address and the write slot number to the transferred empty device handle. Afterwards the EEPR24xx01x word address is set to zero.
Read a single byte from the EEPR24xx01x
First perfoms several checks to ensure that the provided address and state of the library are valid. Afterwards reads a single byte from the provided address and returns the read data.
Read a specific number of bytes from the EEPR24xx01x
First perfoms several checks to ensure that the provided address, length and state of the library are valid. Afterwards reads out the number of bytes specified into the user provided buffer, starting at the specified address.
Write a single byte to the EEPR24xx01x
First perfoms several checks to ensure that the provided address, value and state of the library are valid. Afterwards writes a single byte to the provided address.
Write a specific number of bytes to the EEPR24xx01x
First perfoms several checks to ensure that the provided address, length and state of the library are valid. Afterwards updates the state of the handle to EEPR24xx01x_STATE_BUSY, copies the provided data into an handle specific buffer and sets the necessary variables in the handle for the write process and initiates this process.
Returns the current state of a specific EEPR24xx01x
absolute maximum I2C clock speed for a specific EEPR24FC01
I2C clock speed for the EEPR24AA01 below 2.5V
Available "Write Slots". The combination of a 24xx01x and the associated I2C interface is referred to as "Write Slot". Each "Write Slot" requires its own EEPR24xx01x device handle.
Performs raw I2C read/write communication with a specific EEPR24xx01x.
Resets the state of a specific handle to EEPR24xx01x_STATE_READY. The internal write offsets, address and data length are also reset to zero.