Statement: Interface an 8-digit 7 segment LED display using 8255 to the 8085 microprocessor system and write an 8085 assembly language routine to display message on the display.


Home
8085 Forum
8085 Free Projects
8085 Free Programs
8085 Tutorials
8085 details
Interfacing Techniques
Electronic Tutorials
Electronic Projects
Assembler/ IDE
Datasheets
Guest Book
About Me


Source program:

       SOFTWARE TO INITIALIZE 8255:

       MVI        A, 80H                : Load control word in AL
       OUT        CR                : Load control        word in CR

SUBROUTINE TO DISPLAY MESSAGE ON MULTIPLEXED LED DISPLAY:

       SET UP REGISTERS FOR DISPLAY:

       MVI B, 08H                        : load count
       MVI C, 7FH                        : load select pattern        
       LXI H, 6000B                        : starting address of message

DISPLAY MESSAGE:

DISP 1: MOV A, C                        : select digit
       OUT PB
       MOV A, M                        : get data
       OUT PA                        : display data
       CALL DELAY                : wait for some time
DISP 1: MOV A, C
       RRC
       MOV C, A                        : adjust selection pattern
       INX H
       DCR B                                : Decrement count
       JNZ DISP 1                        : repeat 8 times
       RET                        

Note: This "display message subroutine" must be called continuously to display the 7-segment coded message stored in the memory from address 6000H.

INTERFACING SCHEME




Delay subroutine:

Delay: LXI D, Count
Back: DCX D                        
       MOV A, D        
       ORA E                
       JNZ Back                
       RET

Fig. shows the multiplexed eight 7-segment display connected in the 8085 system using 8255. In this circuit port A and port B are used as simple latched output ports. Port A provides the segment data inputs to the display and port B provides a means of selecting a display position at a time for multiplexing the displays. A0-A7 lines are used to decode the addresses for 8255. For this circuit different addresses are:
                               PA = 00H PB = 01H
                               PC = 02H CR = 03H.
The register values are chosen in Fig. such that the segment current is 80 mA. This current is required to produce an average of 10 mA per segment as the displays are multiplexed. In this type of display system, only one of the eight display position is 'ON' at any given instant. Only one digit is selected at a time by giving low signal on the corresponding control line. Maximum anode current is 560 mA (7-segments x 80 mA = 560 mA), but the average anode current is 70 mA.

HARDWARE FOR EIGHT DIGIT SEVEN SEGMENT DISPLAY INTERFACE
SOFTWARE FOR EIGHT DIGIT SEVEN SEGMENT DISPLAY INTERFACE



For 8255, Port A and B are used as output ports. The control word format of 8255 according to hardware connections is: