I2C backup and Restor

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
User avatar
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:

I2C backup and Restor

Post 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 194 times

User avatar
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

Post 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

User avatar
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

Post by jollybv »

Hi Leigh

Thanks will give it a try

User avatar
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

Post 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

User avatar
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

Post by LeighM »

Hi,
0 to 63, is 64 locations

User avatar
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

Post 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

User avatar
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

Post 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

kersing
Valued Contributor
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

Post by kersing »

No,

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

User avatar
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

Post by jollybv »

Thanks this has helped me tremendously

Post Reply