Author Topic: RE-PROGRAM TIMES FOR PIC  (Read 6615 times)

0 Members and 1 Guest are viewing this topic.

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
RE-PROGRAM TIMES FOR PIC
« on: November 11, 2016, 11:23:51 pm »
Good morning everyone,

I have a question, just out of curiosity.
I am talking generally.
I am at the moment using a PIC16F877A but could be any pic.
According to the data sheet it can be programmed for 100,000 times
I know that some chips have much higher and some much lower PROGRAM TIMES.

Question #1   Is this value factory set or does it depend on how the chip is treated e.g. programming voltage, programming speed,  power supply voltage,  port loading and input voltages, running temperature, etc?

Question #2   Is there a way to see how many times a chip has been programmed?

Question #3   Is there a way to write an ascending number, n+1, somewhere onto the chip each time a chip is programmed using MPLAB perhaps  into the hex code that can be found easily?

This is just a curiosity.

BILL.

 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 5385
  • Country: gb
Re: RE-PROGRAM TIMES FOR PIC
« Reply #1 on: November 12, 2016, 12:38:57 am »
Good morning everyone,

I have a question, just out of curiosity.
I am talking generally.
I am at the moment using a PIC16F877A but could be any pic.
According to the data sheet it can be programmed for 100,000 times
I know that some chips have much higher and some much lower PROGRAM TIMES.

Question #1   Is this value factory set or does it depend on how the chip is treated e.g. programming voltage, programming speed,  power supply voltage,  port loading and input voltages, running temperature, etc?

Question #2   Is there a way to see how many times a chip has been programmed?

Question #3   Is there a way to write an ascending number, n+1, somewhere onto the chip each time a chip is programmed using MPLAB perhaps  into the hex code that can be found easily?

This is just a curiosity.

BILL.

It seems to have a life of 10,000 (Flash) and 100,000 (EEPROM). i.e. guaranteed (MIN on datasheet) rather than typical (on datasheet) values, which are x10 bigger.

Page 181
http://ww1.microchip.com/downloads/en/DeviceDoc/39582b.pdf

The 100K and 1 million life, you are referring to, seem to be TYPICAL life. But only about 50% (depending on definitions) of the chips get to that endurance level.
10K and 100K respectively, applies to almost ALL chips. So is the figure most datasheets refer to, especially other manufacturer's.

Sorry my explanation is NOT as clear as I would like.
« Last Edit: November 12, 2016, 12:40:45 am by MK14 »
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 5385
  • Country: gb
Re: RE-PROGRAM TIMES FOR PIC
« Reply #2 on: November 12, 2016, 12:58:31 am »
Good morning everyone,

I have a question, just out of curiosity.
I am talking generally.
I am at the moment using a PIC16F877A but could be any pic.
According to the data sheet it can be programmed for 100,000 times
I know that some chips have much higher and some much lower PROGRAM TIMES.

Question #1   Is this value factory set or does it depend on how the chip is treated e.g. programming voltage, programming speed,  power supply voltage,  port loading and input voltages, running temperature, etc?

Question #2   Is there a way to see how many times a chip has been programmed?

Question #3   Is there a way to write an ascending number, n+1, somewhere onto the chip each time a chip is programmed using MPLAB perhaps  into the hex code that can be found easily?

This is just a curiosity.

BILL.

#1 It is NOT factory set. I also wonder if it can be affected by varying stuff. Temperature is a likely candidate, and maybe voltage, if stuff reduces the life still further.

#2 I don't think so. The only ways that come to mind are to continue wearing the cells out, and see how many writes were left, and/or measuring leakage currents or something, which is probably NOT practical outside of the chip and/or would not work anyway.

#3 I doubt it, but don't know enough about MPLAB to fully rule it out. But you could always write your own routines to do it, and add them to the setup. Being careful to "Wear level", the counting number. Else it may get data errors, before the end of flash life.
Maybe use EEPROM, as a counter as it has a much longer write life.



For anyone curious enough. I believe Microchip sell a reasonably cheap device, which (destructively) tests the write life of their flash/EEPROM chips.
« Last Edit: November 12, 2016, 01:04:35 am by MK14 »
 

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3596
  • Country: de
Re: RE-PROGRAM TIMES FOR PIC
« Reply #3 on: November 12, 2016, 05:35:11 am »
Hello,

#1 largest dependancy is temperature. High temperature may reduce the number of cycles.

#2 usually the programming cycle is self timed. At end of life the programming time will increase. Usually there is a timeout (max write time), if this timeout is reached the programming may fail.

#3 you could use the IDLOCS for this purpose (4 nibbles). But no support from MPLAB. So you would have to read out before programming. Patch your new Hexfile outside MPLAB and program the patched Hexfile.

but why? do you really need more than about 30 programming cycles for a project?

With best regards

Andreas
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3926
  • Country: it
Re: RE-PROGRAM TIMES FOR PIC
« Reply #4 on: November 12, 2016, 09:17:49 am »
For anyone curious enough. I believe Microchip sell a reasonably cheap device, which (destructively) tests the write life of their flash/EEPROM chips.
am curious. seems funny enough to try
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 5385
  • Country: gb
Re: RE-PROGRAM TIMES FOR PIC
« Reply #5 on: November 12, 2016, 05:01:48 pm »
For anyone curious enough. I believe Microchip sell a reasonably cheap device, which (destructively) tests the write life of their flash/EEPROM chips.
am curious. seems funny enough to try

I would have been curious enough to buy one. But decided that it is quick/easy/cheap enough, to just test the devices yourself, using MCU's and/or development kits. You just need a bit of hardware (which we probably already have), some cheap $0.20 (approx) device(s), and time to write some quick test software.

