TELEGRAM

Thursday, February 2, 2012

8 candidate quiz buzzer using 8051 microcontroller (AT89C51)

Posted by Thiru at 9:47 PM 0 Comments
8051 Microcontroller based quiz buzzer project
The quiz buzzer systems are widely used in school, colleges and TV programs. The team which presses the buzzer earliest is entitled to give the answer. At times it becomes very difficult to identify which team has pressed the button when two teams press the buzzer within a very small time gap. In such cases the decision can be biased due to human intervention. The quiz buzzer presented here takes care of the aforesaid problem. This quiz buzzer disables the other inputs as soon as the first buzzer is pressed. This quiz buzzer can be used for a maximum of eight teams. It is build around 8051 microcontroller (AT89C51).

DESCRIBTION(click here)
  • This quiz buzzer system has eight input pins corresponding to eight teams. The output is displayed on a seven segment display (interfaced with microcontroller), which shows the number corresponding to the team which has pressed the button first. A buzzer is also sounded for a small duration to give an acoustic alarm. The connections of the seven segment, input pins and output pins is shown in the circuit diagram.
    For more details, refer ‘seven segment interfacing ’. There are a total of nine input pins. Eight pins of port P1 of the microcontroller are corresponding to eight inputs and one stop pin for resetting the buzzer system. On the output side a seven segment is connected to display the corresponding output number. There is also a provision for sounding a buzzer for a small duration.
    When the system starts, the seven segment does not displays any output. The microcontroller keeps scanning the input pins. As soon as any one of the inputs is pressed, the buzzer sounds for a small duration. The seven segment displays the number corresponding to the input pressed. Now even if any other input pin is pressed, there will be no effect on the system till the time the stop pin is pressed to reset the system.
CODE(click here)
  • 
    // Program to make a quiz buzzer using seven segment
    
    
    
    #include<reg51.h>
    
    unsigned int digi_val[10]={0x40,0xF9,0x24,0x30,0x19,0x12,0x02,0xF8,0x00,0x10};        // Hex value corresponding to the digits 0 to 9
    
    sbit output_on_pin = P3^0;        // Enable pin to enable the seven segment.
    
    sbit stop_pin = P3^1;        // Stop pin to reset the buzzer.
    
    sbit buzzer_pin=P0^0;        //  Buzzer pin to sound the buzzer.
    
    int flag;
    
    
    
    void delay()        // Time delay function
    
    {
    
        int i,j;
    
        for(i=0;i<200;i++)
    
        for(j=0;j<1275;j++);
    
    }
    
    
    
    void display(unsigned int current_dig)        // Function to display the resultant digit on the seven segment and sound the buzzer.
    
    {
    
        P2=digi_val[current_dig];
    
        output_on_pin = 1;
    
        buzzer_pin=0;
    
        delay();
    
        buzzer_pin=1;
    
        while(stop_pin != 0);
    
    }  
    
    
    
    void buzzer() //Function to monitor the input switches
    
    {
    
        flag = 0;
    
        while(1)
    
        {
    
            while (P1 == 0xFF);
    
            
    
            while (P1 == 0xFE)        //Check if switch 1 is pressed
    
            {
    
                flag = 1;
    
                display(1);
    
            }
    
    
    
            while (P1 == 0xFD)        //Check if switch 2 is pressed
    
            {
    
                flag = 2;
    
                display(2);
    
            }    
    
    
    
            while (P1 == 0xFB )        //Check if switch 3 is pressed
    
            {
    
                flag = 3;
    
                display(3);
    
            }
    
    
    
            while (P1 == 0xF7 )        //Check if switch 4 is pressed
    
            {
    
                flag = 4;
    
                display(4);
    
            }
    
    
    
            while (P1 == 0xEF )        //Check if switch 5 is pressed
    
            {
    
                flag = 5;
    
                display(5);
    
            }
    
    
    
            while (P1 == 0xDF)        //Check if switch 6 is pressed
    
            {
    
                flag = 6;
    
                display(6);
    
            }
    
    
    
            while (P1 == 0xBF )        //Check if switch 7 is pressed
    
            {
    
                flag = 7;
    
                display(7);
    
            }
    
    
    
            while (P1 == 0x7F )        //Check if switch 8 is pressed
    
            {
    
                flag = 8;
    
                display(8);
    
            }
    
          
    
            P1 = 0xFF;
    
            stop_pin = 1;
    
            output_on_pin = 0;
    
        }
    
    }
    
    
    
    void main()
    
    {
    
        output_on_pin=0;
    
        stop_pin = 1;
    
        P1 = 0xFF;
    
        buzzer();
    
    
    
    }
    
    
COMPONENTS(click here)
  • Seven Segment Display
  • Transistor BC548 
  • AT89C51 Microcontroller 
  • Piezo Buzzer

0 comments:

THANKS FOR UR COMMENT ....

RFID based Secured access system using 8051 microcontroller (AT89C51) project

Posted by Thiru at 9:44 PM 0 Comments
This is a very useful application of RFID (Radio-frequency identification) and is very commonly used in institutes, offices, homes and so on. An RFID system consists of a reader device and a transponder. A transponder or tag has a unique serial number which is identified by the reader. Here RFID has been interfaced with AT89C51 to provide secured access. The relevant messages are also displayed on a 16x2 LCD. The free source code for the program is available in C.
RFID based Secured access system using 8051 microcontroller (AT89C51)
DESCRIBTION(click here)
  • Low frequency RFID works on the principle of radio waves and at the frequency of 125 KHz. There is a coil inside the RFID tag and when it is influenced by magnetic field, it sends an identity code to a device for further processing. (For more details, refer interfacing RFID with AT89C51).

    The RFID tag is used as an identity for a particular user. If the identity (serial number of the tag) of the user is matched with the one already stored in this system, he gets immediate access through it. This RFID based secured access system also has many additional features. For example, a new user can register himself with the system. A registered user can also withdraw his entry from the system. These features can be accessed by pressing a tactile switch connected to the microcontroller.

    In beginning, the user is prompted to scan his tag or ID. The serial code of the tag is identified by the reader module and is sent to AT89C51 for checking. If the ID is matched by the microcontroller, the user gets the access. On the contrary, if the tag is not identified, a message (‘Wrong ID’) is displayed on LCD screen.

    A new user needs to press the switch to register after which his identity is verified twice with RFID tag. The new record is stored by the microcontroller to grant future access. The system also shows ‘Error’ if the tags do not match during verification. An existing user can delete his record by pressing the same switch. Again the verification is carried out and the user is deleted if the IDs match. If a different tag is scanned through the reader, LCD displays ‘you have shown different ID’.

    When an RFID tag comes in this range, the reader detects it and sends a unique code of the tag serially. This serial code, consisting of 12 bytes, is received by the microcontroller. This code is treated as an ID for the user and is stored as an array in the microcontroller. If the ID is matched with this code, the user is granted access though the system. For more details on working and connections of the circuit, refer RFID interfacing through serial interrupt.

CODE(click here)
  • 
    //Program for RFID based Secured access system using 8051 microcontroller (AT89C51)
    
    #include<reg51.h>
    
    sfr lcd_data_pin=0xA0; //P2 port
    
    sbit rs=P1^0; 
    
    sbit rw=P1^1; 
    
    sbit en=P1^2; 
    
    sbit new_user=P1^3;
    
    unsigned char card_id[12],index=0,key1=0,flag0=0,flag1=0,flag2=0,flag3=0;
    
    unsigned char card_mem[6][12];   //={/*'2','6','0','0','9','3','6','C','B','2','6','B',*/'2','6','0','0','9','1','1','D','D','B','7','1','2','6','0','0','9','3','6','F','7','2','A','8','0','F','0','0','2','D','D','7','D','0','2','5'};
    
    unsigned char current_byte = 0;
    
    void display();
    
    void memory();
    
    
    
    void delay(unsigned int count) //Function to provide time delay
    
    {
    
      int i,j;
    
      for(i=0;i<count;i++)
    
      for(j=0;j<1275;j++);
    
    }
    
    
    
    void lcd_command(unsigned char comm)   //Lcd command funtion
    
    {
    
      lcd_data_pin=comm;
    
      en=1;
    
      rs=0;
    
      rw=0;
    
      delay(1);
    
      en=0;
    
    }
    
    
    
    void lcd_data(unsigned char disp)  //Lcd data function 
    
    {
    
      lcd_data_pin=disp;
    
      en=1;
    
      rs=1;
    
      rw=0;
    
      delay(1);
    
      en=0;
    
    }
    
    
    
    lcd_string(unsigned char *disp)  //Lcd string function 
    
    {
    
      int x;
    
      for(x=0;disp[x]!=0;x++)
    
     {
    
       lcd_data(disp[x]);
    
     }
    
    }
    
    
    
    void lcd_ini()      //Function to initialize the LCD
    
    {
    
     lcd_command(0x38);    
    
     delay(5);
    
     lcd_command(0x0F);        
    
     delay(5);
    
     lcd_command(0x80);
    
     delay(5);
    
    }
    
      
    
    void display()  // Function to display the unique ID
    
    {
    
     unsigned char count,i,key,flag=0,val;
    
     lcd_command(0x01);
    
     lcd_command(0x80);  //Place cursor to second position of second line
    
     val=index;
    
     for(i=0;i<index;i++)
    
     { 
    
      key=0;
    
      for(count=0;count<12;count++)
    
      { 
    
       if(card_id[count]==card_mem[i][count])
    
       {
    
        key++;
    
       }
    
      }
    
      if(key==12)
    
      {
    
       flag=1;
    
       lcd_command(0x80);
    
       lcd_string("Access granted");
    
       lcd_command(0xC4);
    
       lcd_string("USER ");
    
       lcd_command(0xC9);
    
       lcd_data(49+i);
    
       delay(100);
    
       break;
    
      }
    
     }
    
     if(flag==0)
    
     {
    
      lcd_command(0x84);
    
      lcd_string("Wrong ID");
    
      delay(200);
    
     }
    
     lcd_command(0x01);
    
     lcd_command(0x80);
    
     lcd_string("Pls scan your ID");
    
     current_byte=0;
    
    }
    
    
    
    void recieve() interrupt 4  //Function to recieve data serialy from RS232 
    
    {  
    
     card_id[current_byte]=SBUF;
    
       RI=0;    // Reset the serial interrupt after recieving the byte
    
     current_byte++; 
    
    }
    
    
    
    void memory()
    
    {
    
     unsigned char i,key=0,count,try=0,head=0,select=0,mod=0,size;
    
     unsigned int in,j;
    
     lcd_command(0x01);
    
     lcd_string("scan your ID");
    
     current_byte=0;
    
     while(current_byte!=12);
    
     current_byte=0;
    
     for(i=0;i<6;i++)
    
     { 
    
      key=0;
    
      for(count=0;count<12;count++)
    
      { 
    
         if(card_id[count]==card_mem[i][count])
    
       {
    
        key++;
    
       }
    
      }
    
      if(key==12)
    
      {
    
       size=i;
    
       lcd_command(0x01);
    
       lcd_string("Like to delete");
    
       lcd_command(0xC0);
    
       lcd_string("If yes scan ID");
    
       for(in=0;in<500;in++)
    
       {
    
        for(j=0;j<1275;j++)
    
        {
    
         if(current_byte==12)
    
         {
    
         break;
    
         }
    
        }
    
        if(current_byte==12)
    
        {
    
         break;
    
        }
    
       }
    
       if(current_byte==12)
    
       {
    
        for(in=0;in<12;in++)
    
        {
    
         if(card_id[in]==card_mem[size][in])
    
         {
    
          mod++;
    
         } 
    
        }
    
        if(mod==12)
    
        {
    
         for(in=0;in<12;in++)
    
         {
    
          card_mem[size][in]=5;
    
         }
    
         lcd_command(0x01);
    
         lcd_string("congratulation!");
    
         lcd_command(0xC0);
    
         lcd_string("You are deleted");
    
         delay(200);
    
         lcd_command(0x01);
    
         lcd_string("Pls scan your ID");
    
         key=0;
    
         try=1;
    
         break;
    
        }
    
        if(mod!=12)
    
        {
    
         lcd_command(0x01);
    
         lcd_string("You have shown");
    
         lcd_command(0xC0);
    
         lcd_string("different ID");
    
         delay(200);
    
         lcd_command(0x01);
    
         lcd_string("Pls scan your ID");
    
         key=0;
    
         try=1;
    
         break;
    
        }
    
       }
    
       if(current_byte!=12)
    
       {
    
        lcd_command(0x01);
    
        lcd_string("Sorry ! You are");
    
        lcd_command(0xC0);
    
        lcd_string("already an user"); 
    
        delay(200);
    
        lcd_command(0x01);
    
        lcd_string("Pls scan your ID");
    
        key=0;
    
        try=1;
    
        break;
    
       }
    
      }
    
     }
    
     current_byte=0;
    
     if(key<12 && try==0)
    
     {
    
     key=0;  
    
     for(i=0;i<12;i++)
    
     {
    
      card_mem[index][i]=card_id[i];
    
     }
    
     current_byte=0;
    
     lcd_command(0x01);
    
     lcd_string("Pls scan again");
    
        while(current_byte!=12);
    
     for(i=0;i<12;i++)
    
     {
    
      if(card_mem[index][i]==card_id[i])
    
      {
    
       key++;
    
      }
    
     }
    
        current_byte=0;
    
     if(key==12)
    
        {
    
      lcd_command(0x01);
    
      lcd_string("Pls varify again ");
    
      while(current_byte!=12);
    
      key=0;
    
      for(i=0;i<12;i++)
    
      { 
    
       if(card_mem[index][i]==card_id[i])
    
       {
    
        key++;
    
       }
    
      }
    
      current_byte=0;
    
     }
    
     else 
    
        {
    
      lcd_command(0x01);
    
      lcd_string("ERROR");
    
      delay(200);
    
      for(i=0;i<12;i++)
    
      {
    
       card_mem[index][i]=0;
    
      }
    
      lcd_command(0x01);
    
      lcd_string("Pls scan your ID");
    
     }
    
     if(key==12)
    
     {
    
      lcd_command(0x01);
    
      lcd_string("Congratulation !");
    
      lcd_command(0xC0);
    
      lcd_string("You are User");
    
      lcd_command(0xCC);
    
      lcd_data(index+49);
    
      delay(250);
    
      lcd_command(0x01);
    
      lcd_string("Pls scan your ID");
    
     }
    
     else 
    
        {
    
      lcd_command(0x01);
    
      lcd_string("ERROR");
    
      delay(200);
    
      for(i=0;i<12;i++)
    
      {
    
       card_mem[index][i]=0;
    
      }
    
      lcd_command(0x01);
    
      lcd_string("Pls scan your ID");
    
     }
    
     if(key==12)
    
     index++;
    
       }
    
     }
    
     
    
    void main()
    
    {
    
        new_user=1;
    
     TMOD=0x20;       //Enable Timer 1
    
     TH1=0XFD;
    
     SCON=0x50;
    
     TR1=1;
    
     IE=0x94;
    
     new_user=0;        // Trigger Timer 1
    
     lcd_ini();
    
     lcd_command(0x80);     //Place cursor to second position of first line 
    
     lcd_string("Pls scan your ID");
    
     delay(200);
    
     while(1)
    
     {
    
      if(new_user==1)
    
      {
    
       memory();
    
      }
    
      if(current_byte==12)
    
      { 
    
       display();
    
      }
    
     } 
    
    }
    
    
    
    
COMPONENTS(click here)
  • AT89C51 Microcontroller
  • MAX232 
  • LCD

0 comments:

THANKS FOR UR COMMENT ....

Stopwatch using 8051 microcontroller (AT89C51) PROJECT

Posted by Thiru at 9:39 PM 0 Comments
8051 Microcontroller (AT89C51) based stopwatchA stopwatch is a timepiece that measures the amount of time between any two occurrences. Usually, at the first occurrence, the stopwatch is started while at the second it is stopped. To use it again, a reset option is also provided with the stopwatch. The total time elapsed can thus be obtained. A stopwatch is very commonly used in racing competitions and other gaming activities. The circuit given here is a digital stopwatch that displays time on four seven segment displays using 8051 microcontroller (AT89C51) .


DESCRIBTION(click here)
  • The stopwatch keeps the track of time the same way as a simple digital clock does. It is basically an up time counter that starts from 00:00. The control options are provided by means of tactile switches which are active low. This circuit uses three such switches for following operations:
    Switch 1 (S1)   :           Start               
    Switch 2 (S2)   :           Stop                
    Switch 3 (S3)   :           Reset              
    Initially when Vcc supply is provided to the circuit, the stopwatch goes in reset mode with 00:00 display state on seven segments. The stopwatch starts running when S1 is pressed. The time is displayed on four seven segments (in common anode configuration) by using the concept of multiplexing. (Also refer Digital Clock) On pressing S2, the stopwatch stops and displays the total time elapsed since the start. It can be taken to reset mode at any instant by using S3.
    The seven segments are interfaced to port P2 of the microcontroller AT89C51 through its data pins (a - h). The enable pins are connected to pins 1-4 of port P1 (P1^0 – P1^3). The switches S1-S3 are connected to pins 5-7 of port P1 (P1^4 – P1^6).

CODE(click here)
  • //Program to make a stopwatch
    
    #include
    #define msec 1
    unsigned int sec1,sec2;
    int sec1_1,sec1_2,sec2_1,sec2_2;
    
    unsigned int digi_val[10]={0x40,0xF9,0x24,0x30,0x19,0x12,0x02,0xF8,0x00,0x10};
    sbit dig_ctrl_1=P1^0;  // Declare the control pins of seven segments
    sbit dig_ctrl_2=P1^1;
    sbit dig_ctrl_3=P1^2;
    sbit dig_ctrl_4=P1^3;
    sbit start_pin = P1^4;  // Start pin to start the watch.
    sbit stop_pin = P1^5;  // Stop pin to stop the watch.
    sbit reset_pin = P1^6;  // Reset pin to reset the watch.
    int s,t;
    
    void mplex_delay(unsigned int time)  // Function to provide a time delay of approximatelty one second using Timer 1
    {
    int i,j;
    for (i=0;i<=time;i++)
      for(j=0;j<=50;j++);
    }
    
    void digi_out(unsigned int current_num)
    {
        P2=digi_val[current_num];
         mplex_delay(msec);
    }
    
    void display(unsigned int dig1,unsigned int dig2)  // Function to display the digits on seven segmnet. For more details refer seven segment multiplexing.
    {
        sec1_2=dig1%10;
    sec1_1=dig1/10;
    sec2_2=dig2%10;
    sec2_1=dig2/10;
    TMOD=0x01;  //Enable Timer 0
    TL0=0xFF;
    TH0=0xDB;
    TR0=1;  // Triger Timer 0
    while(TF0==0)
    {
      dig_ctrl_1 = 1;
      dig_ctrl_2 = dig_ctrl_3 = dig_ctrl_4 = 0;
      digi_out(sec1_1);
      dig_ctrl_2 = 1;
      dig_ctrl_1 = dig_ctrl_3 = dig_ctrl_4 = 0;
      digi_out(sec1_2);
      dig_ctrl_3 = 1;
      dig_ctrl_2 = dig_ctrl_1 = dig_ctrl_4 = 0;
      digi_out(sec2_1);
      dig_ctrl_4 = 1;
      dig_ctrl_2 = dig_ctrl_3 = dig_ctrl_1 = 0;
      digi_out(sec2_2);
    }
    
    TR0=0;
    TF0=0;
    }
    
    void main()
    {
    while(1)
    {
    start:  // Segment to start the stop watch
      start_pin = 1;
      stop_pin = 1;
      reset_pin = 1; 
      dig_ctrl_1 = 0;
      dig_ctrl_2 = 0;
      dig_ctrl_3 = 0;
      dig_ctrl_4 = 0;
      P2 = 0xFF;
      s = t = 0;
      while(start_pin == 1)// Check if start pin is pressed
      {
      display(0,0);
      }
    
    stopwatch:  // Segment to stop the watch
      for (sec1=s;sec1<=99;sec1++)
      {
       if (stop_pin == 0 )  //Check if stop pin is pressed
       break;
        for (sec2=t;sec2<=99; sec2++)
        {
        if (stop_pin == 0 )  //Check if stop pin is pressed
        break;
        t=0;
        display(sec1,sec2);
        }
      }
      stop_pin = 1;
      s = sec1;
      t = sec2;
     
      while ( start_pin != 0 && reset_pin != 0 )  //Check if start pin or reset pins are not pressed
      {
      display(sec1,sec2);
      }
     
      if (start_pin == 0)  //Check if start pin is pressed
      {
      goto stopwatch;
      }
      else
      {
       if (reset_pin == 0 )  //Check if reset pin is pressed
       {
       s = t = 0;
       goto start;
       }
      }
    }
    }

0 comments:

THANKS FOR UR COMMENT ....

How to create custom characters on 16x2 LCD using 8051 microcontroller (AT89C51)

Posted by Thiru at 9:33 PM 0 Comments
Custom character display on LCD using 8051 microcontrollerThe commonly used 16x2 LCD can also display custom made characters besides numbers, alphabets & special characters. Any character can be made to appear on a 5x8 pixel matrix element without knowledge of its ASCII value. The idea explained here demonstrates the principle and operation of a simple LCD custom character display using 8051 microcontroller (AT89C51).


DESCRIBTION(click here)
  • When the ASCII code for any character, say ‘A’, is sent to be displayed on LCD module, the module's controller looks up the appropriate 5x8-pixel pattern in ROM (read-only memory) and displays that pattern on the LCD. There are 8 symbol locations where a custom character can be stored as shown in the following right table. These locations will have a particular bitmap layout corresponding to the custom character. To display an arrow sign, the bitmap values are mapped to a base address location, say 64 (ASCII code 0).

    The symbol locations with their base addresses are given below:

    ASCII Code
    Base Address
    0
    64
    1
    72
    2
    80
    3
    88
    4
    96
    5
    104
    6
    112
    7
    120
    This is achieved by first sending the address location (64) to LCD command register. Next, the bitmap values (0, 4, 2, 31, 2, 4, 0, 0) are sent to the LCD data register. Now the arrow sign gets stored at the first address. Now whenever this symbol is to be displayed, its location needs to be sent to the command register of LCD.
     
    There's a 64-byte hunk of RAM (random-access memory) that the LCD controller uses in the same way as character-generator (CG) ROM. When the controller receives an ASCII code in the range that's mapped to the CG RAM, it uses the bit patterns stored there to display a pattern on the LCD. The concept here lies in the fact one can write to the CG RAM, thereby defining one’s own graphic symbols. Each byte of CG RAM is mapped to a five-bit horizontal row of pixels, and LCD characters are typically eight rows high, so 64 bytes of CG RAM is enough to define eight custom characters. These characters correspond to ASCII codes 0 through 7. When an LCD is first powered up, CG RAM contains random garbage bits. If necessary, CG RAM may be cleared by writing 00 into each CG RAM cell.
    Writing to CG RAM
    Writing to CG RAM is a lot like moving the cursor to a particular position on the display and displaying characters at that new location. The steps involved are:
  • Set RS (Register Select) and R/W (Read/Write) pins of the LCD to initialize the LCD to accept instructions
  • Set the CG RAM address by sending an instruction byte from 64 to 127 (locations 0-63 in CG RAM).
  • Switch to Data Mode by changing the setting of RS pin
  • Send bytes with the bit patterns for your symbol(s). The LCD controller automatically increments CG RAM addresses, in the same way as it increments cursor positions on the display.
  • To leave CG RAM, switch to Command Mode to set address counter to a valid display address (e.g. 128, 1st character of 1st line); the clear-screen instruction (byte 1); or the home instruction (byte 2). Now bytes are once again being written to the visible portion of the display.
  • To display the defined custom character print ASCII codes 0 through 7.
In the circuit, output of microcontroller AT89C51 (from port P2) goes to data pins of LCD numbered 7-14. The control pins RS (pin4), R/W (pin5) and EN (pin6) are connected to the pins 0, 1 and 6 of port P3 of the controller (P3^0, P3^1 & P3^6, respectively).
CODE(click here)
  • 
    //Program to create and display custom characters  smilies, heart, musical note symbol
    
    
    
    #include<reg51.h>
    
    sfr lcd_data_pin=0xA0; 
    
    sbit rs=P3^0;  //Register select pin
    
    sbit rw=P3^1;  // Read write pin
    
    sbit en=P3^6;  //Enable pin
    
    
    
    void delay(unsigned int count)  // Function to provide time delay in msec.
    
    {
    
    int i,j;
    
    for(i=0;i<count;i++)
    
      for(j=0;j<1275;j++);
    
    }
    
    
    
    void lcd_command(unsigned char comm)  //Function to send commands to LCD.
    
    {
    
    lcd_data_pin=comm;
    
    en=1; 
    
    rs=0; 
    
    rw=0; 
    
    delay(1);
    
    en=0;
    
    }
    
    
    
    void lcd_data(unsigned char disp)  //Function to send data to LCD
    
    {
    
    lcd_data_pin=disp;
    
    en=1; 
    
    rs=1; 
    
    rw=0; 
    
    delay(1);
    
    en=0;
    
    }
    
    
    
    void lcd_ini()  //Function to initialize the LCD
    
    {
    
    lcd_command(0x38);  
    
    delay(2);
    
    lcd_command(0x0F); 
    
    delay(2);
    
    lcd_command(0x82);  //Set cursor to blink at line 1 positon 2
    
    delay(2);
    
    }
    
    
    
    void character()
    
    {
    
    lcd_command(64);  //Address where values of the first custom character is stored
    
    lcd_data(0);
    
    lcd_data(10);
    
    lcd_data(21);
    
    lcd_data(17);
    
    lcd_data(10);
    
    lcd_data(4);
    
    lcd_data(0);
    
    lcd_data(0);
    
    lcd_command(0xC0);  //Address of the location where the character is to be displayed
    
    lcd_data(0);  // Displaying the character created at address 0x64 
    
    delay(10);
    
    
    
    lcd_command(72);
    
    lcd_data(0);
    
    lcd_data(0);
    
    lcd_data(0);
    
    lcd_data(10);
    
    lcd_data(0);
    
    lcd_data(4);
    
    lcd_data(17);
    
    lcd_data(14);
    
    lcd_command(0x80);
    
    lcd_data(1);
    
    delay(10);
    
    
    
    lcd_command(80);
    
    lcd_data(0);
    
    lcd_data(0);
    
    lcd_data(10);
    
    lcd_data(0);
    
    lcd_data(4);
    
    lcd_data(0);
    
    lcd_data(14);
    
    lcd_data(17);
    
    lcd_command(0x82);
    
    lcd_data(2);
    
    delay(10);
    
    lcd_command(88);
    
    lcd_data(1);
    
    lcd_data(3);
    
    lcd_data(5);
    
    lcd_data(9);
    
    lcd_data(9);
    
    lcd_data(11);
    
    lcd_data(27);
    
    lcd_data(24);
    
    lcd_command(0x84);
    
    lcd_data(3);
    
    delay(10);
    
    
    
    lcd_command(96);
    
    lcd_data(0);
    
    lcd_data(10);
    
    lcd_data(0);
    
    lcd_data(31);
    
    lcd_data(17);
    
    lcd_data(14);
    
    lcd_data(0);
    
    lcd_data(0);
    
    lcd_command(0x86);
    
    lcd_data(4);
    
    delay(10);
    
    
    
    lcd_command(104);
    
    lcd_data(10);
    
    lcd_data(0);
    
    lcd_data(4);
    
    lcd_data(0);
    
    lcd_data(14);
    
    lcd_data(17);
    
    lcd_data(17);
    
    lcd_data(14);
    
    lcd_command(0xC2);
    
    lcd_data(5);
    
    delay(10);
    
    
    
    lcd_command(112);
    
    lcd_data(0);
    
    lcd_data(10);
    
    lcd_data(0);
    
    lcd_data(0);
    
    lcd_data(4);
    
    lcd_data(0);
    
    lcd_data(31);
    
    lcd_data(0);
    
    lcd_command(0xC4);
    
    lcd_data(6);
    
    delay(10);
    
    
    
    lcd_command(120);
    
    lcd_data(0);
    
    lcd_data(17);
    
    lcd_data(10);
    
    lcd_data(17);
    
    lcd_data(4);
    
    lcd_data(0);
    
    lcd_data(14);
    
    lcd_data(17);
    
    lcd_command(0xC6);
    
    lcd_data(7);
    
    delay(10);
    
    }
    
    
    
    void main()
    
    {
    
    lcd_ini();
    
    character();
    
    }
    
    
COMPONENTS(click here)
  • AT89C51 Microcontroller
  • PRESET
  • LCD

0 comments:

THANKS FOR UR COMMENT ....

Categories

Labels

AERONAUTICAL AEROSPACE AGRICULTURE ANDROID Android project titles Animation projects Artificial Intelligence AUTOMOBILE BANK JOBS BANK RECRUITMENTS BIG DATA PROJECT TITLES Bio instrumentation Project titles BIO signal Project titles BIO-TECHNOLOGY BIOINFORMATICS BIOMEDICAL Biometrics projects CAREER CAT 2014 Questions CHEMICAL CIVIL Civil projects cloud computing COMP- PROJ-DOWN COMPUTER SCIENCE PROJECT DOWNLOADS COMPUTER(CSE) CONFERENCE Data mining Projects Data protection. Design projects DIGITAL SIGNAL PROCESSING IEEE Project titles Dot net projects EBOOKS ELECTRICAL MINI PROJECTS ELECTRICAL PROJECTS DOWNLOADS ELECTRONICS MINI PROJECTS ELECTRONICS PROJECT DOWNLOADS EMG PROJECTS employment Engineering projects Exams Facts final year projects FOOD TECHNOLOGY FREE IEEE 2014 project Free IEEE Paper FREE IEEE PROJECTS GATE GAte scorecard GOVT JOBS Green projects GSM BASED Guest authors HIGHWAY IEEE 2014 projects ieee 2015 projects IEEE computer science projects IEEE Paper IEEE PAPER 2015 ieee project titles IEEE projects IEEE Transactions INDUSTRIAL INNOVATIVE PROJECTS INTERFACING IT IT LIST Java projects labview projects LATEST TECHNOLOGY list of project centers Low cost projects m.com MARINE Matlab codes MATLAB PROJECT TITLES MATLAB PROJECTS MBA MBA 2015 projects MCA MECHANICAL MECHANICAL PROJECTS DOWNLOAD MINI PROJECTS modelling projects MP3 MP3 cutter Mp4 Networking topics ns2 projects online jobs PETROCHEMICAL PHYSIOLOGICAL MODELLING projects physiotheraphy Projects Power electronics power system projects PRODUCTION project centers project downloads Prosthesis projects RAILWAY RECRUITMENT 2012 Recent RECENT TECHNOLOGY RECENT TECHNOLOGY LIST RECRUITMENT Rehabilitation projects renewable power respiration projects RESUME FORMAT. Ring Tone Cutter Robotics projects. Robots in medical social network jobs Solar projects Songs Cutter Speech-music separation-Abstract structural engineering TECHNOLOGY technology management TELE COMMUNICATION Telegram project TEXTILE TOP ENGINEERING COLLEGES Training VLSI

Disclaimer

This blogs is an effort to club the scattered information about engineering and project titles and ideas available in the web. While every effort is made to ensure the accuracy of the information on this site, no liability is accepted for any consequences of using it. Most of the material and information are taken from other blogs and site with the help of search engines. If any posts here are hitting the copyrights of any publishers, kindly mail the details to educations360@gmail.com It will be removed immediately.

Alexa Rank

back to top