You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple to use I2C library for talking to any EEPROM. It uses the same template system found in the Arduino EEPROM library so you can use the same get() and put() functions.
8
+
A simple-to-use I2C library for talking to any EEPROM. It uses the same template system found in the Arduino EEPROM library so you can use the same get() and put() functions.
9
9
10
10
Various external EEPROMs have various interface specs (overall size, page size, write times, etc). This library works with all types and allows the various settings to be set at runtime. All read and write restrictions associated with pages are taken care of. You can access the external memory as if it was contiguous.
11
11
12
-
Best used with the Qwiic EEPROM: https://www.sparkfun.com/products/14764
12
+
Once the library has been started, the memory type needs to be set, the following is an example for the [Qwiic 24xx512 EEPROM](https://www.sparkfun.com/products/18355):
13
13
14
-
For a list of all the EEPROM datasheets, please see [this repo](https://github.com/sparkfun/SparkFun_External_EEPROM_Arduino_Library_Docs). We don't want to store the PDFs in the library repo, otherwise every user will have to download all the PDFs just to install the library.
14
+
myMem.setMemoryType(512);
15
+
16
+
Where *512* is the model (ie, 24LC**512**). Setting the memory type configures the memory size in bytes, the number of address bytes, and the page size in bytes. The following memory types are valid: 0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1025, 2048
For a list of all the EEPROM datasheets, please see [this repo](https://github.com/sparkfun/SparkFun_External_EEPROM_Arduino_Library_Docs). We don't want to store the PDFs in the library repo, otherwise, every user will have to download all the PDFs just to install the library.
33
+
34
+
Alternatively, the individual settings can be set. If setMemorySizeBytes/setAddressBytes/setPageSizeBytes() are called, they will overwrite any previous settings set by `setMemoryType()`.
35
+
36
+
myMem.setMemorySizeBytes(65536);
37
+
myMem.setAddressBytes(2); // Set address bytes and page size after MemorySizeBytes()
38
+
myMem.setPageSizeBytes(128);
39
+
40
+
Set the memory type, or set the memory settings, but not both.
41
+
42
+
This library is best used with the [Qwiic EEPROM](https://www.sparkfun.com/products/18355).
15
43
16
44
This library can be installed via the Arduino Library manager. Search for **SparkFun External EEPROM**.
0 commit comments