You are on page 1of 14


The 7 segment display allows us to provide information to the user. Fig. below shows the 4 digit 7 segment displays. A seven-segment display, or seven-segment indicator, is a form of electronic display device for displaying decimal numerals that is an alternative to the more complex dot-matrix displays. Seven-segment displays are widely used in digital clocks, electronic meters, and other electronic devices for displaying numerical information. A seven segment display, as its name indicates, is composed of seven elements. Individually on or off, they can be combined to produce simplified representations of the arabic numerals. The seven segments are arranged as a rectangle of two vertical segments on each side with one horizontal segment on the top, middle, and bottom.

Figure 1.1 7-Segment Display Seven segment display detail and cathode pattern to display the Decimal digits. The segments of a 7-segment display are referred to by the letters A to G, as shown in Fig.

In practice current limiting resistors of about 470 to 220O ohms would be connected in series between the decoder/driver chip and each LED display segment to limit the maximum current flow. Different display decoders or drivers are available for the different types of
Dept. of ECE, MSRIT Page 1

If we look at one digit we can see 10pins each segment and the small dot are LED‟s. after all we are talking about LED‟s not bulbs.display available. railway station displays. to light the segments we need to connect the positive supply rail to the common pin. we have the 10 pins for each digit. 74LS48 for common-cathode LED types. and pull to ground the segments. thus multiplexing the data. Lets take as example the common anode type. low -cost measuring devices or very stressing environments the led based displays are better. both LCD and LED displays are combined together to form larger Dot-Matrix Alphanumeric type displays which can show letters and characters as well as numbers in standard Red or Tri-colour outputs. A seven segment display. The other solution is to connect each corresponding segment from the digits to a common bus. can withstand vibrations. the price drop of LCD‟s tend to overtake the market. as its name indicates. and cheaper. like clock‟s. each segment depending on its size can handle a few miliamps. Individually on or off. of ECE. That‟s fine if you need just one number to display. each of them has one terminal connected to a common pin. e. since the common pin is doubled.g. MSRIT Page 2 . for what the LCD would fail to work or even get permanently damaged. For large numeric displays. from this comes the name common anode or common cathode. The individual segments of a seven-segment display. The most simple led display available is the seven segment display. they can be combined to produce simplified representations of the Arabic numerals. because of its simple construction it is very robust and can function in very low or high temperatures. Liquid crystal displays (LCD´s) have one major advantage over similar LED types in that they consume much less power and nowadays. or the CMOS CD4543 for liquid crystal display (LCD) types. Presently. and the other terminal is connected to a standalone pin. 74LS47 for common-anode LED types. is composed of seven elements. this way for each digit you need 8 pins and isn‟t elegant at all. there are a still few applications for which these devices are more suited. but how can these digits be connected to form a multi-digit display? The first approach is to connect each segment to a micro-controller pin. Often the seven segments are Dept. it consists of 7 led rectangular boxes called 'segments' and are arranged forming the number 8. mechanical shocks without problems. and power the digits one at a time.

