Thank you to all who offered suggestions and ideas, it was all helpful, if only to extend my knowledge of possible fault conditions. I now think the problem is associated with PORTB, 6, as when I change my code to have the switch on PORTB, 5 it works fine. The data sheet shows PORTB, 6 is also the serial programming clock (this shouldn't do anything with /MCLR tied high?) and part of the ICD circuit (I don't know anything about this). My project is moving ahead again now with PORTB, 5, but I would like to know if I missed a configuration bit or something that might have caused this. I definately don't want to have this problem again. I have another project which uses PORTB, 6 with no ill effects so far, though I would like to clear this up before I commit it to production. Thank you all again, -Carl -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST