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: > > Hi, > > I am a beginner of PIC designing. I have to include a time reference in > my design. This means I would like to implement a clock which gives me > the time i.e. {hours,minutes}. An idea is to use the an adequate clock > signal and use it to increment a counter inside the PIC; maybe this is a > stupid idea. Obviously this means the PIC should be always switched on, > with the consequent power consumption. Are there more efficient > solutions in terms of power consumption? Is it there a *COMMON* way to > solve this problem? > > Thanks for your help, > > Andrea. > > --------------------------------------------------------------- > Ing. Andrea AIZZA > --------------------------------------------------------------- > Tender S.p.A. Smart Card's & Rapid Prototyping > > Area Science Park e-mail: Andrea.Aizza@tender-online.com > s.s. 14 Km. 163,5 web : http://www.tender-online.com > Loc. Basovizza phone : +39 40 375 7900 > I-34012 - Trieste fax : +39 40 375 7902 > --------------------------------------------------------------- -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.