Hi Vasile, I welcome your comments on improving the design of my circuit. > Why you need 7 seg AND leds ? Can't you do it only on=20 > 7seg display ? The 7-segment display (red color) is to constantly display a number. = Even the decimal point is used as a separate LED indicator. The other two = LEDs (red & green) are required to indicate key press and mode changes. > 9 buttons AND 8 relays coud be connected on 6+1 pic pins using a > simple 3 to 8 decoder and a 3 x 3 matrix for buttons. That +1 pin is > available also for other jobs.=20 Well, driving the 8 relays with 3 to 8 decoder would mean using two = chips since I have to also use a relay driver like ULN2803. Instead, I have = used UCN5841A (from Allegro), which combines a serial-in parallel-out shift register and relay driver for 8 relays. This requires 3 pins, but two = of them are also used by the other shift register.=20 > ... often when you need serial/parallel=20 > extra devices is definitely the sign you must change=20 > to another microcontroller. ( excep designs dealing=20 > with dosens of relays and thousents of leds ) I agree. In fact I have been seriously thinking of using 16F870 (28 pin skinny DIP) instead of 16F628 for this project. I get 22 I/O pins and = more importantly, I can try out K=FCbek Tony's nice suggestion of using A to = D converter and only one pin to detect closing of 8 or more PB switches; = the added advantage being that there will be only 3 wires connecting the = main PCB and the keypad. Like it happens to many others, my problem is that I conceive the = design, write the code and make the circuit in the breadboard stage work as expected. Then new ideas flash in the mind. The design is modified, = code is rewritten and new features are added. The wonderful people on this list = with their suggestions greatly contribute to this process. This goes on for = a while. When the ideas for the project dry up, the order for the PCB is placed! Regards, Bala -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads