> I don't like writing code for hours, minutes and seconds. ;-) I've done a remote switching project (via SMS) and used minutes, 1440 per day, which worked out in my scheme to be simpler to do maths with than HhMm All of my clocks use a very similar incrementing routine, with a small table for month length and adjustment for 29th Feb. Alarm times are broken down on entry to minutes and stored that way. Have used RTCs in a couple of consumption-sensitive applications, but most often use a kitchen clock driver If you want to maintain long-term accuracy when on battery you could include a link (radio, laser pointer ?) to a PIC with timing based on mains cycles, perhaps in the house. At approximately the same time each day the garden circuit turns on its receiver and waits for a time stamp to come from the house unit. Would have to do some temperature tests (freezer, hot water) to see what drift the garden unit has Joe ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2016.0.7639 / Virus Database: 4591/12305 - Release Date: 05/27/16 --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .