Hi,
I am using PIC16F18857 MCU and MPLAB code configurator and XC8 compiler..
Creating the project using MPLAB X IDE ...
For Normal operation IOC interrupt is generating after pressing the switch and setting the flag after interrupt trigger and i am checking that flag in timer and once the switch status becomes high means i am setting one more and processing that in to main while loop...
It working fine as i expected...
but i need to use SLEEP() in my code.. to avoid power consumption..
after adding the SLEEP() instruction in while loop.. it is going in to SLEEP mode by checking reduced current ..i am confirming SLEEP mode it is entering ...
after switch press IOC is generating but why it is not waking the device i am not getting..
Again it is going to sleep mode showing same current ..
can anybody please suggest me.. how to wakeup the MCU from sleep mode using IOC interrupt??
Putting PIC16F18857 MCU in to sleep mode and coming out from sleep mode
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: Putting PIC16F18857 MCU in to sleep mode and coming out from sleep mode
HI.
I would advise you to ask this at the Microchip forum ,People here work with Flowcode on PIC
I would advise you to ask this at the Microchip forum ,People here work with Flowcode on PIC
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
Re: Putting PIC16F18857 MCU in to sleep mode and coming out from sleep mode
Hi,
thanks for reply.. actually i was much struggling to post this problem in microchip forum..
if have any idea about my problem means please help me , it will needful for me..
thanks for reply.. actually i was much struggling to post this problem in microchip forum..
if have any idea about my problem means please help me , it will needful for me..
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: Putting PIC16F18857 MCU in to sleep mode and coming out from sleep mode
Having issues posting on the microchip forum does not mean you should post messages unrelated to flowcode on this forum.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Putting PIC16F18857 MCU in to sleep mode and coming out from sleep mode
Hello,
It's hard to know whithout seeing your code, are you reading the port register on the IOC interrupt and when arming the interrupt? Without doing this the interrupt won't fire.
It's hard to know whithout seeing your code, are you reading the port register on the IOC interrupt and when arming the interrupt? Without doing this the interrupt won't fire.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel