Daniel wrote : > Hi all, > I am looking for code (or PIC programming help) for a clock with > calendar and one channel controller. > > I am considering using a DS1307 RTC and 16F84 PIC or similar. > It will be > used outdoors, battery powered with no mains reference. The accuracy > needs to be as accurate as possible but no more than ? 2 minutes per > month. > > I have read that a RTC chip does not necessarily ensure > better accuracy > or stability. Should it all be done in the PIC? > > I need to switch at specific times on certain days, plus it needs > compensation / adjustment for daylight saving times. > > I can find plenty of code examples for regular clocks but not > with dates > (calendar). > > Does anyone have any guidance for this? > > Thanks, > Hi. The RTC help with some of the "calendar-calculating", and I'd guess the RTC is more low-power that a running PIC. The accuracy is depending on the timebase use in either case, normaly a crystal. Less programming if you can use a RTC chip that does all calculating and (maybe) the alarm function. B.t.w, any special reason to use the old 16F84 ? There are probably newer chips, check the nanoWatt variants. Jan-Erik. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.