Free Electronic Circuits & 8085 projects

Electronic projects with circuit diagram and 8085 microprocessor projects.

Seven Segment Display Interface (Eight Digits)

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.


HARDWARE FOR EIGHT DIGIT SEVEN SEGMENT DISPLAY INTERFACE

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.

INTERFACING SCHEME

72.a-Seven Segment Display Interface (Eight Digits)

SOFTWARE FOR EIGHT DIGIT SEVEN SEGMENT DISPLAY

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

72.b-Seven Segment Display Interface (Eight Digits)

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.

Delay Subroutine:

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

Related Programs (Click down)

2-Digit BCD to binary conversion.

Binary to BCD conversion

Find the 7-segment codes for given numbers

Find the ASCII character