In most applications. and bottom. which aids readability. this is done to obtain a unique. Dept. where the optional DP decimal point (an "eighth segment") is used for the display of non-integer numbers. The animation to the left cycles through the common glyphs of the ten decimal numerals and the six hexadecimal "letter digits" (A–F). a capital D would look identical to an 0 (or less likely O) and a capital B would look identical to an 8). effectively. Each of the numbers 0. It is an image sequence of a "LED" display. the seven segments are of nearly uniform shape and size (usually elongated hexagons. though trapezoids and rectangles can also be used).arranged in an oblique (slanted) arrangement. the vertical segments are longer and more oddly shaped at the ends in an effort to further enhance readability.The seven segments are arranged as a rectangle of two vertical segments on each side with one horizontal segment on the top. which is described technology-wise in the following section. MSRIT Page 3 . the seventh segment bisects the rectangle horizontally. the fewest required to represent each of the ten Hindu-Arabic numerals with a distinct and recognizable glyph. Seven segments are. 6. as shown to the right. Figure 1. angular blocks and serifs for segments. unambiguous shape for each letter (otherwise. Additionally. LED-based 7-segment display showing the 16 hex digits. Notice the variation between uppercase and lowercase letters for A–F. though in the case of adding machines. There are also fourteen-segment displays and sixteen-segment displays (for full alphanumeric). these have mostly been replaced by dot-matrix displays. Bloggers have experimented with six-segment and even five-segment displays with such novel shapes as curves. however.2 Decimal Numbers The segments of a 7-segment display are referred to by the letters A to G. of ECE. middle. 7 and 9 may be represented by two or more different glyphs on seven-segment displays. however.

“f”. “g” as well as a decimal point “dp”. “b”. In the 7 segment display all of the anodes are tied together. “c”. Consequently. we have to supply a positive voltage to the anode and Gnd to the respective cathode. Figure 1. every digit consists of 8 diodes. “e”.these often require complicated and/or non-uniform shapes and sometimes create unrecognizable glyphs. “d”. of ECE. So to light up a segment. In fact every segment (and the decimal point) is an LED (light emitting diode). MSRIT Page 4 . Dept. The two terminals of an LED are called the “anode” and the “cathode”. each digit of the display has 7 segments called “a”.3 7-Segment Display Format for Common Anode As illustrated in the figure.

For example if the line corresponding to „f „and „e‟ are activated then segments f and e of the display glows indicating a “1″. The “a” output of the decoder is connected to the input terminal (base/gate) of the corresponding switching element inside the driver stage. If the decoder stage is powerful enough to drive the display. If the input signal is digital then there is no need for the ADC and the decoder alone will convert the particular input code into the 8 line code compatible to the seven segment LED display. The same line is buffered by the switching element and is available as output line „a‟ of the driver. For example consider the line „a‟ . then the driver stage is not required. The driver can be arranged in sinking or sourcing mode. This output is connected to the corresponding „a‟ element of the display. The purpose of the driver stage is to provide the necessary current drive in order to drive the LED seven segment display. A typical 7 segment display driver stage consists of an array (8 nos ) transistor or FET based switches. MSRIT Page 5 .CHAPTER-2 OPERATION OF SEVEN SEGMENT Figure 2. Dept.1 Driver Circuit diagram for 7-Segment Display The decoder block converts the given input signal into an 8 line code corresponding to the „a‟ to „g‟ segments and the decimal point which controls the segments to display the desired number. If the input quantity is an anal ogue signal then it must be converter into digital format using an ADC before applying to the decoder. of ECE.

2 Numbers and Alphanumeric Characters BASIC LED OPERATIONS There are two types of LED 7-segment displays: common cathode (CC) and common anode (CA). CATHODE (‒) Dept. The difference between the two displays is the common cathode has all the cathodes of the 7-segments connected directly together and the common anode has all the anodes of the 7-segments connected together. To Turn an LED ON . 1. The amount of current flowing through the LED will determine the brightness of the LED. 2.SSD Display Possibilities Decimal Digits 0-9 Select Alpha Characters Simple Messages 4 Figure 2. MSRIT (+) ANODE ← Current Flow Page 6 . The ANODE must be at a higher voltage potential (1. 3. The amount of current is controlled by a series resistor. Shown below is a common anode seven segment. we must review how an LED works.5v) than the CATHODE. To understand how a seven-segment display works. of ECE. (not shown).

Synchronous counter ASYNCHRONOUS COUNTER A Digital counter in which all the Flip-Flops are not triggered simultaneously. of ECE. Since the clock pulse occur at fixed and known intervals. MSRIT Page 7 . In this counter.Flip-Flops are connected in such a way that output of Flip-Flop is fed to the successive Flip-Flop clock input. A counter can be described as tallying device that tallies or count some number of events. Asynchronous counter 2. the counter can be used as a digital instrument to measure time and therefore period or frequency. trailing edged triggered Flip-Flops are used . Dept.CHAPTER-3 COUNTER A counter is one of the most useful and versatile sub systems in a digital system.1 Counter used in counting of Cricket Balls TYPES OF COUNTERS Basically the counter is of two types 1. A counter is driven by a clock can be employed for counting the number of clock cycles. Figure 3.

input of flip-flop is obtained from its preceding flip-flop so trigger moves from first flip-flop to last flip-flop like a ripple in water that is why this counter is called the ripple counter. This drawback has been overcome in synchronous counter by triggering every flip flop in Dept. Therefore q0 goes from low to high . SYNCHRONOUS COUNTER The ripple counter is simplest to build. of ECE. So ff2 is not affected and hence the state of the counter after one clock pulse is 001.this becomes a positive going signal at the clock input of ff2. In this way it will count up to 111 at the seventh clock pulse.Figure 3. and at the eighth clock pulse all ff reset to 0. At the negative going edge of the second clock pulse ff1 toggles.2 Asynchronous Counter OPERATION OF SYNCHRONOUS COUNTER Three Trailing edge triggered flip.flops connected to form a asynchronous or ripple counter are shown. When the first clock pulse is applied ff1 toggles at the negative going edge of this pulse. activates ff2 and hence q1 goes from low to high thus we get output 010. The counter is initially reset to 000. In this counter. So q0 changes from high to low and this negative going signal applied to clock of ff 2. MSRIT Page 8 . but there is a limit to its highest operating frequency.

MSRIT Page 9 . Dept. Since in this counter. flip flop a toggles and output qa changes from logic 0 to 1. so output is 000.this does make any change in the output states of flip flop b and flip flop c because t input terminals of flip flop b and c were at logic 0. setting time is equal to the propagation delay time of a single flip flop.3 Synchronous Counter OPERATION OF SYNCHRONOUS COUNTER Circuit diagram of a 3-bit synchronous counter is shown above. All the flip-flop are triggered by the same clock signal. Flip-flop c supplied with the and gate a2. which also turns on and gate a1. Input terminal t of the flip flop a and b are at logic 1 before the arrival of second clock pulse. So it is called synchronous counter Figure 3. So in this counter. before the arrival of the first clock pulse. T-input terminal of flip-flop a is supplied with high level signal. and gate a2 turns on only when output of flip-flop b & and gate a1 are high and only during this period flip-flop c toggles. so flip-flop a toggles just at the end of every pulse. But just at the end of first clock pulse. so They toggle just at the end of second clock pulse.synchronism with the clock. and gate a1 turns on only output of flip-flop a is high and only during the outputs of flip-flop c for this duration flip-flop b toggles. In this counter two and gate are also used with three t-flip-flops. every flip flop is triggered in synchronism with the clock.t-input of flip-flop b is supplied with the and gate a1. of ECE. Initially all flip flop are reset to zero.

3.g. metalworking. Mechanical Counters OUTPUT Figure 3. plastic molding.APPLICATIONS 1. in calculators etc 2.4 Output of Seven Segment Display in Counting Process Dept. food processing. of ECE. These devices are used in the following type of machines: packaging. 4. production. MSRIT Page 10 . Totalizing counters. portable equipment and meters. Counters as the name suggest is specifically used where we need to do calculations e. printing. In Electronic preset counter. In generating sequential pulses.

Gupta. Eleventh Reprint 2007.P. "New frequency counting principle improves resolution" Dept. [6] Johansson. Modern Digital Electronics. Power Plant Signalling System. MSRIT Page 11 . Tata Mcgraw-Hill. [4] Warren O.REFERENCES [1] A Anand Kumar. of ECE.Jain. [3] J. [2] R. "Driving 7-Segment Displays”. Power and the Engineer. [5] Maxim Integrated.B. Rogers. Fundamentals Of Digital Circuits. Staffan. Electronics Devices And Circuits.

all. 1.op2. The libraries and entity: library ieee. Next. num: out std_logic_vector(6 downto 0)). use ieee. : in std_logic.numeric_std.op3: out std_logic_vector(6 downto 0)). use ieee. MSRIT Page 12 . 2.clk: in std_logic. end c09. determine the inputs and outputs for the problem. : out std_logic component seg7 port(m: in integer range 0 to 15. implement the design using VHDL in ISE 9. entity c09 is port ( rst. simulate your design and configure it into the board.1.std_logic_unsigned. Architecture count of c09 is component sec_clk Port ( clk rst op ). : in std_logic. op0. use ieee. Dept.std_logic_1164.VHDL CODE First. of ECE. end component.all.all.op1. end component. The architecture that describes input and output signal for various components.

c<=m2. signal d: integer range 0 to 10. d<=m3. begin if rst='0' then m0:=0. Signal declaration signal flag: std_logic. process(rst.3.flag). signal a: integer range 0 to 10. of ECE. Start our design using the next process for working with the user input. begin c1: sec_clk port map(clk. MSRIT Page 13 . m1:=0.rst. if m0 /= 9 then Dept. signal b: integer range 0 to 10. elsif flag'event and flag='1' then a<=m0. m3:=0. m2:=0. variable m2: integer range 0 to 10:=0. b<=m1.flag) variable m0: integer range 0 to 10:=0. signal c: integer range 0 to 10. variable m3: integer range 0 to 10:=0. 4. variable m1: integer range 0 to 10:=0.

end if. z3: seg7 port map(d.m0:= m0 + 1. elsif m3=9 then m0:=0. Finish the VHDL code. simulation and implementation of your counter. Dept.op1). z0: seg7 port map(a. 5. m3:=0.op0).op3).op2). m0:=0. elsif m2=9 and m3/= 9 and m0=9 and m1=9 then m1:=0. m2:=0. end process. of ECE. elsif m1=9 and m2 /= 9 and m0=9 then m1:=0. m0:=0. m3 := m3 + 1. end if. end count. z2: seg7 port map(c. z1: seg7 port map(b. m1:=0. m1:= m1 + 1. MSRIT Page 14 . elsif m0=9 and m1 /= 9 then m0:=0. m2:= m2 + 1. m2 :=0.