Summary:
This article introduces you to the very basic operation of taking an output from the microcontroller AT89C51. It demonstrates the principle behind interfacing LEDs with 8051 microcontroller. Here we have demonstrated the aforesaid principles by blinking LEDs continuously i.e., switching them on and off.
AT89C51, which belongs to the family of 8051 series of microcontrollers,
is very commonly used by a large community of hobbyist and engineers. Its simplicity and ease of programming with inbuilt features easily makes its position in the top preferred list of microcontroller for both beginners and advanced user.
is very commonly used by a large community of hobbyist and engineers. Its simplicity and ease of programming with inbuilt features easily makes its position in the top preferred list of microcontroller for both beginners and advanced user.
Description:
LEDs are by far the most widely used means of taking output. They find huge application as indicators during experimentations to check the validity of results at different stages. They are very cheap and easily available in a variety of shape, size and colors.
The principle of operation of LEDs is simple. The commonly available LEDs have a drop voltage of 1.7 V and need 10 mA to glow at full intensity. The following circuit describes “how to glow an led”.
Circuit Diagram:
Code:
===============================================
//Simple Led Blinking Program Code fro Above circuits
ORG 0H
MOV A, #00H
AGAIN: MOV P2, A
ACALL DELAY
CPL A
SJMP AGAIN
ORG 0H
MOV A, #00H
AGAIN: MOV P2, A
ACALL DELAY
CPL A
SJMP AGAIN
DELAY: MOV R1, #255
NEXT: MOV R2, #255
BACK: DJNZ R2, BACK
DJNZ R1, NEXT
RET
END
NEXT: MOV R2, #255
BACK: DJNZ R2, BACK
DJNZ R1, NEXT
RET
END
===============================================
Video Tutorial:
Please Like Us and Join Us............
Leave msg and comment for suggestions.
No comments:
Post a Comment