Posts Tagged ‘security implementation’

The  Figure is used for this application. The program prompts the user to enter his user ID by displaying a message “LOGIN” on the LCD. The user is expected to enter his ID using the PC keyboard. Then the program displays a message “password” on the LCD to prompt the user to enter the password. After entering the password, the program will check whether the entered information is correct or not. The system can also be used for cabinet lock-up or for any keyboardbased security implementation.This project is very useful to control the automatic door open with authentication,window open,or any security system.so try it now…

Authentication for Your Embedded System Application

Authentication for Your Embedded System Application

Program Source Code
******************************************************
#include <REG52.H>
#include <stdio.h>
sbit RS = P2∧0;
sbit RW = P2∧1;
sbit EL = P2∧2;
void INITt ();
void delay(int);
void INIT(void);
void ENABLE(void);
void LINE(int);
char array[]=“LOGIN:”;
char pass[]=“EMBEDED”;
char Access[]=“CORRECT”;
char denied[]=“WRONG”;

void INITt() // function to Initialize the timer
{ TMOD=0x20;
TH1=0xFD;
SCON=0x50;
TR1=1;
}void LINE (int i) // Enable the line function
{if (i= =1)
{RS=0;
RW=0;
P1=0x80;
ENABLE();
RS=1;
} else
{RS=0;
RW=0;
P1=0xC0;
ENABLE();
RS=1;
}
}
void delay(int k) // invoking delay function
{int i,j;
for (j=0;j<k+1;j++)
{ for (i=0;i<10000;i++);
}
}
void ENABLE(void) // invoking the enable function
{EL=1;

delay(1);
EL=0;
delay(1);
}
void INIT(void) /∗initialization of LCD display∗/
{RS=0;
RW=0;
EL=0;
P1 = 0x38;
ENABLE();
ENABLE();
ENABLE();
ENABLE();
P1 = 0x06;
ENABLE();
P1 = 0x0E;
ENABLE();
P1 = 0x01;
ENABLE();
}
void main (void) // main function
{char b,var;
char ∗p;
int i,j,k;
while (1)
{INIT();
LINE (1);
for (b=0;b<8;b++)
{p=&array;
P1= ∗p++; /∗ increment the pointer and point the
data from the array ∗/
ENABLE ();
}

{INITt();
RI=0;
var=SBUF;
while(!RI);
RI=0;
while(1)
{for (i=0;i<8;i++)
{
if((pass[i])= =(var[i]))
for(j=0;j<8;j++)
{LINE(1);
p=&Access;
P1= ∗p++;
ENABLE();
}else
{LINE(1);
p=&denied;
P1= ∗p++;
ENABLE();
}
RS=0;
P1=0x01;
ENABLE();
RS=1;
}}
}}}
******************************************************