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



Hello Andrea,

without investing in additional hardware your idea is the usual way and not
stupid at all.
Your PIC dont need to be allways active if you use a type that supports
INTERRUPTS. you can use a 16C61 for example because it has a second
oscillator circuit which can be running while the PIC itself is in SLEEP
mode. Now suppose you connect a 32.768kHz crystal to the second oscillator
pins. Then you would set up the prescaler and timer values to overflow after
32768 counts. You would further set the PIC to WAKEUP on timer overflow INT
then go to SLEEP.
Now, each time your PIC wakes up from sleep you know that exactly 1 second
is over.
Then your INT routine would increment a register called SECs, if the value
reaches 60 then reset it to zero and increment the register called MINs and
so on.

Germain Morbe

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


<000601c0825f$d6d410a0$1302a8c0@Morbe> 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...