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

Thread Starter

shenwei5271

Joined Mar 11, 2009
3
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.
 

beenthere

Joined Apr 20, 2004
15,819
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.
 

thatoneguy

Joined Feb 19, 2009
6,359
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.
 
Top