> In my circuit, I am using all the 8 pins of Port B and pin 6 of Port A > as inputs to detect the closing of 9 PB switches. The PIC used is > 16F628 with The 74HC165 (parallel-serial) works OK for up to 8 and takes just 3 pins. I've also tried and used the 74HC251 and 4051 multiplexers -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.