
LED Blinking Project Using 8051 Microcontroller in Proteus ISIS
- I am gonna first design the simulation of LED Blinking Project using 8051 Microcontroller in Proteus ISIS, as you all know Proteus is my favorite simulation software.
- After designing the simulation, we will design the programming code for 8051 Microcontroller.
- In order to design the code we are gonna use Keil micro vision compiler and the version I have rite now is 4. So its keil micro vision 4 compiler for 8051 Microcontrollers.
- So let's first design the Proteus Simulation for LED Blinking PRoject Using 8051 Microcontroller.
Proteus Simulation for LED Blinking Project
- So, get these components from Proteus components library and place it in your workspace, these components are shown in below figure:

- So, now I hope you have got all these components, now design a circuit in your Proteus software as shown in below figure:

- Now you can see in the above image, I have used crystal oscillator of 16MHz which is used to provide frequency to 8051 Microcontroller.
- After that we have placed a 10k resistance in path of our Reset pin.
- LED is connected to first pin of Port 1 which is P1.0.
- So, now let's design the programming code for 8051 Microcontroller as we are done with the Proteus Simulation.
Keil Programming Code for LED Blinking Project
- Now as I have mentioned earlier, the compiler I have used for designing the programming code for LED Blinking Project is Keil micro vision 4.
- So I hope you have this installed on your computer and if not then must install it as otherwise you wont be able to compile this code, but I have also placed the hex file so that you can run the simulation easily.
- You can download them easily by clicking the Download buttons present at the end of this post.
- So now create a new project in your keil compiler and paste the below code in your c file.
#include<reg51.h> sbit LED = P1^0; void cct_init(void); void delay(int a); int main(void) { cct_init(); while(1) { LED = 0; delay(30000); LED = 1; delay(30000); } } void cct_init(void) { P1 = 0x00; } void delay(int a) { int i; for(i=0;i<a;i++); }
- Now let me explain this code a bit, first of all, I declare the pin1.0 as LED so that its easy to use it in our code in future.
- After that I declared two functions. One of them is the delay function which is just adding the delay, while the second function is for initialization of Port 1 as output port.
- While in the Main function, we have used the LED blinking code in which LED is ON and then OFF continuously and so that make it blink.
- Now after adding the code in your Keil software, compile it and get the hex file.
- Upload this hex file into your 8051 Microcontroller which I have used is AT89C52 and hit the RUN button.
- If everything's goes fine then you will get results as shown in below figure:

- Now click the below button to get the simulation and the programming code and let me know did it work for you. :)
[dt_button size="medium" style="default" animation="none" color_mode="default" icon="" icon_align="left" color="" link="https://www.theengineeringprojects.com/8051Projects/LED Blinking Project Using 8051 Microcontroller in Proteus.rar" target_blank="true"]Download Proteus Simulation & Keil Code[/dt_button]
That's all for today, will come soon with new tutorial on 8051 Microcontroller so stay tuned and have fun. Cheers !!! :)
Leave a Reply
Leave a Reply
You must be logged in to post a comment.
Comments on ‘’LED Blinking Project Using 8051 Microcontroller‘’
( 7 )
Thanks for such an informative article for electronic enthusiasts who are highly interested to work with microcontroller projects. I wanna add some more informativ thinkings fo all.
Mainly electronics projects based on these 6 types microcontroller:
8051 Microcontroller
PIC Microcontroller
At-mega Microcontroller
ARM Microcontroller
Arduino Microcontroller
AVR Microcontroller
8051 microcontroller is one of the most used microcontroller developed by intel in 1981 which is broadly used for making the robotic automobiles,Home automation, communation device and Medical Instruments.some projects based on 8051 microcontroller:
Radar Detector System
Vehicle Safety System
GPS Based Women Safety
Voiced Control Home Automation
Smart Car Android
Industry Safety System Using GSM
I can depend on this pic in a real project ? ,It can work for months without stop or exchange in execution the instructions ?
FI think you can but you shouldn’t as it’s an old Microcontroller and you have quite good options available these days. i.e. PIC18F452, PIC18F4550 etc.
Please can u provide me a code on automatic control of street light using microcontroller
i have tried but in my thing led is not blinking
hello
led is not blinking
i think for those whose led are not blinking, download the file and attached uc.hex that are located in your download file into the AT89C52. Just double click the AT89C52. Insert the uc.hex into the program file.