Mohammad

Robotics Blog

RECENT POSTS

TWITTER UPDATES

No public Twitter messages.

The First 8051 Microcontroller Project – LED Blinking

Posted by Mohammad On August - 20 - 2008 7 COMMENTS

The first “Hello World!” project I prefer for Microcontroller is LED Blinking. I have used ATMEL’s 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.

		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
		ret
end

VN:F [1.8.4_1055]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.4_1055]
Rating: 0 (from 0 votes)

7 Responses

  1. athar says:

    goood project for learning

    UN:F [1.8.4_1055]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.4_1055]
    Rating: 0 (from 0 votes)
  2. anshuman says:

    how do you connect the microcontroller with the pc.

    UN:F [1.8.4_1055]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.4_1055]
    Rating: 0 (from 0 votes)
  3. tyler says:

    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.

    UN:F [1.8.4_1055]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.4_1055]
    Rating: 0 (from 0 votes)
  4. Binu says:

    Good start!

    UN:F [1.8.4_1055]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.4_1055]
    Rating: 0 (from 0 votes)
  5. deena says:

    goooooooooddd..

    UN:F [1.8.4_1055]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.4_1055]
    Rating: 0 (from 0 votes)
  6. nasir says:

    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..

    UN:F [1.8.4_1055]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.4_1055]
    Rating: 0 (from 0 votes)
  7. Doru says:

    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.

    UN:F [1.8.4_1055]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.4_1055]
    Rating: 0 (from 0 votes)

Leave a Reply