Introduction - If you have any usage issues, please Google them yourself
Using AT89C2051-24PC in 20-pins SOIC-20 SMT Package , we deleveloped a very verstyle matrix keypad with a power ON/OFF dedicated key with 3 sec hold to ON/OFF the P1.7 and scanning all the keys and send the appropriate byte to the serial port of the MCU. this code could b used in many applications with other embedded controllers.