> 1-pin? Ok fine. I dare you... Let's see you do it with 0 pins! :) > > That's why I put the "more external hardware" qualifier. Resistors are > external hardware. I'll have to think about the 1-pin solution. Seems like > it would be a challenge to be able to detect multiple keys pressed at the > same time. Gee Whiz, Thanks a lot Mike. Now I gotta think about this all > night :) One pin is a sub case of 3 pins. Detecting multiple key presses becomes more complicated the fewer pins you try to use, and error catching becomes more difficult. For example, 8 keys per pin means 8 discrete values between, say, 0-5V (we'll be easy on ourselves for this example ;-). That means we should pick our resistors such that the 0th key on the row is 0 volts, the 1st key is .625V, and so on, with no key at all being 5V. Figure out your error tolerance (due to temperature variations, resistor tolerance, phases of the moon (resistor tolerance will probably swallow the others in most cases)), and any measured resistance outside of the acceptable error is ignored as a multiple key press. Go to all 24 keys on one pin and it becomes increasingly difficult to catch those "out-of-range" errors, since the acceptable values get to being quite close to one another. Still doable. I originally hit upon this method trying to put a keyboard and an LCD onto an 18-pin PIC (the dreaded 18F1320, in fact), along with some other stuff. This was the only way I could figure to do it, and it has worked like a champ. It's also suggested in the Microchip "Tips 'n Tricks" pdf. I forget the actual title, but that phrase sums it up nicely. Mike H. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist