PDA

View Full Version : Using RTC to generate long time delays



schlaray
- 2nd January 2007, 00:21
I am using a crystal controled (watch crystal) programmable timer chip whose time is set by DIP switches (binary). Time intervals from 0 to 255 seconds or 0 to 255 minutes are possible with accuracy dependant upon the crystal. I would like to do this with a PIC. Examining some of the RTC out there, I have discovered that a few of them have built in programmable alarms. Is there any advantage in using a RTC to store a time in memory and keep looking at the clock output until the (time stored) + (clock output reading) >= the delay required ? It seems it might be more direct and simple then using the timers built into the 16F877A. I have not given up trying to learn how the internal timers work but it appears the addition of a cheap RTC just might make things easier. All of your comments will be welcome.

paul borgmeier
- 2nd January 2007, 04:22
...it appears the addition of a cheap RTC just might make things easier.
I don't agree - see
http://www.picbasic.co.uk/forum/showthread.php?t=2129
for some ideas

schlaray
- 3rd January 2007, 00:31
The message here is: Why use an external RTC when I can accomplish the same function using the built in timer configured as a clock. I will study the two programs you listed and try to get on board with the timer features of the 16F877A. As always, a little effort on my part will be required to do this. Thank you for your direction.