Have you tried replacing the 47K resistor with a 10K as somebody suggested earlier? Methinks the 47K is to high and the input is floating, possible oscilating with interference causing your led's to switch on and of fast (you don't see it). Yellow will turn on because you are taking the pin to ground. A shot in the dark here. Also, what happens if you take the switch to +V and the resistor to ground does the green come on then and maybe not the yellow? Also, you only need 1 NOP instruction between the switching. Quentin -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.