non volatiles?
Jimmy W.
Posts: 112
Is there anyway to make a variable persist through a power reset?
I am going to be using 1-wire temp sensors coupled with 1 wire 8 output switches to control temperatures and after I go through on my LCD and associated them with each other I would like to not have to do it again if the power goes out, I guess hard-coding them is possible but I am trying to design something that can easily be changed by some dumb installer if a sensor goes bad.
Jimmy
I am going to be using 1-wire temp sensors coupled with 1 wire 8 output switches to control temperatures and after I go through on my LCD and associated them with each other I would like to not have to do it again if the power goes out, I guess hard-coding them is possible but I am trying to design something that can easily be changed by some dumb installer if a sensor goes bad.
Jimmy
Comments
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
EDIT:
As I am still waiting for my Prop to arrive is it possible to write this data towards the end of the eeprom to prevent it from being erased or does the prop write a complete image to the entire eeprom. If so, is it possible to the trim the end of the compiled file to prevent overwriting all of the eeprom as with the h8616 series chips?
Post Edited (Jimmy W.) : 12/25/2007 10:32:42 AM GMT
> complete image to the entire eeprom.
AFAIK, it is overwritten when you download a new programm.
The easiest way is to have a bigger EEPROM.
With lots of fiddling in the EEPROM, you should be able to find the addresses of your variables and make them non-volatile (until you load a new software-version and have to find the new loacation).
Here: <http://forums.parallax.com/forums/default.aspx?f=25&m=237019>
Or search for "EEPROM"
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
Oh, great.
My answer again was too short to be helpful.
What I meant is the following construct:
Now if you find the address in EEPROM of "someConstant"*) and overwrite it with a new value you do have something configurabe with (maybe) usefull default-values.
Not verified wether that works!
*)
And for sure not a var. You'll never find that in EEPROM!
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
Post Edited (Nick Mueller) : 12/25/2007 11:44:04 AM GMT
However.. I just read through eeprom version 0.6 ... I do not like the that FromRAM writes a complete page (upto 64 bytes). But maybe this has already been fixed in the meantime. Otherwise fix line 49 yourself..
will eeprom.varRestore cause a problem if it hasnt stored a var yet? 1st upload?
if·I needed to store several variables through power loss would it be better to just implement 1 function to restore them all or to serialize all of the arrays into 1 big heap then reloading them and de serializing?
EDIT: too early to spell correctly I guess [noparse]:)[/noparse]
This is a more intelligent question In fact we did not tell you that each writing to an EEPROM involves a small risk when power breaks. Internal pages (=64 bytes) can get corrupted, or data spanning some pages can get inconsistent.
Reducing the number of updates will reduces the probability of failures.
A professional program would put all parameters together in some compact block, add a CRC, write this block alternately onto two different places, check the CRC when loading, and re-load again from the alternative place in case of defects..
Offerings are Serial Two Wire, Serial SPI, and Parallel High Speed.
The prices are amazing - I don't know why we don't ditch EEPROMS altogether.
Just my two cents...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
What are their prices... For a 24C256 I pay 1€ (+VAT) in Europe.
It seems they are stil the only providers for FRAM!? This is generally bad... It means:
- no safety line
- over-prized
- possibly technology flop
I'll get more references. The Ramtron Mouser page is http://www.mouser.com/catalog/632/220.pdf
I'm excited because these are drop-in replacements for high-speed static RAMs. And no tricky timing.
Again, food for thought...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
I'll give the forum a full report.
Well, now I'm committed...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
There are some differences in the I2C protocol with the lower capacity types, but it seems that from 24C128 on it will be compatible. To check it as a replacement for the Propeller EEPROM it must be AT LEAST 24C256.
But I just see, they do not seem to have a 3.3V type of that capacity.
The parallel chip is the most expensive, though....
877-FM18L08-70-PG FM18L08-70-PG PDIP-28 256K 32K x 8 70ns -40 to +85 3.0v - 3.6v $9.97
The serial parts have similar specs, but slower access, being serial in nature.
I want to order two sets, as I have had multiple strokes this year and my fine motor control sucks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
I forgot all about it(They had too), until 2 weeks ago when they called and left a message on my answering machine asking me if I still wanted them.
@Quantum:
- 3.3V: I was referring to the I2C version
- Speed: I2C is limited to 1MHz, I think this is a matter of protocol; SPI should not be handicapped so much
@Quantum: Good luck and keep us posted. If it works for prop eeprom replacement, I'll be placeing an order next
frankly my interest was in the SPI and Parallel versions anyway, but that doesn't allow me to weasel out of my blanket statement.
I truly apologize and let my time spent in the Iron Maiden be a lesson to me.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
Jimmy
I think I will not do that
When there is a direct replacement available (a 3.3V 24256) I shall certainly try this, but not "test" it.
You need not be afraid that you harm the EEPROM. Maybe I have been a little bit unclear about that. It is just that SOMETIMES data cannot be safely written to it, in case of power problems. The probability for such issues is low, and can most like be further decreased by adding a good (ceramic) cap close to the EEPROMs supply pins (220nF or up, not quite cheap...).
Writing once per 10 minutes is not much. I should not care too much, but double buffering your date - as I described - will further stabilize your system.
I post them here....
This is why you should keep all data to be updated together, example (just hacked in, most likely two typos and one logic error in it
Post Edited (deSilva) : 12/26/2007 5:36:12 PM GMT
Post Edited (Fred Hawkins) : 12/26/2007 4:40:35 PM GMT