0% found this document useful (0 votes)
11 views3 pages

Exp 7 MPMC

Uploaded by

shivkanya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views3 pages

Exp 7 MPMC

Uploaded by

shivkanya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

9th SEPTEMBER 2024 SHIVKANYA B

22BEE1063

EXPERIMENT 7
Blinking LED using 8051 Microcontroller
(HARDWARE)

AIM:

To program the 8051 microcontroller to blink an LED at regular intervals using assembly language.

COMPONENTS REQUIRED:

1. 8051 Microcontroller Kit

2. LED

3. Connecting Wires

4. Power Supply

THEORY:

Microcontroller 8051 can be programmed to control devices like LEDs, motors, etc. In this experiment,
we will use assembly language to blink an LED connected to Port 1, Pin 0 (P1.0) of the 8051
microcontroller. The blinking effect is achieved by turning the LED ON and OFF at fixed intervals.

PROCEDURE :

1. Connect the positive terminal of the LED to P1.0 of the microcontroller.

2. The negative terminal of the LED should be connected to the ground pin of the Microcontroller.

3. Provide the power supply to the microcontroller circuit.

4. Initialize two registers, R0 and R1, with delay values.

5. Turn ON the LED by setting P1.0 high.

6. Decrement the delay counter (R0) and wait for the loop to complete.

7. Turn OFF the LED by clearing P1.0.

8. Decrement the second delay counter (R1) and wait for the loop to complete.

9. Repeat the process using an infinite loop to keep the LED blinking.
CODE :

(i) ORG 000H

HERE:

MOV R0, #20d

MOV R1, #20d

TON:

SETB P1.0

DJNZ R0, TON

TOFF:

CLR P1.0

DJNZ R1, TOFF

SJMP START

;SHIVKANYA 22BEE1063

END

RESULTS:

(i) Software Output


(ii) Hardware Output

CONCLUSION:

Successfully programmed the 8051 microcontroller to blink an LED by writing assembly code that
alternates between turning the LED ON and OFF with a specific delay.

You might also like