I am thinking just an On Interrupt ExtInt0 is required.
#chip 16f690,8
#config MCLRE=On, INTRC_OSC_NOCLKOUT
#define Led PortC.0
dir LED out
On Interrupt ExtInt0 call Wakeup
OnWakeup = False
Main:
If OnWakeup = True then
notcount = 5
Else
notcount = 2
end if
For count = 1 to notcount
SET LED ON
wait 50 10ms
SET LED OFF
wait 50 10ms
Next
asm sleep
goto Main
sub Wakeup
OnWakeup = Not OnWakeup ;could use a nop instead
end sub
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What cammands are needed to wake a sleeping 16f916 using the extint0 pin, what varibles need to be set before sleep mode?
I am thinking just an On Interrupt ExtInt0 is required.
#chip 16f690,8
#config MCLRE=On, INTRC_OSC_NOCLKOUT
#define Led PortC.0
dir LED out
On Interrupt ExtInt0 call Wakeup
OnWakeup = False
Main:
If OnWakeup = True then
notcount = 5
Else
notcount = 2
end if
For count = 1 to notcount
SET LED ON
wait 50 10ms
SET LED OFF
wait 50 10ms
Next
asm sleep
goto Main
sub Wakeup
OnWakeup = Not OnWakeup ;could use a nop instead
end sub