Are there a limit to to read/write operations to a pic16f84... in other words, can I read/write to Eeprom say 4 times per second to "save" the status of my pic actions in case of a power failure so that the pic can left of where it stoped? Will the lifetime of the pic be reduced?
For example if I have a action that was switched on at 10H00 and must switch of at 10H30. Say there are a power failure from 10H05 to 10H06. I want the pic - after reset - to switch the action back on if the stop time was not reached. If there was no flag saved in Eeprom that tells the pic to start the action again the action will be ignored untill the following start time.
I ass-u-me that a write to Eeprom at the instant when the power fails can give unexpected results. How can one get around this? (without the use of a UPS or backup power)
Hi Francois
Without looking at the data sheets, I couldn't give you a precise figure,
but there is a limit to the number of times that you can write to the EEPROM
without errors and at 4 x per second, that would not take long.
I'm sure you would be better off using a battery, back-up, and has the
advantage of keeping a track of the time.
Also a write to EEPROM has a time penalty, and may possibly use up a lot of
your processing time, leaving little room for other things.
Have a look through the components catalogues for suitable devices, and data
sheets and application notes are fairly plentiful.
>>
Are there a limit to to read/write operations to a pic16f84... in other
words, can I read/write to Eeprom say 4 times per second to "save" the
status of my pic actions in case of a power failure so that the pic can left
of where it stoped? Will the lifetime of the pic be reduced?
<<
Yes. The lifetime of the EEPROM is specified by the number of write cycles.
For example, if the EEPROM is rated at 1,000,000 writes and you do 4 every
second, then the EEPROM could fail in less then 3 days.
If you need this kind of feature, you could try an external battery backed
CMOS static RAM, or arrange for the PIC itself to be battery backed and
asleep when the unit is "off".
*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, olinKILLspamembedinc.com,http://www.embedinc.com
>>>
>Are there a limit to to read/write operations to a pic16f84... in other
>words, can I read/write to Eeprom say 4 times per second to "save" the
>status of my pic actions in case of a power failure so that the pic can left
>of where it stoped? Will the lifetime of the pic be reduced?
><<
>
>Yes. The lifetime of the EEPROM is specified by the number of write cycles.
>For example, if the EEPROM is rated at 1,000,000 writes and you do 4 every
>second, then the EEPROM could fail in less then 3 days.
>
>If you need this kind of feature, you could try an external battery backed
>CMOS static RAM, or arrange for the PIC itself to be battery backed and
>asleep when the unit is "off".
..or use a power-fail detect circuit to do a save-on-powerdown. You
don't need a very big capacitor to run the PIC for long enough to
ensure a safe eeprom write.
-- http://www.piclist.com hint: To leave the PICList piclist-unsubscribe-requestspam_OUTmitvma.mit.edu
Which compiler? CCS comes with a driver for it in the drivers
directory...
Dale
--
"Curiosity is the very basis of education and if you tell me that
curiosity killed the cat, I say only the cat died nobly."
- Arnold Edinborough