hello everyone, im doin my engineering project on AUTOMATIC SPEED CONTROL OF AUTOMOBILES.i am using AT89C52 and 16x2 lcd display. i have the C program for it,but i need Timer.h & Lcd.h for it to work.... plz help me find it or create one header fle for the program below.....
/* 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, " 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; } } }
Attention to detail is absolutely essential to any kind of programming.
Human readers may give you the benefit of the doubt, but a compiler will not, and neither will a processor.
This forum gives perfectly clear instructions on how to post source code: www.danlhenry.com/.../keil_code.png
You need to learn to look for details like that, and pay attention to them!
Note that TABs don't work (well) - use spaces instead,
and don't forget to check it in the 'Preview'...
"i have the C program for it, but i need Timer.h & Lcd.h for it to work...."
You need the headers to make it Compile - but the headers alone will not make it work.
To make it work you will also need the corresponding source and/or library files.
It is impossible to supply headers without knowing what the corresponding sources and/or libraries are!
And, if you do already have the source and/or library files, you must surely also have the headers?!
i got thz code frm my senior and it works fine in the kit.. they lost the header files and i hav all other codes except the mentioned timer and lcd library files... i just want to edit & put them in the AT89C52
PORT: TX_PORT = P2; PORT: LCD_PORT = P0; PIN: ID_SET_KEY = P1.3; PIN: IN_A0 = P3.3; PIN: IN_A1 = P3.4;
This is not Keil syntax - so you must be in the wrong forum!
Even in the right forum, nobody can give you the headers without knowing what the corresponding sources and/or libraries are - and if you have those, you can easily recreate the headers yourself!