> But note: any sneak current paths from line 0 to line 1 (say) will go > through more than one diode; only if the switch at column 0, row 1 is closed > will there be a path with just one diode. If only there were some way to > distinguish between the one-diode case and the more-than-one-diode case... > > So my crazy idea was to drive line 0 high and line 1 low, then read the > state of line 0 (which, on the PIC, is supposed to reflect the actual > voltage on the pin, IIUC). My hope was that the input thresholds would be > such that with one diode, line 0 would be about 0.7V and would read 0, while > with two (or more) diodes, line 0 would be 1.4V (or more) and would read 1. > > Unfortunately, it didn't work. Even with just one diode, I couldn't get > line 0 to read 0. Sigh. Use the A/D inputs of the PIC instead ? (then you can define your own 0 and 1 voltage levels in software) Tho I am not sure why you want to do this in the first place. It is quite common to read keyboards in X-Y fashion. Just not with diodes in the juncions as you do. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.