Hello GurkaN,

sorry for delayed answer, a lot of work to be done.


Quote Originally Posted by Gurkan-demirbas View Post
How have you connected the switch to the Port pin?
When you press the button; which logic level occurs on the pin? 5 Volt? 0 Volt?
Well if the port pin gets 5 volt when you press, ==> your btfss is wrong; How?
btfss SWPORT, SW1 ==> test SW1 and skip the next, if it is Logic1 (5 Vdc);
call Switch1 ==> if the pin is Logic0 (0 Vdc) then this command will be executed because of the previous.
Then, it will turn on the lights.

Change your hardware, or the simpler way is to change your code to....
btfsc SWPORT, SW1
call Switch1

The situation is the same for the other SWs and also other LEDs

GurkaN
Thank you for your help and advices. I am beginner and every information is useful.
When I press button, 0 V occurs. I have tried it on protoboard and it works. I will
test code and hardware with both situations.

thanks,

regards