piclist 2001\01\09\090733a >
Thread: Time diff code
face picon face BY : Olin Lathrop email (remove spam text)

> I've searched the PIC archive but couldn't find anything like what I need.
> I'm using a Dallas DS1305 Real Time Clock to obtain the time. I need to be
> able to tell if 10 minutes has passed whether it be in the same hour or
> whether it be across a new day, or new month, or new year, or new century.
> (e.g. if time1 is Dec 31, 2000 at 11:59:24pm and time2 is Jan 01, 2001 at
> 12:04:42am, then that's less than 10 minutes of elapsed time.)

Why not just count clock pulses in the code?  Use your main oscillator if
the PIC is contantly running, or use a watch crystal on timer 1 if you need
to sleep.

Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, olinSTOPspamspamspam_OUTembedinc.com, http://www.embedinc.com

http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

<004201c07a3e$24dabd50$260bf6cd@pc> 7bit

See also: www.piclist.com/techref/microchip/time.htm?key=time
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Time diff code

month overview.

new search...