Page 1 of 1

MCU(PIC18F26K22) Sleep & Wakeup Mathod?

Posted: Tue May 31, 2022 10:37 am
by seokgi
Goog morning .!!

I'm working on a project using a PIC18F26K22. It is powered by a battery. So I need to conserve the battery.
I want to use a timer to wake up at a specific time to work, and to wait in sleep mode when the work is finished.
Can you give me a simple example or a procedure I need to follow?
Thank you.

Re: MCU(PIC18F26K22) Sleep & Wakeup Mathod?

Posted: Tue May 31, 2022 10:58 am
by BenR
Hello,

It should be as simple as do the job you want the MCU to do. Enable a timer interrupt with the time you want to spend asleep.

Then call this using a C icon.

Code: Select all

SLEEP();
After the interrupt period the device will reboot and start again from the beginning.