Log in

View Full Version : "Hello......I feel vewwy sleepy"



HankMcSpank
- 22nd March 2011, 10:05
Just wondering if anyone has a a pointer to a primer (or demo code) wrt to the use of

sleep
nap
WDT

Just to appraise you of the latest nut I'm trying to crack....

I want to use my PIC (16fl1824) circuit to run off a 9V battery....& to conserve power, during a period of inactivity (ie no signal observed on a nominated ADC pin for say 10 mins), the PIC collects some 'shuteye'....& before doing so, also shuts down an external opamp (this opamp in turn feeds the aformentioned signal into the ADC pin -....so I can't reawake by "something arrives at the ADC pin" method, because the opamp feeding a signal into the ADC pin will be switched off) ...I've one 'capacitive touch sensor' acting as a selector switch in my circuit, so ideally would like to have the PIC awaken out of its slumber when that is touched?

never dealt with sleep, naps or WDT so any top tips gratefully received.

Archangel
- 31st March 2011, 04:52
Hi ya Hank,
Here is a pretty good thread to read dealing with sleep on a 16f690:
http://www.picbasic.co.uk/forum/showthread.php?t=11325&highlight=toilet+flusher

rsocor01
- 2nd April 2011, 14:05
Also, this thread is very helpful.

http://www.picbasic.co.uk/forum/showthread.php?t=13560