LED Blinking using 8051 Microcontroller and Kail C – AT89C51

0
5017

[nextpage title=”Introduction” ]

8051 Micro controller 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 micro controller, 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.[sam_block id=”2″]

This device also have Timer, Serial Port interface and Interrupt controlling you can use these according to your need.

https://electrosome.com/wp-content/uploads/2013/05/AT89C51.jpg

 

[/nextpage]

[nextpage title=”Detail about Keil” ]

Using Keil uVision 4

  1. Download and Install Keil uVision4
  2. Open Keil uVision

untitled

3. Create a new Project : Project >> Create µVision Project

untitled

4. Browse for the location
5. Select the microcontroller Atmel>>AT89C51
6. Don’t Add The 8051 startup code
7. File>>New
8. Adding Hex file to the output

https://electrosome.com/wp-content/uploads/2013/05/untitled4.jpg
Right click on Target1>>options for target “target 1”
In the Output Tab check the “Create HEX file” box<

[sam_block id=”2″]

untitled

 

To change the operating frequency goto Target tab on the window obtained by right clicking on Target1>>options for target “target

[/nextpage]

[sam_block id=”2″]

[nextpage title=”Program” ]

[message_box title=”Program” color=”red”]

Keil C Program:

#include<reg51.h>
void delay()
{
unsigned int i,j;
for(i=0;i<1000;i++)
{

}

}
void main()
{
while(1)

{
P1=0x01;
delay();
P1=0x02;
delay();
P1=0x04;
delay();
P1=0x08;
delay();
P1=0x10;
delay();
P1=0x20;
delay();
P1=0x40;
delay();
P1=0x80;
delay();
}

}[sam_block id=”2″]

  1. Enter the  source code.
  2. Save it.
  3. Then Compile it. Click Project>>Build Target or F7.
  4. The hex file will be generated in your Project Folder.

[/message_box]

[/nextpage]

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments