EEprom erase

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

EEprom erase

Post by MJU »

Simple question from a simple guy:

Does erasing the program memory erase the Eeprom too?

I need to make sure that after sending the program to the PIC the Eeprom is "empty" or filled with a certain pattern.
In the datasheet for the 16F819 I find this:
The EEPROM data memory allows single byte read
and write. The FLASH program memory allows single
word reads and four-word block writes. Program memory
writes must first start with a 32-word block erase,
then write in 4-word blocks. A byte write in data
EEPROM memory automatically erases the location
and writes the new data (erase before write).
Does this mean that the Eeprom is being erased with programming?
Thanks in advance!

brandonb
Posts: 438
Joined: Mon Aug 29, 2011 12:26 am
Location: arizona
Has thanked: 175 times
Been thanked: 173 times
Contact:

Re: EEprom erase

Post by brandonb »

when you program the eeprom gets a 0xff write to all locations, if you veiw the eeprom with a pickit i beleive you can copy to clipboard and paste it back in then program, i just create a small program and send the eeprom out to another pic chip via serial into its eeprom, if your curious i could show you

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: EEprom erase

Post by Enamul »

Does this mean that the Eeprom is being erased with programming?
As Brandonb said, programming chip erase EEPROM too and the power-up value of EEPROM is 0xFF. But there are ways to save your data in EEPROM before re-program like as said by Brandonb in different chip or external EEPROM.
Enamul
University of Nottingham
enamul4mm@gmail.com

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: EEprom erase

Post by MJU »

Ok!

Thanks both of you, this was very helpful!

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: EEprom erase

Post by medelec35 »

Hi MJU,
You might find this helpful?
http://www.matrixmultimedia.com/mmforum ... 42&#p16442

Martin
Martin

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: EEprom erase

Post by MJU »

Thanks you medelec35,

I don't care what is in the Eeprom after erasing the PIC, I only need to know that a certain pattern is in the Eeprom after programming.
Now I know the Eeprom is filled with 0xFF so thats the pattern I will look for in my porgram.

Thanks you!

Post Reply