Microcontroller › 8051 › Microcontroller
- This topic has 8 replies, 3 voices, and was last updated 10 years, 3 months ago by Ashutosh Bhatt.
-
AuthorPosts
-
June 3, 2014 at 2:24 pm #3104Osama MohammedParticipant
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 #11796SHAH DISHANT H.ParticipantHi,
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 #11797Ashutosh BhattParticipantyou 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 #11808Osama MohammedParticipantThanks 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 , 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 #11810Osama MohammedParticipant#include <reg51.h>msDelay(unsigned int);cmd(unsigned char); //LCD command code initializationdat(unsigned char ); // LCD data code initializationsbit regs=P2^6; //name the pin register select of the lcdsbit 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 bytemsDelay(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 workingJune 9, 2014 at 10:04 pm #11811Osama MohammedParticipantJune 10, 2014 at 3:58 am #11812Ashutosh BhattParticipantyou 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 #11821Osama MohammedParticipantThanks, now it’s working
June 15, 2014 at 9:44 am #11825Ashutosh BhattParticipantif its done. pls post your working code so that other may get benifit and clear their doubts.
-
AuthorPosts
- You must be logged in to reply to this topic.