Thanks a lot Skimask for your support.
I'm going to try with TMR1.
A little more power is maybe worth the precision gain.
Thank you.
Thanks a lot Skimask for your support.
I'm going to try with TMR1.
A little more power is maybe worth the precision gain.
Thank you.
Roger
You could add in a RTC chip, and wake up just a bit more often and compare the RTC's time with what you expected and adjust your nap/sleep time to get you really close to 15 minutes, or even use the RTC's alarm function (usually tied to a pin) to wake up the PIC at intervals. RTC chips use hardly any power except when awake and I'd suspect that adding an RTC would use much less power than adding another oscillator to a PIC.
Hi Flotul. I've used a code similar to this in the past and found it to be accurate within 2 minutes per hour using the internal oscillator set to 4 MHZ. Also, I operated it at 3V (using an LF series PIC), current consumption was only 1/2 mA and runs a long time on 2AA alkaline batteries.
x var word
let x = 0
start:
pause 1000
let x = x + 1
if x >= 900 then (15 minutes passed, do your measurement)
goto start
Thank you for your suggestions.
Two minutes may look acceptable in some cases but if you have to record datas over days and weeks, it's is no more accurate enough.
I'll have to make some tries but, as said by skimask, an RTC is maybe the best choice after all.
Thanks again.
Roger
Bookmarks