![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
ckrusen
Joined: 09 Feb 2009 Posts: 12
|
EEPROM Erased when clearing an EEPROM cell bit? |
Posted: Tue Apr 28, 2009 12:12 pm |
|
|
The data sheet for the 16F688 states,"A byte write automatically erases the location and writes the new data (erase before write)."
When most EEPROMs are erased, the memory is set to 0xFF. Writing to the EEPROM clears the required bits. If you wanted to change an EEPROM byte from 0x7F to 0x77, you wouldn't need to "erase" the byte, just clear bit 3 of the eeprom cell.
Is a complete erase done even when the write only requires clearing set bits in the eeprom? _________________ Calvin |
|
![](templates/subSilver/images/spacer.gif) |
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Tue Apr 28, 2009 12:18 pm |
|
|
for the data sheet I'm looking at.. 18F4620
It shows a similar statement to your quote.
and a little above that it shows.
Quote: | The data EEPROM allows byte read and write |
so the answer is no. Now perhaps there is no degradation of
eeprom cells in a bits that don't change,.. but that's a different question. |
|
![](templates/subSilver/images/spacer.gif) |
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Tue Apr 28, 2009 3:08 pm |
|
|
Quote: | Is a complete erase done even when the write only requires clearing set bits in the eeprom? |
How do I know, that the light is out, when the refrigerator door is closed? You can't know, the same with the said EEPROM erase action, cause there is no separate erase command. |
|
![](templates/subSilver/images/spacer.gif) |
ckrusen
Joined: 09 Feb 2009 Posts: 12
|
|
Posted: Tue Apr 28, 2009 3:43 pm |
|
|
FvM wrote: | Quote: | Is a complete erase done even when the write only requires clearing set bits in the eeprom? |
How do I know, that the light is out, when the refrigerator door is closed? You can't know, the same with the said EEPROM erase action, cause there is no separate erase command. |
I didn't know if the micro tried to optimze the EEPROM write cycle.
After all, if I wanted to erase a small section of a blackboard, I wouldn't run an eraser over an entire blackboard, then rewrite the stuff I didn't want to erase. _________________ Calvin |
|
![](templates/subSilver/images/spacer.gif) |
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Tue Apr 28, 2009 11:37 pm |
|
|
From a user perspective, your question won't get you anywhere, cause the erase action is hardwired to the write command. There is nothing you can influence.
I understand, that you want to know, what the device is actually doing, when you e.g. update a cell from 0x7f to 0x3f. As previously mentioned, it's difficult to know exactly (unless reverse engineering the chip). I expect a solution, that involves a minimum gate count, not optimizing anything without a serious need.
In other words, most likely the erase is always performed without considering the actual data. Besides achieving a lean design, there are probably additional technical reasons to do so, in a short assuring reliable operation in any case.
When looking at memory with separate accessable erase and program action, the question gets interesting - and also complicated. You'll find e.g. specifications, that allow not more than two consecutive program cycles of a byte cell after an erase, because not programming a bit apparently affects the memory somehow. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Wed Apr 29, 2009 2:49 am |
|
|
If you look at latter chips like the PIC24's, these have a 'PGMONLY' bit that can be set, to perform a write without automatic erase. On the PIC16 chips, there is no choice. Interestingly though, the 'life' consequences are the same. The 'erase/write' cycle, is treated for endurance terms, as only one cycle of the memory, even if the value in an individual bit changes twice during this.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Wed Apr 29, 2009 3:46 am |
|
|
I think, it's difficult to conclude detailed properties from a few meagre datasheet lines. Actually, there are only four small PIC24FxxKA devices up to now, that are equipped with data EEPROM and the said feature. With all other PIC24 chips, EEPROM must be emulated in program flash. |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|