chip_1,
Try this..remove the pauses from your program and declare your input and output pins.
--------------------------------
TRISB=%11110111 'make portb.1 and input and portb.3 an output
start:
if portb.1 = 1 then led
else
portb.3=0
goto start
led:
portb.3 =1
goto start
---------------------------------
OR a smaller version would be without the subroutine LED
TRISB=%11110111 'make portb.1 and input and portb.3 an output
start:
if portb.1 = 1 then
portB.3=1
else
portb.3=0
endif
goto start
---------------------------------
Bookmarks