Hello,
i got a project from my seniors which use AT89c52 & 2x16 LCD,the c program displays their names in LCD , ive edited the program to change names, but couldnt compile because of the missing header files TIMER.h & Lcd.h.... can anyone get the correct header for the program & simulate it???? thnx in advance
i got a project from my seniors which use AT89c52 & 2x16 LCD,the c program displays their names in LCD , ive edited the program to change names, but couldnt compile because of the missing header files TIMER.h & Lcd.h.... can anyone get the correct header for the program & simulate it???? thnx in advance
Code:
* RF id transmitter for vehicle SCHOOL ZONE & HOSPITAL ZONE */
#include <stdio.h>
#include <lcd.h>
#include <timer.h>
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, " NAME1 ");
uputs(16,0,16," NAME2 ");
for(d=0; d < 60000; d++);
for(d=0; d < 60000; d++);
uputs(0,0,16, " NAME3 ");
uputs(16,0,16," NAME4 ");
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;
}
}
}