#include <REGX51.H>
#include "lcd.c"
#define MAX_DELAY() delay(65000)
sbit Vibra_Sense=P3^1;
sbit Buz=P1^0;
void intro()
{
lcd_init();
lcd_str("Touch Sensitive ",0x80);
lcd_str("Security System ",0xc0);
MAX_DELAY();MAX_DELAY();
lcd_clr();
}
void main()
{
unsigned int i = 0, j= 0;
intro();
while(1)
{
lcd_str("Security Syst On",0x80);
lcd_str("No Vibra Detectd",0xc0);
Buz = 1;
if(Vibra_Sense == 1)
{
while(Vibra_Sense == 1)
delay(1000);
}
else
{
while(Vibra_Sense == 0)
delay(1000);
}
Buz = 0;
lcd_str("Vibraton Detectd",0xc0);delay(65000);
while(1);
}
}
#include "lcd.c"
#define MAX_DELAY() delay(65000)
sbit Vibra_Sense=P3^1;
sbit Buz=P1^0;
void intro()
{
lcd_init();
lcd_str("Touch Sensitive ",0x80);
lcd_str("Security System ",0xc0);
MAX_DELAY();MAX_DELAY();
lcd_clr();
}
void main()
{
unsigned int i = 0, j= 0;
intro();
while(1)
{
lcd_str("Security Syst On",0x80);
lcd_str("No Vibra Detectd",0xc0);
Buz = 1;
if(Vibra_Sense == 1)
{
while(Vibra_Sense == 1)
delay(1000);
}
else
{
while(Vibra_Sense == 0)
delay(1000);
}
Buz = 0;
lcd_str("Vibraton Detectd",0xc0);delay(65000);
while(1);
}
}
Comments
Post a Comment