I recently asked some questions about timings, loops and interupts, with some good responses - however, further reading has raised even more questions.

I have noticed that several people refer to the watchdog timing waking up the PIC when in sleep, i thought that the watchdog timer just reset the PIC?

Is the internal RC oscillator used for the watchdog also used for anything else, i.e. sleep?

Also, if i was to create an application that, for example:-

1, Used TMR1 with an external 32Khz crystal, an the interal RC oscillator for the main program (or even just one oscillator using idle).

2, Had an interupt set for say, 25ms, which then incremented some variables, then jumped to a main routinue.

3, The main routinue then checked some inputs and the variable counters and set anything that was needed, then went to sleep waiting for the next interupt.

How do you set this, would you just make the sleep command longer than the expected interupt time?

Any guidance would help.

Gordon.