Project On LED Blinking Using 8051 Microcontroller in Proteus

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Project On

LED Blinking Using 8051 Microcontroller in Proteus

to be submitted by:

Tayde Shradha Trimbak (Roll No: 304221)


Tupe Rutuja Bhausaheb (Roll No: 304224)

Shaikh Asma Azim (Roll No: 304273)

LED Blinking Using 8051 Microcontroller in Proteus:

8051 Microcontroller is a programmable device which is used for controlling purpose.


Basically 8051 controller is Mask programmable means it will programmed at the time of
manufacturing and will not programmed again, there is a derivative of 8051 microcontroller,
89c51 micro controller which is re-programmable.

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.

 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 now create a new project in your keil compiler and paste the below code in your c file.

Keil C Program

#include<reg52.h> // special function register declarations


// for the intended 8051 derivative

sbit LED = P1^0; // Defining LED pin

void Delay(void); // Function prototype declaration

void main (void)


{
while(1) // infinite loop
{
LED = 0; // LED ON
Delay();
LED = 1; // LED OFF
Delay();
}
}

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.

You might also like