Posts Tagged ‘Program souce soce for Front Desk Notifier’

The project aims to build an automated system that will alert the food assistance staff that a customer has arrived for service. It can also be used for a housewife who wants to know if someone has arrived at the gate. An IR transceiver pair has been used for detecting the presence of the person at the front desk. The program polls the port pins and displays a message on the LCD that “Someone is arrived” as well as activates a buzzer. The system is also ideal for a bank cashier.

front desk notifier

front desk notifier

Program Source Code
*********************************************************
#include <REG52.H> /∗special function register declarations∗/
/∗ for the intended 8051 derivative ∗/
sbit RS = P2∧0;
sbit RW = P2∧1;
sbit EN = P2∧2;
sbit IN= P2∧4; /∗input from the sensor present at gate ∗/
sbit Buzz=P2∧5; // output indication to housewife∗/
void delay(int); /∗ Stop Exection with Serial Intr. ∗/
void INIT(void);
void ENABLE(void);
void LINE(int);

void LINE(int i){ 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 i,j;
for (j=0;j<10;j++){ for (i=0;i<100;i++);
}}
void ENABLE(void)
{EN=1;
delay();
EN=0;
delay();
}
void INIT(void) // Initialization of the LCD by giving the proper
commands.
{ RS=0;
RW=0;
EN=0;
P1 = 0x38; // 2 lines and 5∗7 matrix LCD.

ENABLE();
ENABLE();
ENABLE();
ENABLE();
P1 = 0x06; //Shift cursor to left
ENABLE();
P1 = 0x0E; // Display ON, Cursor Blinking
ENABLE();
P1 = 0x01; // Clear display Screen.
ENABLE();
}
void main (void){ char code array[] = ”Some is there on the gate”;
char code array1[]=”No one is there on the gate”;
int b,j;
Buzz=0;
while(1)
INIT();
LINE (1);
{ if( IN==1) // some one is there if in = 1
{ Buzz=1; // switch on the buzzer to indicate some
one is there on gate
for (b=0;b<30;b++)
{if (b==8)
LINE(2);
P1=array[b];
ENABLE();
}
RS=0;
P1=0x01;
ENABLE();
RS=1;
LINE(1);
for (b=16;b<33;b++)
{ if (b==24)

LINE(2);
P1=array1[b];
ENABLE();
}
}else // display no one there on gate
{for (b=0;b<30;b++)
{if (b==8)
LINE(2);
P1=array1[b];
ENABLE();
} RS=0;
P1=0x01;
ENABLE();
RS=1;
LINE(1);
for (b=16;b<33;b++)
{ if (b==24)
LINE(2);
P1=array1[b];
ENABLE();
}}}}
*********************************************************