Page 1 of 1
sleep mode with PIC?
Posted: Mon May 16, 2011 4:10 pm
by v_gatev
Hi, I want to put a pic16f627 in sleep mode and then to wake it up, when a button is pressed. Is there a different way than using ASM or C code in my program (only with flowcode blocks)?
thanks
Re: sleep mode with PIC?
Posted: Mon May 16, 2011 4:40 pm
by Benj
Hello,
First you will need to enable an interrupt to wake up your device.
This can either be an INT pin, a port interrupt or a timer based interrupt.
For the INT and Port interrupts these will automatically fire when the switch is pressed.
For the timer based interrupt you will have to monitor the switch from the timer interrupt service macro using an input icon.
To send the device to sleep simply use the following line in a C code icon.