Robin2:
I'm not familiar with the sleep options so I can't help. The article by Nick Gammon that you linked to (and which I bookmarked) seemed comprehensive.This thing will only be on when the user is using it so I wonder how important sleep mode really is. It's not the same as somethng that must be available 24/7.
Have you considered reducing the clock speed - perhaps to 1MHz?
...R
I read Nick Gammons page and it was very helpful. As I said above 2ma over 5 seconds isn't much, however, the extra 2ma over several hours will add up, so I sleep in between timeouts and interrupts. So the basic idea is...
- Sleep as soon as the device is switched on
- Wait for a low signal on INT0
- Process beep(s) and either wait for timeout or turn on output if target met
- Go to sleep, rinse and repeat
I am also already running at 1Mhz.
The latest version of the code is working really well on the bench, so it's time to build the prototype and test it in the real world. I just need to order a few parts, and then design and mill the PCB.
Regards,
Les