source= http://www.piclist.com/postbot.asp?id=piclist\2003\04\11\174744a Let me see if I have all this right. Combining Scott and Eric's comments you could do this: 0 1 2 3 GND | | | | | 0---+--KEY-KEY-KEY-KEY- | | | | | 1---+---+--KEY-KEY-KEY- | | | | | 2---+---+---+--KEY-KEY- | | | | | 3---+---+---+---+--KEY- | | | | | Weak pull-ups enabled, first read the port and check for any lows, this would be a key on the GND (far right) column. If all pins are high, ground pin 0 and any lows on 1 thru 3 would be a key in the top row. Then ground 1 and a low on 2 or 3 indicates the two keys on the second row (other than the last column), finally ground 2 and check the remaining key (on the third row) by reading back 3. That is a 10 key pad in 4 IO lines with no external components other than the keys. --- James Newton: PICList.com webmaster, former Admin #3 mailto:jamesnewton@piclist.com 1-619-652-0593 phone http://www.piclist.com/member/JMN-EFP-786 PIC/PICList FAQ: http://www.piclist.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads