Hello,
I am using an 18F4550 and I am trying to get it to read a digital input and turn on a LED when it is on. For some reason there is a five second pause when I trigger the pin. When I reset the PIC and plug it back in, there is no pause. The pause only occurs when I trigger the pin. The code I am using is below.

It may be important to note that I am using about 10V with a 22K resistor for input, if that has anything to do with it.

Code:
-----------------

rts var porta.2
cts var portd.3
led var portd.2

input rts
output cts
output led

ADCON1 = %00001111

low led : low cts

main:

while rts = 1
high led
wend

low led

goto main

--------------------

Can anyone help?...skimask?

Thanks,

-Mike