> tied portb(4..7) to Vcc through switches and 1k resistors I don't quite understand what the configuration is (a) external pull-ups and switches to ground ? or (b) resistor in series with a switch to Vcc ? If (a) then you will see hard '0' and '1' If (b) then the pin will be floating, and may stay at '1' logic if the switch is open. Presumably it will be '0' at power-up and then pick up a charge. You could put a high-ish value (maybe 100k, depends on what resistor you have in there now [resistive divider]) to ground on the pin. This will return a '0' with the switch open and '1' when closed BTW, why Parallax (Scenix) code for PIC ? -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist