PDA

View Full Version : Sleep until button press?



kevj
- 9th October 2007, 02:00
I know there are tons of ways to do this, but I'm looking for the most simple and purely PicBasic way of doing this (without writing assembly interrupts and such)...

- I need to put the PIC to sleep / low power mode for an unspecified time (perhaps days) then have it wake up when a button is pressed.

- The wakeup can be a complete reset or resume at a specific spot - matters not to me, as the program will start fresh from the top after being waken. It'll do some stuff then eventually go back to sleep until minutes, hours, or days later the button is pressed again.


I'm not looking for the code but rather a link please - I know this has already been discussed before but not having luck finding it. It does'nt have to even be an efficient way to do it. Just sleep, wait, and wake without ASM code. I did some searching and couldn't find anything specific.

I'm running a 16F677 if it makes any difference.

Thanks!

mackrackit
- 9th October 2007, 03:47
http://www.picbasic.co.uk/forum/showthread.php?t=6635&highlight=sleep