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 and Restor
Moderator: Benj
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: I2C backup and Restor
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
The InternalAddress maths in main might need *64, not *63
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Re: I2C backup and Restor
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
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
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Re: I2C backup and Restor
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
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
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Re: I2C backup and Restor
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
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
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: I2C backup and Restor
No,
Ranges of 64 addresses starting at 0 are:
0-63
64-127
128-191
192-255
Ranges of 64 addresses starting at 0 are:
0-63
64-127
128-191
192-255
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis