Programming Cycles for PIC18f452 Issue

Discussion in 'Embedded Systems and Microcontrollers' started by Shehwar Hussain, Oct 31, 2014.

  1. Shehwar Hussain

    Thread Starter New Member

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

    Expert

    Jul 18, 2013
    10,555
    2,375
    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.
     
  3. Papabravo

    Expert

    Feb 24, 2006
    10,149
    1,791
    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: Oct 31, 2014
    Shehwar Hussain likes this.
  4. Shehwar Hussain

    Thread Starter New Member

    Oct 26, 2014
    21
    2
    @MaxHeadRoom
    I am talking about programming cycles...number of times one can program (write/erase program flash) 18f452.
     
  5. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    As Papabravo said, the minimum number of times you can program a PIC is 0.
     
  6. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,689
    2,751
    Like I always say, "Words mean things."
     
  7. Shehwar Hussain

    Thread Starter New Member

    Oct 26, 2014
    21
    2
    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.
     
  8. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    If you are looking for the maximum number of times you can erase/program the device, counter to what you asked for, look at the datasheet. Page 3, right column says it quite clearly.
     
    ErnieM and Shehwar Hussain like this.
  9. Papabravo

    Expert

    Feb 24, 2006
    10,149
    1,791
    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.
     
  10. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,689
    2,751
    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?
     
  11. Papabravo

    Expert

    Feb 24, 2006
    10,149
    1,791
    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: Oct 31, 2014
  12. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,689
    2,751
    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.
     
  13. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,555
    2,375
    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.
     
  14. Papabravo

    Expert

    Feb 24, 2006
    10,149
    1,791
    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.
     
Loading...