I think I've put my Picaxe to sleep :(

pjl83

Member
I was trying to experiment with the sleep command. I can remember the exact code but it was something like -

Code:
Main:
if pin3 = 1
then
gosub greenon
else
sleep 20
goto main
end if

greenon:
high 2
wait 3
low 2
return
After this didn't work I deleted the code without saving it. Now, everytime I've tried programming the chip (08M) it fails to connect. I have tried new batteries and still no joy!

I then read closer in the manual and see that

"The microcontroller is only woken by a hardware interrupt (e.g. hint pin change) or hard-reset. The chip will not respond to new program downloads when in permanent sleep."

Although I didn't use permanent sleep, the way the code reads, could it be in sleep mode forever? This may be total rubbish on my behalf but the hardware hasn't changed and the batteries and connection to PC are fine so it just seems a bit strange :confused:

Any ideas? (this could embarrassing :mad: )
 
Top