I'm new to PIC programming and i have a question
I want to know how to get an input on an 16f688
i want to switch on a led if some port is high and turn it of again when it's low, but i can't get it done
this is the code i use but it doesn't work yet
<code>Led Var PORTC.1
Sensor var PORTC.2
high Led
pause 5000
low led
input Sensor
loop: if sensor = 1 then
high led
else
low led
endif
pause 500
goto loop
end</code>
I previously programmed BASIC stamps so i have some programing experience.
Thanks in advance:
Chris
Bookmarks