I am using an 18f452 and Timer1 (Capture ) is already being used for my measurement circuit so i decided to use Timer0 configured as a 16 bit counter.
i am counting the 1Hz pulse coming out of my DS1307 RTC.
But i need to be able to count those pulses even when the pic is asleep because it is those pulses that
i am using as a service counter so that after a years time this can display a message that the unit needs calibration.
I have just learn't how to use Timer 0 as a counter only to discover that it only counter when the Pic is awake but not when in sleep mode.
Is there a way i can do this ?
i do need some help on this one and any suggestions would be every much appreciated
Why not Read the RTC at the start of your year, convert to Linear DAYS and add 365 (do a search on Julian to see the whole thread) and save this as a Reference. Then when awake just read the RTC, convert to Linear DAYS and if it exceeds your Reference then a year has elapsed. Using this method saves having to keep track of individual elapsed Years, Months, and Days of Month.