But for bigger business's and heavy industrial users. The test units, may actually make more sense to buy. So that you can compare devices from different manufacture's, and make educated decisions when buying flash/EEPROM's in bulk.
Datasheets are not always a 100% reliable way of choosing the best devices to use. Especially as the datasheet terms, tests and measurements are not necessarily done in the same way or using the same measurement units and/or test circuits.

This has further information about EEPROM endurance:
http://www.microchip.com/stellent/groups/SiteComm_sg/documents/Training_Tutorials/en532276.pdf

It has lots of details about endurance, and is well worth reading, if you are interested in this subject area.

It agrees with my earlier post, which said that temperature and voltage (I was not 100% sure) affect the endurance (low of both is best).

Quote
TEMPERATURE & VOLTAGE
• Lower is Better
« Last Edit: November 12, 2016, 05:12:56 pm by MK14 »
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 5385
  • Country: gb
Re: RE-PROGRAM TIMES FOR PIC
« Reply #6 on: November 12, 2016, 05:29:28 pm »
I'm NOT sure if you can still buy the Microchip endurance tester. Maybe it was an older device, and they no longer sell it, and have not produced a newer one. I'm NOT sure.

The one I was talking about may be ? this one:

http://station1.highcliffe.dorset.sch.uk/autosite/binaries/pubtech/data%20sheets/AW67.PDF
 

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: RE-PROGRAM TIMES FOR PIC
« Reply #7 on: November 12, 2016, 11:35:56 pm »
Thanks MK14 and others.
Since I started with PICS  a few months ago I have wondered about the things I questioned in this feed.
Now I know.

Andreas asked
but why? do you really need more than about 30 programming cycles for a project?

Simply I'm just a beginner and 64 years old, and have only been playing about with PICs for a few months
I have often dabbled in electronics, Mainly audio and some digital, but was out of it for about 20 years

I've taken this up as a hobby for after I retire  to keep my mind active.

I am developing a system to monitor a duel tracking power supply +/- 30 Volts at 3 Amps Plus a  5v and perhaps a duel tracker */- 15 volts for Opamps.
It will monitor the voltages of the two rails, current overload, temperature of heat sinks etc.
For each stage of my design, I am coding and debugging and also trying things like "I wonder what would happen if I do this?"
I have spare chips so if one dies I will give it a decent burial.

Often I get help from this forum. IANM has been very helpful and I may have given up if he hadn't helped me with a few things. Thank you IAN.
I'm sure there are other people out there who might do 20 - 30 re-programs in a day then for days maybe only one or two or just be happy to think about the next step..
A couple of pictures attached of my development / test setup display voltage and temperature. one's a touch out of focus.
An LM35 themo sense chip can be seen mounted on top of the heatsink. I have ine analog ports displaying the same  information.

Time to have some breakfast
Thank you everyone

BILL.
« Last Edit: November 12, 2016, 11:40:16 pm by neko efecktz »
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 5385
  • Country: gb
Re: RE-PROGRAM TIMES FOR PIC
« Reply #8 on: November 12, 2016, 11:46:06 pm »
I'm VERY impressed with how neat, you have assembled your PIC thing. Very neat and tidy!

In practice, it would take a crazily huge amount of time, to even reach the 10,000 min limit of the flash program memory. Assuming you make changes on your PC, recompile and then update the flash memory.

Even if you did "burn" one out. They are probably only a few dollars or less, for most types.
 

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: RE-PROGRAM TIMES FOR PIC
« Reply #9 on: November 13, 2016, 12:53:22 am »
Thanks for the nice complement.
I only fitted it all together on the board last week because every time I moved anything it would stop working or flicker.
some of the wires had to be re-terminated  as they were giving flicker on the screen
I will be designing more PCB's for the project but I have to breadboard the support circuits for testing first.

I'm thinking of getting the pcb's manufactured professionally with vias, solder mask overlay, once I have proved the design.
The PIC pcb will be usable for a multitude of projects.

The keyboard is only for the testing as I will be using opto interface for all of the digital inputs and any outputs.

Once again
Thank you

BILL.
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3926
  • Country: it
Re: RE-PROGRAM TIMES FOR PIC
« Reply #10 on: November 13, 2016, 01:51:32 am »
Quote
TEMPERATURE & VOLTAGE
• Lower is Better

LMFAO
am i right ladies and gentlemens? not a single useful piece of information
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 5385
  • Country: gb
Re: RE-PROGRAM TIMES FOR PIC
« Reply #11 on: November 13, 2016, 02:51:39 am »
Quote
TEMPERATURE & VOLTAGE
• Lower is Better

LMFAO
am i right ladies and gentlemens? not a single useful piece of information

Well, reading through the various pages of the information (linked to in my earlier post), seemed interesting and educational to me (my opinion). When I have more time available, I plan on reading through it properly.
But I accept that something that interests me (and seems to be teaching me at least some stuff), may not interest or educate others.
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3926
  • Country: it
Re: RE-PROGRAM TIMES FOR PIC
« Reply #12 on: November 13, 2016, 09:17:32 am »
don't get me wrong :) that's a power point presentation after all, he can't go on in details. what is said there on endurante is basically already there in any eeprom datasheet
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 5385
  • Country: gb
Re: RE-PROGRAM TIMES FOR PIC
« Reply #13 on: November 13, 2016, 01:41:45 pm »
don't get me wrong :) that's a power point presentation after all, he can't go on in details. what is said there on endurante is basically already there in any eeprom datasheet

I still think it gives more information, such as explaining why EEPROMS, have considerably longer lifetimes, compared to flash type memories, than datasheets. It also nicely explains the wear out mechanism, and begins to detail what can affect the rate.
But I do agree, it is a slide show, and does not go into the detail/depth, that is possible, if really good books/guides on flash/EEPROM's exists.
There could be some (such books), but if there are I don't know about them.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->