Skip to main content

Theft preventer alarm project coding

#include <REGX51.H>
#include "lcd.c"

#define MAX_DELAY() delay(65000)

sbit IR_Sense=P3^1;
sbit Buz=P1^0;
sbit Load=P0^1;

void intro()
{
 lcd_init();lcd_clr();
 lcd_str("Theft Preventer ",0x80);
 lcd_str(" Security Alarm ",0xc0);
 MAX_DELAY();MAX_DELAY();
 lcd_clr();
 }

 void main()
 {
unsigned int i = 0, j= 0;
Buz = 1; Load = 0;
intro();
   while(1)
   {
if(IR_Sense == 1)
{
lcd_clr();
lcd_str("No Intruder Detet",0x80);
lcd_str("Home is Safe now ",0xc0);
delay(1000);
Buz = 1; Load = 0;
while(IR_Sense == 1);
}
else
{
lcd_clr();
lcd_str(" Intruder Deteted",0x80);
lcd_str("Home at Risk now ",0xc0);
delay(1000);
Buz = 0; Load = 1;
while(1);
}


   }
 }


LCD CODING:


#define AT89C51
#undef PIC16F877A

#ifdef AT89C51
#undef PIC16F877A

sbit rs=P0^5;
sbit rw=P0^6;
sbit en=P0^7;

#define DATA P2

#else

#define rs RB1
#define rw RB2
#define en RB4
#define DATA PORTD

#endif

#define DELAY() delay(20)

void delay(unsigned int i)
{
while(i--);
}
void lcd_cmd(unsigned char c)
{
rs=0;
DATA=c;
en=1;
DELAY();
en=0;
}

void lcd_data(unsigned char d)
{
delay(500);
rs=1;
DATA=d;
en=1;
DELAY();
en=0;
}

void lcd_clr()
{
 lcd_cmd(0x01);
 delay(100);
 lcd_cmd(0x80);
}

void lcd_init()
{
  #ifdef PIC16F877A
    TRISB1=TRISB2=TRISB4=0;
    TRISD=0;
  #endif
    rw=0;
    lcd_cmd(0x38);
    lcd_cmd(0x0c);
lcd_clr();
}

void lcd_str(const unsigned char *str, const unsigned char pos)
{
 if(pos != 0xff) /*to follow previous written position*/
  lcd_cmd(pos);
 while(*str)
  lcd_data(*str++);
 
}

Comments

Popular posts from this blog

Android Tutorial

Android  is a complete set of software for mobile devices such as tablet computers, notebooks, smartphones, electronic book readers, set-top boxes etc. It contains a  linux-based Operating System ,  middleware  and  key mobile applications . It can be thought of as a mobile operating system. But it is not limited to mobile only. It is currently used in various devices such as mobiles, tablets, televisions etc. This tutorial is developed for beginners and experienced persons. Let's see the topics of android that we are going to learn. Basics of Android In this fundamental chapter, you will learn about android, its components, how to create first android application, internal of first android application etc. What is Android History and Version Software Stack Core Building Blocks Android Emulator Installing softwares Setup Eclipse Hello Android example Internal Details Dalvik VM AndroidManifest.xml R.java Hide Title Bar Activity and I...

A SHOULDER SURFING RESISTANT GRAPHICAL AUTHENTICATION SYSTEM

A SHOULDER SURFING RESISTANT GRAPHICAL AUTHENTICATION SYSTEM ABSTRACT Authentication based on passwords is used largely in applications for computer security and privacy. However, human actions such as choosing bad passwords and inputting passwords in an insecure way are regarded as”the weakest link” in the authentication chain. Rather than arbitrary alphanumeric strings, users tend to choose passwords either short or meaningful for easy memorization. With web applications and mobile apps piling up, people can access these applications anytime and anywhere with various devices. This evolution brings great convenience but also increases the probability of exposing passwords to shoulder surfing attacks. Attackers can observe directly or use external recording devices to collect users’ credentials. To overcome this problem, we proposed a novel authentication system PassMatrix, based on graphical passwords to resist shoulder surfing attacks. With a one-time valid login indicator and ...

ABSTRACT

MULTI USER GSM BASED DIGITAL SCROLLING LED DISPLAY WITH PASSWORD AND VOICE ABSTRACT The project mainly focuses on transmission of textual data through air interface by the use of GSM through asynchronous serial communication. The data will be processed by the microcontroller it programmed by embedded c language by using KEIL C compiler. The data will be displayed on led display on LED only after entering unique pass key. Existing System: How a reliable and an authentic wireless communication could be easily developed between a mobile phone and microcontroller using GSM (Global System for Mobile Communication) MODEM (Modulator-Demodulator). This technical paper explains GSM based e-notice board which can be widely used for multitude of applications including educational sector, traffic control, banks, and public advertisements, stoke exchanges etc. Proposed System: In this project we not only send the data, but send the data with pass code also. Which enables us to preve...