Programming Cycles for PIC18f452 Issue

Thread Starter

Shehwar Hussain

Joined Oct 26, 2014
21
What can be the minimum programming cycles for pic18f452? I tried searching everywhere but couldn't find. Any help would be appreciated.
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
The manual spec the lowest range tested as 455Khz.
The fact that you can step the program through one instruction at a time Presumably indicates no real set minimum?
Although it may become impracticable as far as purpose is concerned?
Max.
 

Papabravo

Joined Feb 24, 2006
21,225
Do you mean:
How many times can I program the part?

or do you mean:
"What is the minimum time that it takes to program the part?"

The answer to the first question is trivial - it is zero. This means you don't ever have to program it at all. There is probably a maximum specified in the datasheet, but don't think of it as a hard boundary. Some devices will fail sooner and some devices will last longer.

The answer to the second question depends on the actual storage technology used by the part. Basically programming involves placing a charge on the floating gate of a MOS transistor. The datasheet will recommend a minimum time for each cell. You multiply this by the number of cells you want to program and that gives you a lower bound on the programming time. If you wish you can experiment with shorter times, but you run the risk of having the device loose it's programming sooner than it would with a longer programming time.

Did that answer your question?
 
Last edited:

Thread Starter

Shehwar Hussain

Joined Oct 26, 2014
21
Do you mean:
How many times can I program the part?

or do you mean:
"What is the minimum that it takes to program the part?"

The answer to the first question is trivial - it is zero. This means you don't ever have to program it at all. There is probably a maximum specified in the datasheet, but don't think of it as a hard boundary. Some devices will fail sooner and some devices will last longer.

The answer to the second question depends on the actual storage technology used by the part. Basically programming involves placing a charge on the floating gate of a MOS transistor. The datasheet will recommend a minimum time for each cell. You multiply this by the number of cells you want to program and that gives you a lower bound on the programming time. If you wish you can experiment with shorter times, but you run the risk of having the device loose it's programming sooner than it would with a longer programming time.

Did that answer your question?
I'll consider that an answer but if u've had any experience of number of times programming 18f452. Then i would like to have a number. I know it can't be an exact one but some number would help.
 

Papabravo

Joined Feb 24, 2006
21,225
In the DS I looked at it was page 268 and it says FLASH cell endurance is Minimum 10,000 and Typical 100,000 cycles. I interpret the 100,000 to be the mean of a normal distribution and the 10,000 to be the minus 3 sigma point. That means you still have some non-zero probability of getting a device that will fail before 10,000 erase program cycles. It does not specify a maximum.
 

joeyd999

Joined Jun 6, 2011
5,283
...I interpret the 100,000 to be the mean ... 10,000 to be the minus 3 sigma point.
Why do you make this assumption? To me, a "minimum" on a datasheet, is, in fact, a minimum. Like a guaranteed specification.

And 3 sigma? Why this? Why not 4, or 5, or 6 even?
 

Papabravo

Joined Feb 24, 2006
21,225
Why do you make this assumption? To me, a "minimum" on a datasheet, is, in fact, a minimum. Like a guaranteed specification.

And 3 sigma? Why this? Why not 4, or 5, or 6 even?
It is an excellent question. The specifications in a datasheet are not guaranteed by 100% testing. Lots coming out of the fab are sampled and tested. A sample mean and a population mean are close with a large enough sample. Similarly the sample variance and the population variance are similarly close for a large enough sample. Standard deviation or sigma is just the square root of the variance.

For a normally distributed random variable 99% of all members in a population will lie between minus 3 sigma and plus 3 sigma from the population mean. That is the reason behind using minus 3 sigma for the minimum. Show me any datasheet where the minimum or a maximum is guaranteed. You can't have a guaranteed minimum without 100% testing. If they did 100% testing then none of the parts would have any endurance left.

In the case of the 18f452, it is my contention that the chances of getting a part with an endurance of less than 10,00 cycles is 0.5% or 1 in 200.

Is that low enough for your purposes? I don't know, but even in a product with field upgrade capability, the number of erase/write cycles is unlikely to approach that number by several orders of magnitude.
 
Last edited:

joeyd999

Joined Jun 6, 2011
5,283
It is an excellent question. The specifications in a datasheet are not guaranteed by 100% testing. Lots coming out of the fab are sampled and tested. A sample mean and a population mean are close with a large enough sample. Similarly the sample variance and the population variance are similarly close for a large enough sample. Standard deviation or sigma is just the square root of the variance.

For a normally distributed random variable 99% of all members in a population will lie between minus 3 sigma and plus 3 sigma from the population mean. That is the reason behind using minus 3 sigma for the minimum. Show me any datasheet where the minimum or a maximum is guaranteed. You can't have a guaranteed minimum without 100% testing. If they did 100% testing then none of the parts would have any endurance left.

In the case of the 18f452, it is my contention that the chances of getting a part with an endurance of less than 10,00 cycles is 0.5% or 1 in 200.

Is that low enough for your purposes? I don't know, but even in a product with field upgrade capability, the number of erase/write cycles is unlikely to approach that number by several orders of magnitude.
I am aware of statistical analysis, but thanks for the review.

I suppose what I am saying is that I would expect, based on the datasheet, that all parts would be re-writable at least 10,000 times. Those that don't would be non-conforming.

Now, in this case, I agree. Even 1,000 erase/write operations would be acceptable in 99.9% of all applications. And 10 erase/write operations for 99%. So, effectively, the spec doesn't matter all that much.

*But*, let's say I design a diode into an application, and the spec sheet provides a minimum Vf at a particular current and temperature. If I receive a diode with a Vf less than the minimum specified at those conditions, I would consider it non-conforming. Yes, I probably wouldn't care unless that application actually required a Vf at or above the minimum spec.
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
The question appears to me to fall into the same category as the U.S. purchaser of a R.R. Silver Ghost who wrote R.R. asking for the H.P. of the motor (which RR do not publish).
The reply .. 'Sufficient".
Max.
 

Papabravo

Joined Feb 24, 2006
21,225
I would agree with you on the non-conforming part, and some(most?) distributors and manufacturers would offer a refund or replacement. It is also possible that as manufacturing processes get refined, that the actual behavior is better than what is specified in the datasheet. Under promise and over deliver is a winning strategy. It is not dissimilar from the situation of beta in a transistor. Designers often design so that the circuit is independent of beta.
 
Top