Problem:
I'm using SLEEP uncalibrated to put the PIC to SLEEP until an IOC occurs earlier on in the program. I'm also using SLEEP 1800 to put the PIC to sleep and test that it's still dark before transmitting the VISITS data. I'm getting an error when I compile the program though (see attachment). I've turned the _WDT_ON but still this error. Any ideas? Is using SLEEP an SLEEP Period in the same program uncompatable?
Code:
DARK:
E_OUT=0 ' Disable transmitter
INTCON.0 = 0 ' Clear int on change flag
@ SLEEP 1800 ' It could be night time...It might only be a cloud though...
' so back to sleep for half an hour..zzzz
@ NOP ' Do nothing for 1st instruction on wake-up
if GPIO.4= 0 then ENCODE ' It really ia dark so carry on and transmit VISITS
IF GPIO.4= 1 THEN RETURN ' It's not dark after all so carry_on_counting
Forgot to add, if I comment out the line:
Code:
@ SLEEP 1800 ' It could be night time...It might only be a cloud though...
the program compiles
Dave
Bookmarks