Hot!Big timers

Author
jtemples
Super Member
  • Total Posts : 10797
  • Reward points : 0
  • Joined: 2004/02/13 12:31:19
  • Location: Southern California
  • Status: offline
2018/05/18 19:16:21 (permalink)
4.8 (5)

Big timers

I was just setting up timers on a PIC16F18855, and noticed it lets you cascade timers 0, 1, 3, and 5, which are all 16-bit timers.  If you include pre- and post-scalers, you can create a 95-bit timer completely in hardware.
 
#1

14 Replies Related Threads

    btbass
    Super Member
    • Total Posts : 332
    • Reward points : 0
    • Joined: 2004/12/10 13:50:32
    • Status: offline
    Re: Big timers 2018/05/18 22:48:50 (permalink)
    +2 (2)
    Thats usefull. But a big number.
    With a 95 bit timer, clocked at 10,000,000
    It would only take:
     
    125,615,427,629,160 Years
     
    Before overflow.
    #2
    dan1138
    Super Member
    • Total Posts : 2744
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Big timers 2018/05/19 20:23:27 (permalink)
    +3 (3)
    jtemples
    I was just setting up timers on a PIC16F18855, and noticed it lets you cascade timers 0, 1, 3, and 5, which are all 16-bit timers.  If you include pre- and post-scalers, you can create a 95-bit timer completely in hardware.

    I bet there is a way to get the 20-bit NCO counter in that chain as well. So you may be able to get 115 bit timer.
     
    At 32MHz it would take more than 658,135,835,239,033,085,979 years to overflow once. To put that in perspective that is 43,875,722,349 times the present age of the universe.
    #3
    jtemples
    Super Member
    • Total Posts : 10797
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Big timers 2018/05/19 23:09:37 (permalink)
    +1 (1)
    I bet there is a way to get the 20-bit NCO counter in that chain as well. So you may be able to get 115 bit timer.

     
    I think you're right.  The NCO can't go directly into a timer, but it can go into the CLC, and the CLC output can go into a timer.  That would be six peripherals chained together.
     
    that is 43,875,722,349 times the present age of the universe.

     
    And since Microchip doesn't end-of-life anything, you'll still be able to buy replacment PICs.
    #4
    DavidBLit
    Super Member
    • Total Posts : 1548
    • Reward points : 0
    • Joined: 2012/02/18 13:08:48
    • Location: The Land of Confusion
    • Status: online
    Re: Big timers 2018/05/20 05:47:58 (permalink)
    +1 (1)
    jtemples 
    that is 43,875,722,349 times the present age of the universe.

     
    And since Microchip doesn't end-of-life anything, you'll still be able to buy replacment PICs.

    But with inflation what would it cost?  wink: wink

    Yeah, "//Code and stuff".
    #5
    mlp
    boots too small
    • Total Posts : 567
    • Reward points : 0
    • Joined: 2012/09/10 15:12:07
    • Location: previously Microchip XC8 team
    • Status: offline
    Re: Big timers 2018/05/20 12:28:51 (permalink)
    +2 (2)
    Slight thread diversion, based on John's throwaway comment
    jtemplessince Microchip doesn't end-of-life anything

     
    If you get the opportunity, while attending MASTERS or otherwise, I recommend you take the Fab tour. Archival storage of reticules (masks) is a significant issue; we were shown where some years ago a new (to MCHP; second-hand, so it arrived all in one piece) library device was brought in - they had to cut a hole in the side of the clean room, and patch the wall up (and re-clean the room) once the device was inside.
     

    Mark (this opinion available for hire)
    #6
    dan1138
    Super Member
    • Total Posts : 2744
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Big timers 2018/05/20 12:29:51 (permalink)
    +2 (2)
    DavidBLit
    jtemples 
    that is 43,875,722,349 times the present age of the universe.
     And since Microchip doesn't end-of-life anything, you'll still be able to buy replacment PICs.
    But with inflation what would it cost?  wink: wink

    And by then MPLABX should have most of the really bad bugs fixed.
    #7
    Mysil
    Super Member
    • Total Posts : 2758
    • Reward points : 0
    • Joined: 2012/07/01 04:19:50
    • Location: Norway
    • Status: online
    Re: Big timers 2018/05/20 13:06:03 (permalink)
    0
    And by then MPLABX should have most of the really bad bugs fixed. 

    Do you think they will not be able to create some new bugs by then?
     
       Mysil
    #8
    dan1138
    Super Member
    • Total Posts : 2744
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Big timers 2018/05/20 13:50:58 (permalink)
    0
    Mysil
    And by then MPLABX should have most of the really bad bugs fixed. 

    Do you think they will not be able to create some new bugs by then?

    Without doubt new bugs will occur, with luck they won't all be in MPLABX.
    #9
    1and0
    Access is Denied
    • Total Posts : 8001
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: Big timers 2018/05/21 12:47:13 (permalink)
    0
    dan1138
    Mysil
    And by then MPLABX should have most of the really bad bugs fixed. 

    Do you think they will not be able to create some new bugs by then?

    Without doubt new bugs will occur, with luck they won't all be in MPLABX.

    Noone will be coding/debugging with MPLABX by then, nor writing code in text files. ;)
     
    #10
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2596
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: online
    Re: Big timers 2018/05/21 14:47:07 (permalink)
    0
    The World will be run by a hugh Corporation.  Probably Samsung.

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #11
    qɥb
    Monolothic Member
    • Total Posts : 2631
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: Big timers 2018/05/21 15:21:10 (permalink)
    0
    Google will have become Big Brother.
     

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #12
    dan1138
    Super Member
    • Total Posts : 2744
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Big timers 2018/05/21 15:56:29 (permalink)
    0
    1and0
    dan1138
    Mysil
    And by then MPLABX should have most of the really bad bugs fixed. 

    Do you think they will not be able to create some new bugs by then?

    Without doubt new bugs will occur, with luck they won't all be in MPLABX.

    Noone will be coding/debugging with MPLABX by then, nor writing code in text files. ;)

    With the possible exception of all those COBOL programs that were supposed to have been rewritten by now.
     
    Got to plan to  for Y3K.
    #13
    jtemples
    Super Member
    • Total Posts : 10797
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Big timers 2018/05/21 16:55:14 (permalink)
    +4 (4)
    Got to plan to  for Y3K.

     
    We have to worry about Y2038 first.
    #14
    qɥb
    Monolothic Member
    • Total Posts : 2631
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: Big timers 2018/05/21 17:06:23 (permalink)
    0
    jtemples
    Got to plan to  for Y3K.

     
    We have to worry about Y2038 first.

    NTP will roll over in 2036.
    https://www.eecis.udel.edu/~mills/y2k.html

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #15
    Jump to:
    © 2018 APG vNext Commercial Version 4.5