I have an LED on GPIO.0, I want it to light when GPIO.1 is low. In this program the LED comes on for 1 second at the beginnig, goes off for 1/2 sec then comes on and stays on. It does not matter if GPIO.1 is high or low. How do I make it work only when GPIO.1 is low?
rem device = 12F675

high GPIO.0
PAUSE 1000

ANSEL = 0 'GPIO.0 TO GPIO.3 SET AS DIGITAL
OPTION_REG = 0 'WEAK PULLUPS ENABLED
GPIO = %00111110 'PORT GPIO.0 SET LOW INITIALLY
WPU = %00110110 'SETS WEAK PULLUP ON DIGITAL INPUTS


rem define variables
time1 var byte: time2 var byte: time4 var byte: time8 var byte
time var word
LOW GPIO.0
PAUSE 500
IF NOT GPIO.1 THEN
HIGH GPIO.0
ELSE
LOW GPIO.0
ENDIF
END