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 / Microcontroller

Microcontroller

|

Microcontroller › 8051 › Microcontroller

  • This topic has 8 replies, 3 voices, and was last updated 11 years, 9 months ago by Ashutosh Bhatt.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • June 3, 2014 at 2:24 pm #3104
    Osama Mohammed
    Participant

    I have 89C52 and it is not working 

     

    and there is no an obvious reason 

     

    I tried a very simple circuit to turn led on and off but the circuit is not working although everything seems to be as it should be.

     

    The circut is working well in ISIS proteus simulation though 

     

    is this a common issue with 8051 microcontrollers !? 

     

    my friend suggested me to work with PIC or any other type of microcontrollers.

     

    actually …. I started to think about leaving 8051 microcontrollers forever , what do you think ? what do u suggest ?

    June 4, 2014 at 12:51 pm #11796
    SHAH DISHANT H.
    Participant

    Hi,

     

    Can u post code and hardware?

     

    Check following things.

     

    1. Is LED glowing when u r directly giving 5V supply to it ?

     

    2. Is the voltage on pin is varying (logic 0 and logic 1) as per the program ?

     

    3. If you have connected LEDs on P0, Have u connected external pull up resistor ?

     

    4. Have u provided enough delay between blinking ?

     

     

    We don’t have any fix issues with 8051 controllers. In market various products are designed with 8051 and it is having a great stability and life time. 

     

    Whetehr to continue with 8051 or not is upto you but surely 8051 is great part of Embedded World and we can’t blame on its power. My sir has designed Gold Melting Furnace which can melt 4 kg of gold within few mins and its in use by many of the world known jewellers even today. So definately, 8051 is a powerful and STABLE controller.

     

    But yes, moving towards advanced controller is always a good choice for learning. You can shift to PIC, AVR or even ARM7. 

     

    So all the best.

    June 5, 2014 at 7:26 am #11797
    Ashutosh Bhatt
    Participant

    you follow the tutorials given on

    EG labs / micro controllers / 8051 

    make hardware and software program as per tutorials and then if still you have any problem

    let us know

    June 9, 2014 at 9:50 pm #11808
    Osama Mohammed
    Participant

    Thanks all , the problem is solved ! 

    I found that the problem was from the voltage supply ,although I am using 5v regulator to supply the microcontroller but the microcontroller was unable to function with it, I don’t know why is this but maybe the voltage regulator is of bad quality !!

     

    I tried to supply it with a 5v from 5v of the Arduino UNO board and the 8051 led blinking circuit worked well :D, this is how I detected where is the problem.

     

     

    but now I am facing another problem ,the LCD in my circuit is not working !!.

     

    when I tried the LCD code and circuit with ISIS proteus simulation it was working fine ,but when implementing it on my breadboard it doesn’t work ……. !!!!!!!!!!!! this would drive me crazy !!.

     

     

     

     

     

    June 9, 2014 at 9:58 pm #11810
    Osama Mohammed
    Participant
    #include <reg51.h>
    msDelay(unsigned int);
     
    cmd(unsigned char); //LCD command code initialization 
    dat(unsigned char ); // LCD data code initialization 
    sbit regs=P2^6;  //name the pin register select of the lcd
    sbit enab=P2^7;
    sbit rd=P2^5;
     
    void LCD_write_string(unsigned char *str)   //store address value of the string in pointer *str
    {
        unsigned char j = 0;
        while (str[j] != 0)
        {
            dat(str[j]);      // sending data on LCD byte by byte
            msDelay(100);
                    j++;
        }
        return;
    }
     
    void main (void)
    {
    cmd(0x38);
    msDelay(100);
    cmd(0x0C);
    msDelay(100);
    cmd(0x01);
    msDelay(100);
     
    while(1)
    {
    LCD_write_string(“osama”);
    msDelay(2000);
    cmd(0x01);
    msDelay(2000);
     
    }
     
    }
     
     
    cmd(unsigned char value)
    {
     P1=value;
     regs=0;
     rd=0;
     enab=0;
     msDelay(500);
     enab=1;
    }
    dat(unsigned char info)
    {
     P1=info;
      regs=1;
      rd=0;
     enab=0;
     msDelay(500);
     enab=1;
    }
     
    msDelay(unsigned int tdelay)
    {
     unsigned int k,j;
     for(k=0;k<=tdelay;k++)
     for(j=0;j<=100;j++);
     
    }
     
     
     
     
     
     
     

     
     
     
     
    This is a code I used to test the LCD , it is not the code that I use in the project that I am working in but just to test the LCD ,but unfortunately this is not working :(
    June 9, 2014 at 10:04 pm #11811
    Osama Mohammed
    Participant

    wysiwyg_imageupload:12491:

    June 10, 2014 at 3:58 am #11812
    Ashutosh Bhatt
    Participant

    you should give strobe to en pin of LCD

    like normaly its 0 but you should give it strobe pulse as

    en = 1

    en=0

     

    every time

    no need to give delay in between

    June 12, 2014 at 7:24 pm #11821
    Osama Mohammed
    Participant

    Thanks, now it’s working 

    June 15, 2014 at 9:44 am #11825
    Ashutosh Bhatt
    Participant

    if its done. pls post your working code so that other may get benifit and clear their doubts.

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

RSS Recent Posts

  • Project boxes March 13, 2026
  • Arduino standalone minimal March 13, 2026
  • Very Curious Issue With DS3231 RTC Clock March 13, 2026
  • Phone to op amp circuit? March 13, 2026
  • energising a solenoid March 12, 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