Sleep and wake timer every 3 minutes

Status
Not open for further replies.

zuser999

Newbie level 6
Joined
Jul 8, 2013
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
LA
Activity points
99
Hello,

I'm working with a PIC18 and I want to put this PIC into sleep mode and wake it up every 3 minute. How is that possible?
The WDT can put the PIC into sleep only 2.3 seconds.

The IDE I'm working in is MikroC

Thank you
 

WDT is used to wake your PIC.

Follow this rule:-
Configure watchdog time for the delay required by you
Enable the Watch Dog Timer

Clear Watch Dog Timer
Sleep()
//Controller is in sleep Mode and will wake when watch dog timer overflows

Do it repeatedly
 

I don't want the PIC to wake up every 2.3 seconds and then put it into sleep. I want the PIC to wake up every 3 minutes and then go to sleep.
As I said in my post, with WDT you can put your PIC into sleep mode for 2.3 sec
 

Hi,

Using the method xpress_embedo suggests only wakes the chip for a couple of nano seconds so it can check/update a 3 min counter and goes back to sleep ; unless the 3 mins has elapsed.

It seems all other methods of waking from sleep requires an external interrupt or possibly Timer1 interrupt if you used a very low speed oscillator - see this thread.
https://www.microchip.com/forums/m596595.aspx
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…