here i am doing some project with the help of Arduino UNO with External EEPROM (24LC256), All i want to create table and wants to store all data into 24LC256 External EEPROM,there are many library for internal EEPROM to create table with limited data as per size of arduino EEPROM but i have huge data to store so have to use External eeprom to do, so i can't find any proper library for doing that.!
can anyone tell me how to do that...
any suggestion..Please help me..
thanking you..
-
I don't quite understand the question. Are you looking for an Arduino library to use (read from and/or write to) the 24LC256?Mark Smith– Mark Smith2017年01月06日 21:07:18 +00:00Commented Jan 6, 2017 at 21:07
-
Creating tables is a database thing. What are you actually trying to do?Majenko– Majenko2017年01月06日 22:47:12 +00:00Commented Jan 6, 2017 at 22:47
1 Answer 1
Simplest way to create a table is to view it as a vector of struct's. For performance it is good to make the struct size a multiple of the EEPROM page size.
struct row_t {
... column fields ...
};
uint32_t row_addr = TABLE_START_ADDR;
row_t data;
data.column = value;
...
eeprom.write(row_addr, &data, sizeof(data));
row_addr += sizeof(row_t);
...
Basically you need to map a two/multiple dimensional table onto a one dimensional address space (of the EEPROM). The programming language can help with some of the calculations (and hide them).
Cheers!
-
Exactly i want to know what's library do i have to used and how...?Stenzin lobsang– Stenzin lobsang2017年01月07日 09:42:52 +00:00Commented Jan 7, 2017 at 9:42
-
Did you do a web-search or check the arduino playground? You could for instance start here; playground.arduino.cc/Main/LibraryForI2CEEPROMMikael Patel– Mikael Patel2017年01月08日 12:55:24 +00:00Commented Jan 8, 2017 at 12:55