write / read arrays to eeprom Kategorie: Programmierung (von Peter - 6.10.2002 3:35) | |
| |
Hallo, I have a problem with writing arrays to the 24c65. I have: -eeprom 24c65. -eeprom.c2 enabled in sys. modules. -i2c enabled in sys.modules. -studied "syntax" and tried beispiele from eeprom.zip My target is to store an int array of 25 ellements into eeprom and read values from elements when starting the program. I wouls like to use eeprom.c2 instead of accessing the functions in i2c module for read/writes. For int, byte and string it is working......just not for arrays. Here is partial code as a test I used, it is based on examples in "syntax.txt" int array[2]; array[0]=0xA20D; array[1]=4284; y=0; //EEProm-Adresse z=16; //Speicher-Adresse eeprom.writeintarray(y,z,array,2); sleep 1000; array[1] = 777; y=0; //EEProm-Adresse z=16; //Speicher-Adresse eeprom.readintarray(y,z,array,2); x = array[1]; if I later on display "x" on the lcd it is either x = 777 or 0 but NEVER 4284 what am I doing wrong? Groeten uit Nederland Peter | |
Antwort schreiben Antworten: Re: write / read arrays to eeprom (von André H. - 8.10.2002 12:36) Jawohl, it works!!!! (von Peter - 8.10.2002 17:30) |