At 02:37 PM 4/15/01 -0700, you wrote: >Here is what I suggest: > >use 8 output pins >one input pin >pull down the input with a 10k resistor >every output pin is connected to the input pin >thru a switch >the switchs also have an led and resistor >connected to ground on the side opposite from >the output > >using 1/8 duty cycle, >set each output pin in turn to 5v >at this time also set the other outputs to inputs > if someone presses a switch, 5v is detected >at the input, so the code should pause until the 5v is gone. >the led will light on the switch press. You can use one more output to keep the lights from all lighting while it is scanning (keep it high (or open) until a hit is detected- it goes to the LED common). Also, when the first press is detected multiple leds may show until some of the switches are released. You'd need diodes on each switch to get around that. I'd suggest an 18-pin PIC16F627 with internal 4MHz clock for minimum parts count. Best regards, =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body