MCU(PIC18F26K22) Sleep & Wakeup Mathod?

For general Flowcode discussion that does not belong in the other sections.
Post Reply
seokgi
Posts: 175
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 6 times

MCU(PIC18F26K22) Sleep & Wakeup Mathod?

Post 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.

BenR
Matrix Staff
Posts: 1726
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 438 times
Been thanked: 602 times

Re: MCU(PIC18F26K22) Sleep & Wakeup Mathod?

Post 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.

Post Reply