Proteus Simulation Interfacing of Seven Segment with Arduino


Seven Segment Display
Seven segment display is an electronic device used for displaying the numeric data. It’s a complex form of LED matrix and is normally used in clocks, LCD displays, calculators, etc where there’s a need to display the numeric data. It has total seven LEDs in it which you can also count from above image and by turning these LEDs ON or OFF.
The seven elements of the display can be lit in different combinations to represent the arabic numerals. Often the seven segments are arranged in an oblique (slanted) arrangement, which aids readability. In most applications, the seven segments are of nearly uniform shape and size (usually elongated hexagons, though trapezoids and rectangles can also be used), though in the case of adding machines, 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, middle, and bottom. Additionally, the seventh segment bisects the rectangle horizontally. There are also fourteen-segment displays and sixteen-segment displays (for full alphanumerics); however, these have mostly been replaced by dot matrix displays.
The segments of a seven segment display are referred to by the letters A to G, where the optional decimal point (an "eighth segment", referred to as DP) is used for the display of non-integer numbers.
In electronics there are two important types of seven segment LED digital display.
The Common Cathode Display (CCD), in the common cathode display, all the cathode connections of the LED’s are joined together to logic “0” or ground. The individual segments are illuminated by application of a “HIGH”, logic “1” signal to the individual anode terminals.
The Common Anode Display (CAD), in the common anode display, all the anode connections of the LED’s are joined together to logic “1” and the individual segments are illuminated by connecting the individual Cathode terminals to a “LOW”, logic “0” signal.

BCD to Seven Segment Display Decoder
Typically seven segment displays consist of seven individual coloured LED’s (called the segments), within one single display package. In order to produce the required numbers or HEX characters from 0 to 9 and A to F respectively, on the display the correct combination of LED segments need to be illuminated and BCD (Binary Coded Decimal) to seven segment display decoders such as the 74LS47 do just that.

<img src="7447_truth_table.png" alt="7447_truth_table">


A standard seven segment LED display generally has 8 input connections, one for each LED segment and one that acts as a common terminal or connection for all the internal display segments. Some single displays have also have an additional input pin to display a decimal point in their lower right or left hand corner.

<img src="arduino_seven_segment_proteus.png" alt="arduino_seven_segment_proteus">




Source Code
Here is the source code (sketch) for this Arduino project.

/*
Program seven segment display
dengan menggunakan library

Loki Lang
*/

#include <SegDisplay.h>

#define A 0
#define B 1
#define C 2
#define D 3
#define Enable 4
SegNumbers lang(A, B, C, D, Enable);

void setup()
{
}

void loop()
{
  lang.off();
  delay(1000);
  lang.zero();
  delay(1000);
  lang.one();
  delay(1000);
  lang.two();
  delay(1000);
  lang.three();
  delay(1000);
  lang.four();
  delay(1000);
  lang.five();
  delay(1000);
  lang.six();
  delay(1000);
  lang.seven();
  delay(1000);
  lang.eight();
  delay(1000);
  lang.nine();
  delay(1000);
}