Basic Level     Skills: Not specified    
Author email


Combination Lock with LCD and Keypad using pic16f628A:

A Brief Description:

This project is written in C language. The basic user lock is of 2 Digits.
The input is taken from a 4x3 Keypad (please see the schematic for more information) and Display the user input on a 2x16 LCD. A pin is assigned as output for activating and deactivating the lock. For demonstration I have connected an LED to that pin.

How combination lock works:

1. Turn switch on (5V DC voltage power supply)
2. A message name “Combination Lock” will display on LCD at first row,
3. Second row display “Enter Pass:” it asked you to enter password for open doors.
4. In this lock design it has three doors. These are the code locks to open doors “door1=05, door2=28, door3=82, door1 & door2 = 33”.
5. If you entered one of the codes in step 4 then press enter key that door will open. For example, you enter 05 for door 1 it’s then open and close door 1 after 5 seconds.
6. If codes you entered are not matched one of the code in step 4 then led door is not turn on.
7. If your first attempt failed the message “invalid code’ display on screen.
8. Then you pressed any key to clear and you can try for second attempt.

After you have reached three attempts but you have not entered correct password. Next Any Keys press alarm will activate for 5 seconds.

Using the Keypad:
Keypad has 12 keys (4x3) starting from 1,2,3,4,5,6,7,8,9,*,0,# (please see the schematic for layout). Numeric keys are used for entering numbers. '*' is used as the Cancel key and '#' is used as the Enter key.

Download File Information:

Diagram bitmap.bmp
Lock_EBES_MODEL.DSN ( Using Proteus to run this file)

70.27 kB





22 Dec 2007: 12:58 PM
its excellent in proteus
27 Dec 2007: 21:29 PM
i want code for password based door locking system
28 Dec 2007: 02:53 AM

4. In this lock design it has three doors. These are the code locks to open doors “door1=05, door2=28, door3=82, door1 & door2 = 33”.

20 Feb 2008: 15:19 PM
excellent effort
06 Mar 2008: 13:14 PM
necesito ke me ayude a deplegar un * en un modulo lcd con un 89c52 mi mail es
12 Mar 2008: 16:38 PM
Does anybody have the PCB for this project. If so woud you poste it here. BW Luka
16 Apr 2008: 08:38 AM
hai dude can you tell me the signals from the keyboard
21 Jul 2008: 13:38 PM
just mail me the PCB of the circuit
04 Aug 2008: 06:12 AM
any1 no why the output of keypad 4x3 ==15 and this refer to #
and also 13 refer to *...can find inside the code
04 Aug 2008: 12:16 PM
4x3 keypad is actually called telephone keypad. so you can see on your telephone * and # keys are there.
11 Aug 2008: 07:45 AM
sir i need a datasheet of LCD 20*4
pl. send me i want to implement in another project sir
12 Aug 2008: 02:43 AM
datasheet is same as that of 16*2, you can download from the link provided in LCD tutorial Introduction page.
15 Sep 2008: 12:15 PM
sory.. sir, can i obtain asembly language here??
23 Sep 2008: 12:32 PM
this is wonderful, but it will be a plus if you could change with some combination.great job
12 Dec 2008: 20:04 PM
what pic should i use...will it work in PIC18F46K20
28 Jan 2009: 07:24 AM
Hey can you please tell me RP1-RESPACK-8, what resistor value i have to use. please email me on
09 Feb 2009: 17:05 PM
does anyone know wat respack 8 value should i use
14 Feb 2009: 23:06 PM
v good
19 Feb 2009: 06:27 AM
is there an assembler version for this projects??
pls post
02 Mar 2009: 05:38 AM
is there assembler version code if there then plz give me
10 May 2009: 03:24 AM
i want project nams based on 8051
04 Aug 2009: 14:38 PM
gr88888888 project
17 Aug 2009: 07:51 AM
what compiler does this use?
30 Sep 2009: 18:56 PM
What compiler does the creator of this project use?Cuz I am using CCS and this compiler shows a lot of I need this to complete it!!!
27 Nov 2009: 16:42 PM
sir can we change the password of the doors. plz reply.
if not so what can we do to change password

29 Nov 2009: 12:26 PM
password is hardcoded, you can change it during assembling. but on runtime you cannot change.
23 Dec 2009: 03:36 AM
i m very much happy,bcs i needed a such type ofpic project to start my pic programming after tuch with 8051.
thankyou very much and also this site thanks.............................
21 Mar 2010: 06:33 AM
does any 1 have the pcb layout for this project?
24 Mar 2010: 16:57 PM's perfect on proteus..Unfortunately i have build the pic trainer based on pic16f877a..i don't know how to reassign the port for lcd..can u help me to provide the c program for pic16f877a..really2 appreciate if u could help me..thanks
26 Mar 2010: 09:30 AM
use forum better..
07 Apr 2010: 21:48 PM
sir....i had run this on pcb board..but y the lcd didn't show the number or word?
08 Apr 2010: 02:18 AM
check your connections..
08 Apr 2010: 22:28 PM
i do follow all the connection, but still didn;t have anything output at lcd.. but the led still function if i enter all of the password
11 Apr 2010: 08:30 AM
try changing LCD then.
15 Apr 2010: 22:27 PM
the lcd still display nothing...
do u have any idea?
please help me
16 Apr 2010: 09:00 AM
use forum
17 Apr 2010: 03:12 AM
what programmer are you using??
15 Jul 2010: 08:44 AM
Plz send me the source code for password door locking system as soon as possible...........
15 Jul 2010: 16:33 PM
its in zip file, just download it using the download button.
25 Nov 2010: 12:05 PM
The source code u provided does not include in header files...
Can u please tell which header files to include?
Also there are no macros defined...I am using PIC C compiler...
please tell me on which compiler did u test?
24 Apr 2011: 11:37 AM
i need the header file...
can some one pls email to my mail box?
26 Apr 2011: 20:37 PM
u got the header file?pls send to me ,,thanks ya..
27 Apr 2011: 12:49 PM
please use forum for any question or help.
25 Oct 2011: 23:43 PM
could you tell me which compiler is being used?...urgent..
nazmi faiz
12 Dec 2011: 08:50 AM
salam...can anybody tell me how to connect the ic to the keypad?each keypad have different pin connection and i want to know the detail on how to connect ot with the ic.
10 Jan 2012: 22:45 PM
hello, may I know where to put the buzzer in the circuit?
27 Jan 2012: 10:00 AM
Where do I connect the buzzer? and does the crystal not needed?
prajapati jigar
24 Feb 2012: 01:35 AM
sir pleses send me assembly progrm code in my email id
my email is
12 Jul 2012: 00:04 AM
i need the complete info about paasword based door locking system project plz send me to my e mail id
16 Sep 2012: 09:12 AM
i cant download the proposal about this project. can u send to my
17 Sep 2012: 08:18 AM
are you getting any error? Try not to use download manager.
22 Jul 2013: 18:49 PM
can we implement this project with amel at89c52 microcontroller if possible plz help me to integrate with at89c52 this project
24 Jul 2013: 16:37 PM
plz tell me in this project we dont use crystal oscilator ? why
muhammad bilal ahmad
23 Aug 2013: 00:36 AM
i requried a code of combination lock for pic 18f452.plz some one send me on email id
23 Aug 2013: 02:33 AM
what value of 2 resistor at circuit???
25 Aug 2013: 09:32 AM
please use forum...
(Required; Min length 5)
(Required; will not be displayed)



Wed Apr 16 2014, 07:32 AM
Tue Apr 15 2014, 04:12 PM
Tue Apr 15 2014, 11:21 AM
Mon Apr 14 2014, 10:00 PM
Sun Apr 13 2014, 02:59 PM
Sun Apr 13 2014, 12:41 PM
Sun Apr 13 2014, 09:00 AM
Sun Apr 13 2014, 01:54 AM


Mon Apr 14 2014, 01:00 PM
@Haranadh,bipin chandra etc. Create threads for your questions.
Sun Apr 13 2014, 04:05 AM
we bought HC 06 Bluetooth modem instead of Module ,Can any one help me of using it as bluetooth module since i am doing this project?
Sun Apr 13 2014, 03:58 AM
Hi,Actually we bought Bluetooth modem instead of Bluetooth Module
Sat Apr 12 2014, 02:55 PM
Please use forum if you want to ask a question.
Sat Apr 12 2014, 01:06 PM
Hi Ahana,I can Help you on this
Sat Apr 12 2014, 03:51 AM
bipin chandra
can anybody help me. we are making a project to control the position of dc motor. so there we need to interface lcd screen and the 4X3 memberane keypad and a dc motor driver chip. can anybody please give me the complete circuit diagram connection of these components with the 8051.and alse help in the programming. my email id is
Fri Apr 11 2014, 01:10 PM
will anybody tell me why do we need comma positions to be considered to know about latitude and longitude from gps?
Thu Apr 10 2014, 01:31 PM
sayed awad
how do i interface energy meter with msp430 kit microcontroller ??
Wed Apr 09 2014, 03:29 PM
In a section the forum you mean?
Wed Apr 09 2014, 02:10 PM
how to create threads for ourself?
  Choose Skin