Professional Documents
Culture Documents
Project On LED Blinking Using 8051 Microcontroller in Proteus
Project On LED Blinking Using 8051 Microcontroller in Proteus
Project On LED Blinking Using 8051 Microcontroller in Proteus
to be submitted by:
89c51 is 8-bit device means it is capable of doing 8-bit operations. It have 4 ports which are
used as input or output according to your need.
This device also have Timer, Serial Port interface and Interrupt controlling you can use these
according to your need.
LED Blinking Project Using 8051 Microcontroller. In this project, we will design a basic circuit
for 8051 Microcontroller which involves crystal oscillator etc. The basic circuit of 8051
Microcontroller is quite the same as we did for PIC Microcontroller. After that, we will attach a
small LED on any of its I/O pins and then will make it blink. I have also given the Proteus
Simulation along with Programming code designed in keil uvision 4.
Procedure:
First design the simulation of LED Blinking Project using 8051 Microcontroller in Proteus ISIS
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 4. So its
keil micro vision 4 compiler for 8051 Microcontrollers.
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 we got all these components, now design a circuit in your Proteus software as shown in
below figure:
Now 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.
So, now let’s design the programming code for 8051 Microcontroller as we are done with the
Proteus Simulation.
So now create a new project in your keil compiler and paste the below code in your c file.
Keil C Program
void Delay(void)
{
int j;
int i;
for(i=0;i<10;i++)
{
for(j=0;j<10000;j++)
{
}
}
}
Code explanation:
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 we will get desired result i.e.LED is blinking.