I'm using a 12f675 to control a camera to take pictures of wildlife.I have a motion sensor hooked to gp3 which is a input only, but can't figure out why it never reads this. I need to hold that input low until the motion sensor sees motion which will bring this input high. Here's the code.********************************************* *******************
'* Name : hpcam.BAS *
'* Author : [select VIEW...EDITOR OPTIONS] *
'* Notice : Copyright (c) 2006 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 6/22/2006 *
'* Version : 1.0 *
'* Notes : *
'* : *
'************************************************* ***************
symbol cambut=4
symbol pir=pin3
symbol on=2
symbol lite=1
symbol led=0
symbol counter=5
symbol CMCON=$19
symbol ANSEL=$9f

main:
poke ANSEL,$00
poke CMCON,$07
high on
pause 250

loop:
if pir=1 then takepic
high led
pause 250
low led
pause 250
b1=b1+1
if b1>230 then camoff
goto loop

camoff:
low on
pause 2000
high on
pause 8000
b1=0
goto loop

takepic:
high lite
pause 250
high cambut
pause 1000
low lite
low cambut
pulsout 5,2
pause 250
for b0=1 to 4
pause 60000
high led
pause 250
low led
next b0
goto camoff