I am designing a Nixie tube watch. It is all on proto board at the moment and am still testing it. It runs from a 100mAh lithium battery and I obviously want it to run at the lowest power possible. There is an accelerometer which is powered up and takes readings and then powered off, this happens every 200ms. When the correct tip angle is reached, the Nixie tubes display the time.
The average current consumption is just under 100uA, which is great, but I want to improve this.
Currently I have a loop which waits for a 200ms interrupt to set a variable called 'wait' to 1, in the main loop I have...
while(wait == 0);
wait = 0;
So every 200ms, the interrupt fires and sets 'wait' to 1, then my while(wait == 0); is skipped, 'wait' is set back to 0 and the rest of the loop runs (it takes about 25ms). Then we get back to the while(..... again, and we wait for the interrupt to set 'wait' again......and so on.
I've read a bit online about 'sleep' and 'idle' in the PIC18F chips and I know 'sleep' won't work as the timers will be stopped, but would 'idle' save any power for me. I mean, idle mode keeps all the peripherals running, so would this save any power over what I'm currently doing? as surely the PIC isn't using much power sitting in a while loop.
Any help on this topic would be great.
The average current consumption is just under 100uA, which is great, but I want to improve this.
Currently I have a loop which waits for a 200ms interrupt to set a variable called 'wait' to 1, in the main loop I have...
while(wait == 0);
wait = 0;
So every 200ms, the interrupt fires and sets 'wait' to 1, then my while(wait == 0); is skipped, 'wait' is set back to 0 and the rest of the loop runs (it takes about 25ms). Then we get back to the while(..... again, and we wait for the interrupt to set 'wait' again......and so on.
I've read a bit online about 'sleep' and 'idle' in the PIC18F chips and I know 'sleep' won't work as the timers will be stopped, but would 'idle' save any power for me. I mean, idle mode keeps all the peripherals running, so would this save any power over what I'm currently doing? as surely the PIC isn't using much power sitting in a while loop.
Any help on this topic would be great.