I'm having issues getting a 12F675 to wake up after a sleep command, I put a toggle LED routine either side of the sleep command to see that it was firstly getting to the sleep command (which it is) then I put the toggle routine after the sleep command - but it never seems to wake - any clues? Here's the snippet of code that's causing me greif
Batt: 'check battery level
adcin 3,battlvl
if battlvl < 26 then battflat = 0
if battlvl > 26 then battflat = 1 'battery near flat
if battlvl > 28 then pwrdwn 'battery flat goto power save mode
return
pwrdwn: 'power down mode
led = 0
hallpwr = 0
sleep 5
for b2 = 0 to 30 'toggle led routine
toggle led
pause 50
next b2
led = 1
pause 50
gosub batt
if battflat = 0 then start 'if battery getting topped up then turn back on
goto pwrdwn
Bookmarks