Thursday, March 31, 2016

8051 7-Segment Display Interfacing

8051 7-Segment Display Interfacing

Program to display 1 on display 0 and 4 on display 1.

ORG 0H
AGAIN :
SETB P0.2 ; enable CS
CLR P0.1
CLR P0.0 ; enable display 0
MOV P1, #00000110B ; put pattern for 1 on display
CALL DELAY
SETB P0.0 ; enable display 0
MOV P1, #00101110B; put pattern for 4 on display
CALL DELAY
JMP AGAIN ; jump back to start
; a crude delay
DELAY:
MOV R0, #200
DJNZ R0, $
RET
END



Related topics:
8051 External Program Memory Interfacing   |   8051 External Data Memory Interfacing   |   8051 Memory Mapped IO   |   8051 LED Interfacing   |   8051 Switch Interfacing   |   8051 Keyboard 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