piclist 2001\01\19\114031a >
Thread: a "clock" ({hours,minutes}) with a PIC
www.piclist.com/techref/microchip/time.htm?key=clock
flavicon
face BY : M. Adam Davis email (remove spam text)



If you use a pic with interrupts (such as the f84) then you can do a few
things:

Use the external source to pulse the timer input RA4, and set that up so
the timer is incremented each time a pulse comes in (or use the prescaler
if you want it incremented less)

Set the counter to generate an interupt on overflow, set the interrupt to
255, and go to sleep.  The next pulse will set the timer to 0, interrupt,
wake the processor, and you can do whatever you need to do before going
back to sleep.  This will result in the lowest power consumption in a
pic.  Of course, if you need to update a display, or otherwise you'll have
to work out some other arrangement.

-Adam

Andrea Aizza wrote:
{Quote hidden}

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


<3A686DCF.51334325@ubasics.com> 7bit

See also: www.piclist.com/techref/microchip/time.htm?key=clock
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) a "clock" ({hours,minutes}) with a PIC

month overview.

new search...