In: Computer Science
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
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++);
}