Page 1 of 1

Timer1 running in SLEEP mode

PostPosted: Tue Jul 03, 2018 5:21 pm
by include12f675
Hi forum,
sorry I'm not often frequenting the forum.
I commonly use a 12F675, but one thing I never learned. Is the timer1 running when the MCU is in a sleep state ?
I mean, is the internal clock feeding the timer during sleep time ?

Anyways. With a different case I've try to fed the clock with a 32 kHz quartz. Everything is fine and shows the running time, but only when is not yet in a sleep state. Once the command is performed nothing comes back alive.
So I still not having much luck with low power projects :(

Re: Timer1 running in SLEEP mode

PostPosted: Tue Jul 03, 2018 7:16 pm
by Jorgef
Hi

Do you have the Timer1 configured for Synchronous or asynchronous operation.
As by the datasheet (section 5.4 page 35) the Timer1 can only operate in sleep when in Asynchronous mode ( T1CON./T1SYNC = 1).
Also the diagram in figure 5-1 (page 32) shows, at lower right, that the SLEEP signal afects the clock synchronization path, but not the oscilator neither the asynchronus clock path.

HIH

Re: Timer1 running in SLEEP mode

PostPosted: Wed Jul 04, 2018 2:19 am
by jtemples
No clocks are running in sleep mode. If you want TMR1 to run in sleep mode, you must provide an external clock on GP5.

Re: Timer1 running in SLEEP mode

PostPosted: Wed Jul 04, 2018 11:57 am
by Jorgef
Hi

The LP oscilator runs in sleep mode, with an 32.768KHz xtal across OSC1 (GP5) and OSC2 (GP4) pins, with relevant capacitors (18~22 pF) to ground, of course.
Also, as I mentioned before, it must be in asynch mode.

Re: Timer1 running in SLEEP mode

PostPosted: Tue Jul 10, 2018 2:04 pm
by include12f675
Sorry I'm late to reply. I was busy.
jtemples wrote:No clocks are running in sleep mode. If you want TMR1 to run in sleep mode, you must provide an external clock on GP5.

It might be the reason as I presumed. Otherwise the consumption in sleep mode wouldn't be below a uA ;)