32
of 76
TEP , The Engineering Projects , Image

syedzainnasir

TEP , The Engineering Projects , Rating 7.5 7.5 / 10
TEP , The Engineering Projects , Icon Level: Moderator
TEP , The Engineering Projects , Icon Joined: 20 Mar 2022
TEP , The Engineering Projects , Icon Last Active: 2:21 PM
TEP , The Engineering Projects , Icon Location: TEP , The Engineering Projects , Flag
TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon
Led not blinking using 8051!
TEP , The Engineering Projects , Calender Question: 25-Feb-2017
TEP , The Engineering Projects , Category In: Proteus Projects
Hey guys!

I setup a breadboard circuit to do the basic single led blinking test using a AT89C52 chip. However, I do not get any blinking, it just lights up until power is stopped. I had only enabled a single bit for port0.0. The code is below. However, the led lights up even if I connect it to any other port. Is it a problem with my code? Please check it. Thank You.
[code]#include<reg52.h> sbit led = P0^0; void delay(int time) //This function produces a delay in msec. { int i,j; for(i=0;i<time;i++) for(j=0;j<1275;j++); } void main() { while(1) { led=0; delay(500); led=1; delay(500); } } [/code]
TEP , The Engineering Projects , Icon Answer: 1 TEP , The Engineering Projects , Icon Views: 150 TEP , The Engineering Projects , Icon Followers: 85
Small Bio
TEP , The Engineering Projects , Image

adiono

TEP , The Engineering Projects , Rating 7.5 7.5 / 10
TEP , The Engineering Projects , Icon Level: Moderator
TEP , The Engineering Projects , Icon Joined: 20 Mar 2022
TEP , The Engineering Projects , Icon Last Active: 2:21 PM
TEP , The Engineering Projects , Icon Location: TEP , The Engineering Projects , Flag
TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon

RE:

Led not blinking using 8051!
TEP , The Engineering Projects , Calender Comment: 25-Feb-2017
TEP , The Engineering Projects , Category In: Proteus Projects
[quote=Josephine post_id=181 time=1488021923 user_id=81] Hey guys!

I setup a breadboard circuit to do the basic single led blinking test using a AT89C52 chip. However, I do not get any blinking, it just lights up until power is stopped. I had only enabled a single bit for port0.0. The code is below. However, the led lights up even if I connect it to any other port. Is it a problem with my code? Please check it. Thank You.
[code]#include<reg52.h> sbit led = P0^0; void delay(int time) //This function produces a delay in msec. { int i,j; for(i=0;i<time;i++) for(j=0;j<1275;j++); } void main() { while(1) { led=0; delay(500); led=1; delay(500); } } [/code] [/quote]
50ms is too short. Try 500ms.
please check: [url=http://www.theengineeringprojects.com/2015/12/led-blinking-project-using-8051-microcontroller-proteus.html]LED Blinking Project Using 8051 Microcontroller[/url]
TEP , The Engineering Projects , Tick Correct Answer
Comment Bio
TEP , The Engineering Projects , Tags
PLC
Robot
STM32
Arduino
AI
ESP32
Ladder Logic
PLC Projects
Programming
Communicates STM32
PLC Projects
Communicates PLC
Font Style
Alignment
Indenting and Lists
Insert Media
Insert Items

Want to leave an answer!

Word Count :0 Draft Saved at 12:42 am.