>From: "James Newton, webhost" >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. Unfortunately you don't get n-key rollover this way (something I require, but that's just me), so you might as well fill in the lower half of the triangle and get 16 keys, no? 0 1 2 3 GND | | | | | 0---+--KEY-KEY-KEY-KEY- | | | | | 1--KEY--+--KEY-KEY-KEY- | | | | | 2--KEY-KEY--+--KEY-KEY- | | | | | 3--KEY-KEY-KEY--+--KEY- | | | | | Btw, why did this thread become [OT]? Should I have marked my original query [OT]? _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.