Page 1 of 1

I2C backup and Restor

Posted: Fri Feb 16, 2018 8:37 am
by jollybv
Hi Guys

I have written a little program to do a backup and restore of an 24LC256 eeprom but i can't seem to get it to work not sure if my addressing is right but according to the dater sheet it seems right. The one address is 0xa0 (1010 0000)and on the board i have A0 A1 A2 all tied to ground on the other eeprom board the address is 0xa8 1010 1000 on that board I have A0, A1 tied to ground and A2 tied to vcc but when I test the program it does no back up. Bothe chips are paralleled up with 10K resistor pulled to Vcc.

Am i doing this right or have i missed something
I2C_Backup_Restore.fcfx
(36.63 KiB) Downloaded 202 times

Re: I2C backup and Restor

Posted: Mon Feb 19, 2018 10:49 am
by LeighM
I would suggest that you first try writing a single fixed value to each eeprom and then read them back and display, just to check the write and read functionality is working.
The InternalAddress maths in main might need *64, not *63

Re: I2C backup and Restor

Posted: Mon Feb 19, 2018 2:40 pm
by jollybv
Hi Leigh

Thanks will give it a try

Re: I2C backup and Restor

Posted: Mon Aug 13, 2018 3:26 pm
by jollybv
Hi Guys

I'm a bit confused with the internal addressing. If the eeprom address starts at 0 and the eeprom can do a 64 byte page read / write then 0 to 64 is 63 or am i missing missing something? or should me next address start address be 65

Re: I2C backup and Restor

Posted: Mon Aug 13, 2018 3:47 pm
by LeighM
Hi,
0 to 63, is 64 locations

Re: I2C backup and Restor

Posted: Fri Aug 31, 2018 3:50 pm
by jollybv
Hi leigh

Am i correct in saying the start address of the next page will be as follows

start end
0 - 63
64 - 128
129- 192
193 - 256

and so on

Re: I2C backup and Restor

Posted: Fri Aug 31, 2018 3:53 pm
by jollybv
Hi leigh

Am i correct in saying the start & end address of the next page will be as follows

start - end
0 - 63
64 - 128
129- 192
193 - 256

and so on

Re: I2C backup and Restor

Posted: Fri Aug 31, 2018 5:16 pm
by kersing
No,

Ranges of 64 addresses starting at 0 are:
0-63
64-127
128-191
192-255

Re: I2C backup and Restor

Posted: Sat Sep 01, 2018 6:06 am
by jollybv
Thanks this has helped me tremendously