Exp 7 MPMC
Exp 7 MPMC
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:
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 :
2. The negative terminal of the LED should be connected to the ground pin of the Microcontroller.
6. Decrement the delay counter (R0) and wait for the loop to complete.
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 :
HERE:
TON:
SETB P1.0
TOFF:
CLR P1.0
SJMP START
;SHIVKANYA 22BEE1063
END
RESULTS:
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.