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.
MCU(PIC18F26K22) Sleep & Wakeup Mathod?
-
- Posts: 206
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 1:43 pm
- Has thanked: 5 times
- Been thanked: 7 times
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: MCU(PIC18F26K22) Sleep & Wakeup Mathod?
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.
After the interrupt period the device will reboot and start again from the beginning.
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();
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel