My test circuit with only one transistor per row: Vcc | |-| | | 680ohm |-| 74LS04 | |\ phi |\ *------| >O--*--| >O-*----> Frequence | |/ | |/ | output to | | |-| digital | BC547B | | | 10K logic. /--|--\ | |-| | | | | | |--|--|-----------------+ Row | \|/ | | \--|--/ | | | Collumn |-| | | | R | |-| | Gnd The resistor R is not needed if all keys are capasitive. If they conduct, then it protects against too high current. It may bee common for all rows. The idea is to use a BC547B as simple amplifier. It detect low voltage changes on base. It is immune to low frequence noise because of impedance, and it only detect if the frequence is in phase or not with phi. The circuit may use decoders, or multiplexers as inverters and only be active for short time to minimalize noise from the keyboard. I have made it to result in lower freqence if keys are short, to make it possible to use with full conducting keys. I have not made software to pic's and like to know that it exist. It may be better to use optocoublers for using in rain. Regards, Jens Dyekjaer Madsen