Need timer.h & lcd.h which suites the program below

hello,
im doin a project with AT89C52.i got the project frm my seniors & i've done some changes to it, i need timer.h & lcd.h to make it run.. plz help me get the above library files or create one.
here is the code:

/* RF id transmitter for vehicle SCHOOL ZONE & HOSPITAL ZONE */
#include
#include
#include
PORT: TX_PORT = P2;
PORT: LCD_PORT = P0;
PIN: ID_SET_KEY = P1.3;
PIN: IN_A0 = P3.3;
PIN: IN_A1 = P3.4;
unsigned char send_id;
select_id_sw()
{
if( (IN_A0 == 0) && (IN_A1 == 0 ) )
{
uputs(16,0,16,"0:NO ZONE LIMIT ");
send_id = 0;
}
if( (IN_A0 == 1) && (IN_A1 == 0 ) )
{
uputs(16,0,16,"1 SCHOOL ZONE ");
send_id = 1;
}
if( (IN_A0 == 0) && (IN_A1 == 1 ) )
{
uputs(16,0,16,"2: HOSPITAL ZONE");
send_id = 2;
}
if( (IN_A0 == 1) && (IN_A1 == 1 ) )
{
uputs(16,0,16,"3:NO ZONE LIMIT ");
send_id = 3;
}
}
main()
{
unsigned int d;
uputs(0,0,16, " VECHILE SPEED ");
uputs(16,0,16," ZONE LIMIT TX ");
for(d=0; d < 60000; d++);
for(d=0; d < 60000; d++);
uputs(0,0,16, " WELCOME TO ECE ");
uputs(16,0,16," DEPARTMENT ");
for(d=0; d < 60000; d++);
for(d=0; d < 60000; d++);
uputs(0,0,16, "THANKS TO H.O.D ");
uputs(16,0,16," GUIDE & ALL ");
for(d=0; d < 60000; d++);
for(d=0; d < 60000; d++);
uputs(0,0,16, " NAME ");
uputs(16,0,16," NAME ");
for(d=0; d < 60000; d++);
for(d=0; d < 60000; d++);
uputs(0,0,16, " NAME ");
uputs(16,0,16," NAME ");
for(d=0; d < 60000; d++);
for(d=0; d < 60000; d++);
uputs(0,0,16, "your in setmode ");
uputs(16,0,16," pls select id ");
while(1)
{
if( ID_SET_KEY == 0)
{
uputs(0,0,16, " u r in setmode ");
do
{
select_id_sw();
} while(ID_SET_KEY == 0);
uputs(0,0,16, "VEHICLE ZONE ID ");
TX_PORT = send_id;
}
}
}


Comments

  • : hello,
    : im doin a project with AT89C52.i got the project frm my seniors &
    : i've done some changes to it, i need timer.h & lcd.h to make it
    : run.. plz help me get the above library files or create one.
    : here is the code:
    :
    : /* RF id transmitter for vehicle SCHOOL ZONE & HOSPITAL ZONE */
    : #include
    : #include
    : #include
    : PORT: TX_PORT = P2;
    : PORT: LCD_PORT = P0;
    : PIN: ID_SET_KEY = P1.3;
    : PIN: IN_A0 = P3.3;
    : PIN: IN_A1 = P3.4;
    : unsigned char send_id;
    : select_id_sw()
    : {
    : if( (IN_A0 == 0) && (IN_A1 == 0 ) )
    : {
    : uputs(16,0,16,"0:NO ZONE LIMIT ");
    : send_id = 0;
    : }
    : if( (IN_A0 == 1) && (IN_A1 == 0 ) )
    : {
    : uputs(16,0,16,"1 SCHOOL ZONE ");
    : send_id = 1;
    : }
    : if( (IN_A0 == 0) && (IN_A1 == 1 ) )
    : {
    : uputs(16,0,16,"2: HOSPITAL ZONE");
    : send_id = 2;
    : }
    : if( (IN_A0 == 1) && (IN_A1 == 1 ) )
    : {
    : uputs(16,0,16,"3:NO ZONE LIMIT ");
    : send_id = 3;
    : }
    : }
    : main()
    : {
    : unsigned int d;
    : uputs(0,0,16, " VECHILE SPEED ");
    : uputs(16,0,16," ZONE LIMIT TX ");
    : for(d=0; d < 60000; d++);
    : for(d=0; d < 60000; d++);
    : uputs(0,0,16, " WELCOME TO ECE ");
    : uputs(16,0,16," DEPARTMENT ");
    : for(d=0; d < 60000; d++);
    : for(d=0; d < 60000; d++);
    : uputs(0,0,16, "THANKS TO H.O.D ");
    : uputs(16,0,16," GUIDE & ALL ");
    : for(d=0; d < 60000; d++);
    : for(d=0; d < 60000; d++);
    : uputs(0,0,16, " NAME ");
    : uputs(16,0,16," NAME ");
    : for(d=0; d < 60000; d++);
    : for(d=0; d < 60000; d++);
    : uputs(0,0,16, " NAME ");
    : uputs(16,0,16," NAME ");
    : for(d=0; d < 60000; d++);
    : for(d=0; d < 60000; d++);
    : uputs(0,0,16, "your in setmode ");
    : uputs(16,0,16," pls select id ");
    : while(1)
    : {
    : if( ID_SET_KEY == 0)
    : {
    : uputs(0,0,16, " u r in setmode ");
    : do
    : {
    : select_id_sw();
    : } while(ID_SET_KEY == 0);
    : uputs(0,0,16, "VEHICLE ZONE ID ");
    : TX_PORT = send_id;
    : }
    : }
    : }
    :
    :
    :
    hey guy...........
    don't go for spoon feeding......
    from code point of view
    in header file their is only intialization of macros and functions
    i think their is one more file in which he has declare the functions
    because all these functions are user defined.
    i will help you regarding the project on 8051 like.....
    security system or put remote cotrol sytem
    i have both source code and schemtaics
    u have to do only hard work

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion