Proteus 8.0 - Password Based Door Lock System Using PIC Microcontroller.

·       For More Detail you can watch my video o this Project, link in Below

Link For Video:- Proteus 8 0 Password Based Door Lock System Project



program:-
#include <16f877.h>
#include <lcd_4bit.c>
#include <keypad.c>
#include <string.h>
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
void main()
{
char m[30];
signed int ss=60,mm=10,hh=00; //Setting the Count Down Timer.
int count=3;
lcd_init();
lcd_str("Password Door");
   gotoxy(0,1);
   lcd_str("Locking System");
   delay_ms(1500);
   char u[]="123",p[10],k;   //set Password as 123
l1:   
int i=0,d;
   lcd_clear();
   lcd_str("Enter Password:");
   gotoxy(0,1);
  while(TRUE)
  {
   k=key();
   if(k=='c')
   {
   lcd_clear();
   gotoxy(0,0);
   lcd_str("Enter Password:");
   gotoxy(0,1);
   i=0;
   }
   else if(k=='=')
   {
   p[i]='\0';
   goto l;
   }
   else
   {
   lcd_str(k);
   p[i]=k;
   i++;
   }
  }
  l:
  gotoxy(0,1);
  d=strcmp(u,p);
  if(d==0)
  {
  count=3;
  gotoxy(0,0);
  lcd_str("Correct Password");
  delay_ms(500);
  gotoxy(0,1);
  lcd_str("Door Opening.."); // Here you can activate Relay or anything
  delay_ms(1500);
  goto l1;
  }
  else
  {
  lcd_str("Wrong...");
  count--;
  if(count==0)
  {
  lcd_clear();
  lcd_str("SYSTEM LOCKED");
  printf("AT\r");    //GSM Configuration
   delay_ms(10);
  printf("AT+CMGF=1\r");
   delay_ms(10);
  printf("AT+CMGS=+91999500xxxx\r");  //Set the mobile Number to receive sms alert.
  delay_ms(10);
  printf("Door Security Alert!!");  //Alerting Message.
  delay_ms(10);
  putc(0x1A);
  delay_ms(100);
  goto timer;
  }
  delay_ms(1500);
   goto l1;
  }
timer:
  while(1)
{
ss--;
delay_ms(1000);
if(ss==0)
{
ss=60;
mm--;
if(mm<0)
{
mm=59;
hh--;
if(hh<0)
{
goto l1;
}
}
}
gotoxy(2,1);
sprintf(m,"%02d:%02d:%02d",hh,mm,ss);
lcd_array(m);
}

}

2 Responses to " Proteus 8.0 - Password Based Door Lock System Using PIC Microcontroller."

  1. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. I have Explained in Video. You Can Watch Video, Link Given Below Of Code

      Delete

Thanks For Commenting