Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

EEPROM write must be preceeded by an EEPROM erase? PIC16F1704

Status
Not open for further replies.
T

treez

Guest
Hello,
If you do an eeprom write to a pic16f1704, then do you have to erase the eeprom cell first?
Page 381 only gives the write time (2ms)..it does not give the erase time. Do you know what is the erase time?
PIC16F1704 Datasheet
ww1.microchip.com/downloads/en/DeviceDoc/40001715D.pdf

(I tried to ask on the microchip forum, but i have forgoteen my username and password, and you need at least one of them to get the forgotten one sent to you....i cannot get a new account because it just says i already have one.)
 

If you do an eeprom write to a pic16f1704, then do you have to erase the eeprom cell first?
Yes because it's flash, not EEPROM.

Page 381 only gives the write time (2ms)..it does not give the erase time. Do you know what is the erase time?
See 10.2.3. Erasing Flash Program Memory. 2 ms typically.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Hi,

(I tried to ask on the microchip forum, but i have forgoteen my username and password, and you need at least one of them to get the forgotten one sent to you....i cannot get a new account because it just says i already have one.)
I wonder.
A quick view at the microchip forum tells that your username there is "treez"...not surprising.
You should be able to create a new account.
Try to delete the microchip_forum_cookies before you creata a new account.

Klaus
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
In answer to your original question - yes and no!
Yes - the Flash memory you are using needs to be erased before it is written but...
No - you don't need to do the erase for *every* write.
HOWEVER there are a number of things to remember when using the Flash memory on that chip in this way. First is that there are only 4096 words of Flash altogether, and only 128 of 'high endurance' Flash at the top addresses of that. Therefore however much space you use as "EEPROM" takes away from your program space.
When you erase the Flash memory, you must do so in rows of 32 words.
Also you have to write to the Flash a row at a time. However there is a 'trick' you can use: erasing a memory location sets it to all '1' bits, and a write will transform the '1's to '0' as appropriate. Therefore it is possible with careful programming - remember you have a very limited programming space - to update the complete row to be written by adding your new value to a previously "unwritten" address.
Finally, remember that the normal Flash as a minimum endurance of 10K Erase/Write cycles and even the 'high endurance' Flash has 100K Erase/Write cycles. This mainly refers to the 'erase' operation and, again if you are careful, you can write a few more times than that (but only to convert the '1's to '0's as mentioned).
Susan
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top