RE-PROGRAM TIMES FOR PIC - Page 1
Forum section: electronics / general

author: neko efecktz
author_rank: Regular Contributor
timestamp: November 11, 2016, 11:23:51 pm
content: 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 timesI 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.

author: MK14
author_rank: Super Contributor
timestamp: November 12, 2016, 12:38:57 am
content: Quote from: neko efecktz on November 11, 2016, 11:23:51 pmIt 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 181http://ww1.microchip.com/downloads/en/DeviceDoc/39582b.pdfThe 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.

author: MK14
author_rank: Super Contributor
timestamp: November 12, 2016, 12:58:31 am
content: Quote from: neko efecktz on November 11, 2016, 11:23:51 pm#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.

author: Andreas
author_rank: Super Contributor
timestamp: November 12, 2016, 05:35:11 am
content: 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 regardsAndreas

author: JPortici
author_rank: Super Contributor
timestamp: November 12, 2016, 09:17:49 am
content: Quote from: MK14 on November 12, 2016, 12:58:31 amam curious. seems funny enough to try

author: MK14
author_rank: Super Contributor
timestamp: November 12, 2016, 05:01:48 pm
content: Quote from: JPortici on November 12, 2016, 09:17:49 amI 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.pdfIt 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

author: MK14
author_rank: Super Contributor
timestamp: November 12, 2016, 05:29:28 pm
content: 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 aboutmay be ?this one:http://station1.highcliffe.dorset.sch.uk/autosite/binaries/pubtech/data%20sheets/AW67.PDF

author: neko efecktz
author_rank: Regular Contributor
timestamp: November 12, 2016, 11:35:56 pm
content: 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 askedbut 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 monthsI have often dabbled in electronics, Mainly audio and some digital, but was out of it for about 20 yearsI'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 breakfastThank you everyoneBILL.

author: MK14
author_rank: Super Contributor
timestamp: November 12, 2016, 11:46:06 pm
content: 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.

author: neko efecktz
author_rank: Regular Contributor
timestamp: November 13, 2016, 12:53:22 am
content: 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 screenI 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 againThank youBILL.

author: JPortici
author_rank: Super Contributor
timestamp: November 13, 2016, 01:51:32 am
content: Quote from: MK14 on November 12, 2016, 05:01:48 pmLMFAOam i right ladies and gentlemens? not a single useful piece of information

author: MK14
author_rank: Super Contributor
timestamp: November 13, 2016, 02:51:39 am
content: Quote from: JPortici on November 13, 2016, 01:51:32 amWell, 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.

author: JPortici
author_rank: Super Contributor
timestamp: November 13, 2016, 09:17:32 am
content: don't get me wrongthat'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

author: MK14
author_rank: Super Contributor
timestamp: November 13, 2016, 01:41:45 pm
content: Quote from: JPortici on November 13, 2016, 09:17:32 amI 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.