You are on page 1of 9

1/27/2014 The First 8051 Microcontroller Project LED Blinking | Mohammad

http://robotics.reefat.com/2008/08/the-first-8051-microcontroller-project-led-blinking/ 1/9
Home
About Mohammad

Mohammad
Robotics Blog
Categories
Actuators
Featured
Uncategorized
Archives
February 2010
January 2009
September 2008
August 2008
RECENT POSTS
1/27/2014 The First 8051 Microcontroller Project LED Blinking | Mohammad
http://robotics.reefat.com/2008/08/the-first-8051-microcontroller-project-led-blinking/ 2/9
TWITTER UPDATES
No public Twitter messages.
Categories
Actuators
Featured
Uncategorized
Archives
February 2010
January 2009
September 2008
August 2008
The First 8051 Microcontroller Project LED Blinking
Posted by Mohammad On August - 20 - 2008 19 COMMENTS
The first Hello World! project I prefer for Microcontroller is LED Blinking. I have used ATMELs 89C51
(40-pins DIP) 8051 architecture microcontroller which is ideal for first time learning MCU Chip. I used my
previously made 5V Regulator to supply uninterrupted regulated DC voltage. The program is very simple and
straight forward, that uses a delay procedure that loops for 255 x 256 = 65536 times and produce loop based
software delay.
1/27/2014 The First 8051 Microcontroller Project LED Blinking | Mohammad
http://robotics.reefat.com/2008/08/the-first-8051-microcontroller-project-led-blinking/ 3/9
org 0000h
loop:
mov b, #0FFh
acall delay
clr p1.0
mov b, #0FFh
acall delay
mov p1, #0FFh
ajmp loop
delay:
djnz acc, delay
mov acc, #0FFh
djnz b, delay
1/27/2014 The First 8051 Microcontroller Project LED Blinking | Mohammad
http://robotics.reefat.com/2008/08/the-first-8051-microcontroller-project-led-blinking/ 4/9
Rating: +7 (from 7 votes)
Rating: +2 (from 2 votes)
ret
end
Rating: 8.6/10 (20 votes cast)
The First 8051 Microcontroller Project LED Blinking, 8.6 out of 10 based on 20 ratings
Uncategorized
Mohammad
19 Responses
1. athar says:
February 6, 1928 at 4:26 pm
goood project for learning
Rating: 5.0/5 (1 vote cast)
1/27/2014 The First 8051 Microcontroller Project LED Blinking | Mohammad
http://robotics.reefat.com/2008/08/the-first-8051-microcontroller-project-led-blinking/ 5/9
Rating: +2 (from 2 votes)
Rating: +1 (from 3 votes)
Rating: 0 (from 2 votes)
Rating: +1 (from 1 vote)
2. anshuman says:
February 22, 1928 at 9:45 pm
how do you connect the microcontroller with the pc.
Rating: 5.0/5 (3 votes cast)
3. tyler says:
December 24, 2008 at 4:17 am
hi.i interest about MCS-51.Your project LED Blinking by 8051 it very easy.
Thank you for example.maybe u have free time.
Thank You.
Rating: 0.0/5 (0 votes cast)
4. Binu says:
May 27, 2009 at 10:54 pm
Good start!
Rating: 5.0/5 (1 vote cast)
5. deena says:
September 5, 2009 at 7:25 am
goooooooooddd..
Rating: 0.0/5 (0 votes cast)
6. nasir says:
1/27/2014 The First 8051 Microcontroller Project LED Blinking | Mohammad
http://robotics.reefat.com/2008/08/the-first-8051-microcontroller-project-led-blinking/ 6/9
Rating: +2 (from 2 votes)
Rating: 0 (from 0 votes)
Rating: +1 (from 1 vote)
Rating: +2 (from 2 votes)
September 9, 2009 at 10:38 pm
do you have an example to blinking 7 led sir?
i need a circuit and the source code also..
perhaps the source code is using keil uversion and 8051 microcontroller..
Rating: 0.0/5 (0 votes cast)
7. Doru says:
January 15, 2010 at 7:21 am
Hi there. I have a simple project for school. I need to connect a 8051 to a 7 segment lcd and to make a
counter. Basically once every 2 seconds the display should increment with i(where i is a value that can be
set from the assembly code). When it reaches 10 it should overflow and start over.
I need to simulate this in proteus.
Please help me. I will be forever grateful.
Rating: 0.0/5 (0 votes cast)
8. Prithviraj says:
May 12, 2010 at 1:46 pm
But how do you program the 8051? serial or ISP?? please give the programming circuit sir..thank
you..
Rating: 2.7/5 (3 votes cast)
9. Sajiv says:
July 6, 2010 at 6:54 am
Good for beginners.
Rating: 4.0/5 (1 vote cast)
1/27/2014 The First 8051 Microcontroller Project LED Blinking | Mohammad
http://robotics.reefat.com/2008/08/the-first-8051-microcontroller-project-led-blinking/ 7/9
Rating: 0 (from 0 votes)
Rating: +1 (from 1 vote)
Rating: +1 (from 1 vote)
10. gaurav singh says:
July 10, 2011 at 2:13 pm
sir
is this possilbe to connect led + terminal to the mcu and to the gnd
will the mcu draw enough couurent to blink the led
Rating: 0.0/5 (0 votes cast)
11. rashmi chauhan says:
July 10, 2011 at 2:17 pm
HI Sajiv
this is good for beginers ,good job
check out this blog for 8051 usb programmer schematic
http://microembeded.blogspot.com/2011/06/usb-8051-avr-microcontroller-programmer.html
Rating: 0.0/5 (0 votes cast)
12. Mohammad says:
July 10, 2011 at 8:06 pm
@Gaurav Singh: You can do it too, but add a current limiting resistor in series to make sure the current
through the LED doesnt go above 25-30mA.
Rating: 0.0/5 (0 votes cast)
13. Daljit says:
November 1, 2011 at 11:13 am
sir please tell me why led is blinking on clear and off when set???why??plz answer me m so confused
1/27/2014 The First 8051 Microcontroller Project LED Blinking | Mohammad
http://robotics.reefat.com/2008/08/the-first-8051-microcontroller-project-led-blinking/ 8/9
Rating: 0 (from 0 votes)
Rating: +2 (from 2 votes)
Rating: 0 (from 0 votes)
Rating: +1 (from 1 vote)
Rating: +1 (from 1 vote)
Rating: 0.0/5 (0 votes cast)
14. Mohammad says:
November 2, 2011 at 12:56 am
@Daljit: Simple math. Do you see the right side (+) of the LED is connected to VCC (+5V)? Now if you
ground (0V) the other side, LED will lit.
Rating: 0.0/5 (0 votes cast)
15. mayur says:
March 13, 2012 at 7:42 am
sir, for lighting on any building or temple, can we use such kind of program(more complex)
Rating: 0.0/5 (0 votes cast)
16. vikram says:
June 10, 2012 at 3:38 am
better for freshers
Rating: 0.0/5 (0 votes cast)
17. pushkar says:
July 13, 2012 at 6:22 am
gooood start
Rating: 0.0/5 (0 votes cast)
1/27/2014 The First 8051 Microcontroller Project LED Blinking | Mohammad
http://robotics.reefat.com/2008/08/the-first-8051-microcontroller-project-led-blinking/ 9/9
Rating: +1 (from 1 vote)
Rating: +2 (from 2 votes)
18. manoj soorya says:
January 31, 2013 at 8:00 am
can you tell how to build a switched off delay circuit with 89C51?
Rating: 0.0/5 (0 votes cast)
19. melaku says:
March 30, 2013 at 6:21 am
Hi there. I have a simple project for school. I need to connect a 8051 to a 7 segment lcd and to make a
counter. Basically once every 1,1/2,2 seconds the display should increment with i(where i is a value that
can be set from the assembly code).
Rating: 0.0/5 (0 votes cast)
Neptune theme from Cheap Web Hosting
Copyright 2014 Mohammad Robotics Blog.
Subscribe to Posts
Subscribe to Comments

You might also like