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
    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.

  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?

    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.

  3. #3
    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!

  4. #4
    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

  5. #5
    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

  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?

    Quote Originally Posted by Ioannis View Post
    ...Page 603 shows the wake up time that any osc selection needs...
    HFINTOSC is typically 11usec to 20usec max (I don't sleep the PIC)

    So PAUSE 1 should be more than sufficient for a PIC without LCDs...?

    (I wouldn't bother with PAUSEUS if I don't have to).


    Using:

    Code:
    #CONFIG
        __config _CONFIG1, _FEXTOSC_OFF & _RSTOSC_HFINT32 & _CLKOUTEN_OFF & _CSWEN_OFF & _FCMEN_ON
        __config _CONFIG2, _MCLRE_ON & _PWRTE_OFF & _LPBOREN_OFF & _BOREN_ON & _BORV_LO & _ZCD_OFF & _PPS1WAY_OFF & _STVREN_ON & _DEBUG_OFF
        __config _CONFIG3, _WDTCPS_WDTCPS_11 & _WDTE_OFF & _WDTCWS_WDTCWS_7 & _WDTCCS_LFINTOSC
        __config _CONFIG4, _WRT_OFF & _SCANE_available & _LVP_OFF
        __config _CONFIG5, _CP_OFF & _CPD_OFF
    #ENDCONFIG
    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
    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?

    If you do not have any LCDs or other peripherals that need time to settle, I am sure that you do not need any delay in your program. If the program reached the first command then the PIC just woke up!

    The problem is with other circuits connected to the PIC and are still under Reset period. PIC will not be able to communicate with this only device.

    Ioannis

  8. #8
    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?

    Yeah, hadn't put any thought into MCP23017 requirements.

    Gonna have to look at those datasheets.
    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!

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