I'm using a base code that worked to run a camera with a switch, added some fuses and was attempting to use the sleep command and an interupt to bring it out of sleep and operate the camera. I wanted the pic to basically sleep until the interupt occured. using the sleep with no period I get an error when compiling. If I add a period of 0, it will compile but the program doesn't do anything at all now. I guess I need help again.
@ DEVICE pic12F629
@ DEVICE pic12F629, MCLR_OFF
@ DEVICE pic12F629, CPD_OFF
@ DEVICE pic12F629, BOD_OFF
@ DEVICE pic12F629, PWRT_ON
@ DEVICE pic12F629, PROTECT_OFF
SEN VAR GPIO.4
POW VAR GPIO.1
SHT VAR GPIO.2
LOW SEN
LOW POW
LOW SHT
INPUT SEN
OUTPUT POW
OUTPUT SHT
BASE:
ON INTERRUPT GOTO LOOP
SLEEP
GOTO BASE
LOOP:
HIGH sht
PAUSE 100
HIGH pow
PAUSE 2000
LOW POW
PAUSE 4000
LOW SHT
PAUSE 6000
HIGH POW
PAUSE 1000
LOW POW
RESUME


 
		
		 
						
					 
			 
			 
			 
					
					 Another 12F629 Rookie problem
 Another 12F629 Rookie problem
		

 
 
		

Bookmarks