How long does it take for an 8 bit PIC to stabilize after Power-up?


+ Reply to Thread
Results 1 to 18 of 18

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: How long does it take for an 8 bit PIC to stabilize after Power-up?

    I’d have thought it’s the internal RC clock that would be the option wanting to be stabilised
    Do you have any basis for that or is it just agut feeling? Is it an RC clock? I can't find in the datasheet what kind of osc the internal 4Mhz clock is, perhaps I didn't look hard enough.

    Seems to me the internal osc is physically closer, has optimal caps, and a load of other things I can't think of.

    Anyway I think your idea of using an RC to hold MCRL for a short while is vcg's only option if he is uncomfortable turning off PWRT (which he has to to achieve 50Ms reliably).

    George

  2. #2
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: How long does it take for an 8 bit PIC to stabilize after Power-up?

    it’s more than a feeling that it’s an RC clock.
    You would rarely need any external clock if it were any better, the clock wouldn’t need a calibration value,
    and the clock wouldn’t run faster if the chip is powered from a higher than spec voltage.
    It’s only a feeling that an RC clock would take the longest time to stabilise than any other option.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: How long does it take for an 8 bit PIC to stabilize after Power-up?

    Looked in Mid-range family MCU ref manual and you're right, it is an RC clock.

    Having read the blurb I was surprised to find that although devices have a calibration value written to them, it is the responsibility of the application to fetch that value and write to the appropriate register.

    George
    Last edited by towlerg; - 31st March 2015 at 15:38. Reason: old and stupid

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: How long does it take for an 8 bit PIC to stabilize after Power-up?

    Last edited by towlerg; Today at 00:38. Reason: old and stupid
    That’s a bit rough!

    It will loose time with temperature, and any supply voltage fluctuation (batteries).
    It’s ultra cheap, you can use serial, but not keep or measure time with it.

  5. #5
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: How long does it take for an 8 bit PIC to stabilize after Power-up?

    That’s an interesting find.
    You could probably cycle the calibration value at run time then.
    Code:
    for value = mincalvalue to maxcalvalue
    calvalue = value
    turn led on
    pause
    turn led off
    pause
    next value
    You could probably calibrate it yourself with a good freq counter,
    and double check their work or what they thought was operating temperature.

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    Did you find this post helpful? Yes | No

    Default Re: How long does it take for an 8 bit PIC to stabilize after Power-up?

    Does anyone have an answer to the original question?

    How long does it take for an 8 bit PIC to stabilize after Power-up?
    I'm trying to clean up code and wondering just how much we should pause at program start. I have code with pauses of all sorts of lengths.

    How about:
    - without LCD
    - with standard 4x20 LCD

    16F18877, also an 8-bit PIC.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: How long does it take for an 8 bit PIC to stabilize after Power-up?

    How about:
    - without LCD
    - with standard 4x20 LCD
    a pic is ready as soon as its osc is stable; as discoverable from the oscstat reg, a handful of microseconds at worst
    a LCD can take 100's of milliseconds, 500 not uncommon. its not the same across version/model/maker either
    its usually pretty obvious when you have tried to talk to a LCD before its listening

    i feel you have the cart before the horse
    Warning I'm not a teacher

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: How long does it take for an 8 bit PIC to stabilize after Power-up?

    Up to this moment I did not had any special needs for a fast power up, so the 1 sec pause worked just fine for me.

    But I am pretty sure that each osc will have its own time to stabilise. So, for 18877, page 112 of the datasheet, says that there is a timer named OST (Oscillator Startup Timer) that counts 1024 cycles of from OSC1, if the Oscillator is set to LP, XT or HS (all these are external oscillators).

    For any case of oscillator selection (internal or external), there is OSCSTAT register that displays the status of that module in the appropriate bits (page 122).

    Page 603 shows the wake up time that any osc selection needs.

    Other PIC have same data also, so you may look accordingly.

    Ioannis

Similar Threads

  1. How do I use 10 bit A/D on 8 bit Pic? 12F675
    By polymer52 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 1st April 2020, 20:10
  2. Replies: 3
    Last Post: - 24th September 2013, 18:01
  3. long countdown timer, how to save power?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 15th November 2008, 05:15
  4. signed long (32-bit) variable
    By Stephan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th September 2007, 03:40
  5. Long Distance Input's to Pic
    By GregK in forum General
    Replies: 3
    Last Post: - 21st April 2005, 09:37

Members who have read this thread : 9

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts