Password Based Door Lock System using 8051 Microcontroller

8051 code for Password Locking System

This program is to take input from the keypad as the password which is set by the user and displays whether the password is correct or incorrect on LCD.


1)Initializing the password in an array called pass.
2)Taking the inputs from the keypad.
3)The flag variable keeps the count of number pressed.
4) As shown below program contains 4 password letters if enters into the if loop if four letters are pressed and compares the pass array with the user pressed array.
5) If each letter is correct it increments the status variable to ensure all the letters
are matched.
6) When status is 4 it display Correct password on LCD else displays Incorrect password on LCD.