Thursday, March 31, 2016

8051 LED Interfacing

8051 port pins can be used to interface LED’s. We can control the LED by programming the IO pins.

8051 LED Interfacing

Program to toggle bits in 8255 output ports:
ORG 0H
MOV P0, 00H
MOV A, #55H
AGAIN:
MOV P0, A
ACALL DELAY
CPL A
SJMP AGAIN
DELAY:MOV R3, #100
HERE1:MOV R4, #255
HERE2:DJNZ R4, HERE2
DJNZ R3, HERE1
RET
END



Related topics:
8051 External Program Memory Interfacing   |   8051 External Data Memory Interfacing   |   8051 Memory Mapped IO   |   8051 Switch Interfacing   |   8051 Keyboard Interfacing   |   8051 7-Segment Display Interfacing   |   8051 LCD Interfacing   |   8051 ADC Interfacing   |   8051 DAC Interfacing   |   8051 Relay Interfacing   |   8051 Sensor Interfacing   |   8051 Stepper Motor Interfacing   |   8051 DC Motor Interfacing

List of topics: 8051

No comments:

Post a Comment