You could connect an optocoupler like this. R1 gives about 8mA thru the opto's LED and R2 gives about 5mA thru the opto's transistor. Your output will be inverted (i.e. switch on=output low). Motorola's databook says switching time will be on the order of microseconds.
There's no need for it, an opto-coupler as shown would be ideal, basically because it's current driven, rather than voltage driven - if the resistance of the wire was as high as 470 ohms, there's still plenty of current to feed the LED.
You could use a higher LED voltage, say 12VDC if you want, but you will need to adjust the value of R1 so that you don't put too much current thru the LED and burn it out. Motorola says the LED in the 4N37 can handle a max forward current of 60mA(!), but they recommend about 10mA for normal operation ...
are multiplexers used to increase the number of possible key switches in a key matrix? i mean over a hundred of switches.
the column of the matrix is connected to the output of the microcontroller and the row is connected to the multiplexers, while the outputs of the mulitplexers are the ones that are connected to the inputs of the microcontroller.
thus by increasing the multiplexers the number of rows are multiplied.
so if i use 8 ports as outputs(column) and for example 5pcs of 16X1 MUX. my switches can reach up to 8 * (5*16) = 640 switches.
and only utilizing 5 input ports of the microcontroller.
is this correct and functional? or are there other ways?