Question

In: Computer Science

What is the circuit diagram of password based door lock system project by using interface 8088...

What is the circuit diagram of password based door lock system project by using interface 8088 microprocessor with peripherals Ics ( PPI , PIT and PIC ) and what is code by using assembly language ?

notes:
1- this question related to microprocessor Interface subject .
2- I need answer after 4 hour very necessary , please

Solutions

Expert Solution

May this helps you...

#include"delay.h"

#include"lcd.h"

#include"keypad.h"

sbit a1=P2^0;

sbit a2=P2^1;

sbit a3=P2^2;

sbit a4=P2^3;

void motor();

unsigned char ar[5];

unsigned char com[5]={"77777"};

unsigned int f,m=1,p;

void main()

{

unsigned int i;

lcd_ini();

while(1)

{

cmd(0x01);

lcd_str(" ENTER YOUR");

cmd(0xc0);

lcd_str(" PASSWORD");

for(i=0;i<5;i++)

{

keypad1();

ar[i]=c;

if(i==0)

{

  cmd(0x01);

lcd_display(' ');

}

lcd_display('*');

}

if(ar[0]==com[0] && ar[1]==com[1] && ar[2]==com[2] && ar[3]==com[3] && ar[4]==com[4])

{

m=1;

}

else

{

m=0;

}

if(m==1)

{

cmd(0x01);

lcd_str(" PASSWORD MATCHED");

cmd(0xc0);

lcd_str(" ACCESS GRANTED");

motor();

p=0;

delay_fv(1000,100);

}

else if(m==0)

{

p++;

cmd(0x01);

lcd_str(" WRONG PASSWORD");

cmd(0xc0);

lcd_str(" ACCESS DENIED");

delay_fv(1000,100);

delay_fv(1000,100);

m=1;

if(p==3)

{

cmd(0x01);

lcd_str(" PLEASE CONTACT");

cmd(0xc0);

lcd_str(" YOUR HOD....");

while(p==3);

}

}

}

}

void motor()

{

unsigned int i;

for(i=0;i<10;i++)

{

a2=a3=a4=0;

a1=1;

delay_ff();

a1=a3=a4=0;

a2=1;

delay_ff();

a1=a2=a4=0;

a3=1;

delay_ff();

a1=a2=a3=0;

a4=1;

delay_ff();

  }

delay_fv(1000,100);

for(i=0;i<10;i++)

{

a2=a3=a1=0;

a4=1;

delay_ff();

a1=a2=a4=0;

a3=1;

delay_ff();

a1=a3=a4=0;

a2=1;

delay_ff();

a4=a2=a3=0;

a1=1;

delay_ff();

}

}

lcd.h

sbit rs=P3^0;

sbit rw=P3^1;

sbit en=P3^2;

sfr lcd=0x90;

void lcd_display(unsigned int x)  // lcd display fuction

{

unsigned int i;

lcd=x;

rs=1;

rw=0;

en=1;

for(i=0;i<100;i++);

en=0;

}

void cmd(unsigned char m)

{

unsigned int i;

lcd=m;

rs=0;

rw=0;

en=1;

for(i=0;i<10;i++);

en=0;

}

void lcd_ini()  

{

cmd(0x38);

cmd(0x0e);

cmd(0x01);

cmd(0x06);

cmd(0x90);

}

void lcd_str(unsigned char *str)  

while(*str!='\0')  

{

  lcd_display(*str);

  str++;

}

}

keypad.h

sbit r1=P0^0;

sbit r2=P0^1;

sbit r3=P0^2;

sbit r4=P0^3;

sbit c1=P0^4;

sbit c2=P0^5;

sbit c3=P0^6;

sbit c4=P0^7;

unsigned int c;

char keypad1()

