Hi Dwayne,

This is my full code:

TRISA = %00000011
TRISB = %00000000
loop1:
if PORTA.0 = 1 then
PORTB.0 = 1
endif
high PORTB.1
goto loop1
end


I am using the PIC16F84. What I am trying to do is just have PORTA.0 be an input and if it is high then it will turn the led at PORTB.0 on otherwise the led should be off. PORTB.1 is just the heartbeat.

What is happening is that the led is on all the time no matter if PORTA.0 is connected to 5 volt or ground. It is like it is just missing the IF statement and executing the operation anyway. (Which I am guessing means that the microcontroller is somehow always seeing PORTA.0 as high?)

Thanks for the help.