Microcontroller 7 Segment Interfacing
Seven segment display is a basic type of display which can display numbers from 0 to 9. The circuit for interfacing single 7 segment display is shown below.
Driving a 7 segment display is as simple as flashing LEDs, but here we are flashing 7+1 LEDs. The 7 segment display module has 8 LEDs (7 segments to display number and one segment for decimal point or dot) arranged in a particular manner as shown in image below.
By driving (in the sense controlling ON and OFF conditions) these LEDs in various combinations, we can display the numbers 0 to 9. There are basically two types of 7 segment displays, they are common cathode and common anode. In common cathode, the cathodes of all the LED segments are connected together, we should apply a logic 1 or high input to a segment pin to light up that particular segment, and in common cathode the case is opposite. Table below shows the combinations of inputs to be applied to 7 segment display for digits 0 to 9.
| For common cathode displays | ||
| Digit | binary input value | hexadecimal input value |
| 0 | 11111100 | FC |
| 1 | 01100000 | 60 |
| 2 | 11011010 | DA |
| 3 | 11110010 | F2 |
| 4 | 01100110 | 66 |
| 5 | 10110110 | B6 |
| 6 | 10111110 | BE |
| 7 | 11100000 | E0 |
| 8 | 11111110 | FE |
| 9 | 11110110 | F6 |
| For common anode displays | ||
| Digit | binary input value | hexadecimal input value |
| 0 | 00000011 | 03 |
| 1 | 10011111 | 9F |
| 2 | 00100101 | 25 |
| 3 | 00001101 | 0D |
| 4 | 10011001 | 99 |
| 5 | 01001001 | 49 |
| 6 | 01000001 | 41 |
| 7 | 00011111 | 1F |
| 8 | 00000001 | 01 |
| 9 | 00001001 | 09 |
The images shown below are the photographs of 7 segment add-on board for my microcontroller board, I have included one 7 segment in the current version of my development board, so if you are using that circuit then you don’t need an external 7 segment display board. Click on the image to enlarge.
The assembly language source code for interfacing 7 segment display is given below.
| ;************************************************* ; ;Program: Driving seven segment display ;Author: Srikanth ;Website: http://shree-electronics.com/ ;Description: Displays numbers 0 to 9 on ;the LED seven segment display continuously ; ;************************************************* ;Declarations ;************************************************* ;Main program main:mov r0,#08h again:mov port,#11111100b ;’0′ ;************************************************* delay:mov r2,#0ffh ;delay subroutine ;************************************************* end |













PROJECTS TO GET COSTLY as demand will increase as exams reach so HURRY to GET it on TIME




THIS SITE HAS BEEN SO USEFUL TO ME IN MY PROJECT WORK,IN DESIGN AND CONTRUCTION OF 7 SEGMENT DIPLAY OF DIGITAL ANENOMETER.