{

P2=0xff;

while(1)

{

r1=0;

r4=1;

if(c1==0)

{

c='7';

delay_pf(500);

return c;

}

else if(c2==0)

{

c='8';

delay_pf(500);

return c;

}

else if(c3==0)

{

c='9';

delay_pf(500);

return c;

}

else if(c4==0)

{

c='/';

delay_pf(500);

return c;

}

r1=1;

r2=0;

if(c1==0)

{

c='4';

delay_pf(500);

return c;

}

else if(c2==0)

{

c='5';

delay_pf(500);

return c;

}

else if(c3==0)

{

c='6';

delay_pf(500);

return c;

}

else if(c4==0)

{

c='*';

delay_pf(500);

return c;

}

r2=1;

r3=0;

if(c1==0)

{

c='1';

delay_pf(500);

return c;

}

else if(c2==0)

{

c='2';

delay_pf(500);

return c;

}

else if(c3==0)

{

c='3';

delay_pf(500);

return c;

}

else if(c4==0)

{

c='-';

delay_pf(500);

return c;

}

r3=1;

r4=0;

if(c1==0)

{

delay_pf(500);

cmd(0x01);

}

else if(c2==0)

{

c='0';

delay_pf(500);

return c;

}

else if(c3==0)

{

c='=';

delay_pf(500);

return c;

}

else if(c4==0)

{

c='+';

delay_pf(500);

return c;

}

}

}

Delay.h

void delay_ff()  // fully fixed delay

{

    unsigned int i,j;

    for(i=0;i<80;i++)

    for(j=0;j<120;j++);

}

void delay_pf(unsigned int x)

{

unsigned int i,j;

for(i=0;i<x;i++)

for(j=0;j<50;j++);

}

void delay_fv(unsigned int x,y)

{

unsigned int i,j;

for(i=0;i<x;i++)

for(j=0;j<y;j++);

}


Related Solutions

What is the best smart door lock for an offices at a company? Smart card based...
What is the best smart door lock for an offices at a company? Smart card based door lock system or fingerprint based door lock system ? ( only one system should be select not both) which one is more secure than other (when a person take excuse for a long time and should somebody do her/his work until come back .. so, in this case the fingerprint is feasible or smart card and why ? I need the Advantage and...
What is the best smart door lock for an office at a company? which one is...
What is the best smart door lock for an office at a company? which one is more secure than others and why? I need the Advantage and Disadvantage for each type
Hi , Which SDLC model is the best suited for “smart door lock using RFID card...
Hi , Which SDLC model is the best suited for “smart door lock using RFID card “ project ? And why?
I need a uml diagram of password manager and little explaining about it as a project...
I need a uml diagram of password manager and little explaining about it as a project report
a) Draw and label your own circuit diagram using standard schematic symbols for a circuit with...
a) Draw and label your own circuit diagram using standard schematic symbols for a circuit with a 12 V battery, a 15 ohm resistor, a 400 mH inductor, and a switch, all in series. b) Write a diffferential equation (in the form of a loop equation) describing the behavior of this circuit after the switch is closed. c) The switch is first closed at time t = 0. Write down an equation for current in the circuit as a function...
Identify FM Broadcasting System in wireless communication and design circuit. Draw the appropriate circuit diagram or...
Identify FM Broadcasting System in wireless communication and design circuit. Draw the appropriate circuit diagram or functioning diagram. Develop circuit diagram in MATLAB for FM Broadcasting System and run the simulation.
gray code to excess 3 code converter circuit and its logic diagram and ic based diagram
gray code to excess 3 code converter circuit and its logic diagram and ic based diagram
Bus ticket reservation project in java using class ,inheritance,interface
Bus ticket reservation project in java using class ,inheritance,interface
Why should a time-based authentication system invalidate the current password on a successful authentication?
Why should a time-based authentication system invalidate the current password on a successful authentication?
Draw the circuit diagram of a stand-alone photovoltaic system assisted with batteries and explain the function...
Draw the circuit diagram of a stand-alone photovoltaic system assisted with batteries and explain the function of each stage of the system.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT