On Wed, 2 Dec 1998, Rigby-Jones, Michael [PAI01:4837:EXCH] wrote: > OK, I got bored last night and got to thinking if I could interface a 3x4 > matrix keypad using less than 7 lines without shift registers etc. I > suspect it must have been done, but I figured out a (possible) solution > which uses only 4 lines and some diodes. > > I haven't got any hardware to try this out on at present, but I'd be > interested in any comments. I started writing the code in Hitech C but > figured that I had to get to grips with PIC assembler some time so this is > my first attempt, and is therefore probably full of standard mistakes and is > most definately in need of optimisation. I haven't seen your code yet but I have to say that AN512 allows one to connect buttons through a SIPP R ladder with good results ;) 8 keys per ladder is the usual limit, you can use 3 ladders with 4 pins to interface 24 keys to the PIC. hope this helps, Peter