How to perform delay up to 72hrs using 16F876A?

Discussion in 'Embedded Systems and Microcontrollers' started by shenwei5271, Mar 11, 2009.

  1. shenwei5271

    Thread Starter New Member

    Mar 11, 2009
    I'm newbie in PIC programming and i've some question about PIC16F876A. Here are my Question: How long is the maximum delay can the PIC uC do? If I'd like to activate a sensor after 3 days (72Hrs) I turn ON the PIC, what should I use for such long delay?

    Any examples can be referred?

    Can someone help me on this matter? I need to solve this doubt for my Final Year Project.

    Thank you.
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    There should be no limit to the timing you can do. What kind of accuracy do you need?

    One way to proceed is to use an internal counter to increment from a source. Use the power line through a transformer and diode for good long-term accuracy. After that, you increment a value every selected time interval, as determined by the counter. With some memory to store counts, you should be able to time events over periods of years.
  3. t_n_k

    AAC Fanatic!

    Mar 6, 2009
  4. thatoneguy


    Feb 19, 2009
    To save power, use a PIC that can switch to low power/internal oscillator mode. That way the battery isn't running dead keeping the clock alive. If it is line powered, it is entirely optional, and less math for the delay.
  5. shenwei5271

    Thread Starter New Member

    Mar 11, 2009
    Thanks for the reply~... i can solve my question by using simple 'for' loop function... i'm at the stg of testing...