Thanks a lot to all those who responded to my query with helpful tips. Now I know that there are many ways of solving the problem, each with its own advantages - PISO shift registers, software, special chips from Philips & Maxim, matrix with diodes, etc. As you would all agree, when you use microcontrollers, the ideal solution would be to accomplish as much as possible through software and minimize cost and component count. Viewed from this angle, Roman's suggestion sounds very interesting as well as intriguing! How did he manage to all that without any extra chips? Roman Black wrote: "I have one circuit running - 16 independent dipswitches - a 7 seg display - 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?" Wow! That's brilliant, Roman. Must be a highly complex piece of code. My circuit has the following: - 9 PB Switches - 8 Relays (Driven by a 5841) - 1 7-Seg display including the Dec.Point (Driven by a 74HC595) - 2 Inputs for zero crossing signal & data from power line - 1 I/O for a DS1820 - 2 Outputs for Data & Clock combined with outputs for Red & Green LEDs - 2 Strobe outputs for 5841 & 74HC595 - 1 Output for an Orange LED I am using the internal oscillator of the 16F628 and MCLR is used as an input pin. So, all the 16 I/O pins are being used. Roman, your suggestions please. Regards, Bala -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body