Wednesday, 18 March 2020

LED DISPLAY INTERFACE



Aim:
To display 8086 number in a four seven segment Common Anode LED display.
Hardware and Software Required:
8086 kit, LED Display Unit
Hardware Description:
Seven segment displays are important display units in Electronics and widely used to display numbers from 0 to 9. It can also display some character alphabets like A,B,C,H,F,E etc


There are two types of 7 segment displays: Common Anode and Common Cathode:
Common Anode: In this all the Negative terminals (cathode) of all the 8 LEDs are connected together (see diagram below), named as COM. And all the positive terminals are left alone.
Common Cathode: In this all the positive terminals (Anodes) of all the 8 LEDs are connected together, named as COM. And all the negative thermals are left alone.




A table has been given below for all the numbers while using Common Anode 7 segment.
Digit to Display
h g f e d c b a
Hex code
0
11000000
C0
1
11111001
F9
2
10100100
A4
3
10110000
B0
4
10011001
99
5
10010010
92
6
10000010
82
7
11111000
F8
8
10000000
80
9
10010000
90

Code:

                         OUTPUT 2500AD
                         ORG 2000H
         
                         MOV DX,FFE6H            ;Configure all 8255 ports
                         MOV AL,80H              ;as output.
                         OUT DX,AL

         LOOP4:  MOV SI,2100H            ;Initialise pointer
          
         LOOP3:  MOV CH,04H              ;4 charecters/group
         LOOP2:  MOV BL,08H              ;8 segments/charecter

                        MOV AL,[SI]             ;get the display code
                        INC SI                  ;Increment pointer
         LOOP1: ROL AL,1                ;get 1 data bit
                MOV DX,FFE2H
                OUT DX,AL               ;o/p bit to portb
                MOV AH,AL
                MOV AL,01H              ;o/p clock to
                MOV DX,FFE4H            ;shift register
                OUT DX,AL
                DEC AL
                OUT DX,AL
                MOV AL,AH
                DEC BL                  ;all bits over?
                JNZ LOOP1               ;no,continue
                DEC CH                  ;all charecters over?
                JNZ LOOP2               ;no,continue                              
                CALL DELAY
                                        ;all groups over?
                ;JNZ LOOP3               ;no,continue
                JMP SHORT LOOP4

DELAY:          MOV CX,0FFFFH
XX:                 DEC CX        
                              JNZ XX
                RET

;Display code table

                ORG 2100H
        STRING:  DB 080H,0C0H,080H,080H
              
                END



No comments:

Post a Comment