Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

editing a AT89C52

Status
Not open for further replies.

vinstein

New Member
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:)

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;
     }
 }
}
 
There are probably thousands of files out there named lcd.h and timer.h, many of which are for the AT89c52. I know I have a lcd.h which I wrote myself, the file you would be looking for is a file that these "seniors" either wrote or a file that came with some development board you're using, or even possibly with whatever compiler you're using. We don't know any of the above information as you haven't supplied it. Don't even know what simulator you're trying to use either.
 
hmm..:confused:
i thought thr'll b some common headers available for an AT89C52:eek:
thnx for d reply...

k.. anywayz to stop their names appearing ther by using some extrenal components(like some timing devices to the lcd pins) ??? n continue wit the rest of LCD operation???
 
Sorry, I don't understand your question. What do you mean by "stop their names appearing"?
Also, your first post was pretty decent with the English used, however your second post was barely decipherable for me.
 
hey i paid them for tat project !!!!!:mad: ,(they got the same from a PROJECT CENTER n those people wont give headers)

the LCD displays 4 names after a certain delay... i just want to change the names(for tat a program is necessary,but i dont have the headers),so anyother ways to do it
 
vinstein said:
hey i paid them for tat project !!!!!:mad: ,(they got the same from a PROJECT CENTER n those people wont give headers)

the LCD displays 4 names after a certain delay... i just want to change the names(for tat a program is necessary,but i dont have the headers),so anyother ways to do it

Ah so it's ok to pay people to do your homework. :p
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top