Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 21st March 2007, 07:34 PM   (permalink)
Default

One Question rise in my mind,
When we erase PIC from MPLAB ICD2, it also erase ROM!! Yes or Not?????

I have Program my PIC16F877A approximate 30 times using ICD2...
It means my EEPROM 30 write cycles decreases????

Last edited by Ayne; 21st March 2007 at 07:43 PM.
Ayne is offline  
Old 21st March 2007, 10:07 PM   (permalink)
Default

I just did a quick eeprom write with IC-Prog, followed by an erase, and yes it does write and clear the eeprom's data.

Don't forget that most PIC eeproms are rated at 1,000,000 writes, so you have used 0.003% of its life span
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net

Last edited by gramo; 21st March 2007 at 10:24 PM.
gramo is offline  
Old 22nd March 2007, 04:12 AM   (permalink)
Default

Ayne, the PIC you mentioned uses flash memory not ROM, and the flash and eeprom write endurance is different.

According to the information I found from Microchip, the eeprom endurance is a minimum 100k cycles, but it says typically 1 million.
The flash endurance is only a minimum of 10k and 'typically' 100k

Not even the most dedicated of programmers could wear out the flash writing test code by hand in a sane period of time. You'd have to program your PIC 100 times a day every day for 4 months straight before it would fail (garunteed) and going by the 'typical' rateing it would take three years doing 100 programming sessions a day.
If you program your PIC like you did 30 times every day it's minimum write endurance means it won't wear out till next year.

Problems really only occur when you have self modifying code, like storing buffers or frequently updated table information in FLASH or EEPROM where 100's or even 1000's of write cycles could occur in a short period of time.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."

Last edited by Sceadwian; 22nd March 2007 at 04:14 AM.
Sceadwian is offline  
Old 22nd March 2007, 09:15 AM   (permalink)
Default

Ooo
Quote:
Don't forget that most PIC eeproms are rated at 1,000,000 writes, so you have used 0.003% of its life span
I not use my EEPROM until yet......
Ayne is offline  
Old 22nd March 2007, 09:36 AM   (permalink)
Default

By the looks of things, every time you program your PIC, it writes to the eeprom too.

I've just tried a program that writes to the EEPROM, then out the PIC back in the programmer & read the PIC data, sure enough the EEPROM has data stored in it, Then re-programmed the PIC, and the EEPROM data is over written
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline  
Old 22nd March 2007, 09:39 AM   (permalink)
Default

It depends on the programmer. Some only write locations that contain a zero bit. I.E. not 0xff or 0x3fff.

Mike.
Pommie is online now  
Old 22nd March 2007, 10:07 AM   (permalink)
Default

That would make sense, there's no need to overwrite data thats already cleared
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline  
Old 22nd March 2007, 11:56 AM   (permalink)
Default

Quote:
Originally Posted by Pommie
It depends on the programmer. Some only write locations that contain a zero bit. I.E. not 0xff or 0x3fff.
Mine does (and always has), which is what helps make it the fastest programmer software. However, I don't know if 'writing' all ones actually counts as doing a write or not?, as nothing is changed by it.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 23rd March 2007, 03:01 AM   (permalink)
Default

I think it's the same with flash, but with eeprom a write of any data (even the same data back) will have to erase the block first, unless the compiler or the code itself checks to see if the data is the same before it writes.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is offline  
Old 23rd March 2007, 08:42 AM   (permalink)
Default

Quote:
Originally Posted by Sceadwian
I think it's the same with flash, but with eeprom a write of any data (even the same data back) will have to erase the block first, unless the compiler or the code itself checks to see if the data is the same before it writes.
You can write a word over another one, but it will only affect one's that change to zero's, you can't change zero's to one's without erasing it - same applies to EPROM as well.

Much 'Flash' is actually just EEPROM any way, Atmel started calling their EEPROM devices Flash (as it's a popular buzz word), and everyone else followed suite - although there are some Flash devices now.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Need some help with a code provided by ATMEL ikalogic Micro Controllers 1 23rd January 2007 03:46 PM
Hardcode a PIC by hand? (or 16F74 + par.port.prog = problem) smilen Micro Controllers 15 21st November 2005 10:23 AM
Oscilloscope storing data software xmat General Electronics Chat 10 14th August 2005 07:01 PM
Just Joined, Got some bugs I can't find. Thedoctorisin136 Micro Controllers 0 1st March 2005 07:07 PM
An error in pic16f84a, why? Zener_Diode Micro Controllers 6 11th April 2004 03:55 AM



All times are GMT. The time now is 07:25 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker