EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / project guidance for mini project on 8051 microcontroller by swapnil

project guidance for mini project on 8051 microcontroller by swapnil

|

Microcontroller › 8051 › project guidance for mini project on 8051 microcontroller by swapnil

  • This topic has 7 replies, 8 voices, and was last updated 10 years, 7 months ago by Milind Gargade.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • July 13, 2011 at 5:49 am #1143
    query
    Participant

    can i get the project guidance from you to do a mini project on 8051 microcotroller

    December 2, 2011 at 3:01 am #6903
    Dexter
    Participant

    i will try my best to help u

    send the details

    March 4, 2013 at 11:12 am #9238
    Afnan Ali Khan
    Participant

    can i get your guidence 4 using kail U version4

     

    March 17, 2013 at 8:07 am #9331
    Prathmesh A. Bhat
    Participant

    Sir,i am working on my mini project of guidance system and i need your help

    March 24, 2013 at 5:21 am #9366
    Gopi.g
    Participant

    Hi,

     

    Mini project of  “Door security lock password.”

    Components required: 2*16 LCD, micro controller AT89S52, 4*4 Keypad, 6vc dc motor and 5v power supply.

    Software required: Keil 2v and flash memory programmable.

    Write a programming code in Keil 2v software for Door security password lock: see below coding for your mini project.

     

    //Program to make a simple code lock. The default password is 3907.
     
    #include<reg51.h>
    #define port P1
    #define dataport P2
    #define key P0
    #define sec 100
    sbit rs = port^0;
    sbit rw = port^1;
    sbit en = port^2;
     
    sbit col1=key^4;
    sbit col2=key^5;
    sbit col3=key^6;
    sbit col4=key^7;
    sbit row1=key^0;
    sbit row2=key^1;
    sbit row3=key^2;
    sbit row4=key^3;
    sbit lock_output=P0^7;
     
    int check=0;
    int digit[4]={0,0,0,0};
    int dig_one=3;
    int dig_two=9;
    int dig_three=0;
    int dig_four=7;
    int i,count=0;
     
    void delay(unsigned int msec) //Time delay function
    {
    int i,j ;
    for(i=0;i<msec;i++)
      for(j=0;j<1275;j++);
    }
     
    void lcd_cmd(unsigned char item) //Function to send command to LCD
    {
    dataport = item;
    rs= 0;
    rw=0;
    en=1;
    delay(1);
    en=0;
    return;
    }
     
    void lcd_data(unsigned char item) // Function to send data to LCD
    {
    dataport = item;
    rs= 1;
    rw=0;
    en=1;
    delay(1);
    en=0;
    return;
    }
     
    void lcd_data_string(unsigned char *str)  // Function to send string to LCD
    {
    int i=0;
    while(str!=’’)
    {
      lcd_data(str);
      i++;
      //delay(10);
    }
    return;
    }
     
    void lcd(unsigned char str[10])  // Function to send string to LCD
    {
    lcd_cmd(0x38);
    lcd_cmd(0x0e);
    lcd_data_string(str);
    }
     
    void ans()
    {
    if(check>3)
    {
      lcd_cmd(0x01);
      lcd_cmd(0x82);
      lcd_data_string(” LOCK OPEN”);
      lock_output=1;
      delay(500);
    }
    else
    {
      lcd_cmd(0x01);
      lcd_cmd(0x82);
      lcd_data_string(” WRONG PASSWORD”);
      lock_output=0;
      count++;
      delay(500);
    }                   
    }
     
    void code_check() // Function to check password
    {
    if(i<=3 )
    {
      switch((i+1))
      {
       case 1: {
          if(dig_one==digit[0])
          {
           check=check+1;
          }
          break;
         }
     
       case 2: {
          if(dig_two==digit[1])
          {
           check=check+1;
          }
          break;
         }
        
       case 3: {
          if(dig_three==digit[2])
          {
           check=check+1;
          }
          break;
          }
        
       case 4: {
          if(dig_four==digit[3])
          {
           check=check+1;
          }
          break;
         }
      }
    }
    if(i==3)
    {
      ans();
    }
    }
     
     
    void display(int a) //Display function
    {
    switch(a)
    { 
      case 1:{
        lcd_data(‘1’);
        delay(30);
        digit=1;
        code_check();
        break;
        }
      case 2:{
        lcd_data(‘2’);
        delay(30);
        digit=2;
        code_check(); 
        break;
        }
      case 3:{
        lcd_data(‘3’);
        delay(30);
        digit=3;
        code_check();
        break; 
        }
      case 4:{
        lcd_data(‘4’);
        delay(30);
        digit=4;
        code_check();
        break;
        }
      case 5:{
        lcd_data(‘5’);
        delay(30);
        digit=5;
        code_check();
        break;
        }
      case 6:{
        lcd_data(‘6’);
        delay(30);
        digit=6;
        code_check();
        break;
        }
      case 7:{
        lcd_data(‘7’);
        delay(30);
        digit=7;
        code_check();
        break;
        }
      case 8:{
        lcd_data(‘8’);
        delay(30);
        digit=8;
        code_check();
        break;
        }
      case 9:{
        lcd_data(‘9’);
        delay(30);
        digit=9;
        code_check();
        break;
        }
      case 0:{
        lcd_data(‘0’);
        delay(30);
        digit=0;
        code_check();
        break;
        }
    }
    }
     
    void check_col1()
    {
    row1=row2=row3=row4=1;
    row1=0;
    if(col1==0)
    display(1);
    row1=1;
    row2=0;
    if(col1==0)
    display(4);
    row2=1;
    row3=0;
    if(col1==0)
    display(7);
    row3=1;
    row4=0;
    if(col1==0)
    {
      row4=1;
    }
    }
     
    void check_col2()
    {
    row1=row2=row3=row4=1;
    row1=0;
    if(col2==0)
    display(2);
    row1=1;
    row2=0;
    if(col2==0)
    display(5);
    row2=1;
    row3=0;
    if(col2==0)
    display(8);
    row3=1;
    row4=0;
    if(col2==0)
    display(0);
    row4=1;
    }
     
    void check_col3()
    {
    row1=row2=row3=row4=1;
    row1=0;
    if(col3==0)
    display(3);
    row1=1;
    row2=0;
    if(col3==0)
    display(6);
    row2=1;
    row3=0;
    if(col3==0)
    display(9);
    row3=1;
    row4=0;
    if(col3==0)
    {
      row4=1;
    }
    }
     
    void main()
    {
    col1=col2=col3=1;
    while(1)
    {
      lcd_cmd(0x01);  //Clear LCD screen
      lock_output=0;
      lcd_cmd(0x82);   // Set cursor on position first of first line
      lcd(“ENTER PASSWORD”);
      check=0;
      row1=row2=row3=row4=0;
      while(col1==1 && col2==1 && col3==1);
      for(i=0;i<4;i++)
      {
       delay(100);
       lcd_cmd(0xc4+i);
       row1=row2=row3=row4=0;
       while(col1==1 && col2==1 && col3==1);
       row1=row2=row3=row4=0;
       if(col1==0)
       check_col1();
       else
        if(col2==0)
        check_col2();
        else
         if(col3==0)
         check_col3();
       if(count==4)
       {
       lcd_cmd(0x01);
       lcd_cmd(0x86);
       lcd(“SORRY”);
       lcd_cmd(0xc1);
       lcd(“NO MORE TRIALS”);
       while(1);
       }
      }   
    }
    }
     
     
     
     
     
    If require any clarification send me. i will help you………………
     
    Thanks.
    April 6, 2013 at 4:18 pm #9436
    karthik Balu
    Participant

    how to display decimal values on lcd display………………………by converting analog value to digital value and to decimal value……….

    using piezoelectricsensors as input to adc….and interfacing with microcontroller AT89C51

    April 7, 2013 at 4:45 pm #9438
    GAJENDRA TIWARI
    Participant

    HELLO SIR, MY PROJECT NAME IS AUTOMATIC COLLEGE RING BELL. SO I WANT PROGRAMMING CODE FOR MICROCONTROLLER AT89CS51

    August 13, 2015 at 8:28 am #13159
    Milind Gargade
    Participant

    Plaee give me project guidence for project " Automatic College Bell using 8051"

    and please give C code for " Automatic College Bell using 8051" project.

    please

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Happy Pi day. March 15, 2026
  • Please could you advise me on this circuit for car OBD2 March 15, 2026
  • Noise problem March 14, 2026
  • Cubloc modbus settings with rs485 March 14, 2026
  • Measuring microphone output March 14, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise