HI Melanie - just curious, isn't that more-or-less what the PBP "SLEEP" command does?
Also, seems like he'd still have the inaccuracy of the WDT clock to deal with (variance between devices, etc).
Arch
HI Melanie - just curious, isn't that more-or-less what the PBP "SLEEP" command does?
Also, seems like he'd still have the inaccuracy of the WDT clock to deal with (variance between devices, etc).
Arch
"Data sheets? I ain't got no data sheets. I don't need no data sheets. I don't have to read any stinking data sheets!"
Yes, in a way. PICBasics SLEEP uses the WDT but doesn't cause a WDT event. I was actually thinking about causing a WDT to happen... but yes you're right, both methods rely on the WDT oscillator which isn't too hot on accuracy.
Without adding external Hardware, we're in trouble here trying to maintain accurate timing whilst in a Low-Power quiesce mode. Lots of things 'should have' been designed in... if I was doing this, I'd probably run my application at sub 100kHz and have chosen one of the better Micropower PICs, and/or have an external RTC that could wake me every second. But Brad's stuck with an existing design and has to make the best.
Best thing to do, if Power is really an issue, is to switch all I/O's to ensure there's minimal current drain, and run the PIC at the slowest clock rate you can get away with. If that means a 32kHz xtal and having to manually work-out Pauses and Timings for PBP, then so be it.
Melanie-Thanks again for the fast responses.
I'll try your suggestion counting WDT events.
Max time in sleep mode is closer to 2 hours, not 5, and the timer/clock will be reset at least once a day so accumulative time errors will not exist past the end of say 16 hours of continous operation.
I was hoping you would suggest some of your code from the Olympic Timer project. I saw something that might work at this link http://www.picbasic.co.uk/forum/showthread.php?t=603
What do you think?
B
Yes, my Timer Code will happilly work for you but not when the PIC sleeps, and I thought you wanted to conserve power by sleeping?
Bookmarks