>> been doing basic i/o with 16f84 " if input do output " >> but i now need to be able to scan a 4 x 4 keypad and get >> 1 and 2 key inputs from it. Any suggestions or pointers >> would be greatly appreciated. Henry, Attached is a chunk of code to do just that. To simplify things, I require that "double" keypresses have a common line, although one could easily change by shifting bits around a little (rlf/rrf). I think you can probably figure out how to detect 3-down keypresses too, iuf you look at the pins on the rows/columns other than the "active" one. The enclosed module is intended to be called at about 60 Hz. In series with each pin used in the matrix is a 150 ohm resistor. VERY important. Diodes, etc. are not needed. Andy Attachment converted: wonderland:keyscan.src (TEXT/CSOm) (0000D8C5) ================================================================== Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865 Hardware & Software for Industry & R/C Hobbies "Go fast, turn right, and keep the wet side down!" ==================================================================