Bala Chandar wrote: > > 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 > internal RC Oscillator. Port B weak pull-up is enabled and PortA.6 has a > 4.7K pull-up resistor. > > As I am running short of I/O pins, I want to use an IC to reduce the number > of pins used by the PIC for detecting key pressings. After a search through > CMOS data book, I found 74HC147 (10 to 4 Priority Encoder) almost ideal for > the purpose. With this IC, I will need only 4 pins of the PIC and as many as > 5 pins will become available. Why use a chip? I have one circuit running 16 independant dipswitches, a 7 seg display and 2 input/output pins on a 16F84 which only has 13 IO pins, no other chips needed. Exactly how many things do you need to connect?? -Roman -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.