I don't know for sure, but keeping the pic in sleep and keep a real accurate time AFIK is not possible without external RTD, for a PIC chip having only TMR0 available. The 12F675 has the choice of switching from 4MHz internal to 32768KHZ external, which is limiting the power consumption. However, I think even in this way it can't keep an accurate time. The only way I see it's a continuous operation at 32KHz with less power then HS mode, with the leak of fast communications or faster events detection, or using TMR1 with an external and calibrate 32768 KHz oscillator. best, Vasile On Tue, 8 Oct 2002, Dean Brotzel wrote: > Hi, > > I was wondering if anyone has tried to keep somewhat accurate time using = only the wdt on a PIC (kinda like regularly scheduled interrupts but with s= leeps thrown in to save power). I'm using a PIC16F628 in my design and hav= e replaced the internal 4MHz oscillator with an external 10MHz ceramic osci= llator that is much less sensitive to temperature and changes in Vdd. The = 10Mhz oscillator is needed for the real time processing requirements done o= n the PIC. The PIC must also be able to keep track of time. This is done = by incrementing a count every time the wdt times out and wakes the PIC from= a sleep. The goal is to increment the count in regularly spaced intervals= which are used later as an indication of the time an event occurred. I co= mpensate for the extreme temperature and vdd sensitivity of the wdt by taki= ng a reference measurement of the shortest wdt timeout period of the wdt ev= ery so often. Even with compensation I still drift at least 30 minutes a m= onth. If anyone has tried this before and has any suggestions I would grea= tly appreciate it. In particular is there any weird behavior in terms osci= llator startup or vdd when the PIC wakes from sleeping or when the wdt time= outs that is not mentioned in the data sheets? > > Cheers. > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu