Timer1 running in SLEEP mode

(instructions, reset, WDT, specifications...) PIC12F6xx, PIC16Fxxx, PIC16F6x, PIC16F7x

Timer1 running in SLEEP mode

Postby include12f675 » Tue Jul 03, 2018 5:21 pm

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 :(
include12f675
 
Posts: 12
Joined: Sat May 26, 2018 6:50 am
PIC experience: Experienced Hobbyist

Re: Timer1 running in SLEEP mode

Postby Jorgef » Tue Jul 03, 2018 7:16 pm

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
Best regards
Jorge
Jorgef
Verified identity
 
Posts: 19
Joined: Wed May 30, 2018 8:46 pm
PIC experience: Professional 5+ years with MCHP products

Re: Timer1 running in SLEEP mode

Postby jtemples » Wed Jul 04, 2018 2:19 am

No clocks are running in sleep mode. If you want TMR1 to run in sleep mode, you must provide an external clock on GP5.
jtemples
Verified identity
 
Posts: 195
Joined: Sun May 25, 2014 2:23 am
Location: The 805
PIC experience: Professional 5+ years with MCHP products

Re: Timer1 running in SLEEP mode

Postby Jorgef » Wed Jul 04, 2018 11:57 am

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.
Best regards
Jorge
Jorgef
Verified identity
 
Posts: 19
Joined: Wed May 30, 2018 8:46 pm
PIC experience: Professional 5+ years with MCHP products

Re: Timer1 running in SLEEP mode

Postby include12f675 » Tue Jul 10, 2018 2:04 pm

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 ;)
include12f675
 
Posts: 12
Joined: Sat May 26, 2018 6:50 am
PIC experience: Experienced Hobbyist


Return to 14-Bit Core

Who is online

Users browsing this forum: No registered users and 7 guests

cron