I use the watchdog. Set it for max delay (around 2.3 seconds nominal) and go to SLEEP. The watchdog will wake you up. In mine I do two consecutive SLEEPs, so I get a new reading a little more than once every 5 seconds. Of course this won't do you a lot of good if you need to log anything resembling an accurate timestamp, but I have gotten several months out of three AA cells this way. Mine was a 16F84 and DS1620, by the way - I think a 1620 would be fine with a slow clock, and it's only two more pins than an 18S20 and simpler software. Dale -- "Curiosity is the very basis of education and if you tell me that curiosity killed the cat, I say only the cat died nobly." - Arnold Edinborough On Thu, 7 Feb 2002, marco genovesi wrote: > Hi, > my 16F84 -based datalogger (16F84 running at 4MHz with a DS1820) have a > current > consumption of about 0.7 ma at 4.5V, 3AA cells (when sensor is off). > I'm not sure, but It is at least 1 month of continuous use without excessive > discharge of the cells. > This is enough for my most uses but not for all... > For long-time measuremets I would put the logger in "sleep": at this time I > have two (or more?) ways: > > - Use a 32 Khz crystal clock. > - Use an external circuit ( a 4060 CMOS with 32 Khz crystal ) that send an > interrupt to wake-up the PIC. > > The first solution isn't valid for DS1820 (timings, i think) but in this > event I can change with a DS1721. > I must also modify all the code delays, but this is obvious, but the board > is more compact. > The second is more complex to assemble but is still cheap and the pic's > clock remains 4Mhz. > > My questions: > > 1) Is 32 Khz solution too limited if used for other types of measure? > ( for example, i want use other sensors with frequency output ) > 2) Are there other CHEAP solutions for low current consumption? -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics