another problem i have: After writing data into the EEPROM-space of the st7lite29, the chip sometimes looses parts of this data. When i repower the circuit a few times, after aprox. 5 times a part of 3 bytes are set FF. Thes 3 bytes are written quite often in the software. Is it possible that the data disapears when the power is interrupted in while the ST7 is writing its EEPROM? Thanks, Johan
Maybe it is a better sollution to do not use the EEPROM at all, and only use the RAM. Because writing to the EEPROM every millisecond isn't a good idea at all! I'm planning to hold the data in the RAM after the power is disconnected by putting the ST7 into haltmode and use a battery for its supply. Ony input pin is used to sense the supply voltage and put the ST7 into haltmode after the voltage drops. A RC-network resets the ST7 after power is back and puts it into RUN-mode again. Is this a good idea???[ This message was edited by: joble on 05-06-2003 09:26 ]
When you say EEPROM, do you speak about the Flash (EEPROM technology) ot about the data EEPROM??
Anyway in both case, if data are written in the correct way, a switch-off of the power supply has no effect on the data retention for sure! Are you sure not to overwrite these 3 bytes (always the same ones I suppose?) in your software?
I mean the data EEPROM. The way i'm working is totaly wrong, but i do not know what is the good way... What i need is: * 3 variables can be changed at any time (by 6 pushbuttons + and -) * The data must remain in memory during an interruption of the supply. I solved it by writing it into EEPROM every time the pushbuttons are polled. (a few times per millisecond) This is no good idea, and data seem to be lost (turned into 0xFF) sometimes. Maybe it is better to write the EEPROM only when the voltage drops. (in an AVD interrupt). Is there enough time to do this? Has anyone a better idea???
I tried the last sollution(writing the data while supply voltage drops), and it works... but: I have to place a 2200µF elco over the supply pins to ensure the voltage drops slow enough. When i don't do this nothing is written into EEPROM. With smaller elco's the data isn't allways correct. Is it normal i should use such a big capacitor???[ This message was edited by: joble on 05-06-2003 16:37 ]
The time you will have to perform actions in your AVD interrupt routine depends on the Vdd falling, but to write some bytes in EEPROM data, it should be enough! No need to add such big capacitors....Try to extract the software corresponding to this part and post it in this forum, people will be able to have a look on it and to help you.
I am using Lite29 and I do not have any problem with EEPROM but I remind you that datasheet specificies a typical programming time of 5ms so you will not be able to write data several time per ms. I guess you are corrupting the operation by doing this. If you follow the flowchart (fig. 7, p16/130) in the datasheet, it will work.